Endicia创建标签返回163解析XML数据时出错

时间:2018-10-20 11:35:12

标签: php xml api curl xml-parsing

我们一直在努力使Endicia Label API正常工作,但我们一直在遇到多个错误。一种是获得邮资标签。

我们使用的URL:https://LabelServer.Endicia.com/LabelService/EwsLabelService.asmx/GetPostageLabelXML

我们正在通过cURL进行此操作。

我们的要求

<LabelRequest Test="NO" LabelType="Default" LabelSize="4x8" ImageFormat="GIF">
<WeightOz>2</WeightOz>
<MailpieceShape>Parcel</MailpieceShape>
<DeliveryConfirmation>on</DeliveryConfirmation>
<RequesterID>{$our_requested_id}</RequesterID>
<AccountID>{$our_account_id}</AccountID>
<PassPhrase>{$our_pass_phrase}</PassPhrase>
<ShowReturnAddress>TRUE</ShowReturnAddress>
<Stealth>TRUE</Stealth>
<Services InsuredMail="OFF" SignatureConfirmation="OFF" />
<Description>Confidential</Description>
<PartnerTransactionID>6001849164</PartnerTransactionID>
<ToName>james lastjames</ToName>
<ToAddress1>34 Fake st</ToAddress1>
<ToCity>Houston</ToCity>
<ToState>TX</ToState>
<ToPostalCode>77459</ToPostalCode>
<ToPhone>2025551212</ToPhone>
<FromName>My Application Help</FromName>
<FromCompany>MyApplicationHelp.com</FromCompany>
<ReturnAddress1>11821 S Sam Houston Pkwy W</ReturnAddress1>
<FromCity>Houston</FromCity>
<FromState>TX</FromState>
<FromPostalCode>770312360</FromPostalCode>
<FromPhone>7135551234</FromPhone>
</LabelRequest>

以及我们总是得到的答复:

<?xml version="1.0" encoding="utf-8"?>
<LabelRequestResponse xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="www.envmgr.com/LabelService">
<Status>163</Status>
<ErrorMessage>Error parsing XML data.
There is an error in XML document (7, 20). Error encountered (Log ID: 24249) 
</ErrorMessage>
<FinalPostage>0.0</FinalPostage>
<TransactionID>0</TransactionID>
<PostageBalance>0.00</PostageBalance>
<CostCenter>0</CostCenter>
<ReferenceID2 />
<ReferenceID3 />
<ReferenceID4 />
<SDRValue />
</LabelRequestResponse>

我们可能做错了什么? Endicia确认我们正在使用的帐户处于正式使用状态,但是在向我们发送示例请求和得到的回复后,我们已经有好几天没有收到他们的回音了。

我们非常感谢您的帮助。

0 个答案:

没有答案