• i get the DHL response:

    Array
    (
        [headers] => Requests_Utility_CaseInsensitiveDictionary Object
            (
                [data:protected] => Array
                    (
                        [date] => Thu, 29 Aug 2019 13:15:33 GMT
                        [content-type] => text/xml
                        [x-powered-by] => Servlet/3.0 JSP/2.2
                    )
    
            )
    
        [body] => <?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>2019-08-29T15:15:33.161+02:00</MessageTime>
                <MessageReference>1234567890123456789012345678901</MessageReference>
                <SiteID>xxxxxx</SiteID>
                <Password>xxxxxx</Password>
            </ServiceHeader>
            <Status>
                <ActionStatus>Error</ActionStatus>
                <Condition>
                    <ConditionCode>111</ConditionCode>
                    <ConditionData>Error in parsing request XML:Error: Datatype error: In element
                        &apos;GlobalProductCode&apos; : Value &apos;undefined&apos; does not match regular expression facet
                        &apos;([A-Z0-9])*&apos;.. at line 50, column 58</ConditionData>
                </Condition>
            </Status>
        </Response></res:ErrorResponse><!-- ServiceInvocationId:20190829151533_97ed_cc17c7a0-c4df-4c6f-9400-064b90625919 -->
    
        [response] => Array
            (
                [code] => 200
                [message] => OK
            )
    
        [cookies] => Array
            (
            )
    
        [filename] => 
        [http_response] => WP_HTTP_Requests_Response Object
            (
                [response:protected] => Requests_Response Object
                    (
                        [body] => <?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>2019-08-29T15:15:33.161+02:00</MessageTime>
                <MessageReference>1234567890123456789012345678901</MessageReference>
                <SiteID>xxxxx</SiteID>
                <Password>xxxxx</Password>
            </ServiceHeader>
            <Status>
                <ActionStatus>Error</ActionStatus>
                <Condition>
                    <ConditionCode>111</ConditionCode>
                    <ConditionData>Error in parsing request XML:Error: Datatype error: In element
                        &apos;GlobalProductCode&apos; : Value &apos;undefined&apos; does not match regular expression facet
                        &apos;([A-Z0-9])*&apos;.. at line 50, column 58</ConditionData>
                </Condition>
            </Status>
        </Response></res:ErrorResponse><!-- ServiceInvocationId:20190829151533_97ed_cc17c7a0-c4df-4c6f-9400-064b90625919 -->
    
                        [raw] => HTTP/1.1 200 OK
    Connection: close
    Date: Thu, 29 Aug 2019 13:15:33 GMT
    Content-Type: text/xml
    X-Powered-By: Servlet/3.0 JSP/2.2
    Transfer-Encoding: chunked
    
    <?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>2019-08-29T15:15:33.161+02:00</MessageTime>
                <MessageReference>1234567890123456789012345678901</MessageReference>
                <SiteID>xxxxxx</SiteID>
                <Password>xxxxxx</Password>
            </ServiceHeader>
            <Status>
                <ActionStatus>Error</ActionStatus>
                <Condition>
                    <ConditionCode>111</ConditionCode>
                    <ConditionData>Error in parsing request XML:Error: Datatype error: In element
                        &apos;GlobalProductCode&apos; : Value &apos;undefined&apos; does not match regular expression facet
                        &apos;([A-Z0-9])*&apos;.. at line 50, column 58</ConditionData>
                </Condition>
            </Status>
        </Response></res:ErrorResponse><!-- ServiceInvocationId:20190829151533_97ed_cc17c7a0-c4df-4c6f-9400-064b90625919 -->
    
                        [headers] => Requests_Response_Headers Object
                            (
                                [data:protected] => Array
                                    (
                                        [date] => Array
                                            (
                                                [0] => Thu, 29 Aug 2019 13:15:33 GMT
                                            )
    
                                        [content-type] => Array
                                            (
                                                [0] => text/xml
                                            )
    
                                        [x-powered-by] => Array
                                            (
                                                [0] => Servlet/3.0 JSP/2.2
                                            )
    
                                    )
    
                            )
    
                        [status_code] => 200
                        [protocol_version] => 1.1
                        [success] => 1
                        [redirects] => 0
                        [url] => https://xmlpitest-ea.dhl.com/XMLShippingServlet?isUTF8Support=true
                        [history] => Array
                            (
                            )
    
                        [cookies] => Requests_Cookie_Jar Object
                            (
                                [cookies:protected] => Array
                                    (
                                    )
    
                            )
    
                    )
    
                [filename:protected] => 
                [data] => 
                [headers] => 
                [status] => 
            )
    
    )

    the request is:

    <?xml version="1.0" encoding="UTF-8"?>
    <req:ShipmentRequest xmlns:req="http://www.dhl.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.dhl.com ship-val-global-req-6.0.xsd" schemaVersion="6.0">
        <Request>
            <ServiceHeader>
                <MessageTime>2019-08-29T14:15:30</MessageTime>
                <MessageReference>1234567890123456789012345678901</MessageReference>
                <SiteID>xxxx</SiteID>
                <Password>xxxxx</Password>
            </ServiceHeader>
        </Request>
        <RegionCode>EU</RegionCode>
        <RequestedPickupTime>Y</RequestedPickupTime>
        <LanguageCode>en</LanguageCode>
        <PiecesEnabled>Y</PiecesEnabled>
        <Billing>
            <ShipperAccountNumber>273969684</ShipperAccountNumber>
            <ShippingPaymentType>S</ShippingPaymentType>
            <BillingAccountNumber>273969684</BillingAccountNumber>
            
        </Billing>
        <Consignee>
            <CompanyName>Mendi Sterenfeld</CompanyName>
            <AddressLine>Alexanderplatz 5</AddressLine><AddressLine>6</AddressLine>
            <City>BERLIN</City>
            <PostalCode>10178</PostalCode>
            <CountryCode>DE</CountryCode>
            <CountryName>Germany</CountryName>
            <Contact>
                <PersonName>Mendi xxxxx</PersonName>
                <PhoneNumber>xxxxx</PhoneNumber>
                <Email>xxxx</Email>
            </Contact>
        </Consignee>
        <Commodity>
            <CommodityCode>cc</CommodityCode>
            <CommodityName>cn</CommodityName>
        </Commodity>
        
        
        <Reference>
            <ReferenceID>2349</ReferenceID>
        </Reference>
            <ShipmentDetails>
            <NumberOfPieces>1</NumberOfPieces>
            <Pieces>
                <Piece><PieceID>1</PieceID><PackageType>OD</PackageType><Weight>0.001</Weight></Piece>
            </Pieces>
            <Weight>0.001</Weight>
            <WeightUnit>K</WeightUnit>
            <strong><GlobalProductCode>undefined</GlobalProductCode>
            <LocalProductCode>undefined</LocalProductCode></strong>
            <Date>2019-08-29</Date>
            <Contents>NA</Contents>
            <DoorTo>DD</DoorTo>
            <DimensionUnit>C</DimensionUnit>
            
            <IsDutiable>N</IsDutiable>
            <CurrencyCode>EUR</CurrencyCode>
        </ShipmentDetails>
        <Shipper>
            <ShipperID>xxxx</ShipperID>
            <CompanyName>xxxx</CompanyName>
            <RegisteredAccount>xxxx</RegisteredAccount>
            <AddressLine>xxxxx</AddressLine>
            <AddressLine></AddressLine>
            <City>xxxx</City>
            <Division>xxxx</Division>
            <PostalCode>xxxx</PostalCode>
            <CountryCode>BE</CountryCode>
            <CountryName>Belgium</CountryName>
            <Contact>
                <PersonName>xxxxx</PersonName>
                <PhoneNumber>xxx</PhoneNumber>
                <Email>[email protected]</Email>
            </Contact>
        </Shipper>
        
        <Notification><EmailAddress>[email protected]</EmailAddress><Message></Message></Notification>
        
        <LabelImageFormat>PDF</LabelImageFormat>
        <RequestArchiveDoc>N</RequestArchiveDoc>
        
        
        <Label>
            <HideAccount>Y</HideAccount>
            <LabelTemplate>6X4_A4_PDF</LabelTemplate>
            <CustomerLogo>
        </Label>
    </req:ShipmentRequest>
    

The topic ‘DHL response error ‘GlobalProductCode’ is undefined’ is closed to new replies.