SOAP WSDL Generate Code

DPDPackageObjServicesServiceSoapBinding / generateShipmentV1

ASP AutoIt C C (Unicode) C++ C++ (Unicode) C# DataFlex Delphi Foxpro Go Java Node.js Objective-C Perl PHP Extension PowerBuilder Powershell PureBasic Python CkPython Ruby SQL Server Swift TCL VB.NET VB6 VBScript Xojo
$oXml = ObjCreate("Chilkat_9_5_0.Xml")
$oXml.Tag = "soapenv:Envelope"
$oXml.AddAttribute("xmlns:soapenv","http://schemas.xmlsoap.org/soap/envelope/")
$oXml.AddAttribute("xmlns:dpd","http://dpdservices.dpd.com.pl/")
$oXml.UpdateChildContent "soapenv:Header",""
$oXml.UpdateChildContent "soapenv:Body|dpd:generateShipmentV1|dpd:openUMLFeV10|dpd:packages|dpd:parcels|dpd:reference","string"
$oXml.UpdateChildContent "soapenv:Body|dpd:generateShipmentV1|dpd:openUMLFeV10|dpd:packages|dpd:parcels|dpd:weight","string"
$oXml.UpdateChildContent "soapenv:Body|dpd:generateShipmentV1|dpd:openUMLFeV10|dpd:packages|dpd:parcels|dpd:sizeX","string"
$oXml.UpdateChildContent "soapenv:Body|dpd:generateShipmentV1|dpd:openUMLFeV10|dpd:packages|dpd:parcels|dpd:sizeY","string"
$oXml.UpdateChildContent "soapenv:Body|dpd:generateShipmentV1|dpd:openUMLFeV10|dpd:packages|dpd:parcels|dpd:sizeZ","string"
$oXml.UpdateChildContent "soapenv:Body|dpd:generateShipmentV1|dpd:openUMLFeV10|dpd:packages|dpd:parcels|dpd:content","string"
$oXml.UpdateChildContent "soapenv:Body|dpd:generateShipmentV1|dpd:openUMLFeV10|dpd:packages|dpd:parcels|dpd:customerData1","string"
$oXml.UpdateChildContent "soapenv:Body|dpd:generateShipmentV1|dpd:openUMLFeV10|dpd:packages|dpd:parcels|dpd:customerData2","string"
$oXml.UpdateChildContent "soapenv:Body|dpd:generateShipmentV1|dpd:openUMLFeV10|dpd:packages|dpd:parcels|dpd:customerData3","string"
$oXml.UpdateChildContent "soapenv:Body|dpd:generateShipmentV1|dpd:openUMLFeV10|dpd:packages|dpd:parcels|dpd:weightAdr","string"
$oXml.UpdateChildContent "soapenv:Body|dpd:generateShipmentV1|dpd:openUMLFeV10|dpd:packages|dpd:parcels|dpd:waybill","string"
$oXml.UpdateChildContent "soapenv:Body|dpd:generateShipmentV1|dpd:openUMLFeV10|dpd:packages|dpd:payerType","RECEIVER"
$oXml.UpdateChildContent "soapenv:Body|dpd:generateShipmentV1|dpd:openUMLFeV10|dpd:packages|dpd:receiver|dpd:address","string"
$oXml.UpdateChildContent "soapenv:Body|dpd:generateShipmentV1|dpd:openUMLFeV10|dpd:packages|dpd:receiver|dpd:city","string"
$oXml.UpdateChildContent "soapenv:Body|dpd:generateShipmentV1|dpd:openUMLFeV10|dpd:packages|dpd:receiver|dpd:company","string"
$oXml.UpdateChildContent "soapenv:Body|dpd:generateShipmentV1|dpd:openUMLFeV10|dpd:packages|dpd:receiver|dpd:countryCode","string"
$oXml.UpdateChildContent "soapenv:Body|dpd:generateShipmentV1|dpd:openUMLFeV10|dpd:packages|dpd:receiver|dpd:email","string"
$oXml.UpdateChildContentInt "soapenv:Body|dpd:generateShipmentV1|dpd:openUMLFeV10|dpd:packages|dpd:receiver|dpd:fid",1042
$oXml.UpdateChildContent "soapenv:Body|dpd:generateShipmentV1|dpd:openUMLFeV10|dpd:packages|dpd:receiver|dpd:name","string"
$oXml.UpdateChildContent "soapenv:Body|dpd:generateShipmentV1|dpd:openUMLFeV10|dpd:packages|dpd:receiver|dpd:phone","string"
$oXml.UpdateChildContent "soapenv:Body|dpd:generateShipmentV1|dpd:openUMLFeV10|dpd:packages|dpd:receiver|dpd:postalCode","string"
$oXml.UpdateChildContent "soapenv:Body|dpd:generateShipmentV1|dpd:openUMLFeV10|dpd:packages|dpd:ref1","string"
$oXml.UpdateChildContent "soapenv:Body|dpd:generateShipmentV1|dpd:openUMLFeV10|dpd:packages|dpd:ref2","string"
$oXml.UpdateChildContent "soapenv:Body|dpd:generateShipmentV1|dpd:openUMLFeV10|dpd:packages|dpd:ref3","string"
$oXml.UpdateChildContent "soapenv:Body|dpd:generateShipmentV1|dpd:openUMLFeV10|dpd:packages|dpd:reference","string"
$oXml.UpdateChildContent "soapenv:Body|dpd:generateShipmentV1|dpd:openUMLFeV10|dpd:packages|dpd:sender|dpd:address","string"
$oXml.UpdateChildContent "soapenv:Body|dpd:generateShipmentV1|dpd:openUMLFeV10|dpd:packages|dpd:sender|dpd:city","string"
$oXml.UpdateChildContent "soapenv:Body|dpd:generateShipmentV1|dpd:openUMLFeV10|dpd:packages|dpd:sender|dpd:company","string"
$oXml.UpdateChildContent "soapenv:Body|dpd:generateShipmentV1|dpd:openUMLFeV10|dpd:packages|dpd:sender|dpd:countryCode","string"
$oXml.UpdateChildContent "soapenv:Body|dpd:generateShipmentV1|dpd:openUMLFeV10|dpd:packages|dpd:sender|dpd:email","string"
$oXml.UpdateChildContentInt "soapenv:Body|dpd:generateShipmentV1|dpd:openUMLFeV10|dpd:packages|dpd:sender|dpd:fid",1042
$oXml.UpdateChildContent "soapenv:Body|dpd:generateShipmentV1|dpd:openUMLFeV10|dpd:packages|dpd:sender|dpd:name","string"
$oXml.UpdateChildContent "soapenv:Body|dpd:generateShipmentV1|dpd:openUMLFeV10|dpd:packages|dpd:sender|dpd:phone","string"
$oXml.UpdateChildContent "soapenv:Body|dpd:generateShipmentV1|dpd:openUMLFeV10|dpd:packages|dpd:sender|dpd:postalCode","string"
$oXml.UpdateChildContent "soapenv:Body|dpd:generateShipmentV1|dpd:openUMLFeV10|dpd:packages|dpd:services|dpd:carryIn",""
$oXml.UpdateChildContent "soapenv:Body|dpd:generateShipmentV1|dpd:openUMLFeV10|dpd:packages|dpd:services|dpd:cod|dpd:amount","string"
$oXml.UpdateChildContent "soapenv:Body|dpd:generateShipmentV1|dpd:openUMLFeV10|dpd:packages|dpd:services|dpd:cod|dpd:currency","PLN"
$oXml.UpdateChildContent "soapenv:Body|dpd:generateShipmentV1|dpd:openUMLFeV10|dpd:packages|dpd:services|dpd:codDedicatedAccount|dpd:accountNumber","string"
$oXml.UpdateChildContent "soapenv:Body|dpd:generateShipmentV1|dpd:openUMLFeV10|dpd:packages|dpd:services|dpd:codDedicatedAccount|dpd:amount","string"
$oXml.UpdateChildContent "soapenv:Body|dpd:generateShipmentV1|dpd:openUMLFeV10|dpd:packages|dpd:services|dpd:codDedicatedAccount|dpd:currency","PLN"
$oXml.UpdateChildContent "soapenv:Body|dpd:generateShipmentV1|dpd:openUMLFeV10|dpd:packages|dpd:services|dpd:cud",""
$oXml.UpdateChildContent "soapenv:Body|dpd:generateShipmentV1|dpd:openUMLFeV10|dpd:packages|dpd:services|dpd:declaredValue|dpd:amount","string"
$oXml.UpdateChildContent "soapenv:Body|dpd:generateShipmentV1|dpd:openUMLFeV10|dpd:packages|dpd:services|dpd:declaredValue|dpd:currency","PLN"
$oXml.UpdateChildContent "soapenv:Body|dpd:generateShipmentV1|dpd:openUMLFeV10|dpd:packages|dpd:services|dpd:dedicatedDelivery",""
$oXml.UpdateChildContent "soapenv:Body|dpd:generateShipmentV1|dpd:openUMLFeV10|dpd:packages|dpd:services|dpd:digitalLabel",""
$oXml.UpdateChildContent "soapenv:Body|dpd:generateShipmentV1|dpd:openUMLFeV10|dpd:packages|dpd:services|dpd:documentsInternational",""
$oXml.UpdateChildContent "soapenv:Body|dpd:generateShipmentV1|dpd:openUMLFeV10|dpd:packages|dpd:services|dpd:dox",""
$oXml.UpdateChildContent "soapenv:Body|dpd:generateShipmentV1|dpd:openUMLFeV10|dpd:packages|dpd:services|dpd:dpdExpress",""
$oXml.UpdateChildContent "soapenv:Body|dpd:generateShipmentV1|dpd:openUMLFeV10|dpd:packages|dpd:services|dpd:dpdFood|dpd:limitDate","string"
$oXml.UpdateChildContent "soapenv:Body|dpd:generateShipmentV1|dpd:openUMLFeV10|dpd:packages|dpd:services|dpd:dpdLQ",""
$oXml.UpdateChildContent "soapenv:Body|dpd:generateShipmentV1|dpd:openUMLFeV10|dpd:packages|dpd:services|dpd:dpdPickup|dpd:pudo","string"
$oXml.UpdateChildContent "soapenv:Body|dpd:generateShipmentV1|dpd:openUMLFeV10|dpd:packages|dpd:services|dpd:duty|dpd:amount","string"
$oXml.UpdateChildContent "soapenv:Body|dpd:generateShipmentV1|dpd:openUMLFeV10|dpd:packages|dpd:services|dpd:duty|dpd:currency","PLN"
$oXml.UpdateChildContent "soapenv:Body|dpd:generateShipmentV1|dpd:openUMLFeV10|dpd:packages|dpd:services|dpd:guarantee|dpd:type","TIME0930"
$oXml.UpdateChildContent "soapenv:Body|dpd:generateShipmentV1|dpd:openUMLFeV10|dpd:packages|dpd:services|dpd:guarantee|dpd:value","string"
$oXml.UpdateChildContent "soapenv:Body|dpd:generateShipmentV1|dpd:openUMLFeV10|dpd:packages|dpd:services|dpd:inPers",""
$oXml.UpdateChildContent "soapenv:Body|dpd:generateShipmentV1|dpd:openUMLFeV10|dpd:packages|dpd:services|dpd:pallet",""
$oXml.UpdateChildContent "soapenv:Body|dpd:generateShipmentV1|dpd:openUMLFeV10|dpd:packages|dpd:services|dpd:privPers",""
$oXml.UpdateChildContent "soapenv:Body|dpd:generateShipmentV1|dpd:openUMLFeV10|dpd:packages|dpd:services|dpd:rod",""
$oXml.UpdateChildContent "soapenv:Body|dpd:generateShipmentV1|dpd:openUMLFeV10|dpd:packages|dpd:services|dpd:selfCol|dpd:receiver","PRIV"
$oXml.UpdateChildContent "soapenv:Body|dpd:generateShipmentV1|dpd:openUMLFeV10|dpd:packages|dpd:services|dpd:tires",""
$oXml.UpdateChildContent "soapenv:Body|dpd:generateShipmentV1|dpd:openUMLFeV10|dpd:packages|dpd:services|dpd:tiresExport",""
$oXml.UpdateChildContentInt "soapenv:Body|dpd:generateShipmentV1|dpd:openUMLFeV10|dpd:packages|dpd:thirdPartyFID",1042
$oXml.UpdateChildContent "soapenv:Body|dpd:generateShipmentV1|dpd:pkgNumsGenerationPolicyV1","STOP_ON_FIRST_ERROR"
$oXml.UpdateChildContent "soapenv:Body|dpd:generateShipmentV1|dpd:langCode","string"
$oXml.UpdateChildContent "soapenv:Body|dpd:generateShipmentV1|dpd:outputDocFormatV1","PDF"
$oXml.UpdateChildContent "soapenv:Body|dpd:generateShipmentV1|dpd:outputDocPageFormatV1","A4"
$oXml.UpdateChildContent "soapenv:Body|dpd:generateShipmentV1|dpd:outputLabelType","BIC3"
$oXml.UpdateChildContent "soapenv:Body|dpd:generateShipmentV1|dpd:labelVariant","string"
$oXml.UpdateChildContent "soapenv:Body|dpd:generateShipmentV1|dpd:authDataV1|dpd:login","string"
$oXml.UpdateChildContentInt "soapenv:Body|dpd:generateShipmentV1|dpd:authDataV1|dpd:masterFid",1042
$oXml.UpdateChildContent "soapenv:Body|dpd:generateShipmentV1|dpd:authDataV1|dpd:password","string"

