0

It was all set a while ago,but got this error today.

Here is the debug log

2014-03-26T08:44:43+00:00 DEBUG (7): Array
(
    [try-0] => Array
    (
        [request] => <?xml version="1.0" encoding="UTF-8"?>
        <p:DCTRequest xmlns:p="http://www.dhl.com" xmlns:p1="http://www.dhl.com/datatypes" xmlns:p2="http://www.dhl.com/DCTRequestdatatypes" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.dhl.com DCT-req.xsd ">
            <GetQuote xmlns="">
                <Request>
                    <ServiceHeader>
                        <SiteID>AMPROSERVE</SiteID>
                        <Password>YourPwd</Password>
                    </ServiceHeader>
                </Request>
                <From>
                    <CountryCode>TW</CountryCode>
                    <Postalcode>42751</Postalcode>
                    <City>TANTZ</City>
                </From>
                <BkgDetails>
                    <PaymentCountryCode>TW</PaymentCountryCode>
                    <Date>2014-03-26</Date>
                    <ReadyTime>PT12H00M</ReadyTime>
                    <DimensionUnit>CM</DimensionUnit>
                    <WeightUnit>KG</WeightUnit>
                    <Pieces xmlns=""/>
                    <PaymentAccountNumber>YorNumber</PaymentAccountNumber>
                </BkgDetails>
                <To>
                    <CountryCode>US</CountryCode>
                    <Postalcode>02139</Postalcode>
                    <City>Cambridge</City>
                </To>
            </GetQuote></p:DCTRequest>

        [from_cache] => 1
        [response] => <?xml version="1.0" encoding="UTF-8"?>
                    <res:ErrorResponse xmlns:res='http://www.dhl.com' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:schemaLocation= 'http://www.dhl.com err-res.xsd'>
                    <Response>
                        <ServiceHeader>
                            <MessageTime>2014-03-26T08:44:16+00:00</MessageTime>
                            <SiteID>AMPROSERVE</SiteID>
                            <Password>AMPROSERVE</Password>
                        </ServiceHeader>
                        <Status>
                            <ActionStatus>Error</ActionStatus>
                            <Condition>
                                <ConditionCode>111</ConditionCode>
                                <ConditionData>Error in parsing request XML:Error: The
                                content of element type &quot;Pieces&quot; is
                                incomplete, it must match
                                &quot;(Piece,Piece?,Piece?,Piece?,Piece?,Piece?,Piece?,Piece?,Piece?,Piece?,Piece?,Piece?,Piece?,Piece?,Piece?,Piece?,Piece?,Piece?,Piece?,Piece?,Piece?,Piece?,Piece?,Piece?,Piece?,Piece?,Piece?,Piece?,Piece?,Piece?,Piece?,Piece?,Piece?,Piece?,Piece?,Piece?,Piece?,Piece?,Piece?,Piece?,Piece?,Piece?,Piece?,Piece?,Piece?,Piece?,Piece?,Piece?,Piece?,Piece?,Piece?,Piece?,Piece?,Piece?,Piece?,Piece?,Piece?,Piece?,Piece?,Piece?,Piece?,Piece?,Piece?,Piece?,Piece?,Piece?,Piece?,Piece?,Piece?,Piece?,Piece?,Piece?,Piece?,Piece?,Piece?,Piece?,Piece?,Piece?,Piece?,Piece?,Piece?,Piece?,Piece?,Piece?,Piece?,Piece?,Piece?,Piece?,Piece?,Piece?,Piece?,Piece?,Piece?,Piece?,Piece?,Piece?,Piece?,Piece?,Piece?)&quot;.
                                at line 2, column 658</ConditionData>
                            </Condition>
                        </Status>
                    </Response></res:ErrorResponse>
    )

    [__pid] => 770397
)

What's wrong with my request xml?

  • What was your fix for this? As I'm having similar issues? – andrew-caulfield Sep 28 '15 at 15:01
  • 1
    @AndrewCaulfield I set the values as the picture . You may have different error from me. Watch for the ConditionData column. – Wen Wei Sep 30 '15 at 6:29
1

Wild stab in the dark here but it looks like you need to provide a valid Pieces section in your request.

Have a look at the _makePieces function to see what exactly is going wrong and how you can fix it.

1

I had similar issue and the reason was that the products had no set weight.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.