亚马逊MWS _POST_ORDER_FULFILLMENT_DATA_未提交

时间:2014-12-19 15:32:17

标签: xml amazon-web-services amazon amazon-mws

我已经看了很长时间才发现我的XML结构有什么问题,但现在可能无法看到它。有人可以帮忙吗?

当我在Scratchpad中运行时,在尝试提交后,我不断收到“我们无法处理XML Feed,因为一个或多个项目无效。请重新提交Feed。”

<?xml version="1.0" encoding="UTF-8"?>
<AmazonEnvelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="amzn-envelope.xsd">
  <Header>
    <DocumentVersion>1.01</DocumentVersion>
    <MerchantIdentifier>XXXXXXXXXXXXX</MerchantIdentifier>
  </Header>
  <MessageType>OrderFulfillment</MessageType>
  <Message>
    <MessageID>1</MessageID>
    <OrderFulfillment>
      <OperationType>Update</OperationType>
      <AmazonOrderID>XXX-XXXXXXX-XXXXXXX</AmazonOrderID>
      <FulfillmentDate>2014-12-19T15:09:51+00:00</FulfillmentDate>
      <FulfillmentData>
        <CarrierName>FedEx</CarrierName>
        <ShippingMethod>Standard</ShippingMethod>
        <ShipperTrackingNumber>XXXXXXXX</ShipperTrackingNumber>
      </FulfillmentData>
      <Item>
        <AmazonOrderItemCode>XXXXXXXXXXXXXX</AmazonOrderItemCode>
        <Quantity>8</Quantity>
      </Item>
    </OrderFulfillment>
  </Message>
</AmazonEnvelope>

这是从样本的示例Feed中获取的:

<?xml version="1.0" encoding="UTF-8"?>
  <AmazonEnvelope xsi:noNamespaceSchemaLocation="amzn-envelope.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <Header>
    <DocumentVersion>1.01</DocumentVersion>
    <MerchantIdentifier>123456</MerchantIdentifier>
  </Header>
  <MessageType>OrderFulfillment</MessageType>
  <Message>
    <MessageID>1</MessageID>
    <OperationType>Update</OperationType>
    <OrderFulfillment>
      <AmazonOrderID>204-3070364-1550743</AmazonOrderID>
      <FulfillmentDate>2014-07-22T23:59:59-07:00</FulfillmentDate>
      <FulfillmentData>
        <CarrierName>Contact Us for Details</CarrierName>
        <ShippingMethod>Standard</ShippingMethod>
      </FulfillmentData>
      <Item>
        <AmazonOrderItemCode>42197908407194</AmazonOrderItemCode>
        <Quantity>1</Quantity>
      </Item>
    </OrderFulfillment>
  </Message>
</AmazonEnvelope>

我还删除了“更新”,因为我不确定XSD中是否需要这样做。

非常感谢任何帮助。

非常感谢,

杰森

2 个答案:

答案 0 :(得分:0)

查看此链接Amazon MWS Forum | Similar Stackoverflow Question

我唯一能注意到的是FulfillmentDate

<FulfillmentDate>2014-07-22T23:59:59-07:00</FulfillmentDate>

答案 1 :(得分:0)

OperationTypeMessage的一部分,不属于OrderFulfillment。切换第10行和第11行,如下所示:

<MessageID>1</MessageID>
<OperationType>Update</OperationType>
<OrderFulfillment>