; In a SOAP HTTP request, including the XML declaration (<?xml version="1.0" encoding="UTF-8"?>) in the XML body is generally not required. 
$oXml.EmitXmlDecl = False
Local $soapRequestBody = $oXml.GetXml()

Local $sEndpoint = "https://dpdservicesdemo.dpd.com.pl/DPDPackageObjServicesService/DPDPackageObjServices"
Local $soapAction = ""
;  For SOAP requests, the standard Content-Type is usually set to "text/xml" or "application/soap+xml"
Local $sContentType = "text/xml"

$oHttp = ObjCreate("Chilkat_9_5_0.Http")

$oHttp.ClearHeaders 
$oHttp.SetRequestHeader "Content-Type",$sContentType
$oHttp.SetRequestHeader "SOAPAction",$soapAction

Local $oResp = $oHttp.PostXml($sEndpoint,$soapRequestBody,"utf-8")
If ($oHttp.LastMethodSuccess = False) Then
    ConsoleWrite($oHttp.LastErrorText & @CRLF)
    ConsoleWrite("Failed to send SOAP request." & @CRLF)
    Exit
EndIf

; Get the XML response body.
$oResponseXml = ObjCreate("Chilkat_9_5_0.Xml")
$oResp.GetBodyXml($oResponseXml)

