Help with FEDEX Web Services

1
0
-1

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 )

 

 

Question Tags: 

Answers

Daryl Foster answered Help with FEDEX Web Services

1
0
-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

Alfredo Santibanez's picture

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