FedEx Tracking via SOAP using TrackService_v8 exam

2019-08-07 18:14发布

I haveing trouble figuring out how to use Fedex's example file on tracking. I've got it communicateing with their test server, but I'm trying to get 'INCLUDE_DETAILED_SCANS' information from it. I can't figure out what syntax, of what to put to include it. I've found...

  <xs:simpleType name="TrackRequestProcessingOptionType">
    <xs:restriction base="xs:string">
      <xs:enumeration value="INCLUDE_DETAILED_SCANS"/>
    </xs:restriction>
  </xs:simpleType>

So I've tried all sorts of variations of stuff like

    $request['TrackRequestProcessingOptionType']=array('INCLUDE_DETAILED_SCANS' => true );

but I'm not getting anything extra. Has anybody used this... what am I missing? I'm just not understanding how it's using the TrackService_v8 file very well. I'm about to just change tactics and try writing it similar to an Ebay project I did which involved using curl and transmitting XML... although this might be slower...

Full code of request:

$request['WebAuthenticationDetail'] = array(
    'UserCredential' =>array(
        'Key' => 'asdfasdf', 
        'Password' => 'asdfasasdf'
    )
);
$request['ClientDetail'] = array(
    'AccountNumber' => 'asdfasdf', 
    'MeterNumber' => 'asdfas'
);
$request['TransactionDetail'] = array('CustomerTransactionId' => '*** Track Request v8 using PHP ***');
$request['Version'] = array(
    'ServiceId' => 'trck', 
    'Major' => '8', 
    'Intermediate' => '0', 
    'Minor' => '0'
);
$request['TrackRequestProcessingOptionType']=array('INCLUDE_DETAILED_SCANS' => true );
$request['SelectionDetails'] = array(
    'CarrierCode' => 'FDXE',
    'PackageIdentifier' => array(
        'Type' => 'TRACKING_NUMBER_OR_DOORTAG',
        'Value' => 'asdfasdf' // Replace 'XXX' with a valid tracking identifier
    )
);

Thank you in advance.

标签: php xml soap fedex
0条回答
登录 后发表回答