Local $iStatusCode = $oResp.StatusCode
ConsoleWrite("response status code: " & $iStatusCode & @CRLF)

; If the status code does not indicate succcess, then show the response XML,
; which probably contains error information.
If ($iStatusCode <> 200) Then
    ConsoleWrite($oResponseXml.GetXml() & @CRLF)
    Exit
EndIf

ConsoleWrite($oResponseXml.GetXml() & @CRLF)

; Parse the successful SOAP response XML.

; This is a sample of the response XML, but the namespace prefixes will be different.
; We can parse the result using "*" for the namespace prefixes (see below).

Local $sDocumentData = $oResponseXml.GetChildContent("*:Body|*:generateShipmentV1Response|*:return|*:documentData")
Local $sDocumentId = $oResponseXml.GetChildContent("*:Body|*:generateShipmentV1Response|*:return|*:documentId")
Local $iPackageId = $oResponseXml.GetChildIntValue("*:Body|*:generateShipmentV1Response|*:return|*:session|*:packages|*:packageId")
Local $iParcelId = $oResponseXml.GetChildIntValue("*:Body|*:generateShipmentV1Response|*:return|*:session|*:packages|*:parcels|*:parcelId")
Local $sReference = $oResponseXml.GetChildContent("*:Body|*:generateShipmentV1Response|*:return|*:session|*:packages|*:parcels|*:reference")
Local $sDescription = $oResponseXml.GetChildContent("*:Body|*:generateShipmentV1Response|*:return|*:session|*:packages|*:parcels|*:statusInfo|*:description")
Local $status = $oResponseXml.GetChildContent("*:Body|*:generateShipmentV1Response|*:return|*:session|*:packages|*:parcels|*:statusInfo|*:status")
Local $sWaybill = $oResponseXml.GetChildContent("*:Body|*:generateShipmentV1Response|*:return|*:session|*:packages|*:parcels|*:waybill")
$sReference = $oResponseXml.GetChildContent("*:Body|*:generateShipmentV1Response|*:return|*:session|*:packages|*:reference")
$sDescription = $oResponseXml.GetChildContent("*:Body|*:generateShipmentV1Response|*:return|*:session|*:packages|*:statusInfo|*:description")
$status = $oResponseXml.GetChildContent("*:Body|*:generateShipmentV1Response|*:return|*:session|*:packages|*:statusInfo|*:status")
Local $iSessionId = $oResponseXml.GetChildIntValue("*:Body|*:generateShipmentV1Response|*:return|*:session|*:sessionId")
$sDescription = $oResponseXml.GetChildContent("*:Body|*:generateShipmentV1Response|*:return|*:session|*:statusInfo|*:description")
$status = $oResponseXml.GetChildContent("*:Body|*:generateShipmentV1Response|*:return|*:session|*:statusInfo|*:status")
Request XML
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:dpd="http://dpdservices.dpd.com.pl/">
    <soapenv:Header/>
    <soapenv:Body>
        <dpd:generateShipmentV1>
            <dpd:openUMLFeV10>
                <dpd:packages>
                    <dpd:parcels>
                        <dpd:reference>string</dpd:reference>
                        <dpd:weight>string</dpd:weight>
                        <dpd:sizeX>string</dpd:sizeX>
                        <dpd:sizeY>string</dpd:sizeY>
                        <dpd:sizeZ>string</dpd:sizeZ>
                        <dpd:content>string</dpd:content>
                        <dpd:customerData1>string</dpd:customerData1>
                        <dpd:customerData2>string</dpd:customerData2>
                        <dpd:customerData3>string</dpd:customerData3>
                        <dpd:weightAdr>string</dpd:weightAdr>
                        <dpd:waybill>string</dpd:waybill>
                    </dpd:parcels>
                    <dpd:payerType>RECEIVER</dpd:payerType>
                    <dpd:receiver>
                        <dpd:address>string</dpd:address>
                        <dpd:city>string</dpd:city>
                        <dpd:company>string</dpd:company>
                        <dpd:countryCode>string</dpd:countryCode>
                        <dpd:email>string</dpd:email>
                        <dpd:fid>1042</dpd:fid>
                        <dpd:name>string</dpd:name>
                        <dpd:phone>string</dpd:phone>
                        <dpd:postalCode>string</dpd:postalCode>
                    </dpd:receiver>
                    <dpd:ref1>string</dpd:ref1>
                    <dpd:ref2>string</dpd:ref2>
                    <dpd:ref3>string</dpd:ref3>
                    <dpd:reference>string</dpd:reference>
                    <dpd:sender>
                        <dpd:address>string</dpd:address>
                        <dpd:city>string</dpd:city>
                        <dpd:company>string</dpd:company>
                        <dpd:countryCode>string</dpd:countryCode>
                        <dpd:email>string</dpd:email>
                        <dpd:fid>1042</dpd:fid>
                        <dpd:name>string</dpd:name>
                        <dpd:phone>string</dpd:phone>
                        <dpd:postalCode>string</dpd:postalCode>
                    </dpd:sender>
                    <dpd:services>
                        <dpd:carryIn/>
                        <dpd:cod>
                            <dpd:amount>string</dpd:amount>
                            <dpd:currency>PLN</dpd:currency>
                        </dpd:cod>
                        <dpd:codDedicatedAccount>
                            <dpd:accountNumber>string</dpd:accountNumber>
                            <dpd:amount>string</dpd:amount>
                            <dpd:currency>PLN</dpd:currency>
                        </dpd:codDedicatedAccount>
                        <dpd:cud/>
                        <dpd:declaredValue>
                            <dpd:amount>string</dpd:amount>
                            <dpd:currency>PLN</dpd:currency>
                        </dpd:declaredValue>
                        <dpd:dedicatedDelivery/>
                        <dpd:digitalLabel/>
                        <dpd:documentsInternational/>
                        <dpd:dox/>
                        <dpd:dpdExpress/>
                        <dpd:dpdFood>
                            <dpd:limitDate>string</dpd:limitDate>
                        </dpd:dpdFood>
                        <dpd:dpdLQ/>
                        <dpd:dpdPickup>
                            <dpd:pudo>string</dpd:pudo>
                        </dpd:dpdPickup>
                        <dpd:duty>
                            <dpd:amount>string</dpd:amount>
                            <dpd:currency>PLN</dpd:currency>
                        </dpd:duty>
                        <dpd:guarantee>
                            <dpd:type>TIME0930</dpd:type>
                            <dpd:value>string</dpd:value>
                        </dpd:guarantee>
                        <dpd:inPers/>
                        <dpd:pallet/>
                        <dpd:privPers/>
                        <dpd:rod/>
                        <dpd:selfCol>
                            <dpd:receiver>PRIV</dpd:receiver>
                        </dpd:selfCol>
                        <dpd:tires/>
                        <dpd:tiresExport/>
                    </dpd:services>
                    <dpd:thirdPartyFID>1042</dpd:thirdPartyFID>
                </dpd:packages>
            </dpd:openUMLFeV10>
            <dpd:pkgNumsGenerationPolicyV1>STOP_ON_FIRST_ERROR</dpd:pkgNumsGenerationPolicyV1>
            <dpd:langCode>string</dpd:langCode>
            <dpd:outputDocFormatV1>PDF</dpd:outputDocFormatV1>
            <dpd:outputDocPageFormatV1>A4</dpd:outputDocPageFormatV1>
            <dpd:outputLabelType>BIC3</dpd:outputLabelType>
            <dpd:labelVariant>string</dpd:labelVariant>
            <dpd:authDataV1>
                <dpd:login>string</dpd:login>
                <dpd:masterFid>1042</dpd:masterFid>
                <dpd:password>string</dpd:password>
            </dpd:authDataV1>
        </dpd:generateShipmentV1>
    </soapenv:Body>
