1. Alfredo Santibanez
  2. PowerBuilder
  3. Monday, 22 May 2017 16:40 PM UTC

Hi, I am trying to get tracking information from FEDEX SOAP webservices, but receiving an array boundary execeed run time error setting the package number info with request.selectiondetails[0] =trackselectiondetail.  Using PB 12.6 Classic

Only example found on the web is https://archive.sap.com/discussions/thread/3286488.  But using the same syntax returns errors, for example request.ws_WebAuthenticationDetail.UserCredential.Key = "XXX"

Any Help on this topic?

Best Regards

Alfredo

 

The complete code to try to get the tracking is:

long     ll_rc
ws_trackservice  lnv_trackservice
ws_trackrequest request
ws_clientdetail  clientdetail
ws_WebAuthenticationDetail WebAuthenticationDetail
ws_webauthenticationcredential usercredential
ws_transactiondetail transactiondetail
ws_trackselectiondetail trackselectiondetail
string                              ls_response = ""
SoapConnection           conn
conn = create SoapConnection
ll_rc = conn.CreateInstance(lnv_trackservice, "ws_trackservice" )  

usercredential = create ws_webauthenticationcredential
UserCredential.Key = "BPPOeHgXCoYD0TFG "
UserCredential.Password = "BjZxsHvozzRwCBME4wP8OGl5x"
webauthenticationdetail= create ws_WebAuthenticationDetail
webauthenticationdetail.usercredential=usercredential
clientdetail = create ws_clientdetail 
clientdetail.accountnumber="XXXXXX681"
clientdetail.meternumber="111066861"
transactiondetail = create ws_transactiondetail
transactiondetail.customertransactionid="XX"
ws_trackpackageidentifier trackpackageidentifier
trackpackageidentifier =  create ws_trackpackageidentifier
trackpackageidentifier.value= "779111292640"

trackselectiondetail = create ws_trackselectiondetail
trackselectiondetail.packageidentifier=trackpackageidentifier
trackselectiondetail.shipdaterangebeginspecified=false
trackselectiondetail.shipdaterangeendspecified=false
request = create ws_trackrequest
request.webauthenticationdetail=webauthenticationdetail
request.clientdetail=clientdetail
request.transactiondetail=transactiondetail
request.selectiondetails[0] =trackselectiondetail
lnv_Trackreply= lnv_Trackservice.track( request )

 

 

Daryl Foster Accepted Answer Pending Moderation
  1. Monday, 22 May 2017 23:33 PM UTC
  2. PowerBuilder
  3. # 1

I don't think arrays in PB Classic are zero based like in C# so maybe you need to use 1 as your array subscript?

Instead of:

request.selectiondetails[0] =trackselectiondetail

would it work with:

request.selectiondetails[1] =trackselectiondetail

Comment
  1. Alfredo Santibanez
  2. Tuesday, 23 May 2017 14:46 PM UTC
Thanks, it works now.



But SOAP web service returns error CS0029: Cannot implicitly convert type  'WebService.NotificationEventType' en 'WebService.NotificationEventType[]'



Seems to be a problem with the WSDL, looking for a solution



Thanks



 



 



 

  1. Helpful
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.
We use cookies which are necessary for the proper functioning of our websites. We also use cookies to analyze our traffic, improve your experience and provide social media features. If you continue to use this site, you consent to our use of cookies.