我正在尝试向 UPS 跟踪 API 发送测试,但我不断收到以下错误
SoapFault: Wrong Version in...
以下是我发送的请求文件
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:ns1="http://www.ups.com/XMLSchema/XOLTWS/Common/v1.0"
xmlns:ns2="http://www.ups.com/XMLSchema/XOLTWS/Track/v2.0"
xmlns:ns3="http://www.ups.com/XMLSchema/XOLTWS/UPSS/v1.0">
<SOAP-ENV:Header>
<ns3:UPSSecurity>
<ns3:UsernameToken>
<ns3:Username>username</ns3:Username>
<ns3:Password>password</ns3:Password>
</ns3:UsernameToken>
<ns3:ServiceAccessToken>
<ns3:AccessLicenseNumber>855566598C34</ns3:AccessLicenseNumber>
</ns3:ServiceAccessToken>
</ns3:UPSSecurity>
</SOAP-ENV:Header>
<SOAP-ENV:Body>
<ns2:TrackRequest>
<ns1:Request>
<ns1:RequestOption>15</ns1:RequestOption>
<ns1:TransactionReference>
<ns1:CustomerContext>Add description here</ns1:CustomerContext>
</ns1:TransactionReference>
</ns1:Request>
<ns2:InquiryNumber></ns2:InquiryNumber>
<ns2:TrackingOption>02</ns2:TrackingOption>
</ns2:TrackRequest>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
以下是我的 xml 响应
<?xml version="1.0"?>
<TrackResponse>
<Response>
<ResponseStatusCode>0</ResponseStatusCode>
<ResponseStatusDescription>Failure</ResponseStatusDescription>
<Error>
<ErrorSeverity>Hard</ErrorSeverity>
<ErrorCode>10002</ErrorCode>
<ErrorDescription>The XML document is well formed but the document is not valid</ErrorDescription>
</Error>
</Response>
</TrackResponse>