</soapenv:Envelope>
Response XML
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:dpd="http://dpdservices.dpd.com.pl/">
    <soapenv:Header/>
    <soapenv:Body>
        <dpd:generateShipmentV1Response>
            <dpd:return>
                <dpd:documentData>BqozVXeZZg==</dpd:documentData>
                <dpd:documentId>string</dpd:documentId>
                <dpd:session>
                    <dpd:packages>
                        <dpd:packageId>123456</dpd:packageId>
                        <dpd:parcels>
                            <dpd:parcelId>123456</dpd:parcelId>
                            <dpd:reference>string</dpd:reference>
                            <dpd:statusInfo>
                                <dpd:description>string</dpd:description>
                                <dpd:status>OK</dpd:status>
                            </dpd:statusInfo>
                            <dpd:waybill>string</dpd:waybill>
                        </dpd:parcels>
                        <dpd:reference>string</dpd:reference>
                        <dpd:statusInfo>
                            <dpd:description>string</dpd:description>
                            <dpd:status>OK</dpd:status>
                        </dpd:statusInfo>
                    </dpd:packages>
                    <dpd:sessionId>123456</dpd:sessionId>
                    <dpd:statusInfo>
                        <dpd:description>string</dpd:description>
                        <dpd:status>OK</dpd:status>
                    </dpd:statusInfo>
                </dpd:session>
            </dpd:return>
        </dpd:generateShipmentV1Response>
    </soapenv:Body>
</soapenv:Envelope>