php - Fedex Web Services: ERROR 9040 - Can't pull up tracking -


i'm having issues attempting pull tracking info using fedex's web services. using valid tracking number , i'm able view details on fedex's site. however, error 9040 "no information following shipments has been received our system yet. please try again or contact customer service @ 1.800.go.fedex(r) 800.463.3339." leaving out?

my code:

<?php  $path_to_wsdl = "url_to_wsdl"; ini_set("soap.wsdl_cache_enabled", "0");  $client = new soapclient($path_to_wsdl, array('trace' => 1));  $request['webauthenticationdetail'] = array(     'usercredential' =>array(         'key' => 'my_key',          'password' => 'my_password'     ) ); $request['clientdetail'] = array(     'accountnumber' => 'my_acct',      'meternumber' => 'my_meter' ); $request['transactiondetail'] = array('customertransactionid' => 'activeshipping'); $request['version'] = array(     'serviceid' => 'trck',      'major' => '5',      'intermediate' => '0',      'minor' => '0' ); $request['packageidentifier'] = array(     'value' => 'tracking#',     'type' => 'tracking_number_or_doortag');  $response = $client->track($request); var_dump($response);   ?> 

got it!

call web services departement , told me remove 'beta' wsdl file. appears different address found in responses problem before. on line 1507 of wsdl file, make following change:

from:

<s1:address location="https://wsbeta.fedex.com:443/web-services/track"/> 

to

<s1:address location="https://ws.fedex.com:443/web-services/track"/> 

i changed rest of code slightly, shouldn't have made difference. on safe side, here is:

<?php $path_to_wsdl = "path_to_wsdl_file";  $client = new soapclient($path_to_wsdl, array('trace' => 1));  $trackrequest = array(     'webauthenticationdetail' => array(         'usercredential' => array(             'key'      => 'my_key',             'password' => 'my_password'         )     ),     'clientdetail' => array(         'accountnumber' => 'my_acct_#',         'meternumber'   => 'my_meter_#'     ),     'version' => array(         'serviceid'    => 'trck',         'major'        => '5',         'intermediate' => '0',         'minor'        => '0'     ),     'packageidentifier' => array(         'type'  => 'tracking_number_or_doortag',         'value' => 'the_tracking_#',     ),     'customertrasactionid',     'includedetailedscans' => 1 ); $response = $client->track($trackrequest); var_dump($response);  ?> 

Comments

Popular posts from this blog

django - How can I change user group without delete record -

java - Need to add SOAP security token -

java - EclipseLink JPA Object is not a known entity type -