UPS Shipping API - ShipmentConfirmRequest Error

我只是一个虾纸丫 提交于 2019-12-05 05:38:17
Jusmark123

It was the service code container it must be included in the package container. I had it before it. Took me quite a while to figure out this dumb mistake on my part.

Before:

...
<Service>
    <Code>03</Code>
</Service>
<Package>
    ...

After:

...
<Package>
    <Service>
        <Code>03</Code>
    </Service>
    ...

Thanks for the help, and yes UPS requires a strange XML format.

The XML processing instruction appears twice:

<?xml version="1.0" ?>

This indicates the presence of two distinct XML documnents:

<?xml version="1.0" ?>
<AccessRequest xml:lang='en-US'>
  <AccessLicenseNumber>******</AccessLicenseNumber>
  <UserId>********</UserId>
  <Password>********</Password>
</AccessRequest>

and

<?xml version="1.0" ?>
<ShipConfirmRequest xml:lang='en-US'>
  <Request>
    <TransactionReference>
      <CustomerContext>Customer Context</CustomerContext>
      <XpciVersion>1.0</XpciVersion>
    </TransactionReference>
    <RequestAction>ShipConfirm</RequestAction>
    <RequestOption>validate</RequestOption>
  </Request>
  <!-- ... -->
</ShipConfirmRequest>
标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!