如何获得完整的跟踪信息 (Fedex Webservices)?
How to get full tracking info (Fedex Webservices)?
如果我使用网站 (https://www.fedex.com) 的 Fedex 追踪工具,我可以看到每个 activity 及其详细信息(如位置)。但是,当我使用 Fedex Webservice 时,我没有得到相同的信息。我只获取当前状态的详细信息,但我还需要获取以前状态的详细信息。
在文档中没有描述标志或我需要添加到我的请求中以检索 Fedex 网站中的完整信息的内容。
这是我在请求中发送的 SOAP 信封。
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:v16="http://fedex.com/ws/track/v16">
<soapenv:Header/>
<soapenv:Body>
<v16:TrackRequest>
<v16:WebAuthenticationDetail>
<v16:UserCredential>
<v16:Key>XXXXXXXXXXX</v16:Key>
<v16:Password>XXXXXXXXX</v16:Password>
</v16:UserCredential>
</v16:WebAuthenticationDetail>
<v16:ClientDetail>
<v16:AccountNumber>XXXXXXXXX</v16:AccountNumber>
<v16:MeterNumber>XXXXXXXXXXX</v16:MeterNumber>
</v16:ClientDetail>
<v16:TransactionDetail>
<v16:CustomerTransactionId>Track By Number_v16</v16:CustomerTransactionId>
<v16:Localization>
<v16:LanguageCode>EN</v16:LanguageCode>
<v16:LocaleCode>US</v16:LocaleCode>
</v16:Localization>
</v16:TransactionDetail>
<v16:Version>
<v16:ServiceId>trck</v16:ServiceId>
<v16:Major>16</v16:Major>
<v16:Intermediate>0</v16:Intermediate>
<v16:Minor>0</v16:Minor>
</v16:Version>
<v16:SelectionDetails>
<v16:CarrierCode>FDXE</v16:CarrierCode>
<v16:PackageIdentifier>
<v16:Type>TRACKING_NUMBER_OR_DOORTAG</v16:Type>
<v16:Value>783202918813</v16:Value>
</v16:PackageIdentifier>
<v16:PagingDetail></v16:PagingDetail>
<v16:SecureSpodAccount/>
<v16:Destination>
</v16:Destination>
</v16:SelectionDetails>
</v16:TrackRequest>
</soapenv:Body>
</soapenv:Envelope>
根据 this documentation I found(第 606 页),您需要在 TrackRequest
上包含一个 ProcessingOptions
对象,并将 INCLUDE_DETAILED_SCANS
的值设置为 TRUE
.
If FALSE (the default), the reply will contain
summary/profile data including current status.
If TRUE, the reply will contain profile and detailed scan
activity (multiple TrackDetail objects) for each package.
转化为
<v16:ProcessingOptions>INCLUDE_DETAILED_SCANS</v16:ProcessingOptions>
在您的 SOAP 请求中。
如果我使用网站 (https://www.fedex.com) 的 Fedex 追踪工具,我可以看到每个 activity 及其详细信息(如位置)。但是,当我使用 Fedex Webservice 时,我没有得到相同的信息。我只获取当前状态的详细信息,但我还需要获取以前状态的详细信息。 在文档中没有描述标志或我需要添加到我的请求中以检索 Fedex 网站中的完整信息的内容。
这是我在请求中发送的 SOAP 信封。
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:v16="http://fedex.com/ws/track/v16">
<soapenv:Header/>
<soapenv:Body>
<v16:TrackRequest>
<v16:WebAuthenticationDetail>
<v16:UserCredential>
<v16:Key>XXXXXXXXXXX</v16:Key>
<v16:Password>XXXXXXXXX</v16:Password>
</v16:UserCredential>
</v16:WebAuthenticationDetail>
<v16:ClientDetail>
<v16:AccountNumber>XXXXXXXXX</v16:AccountNumber>
<v16:MeterNumber>XXXXXXXXXXX</v16:MeterNumber>
</v16:ClientDetail>
<v16:TransactionDetail>
<v16:CustomerTransactionId>Track By Number_v16</v16:CustomerTransactionId>
<v16:Localization>
<v16:LanguageCode>EN</v16:LanguageCode>
<v16:LocaleCode>US</v16:LocaleCode>
</v16:Localization>
</v16:TransactionDetail>
<v16:Version>
<v16:ServiceId>trck</v16:ServiceId>
<v16:Major>16</v16:Major>
<v16:Intermediate>0</v16:Intermediate>
<v16:Minor>0</v16:Minor>
</v16:Version>
<v16:SelectionDetails>
<v16:CarrierCode>FDXE</v16:CarrierCode>
<v16:PackageIdentifier>
<v16:Type>TRACKING_NUMBER_OR_DOORTAG</v16:Type>
<v16:Value>783202918813</v16:Value>
</v16:PackageIdentifier>
<v16:PagingDetail></v16:PagingDetail>
<v16:SecureSpodAccount/>
<v16:Destination>
</v16:Destination>
</v16:SelectionDetails>
</v16:TrackRequest>
</soapenv:Body>
</soapenv:Envelope>
根据 this documentation I found(第 606 页),您需要在 TrackRequest
上包含一个 ProcessingOptions
对象,并将 INCLUDE_DETAILED_SCANS
的值设置为 TRUE
.
If FALSE (the default), the reply will contain summary/profile data including current status.
If TRUE, the reply will contain profile and detailed scan activity (multiple TrackDetail objects) for each package.
转化为
<v16:ProcessingOptions>INCLUDE_DETAILED_SCANS</v16:ProcessingOptions>
在您的 SOAP 请求中。