SOAP WSDL Generate Code

DPDPackageObjServicesServiceSoapBinding / generateShipmentV2

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
Add-Type -Path "C:\chilkat\ChilkatDotNet47-9.5.0-x64\ChilkatDotNet47.dll"

$xml = New-Object Chilkat.Xml
$xml.Tag = "soapenv:Envelope"
$xml.AddAttribute("xmlns:soapenv","http://schemas.xmlsoap.org/soap/envelope/")
$xml.AddAttribute("xmlns:dpd","http://dpdservices.dpd.com.pl/")
$xml.UpdateChildContent("soapenv:Header","")
$xml.UpdateChildContent("soapenv:Body|dpd:generateShipmentV2|dpd:openUMLFeV12|dpd:packages|dpd:reference","string")
$xml.UpdateChildContent("soapenv:Body|dpd:generateShipmentV2|dpd:openUMLFeV12|dpd:packages|dpd:receiver|dpd:address","string")
$xml.UpdateChildContent("soapenv:Body|dpd:generateShipmentV2|dpd:openUMLFeV12|dpd:packages|dpd:receiver|dpd:city","string")
$xml.UpdateChildContent("soapenv:Body|dpd:generateShipmentV2|dpd:openUMLFeV12|dpd:packages|dpd:receiver|dpd:company","string")
$xml.UpdateChildContent("soapenv:Body|dpd:generateShipmentV2|dpd:openUMLFeV12|dpd:packages|dpd:receiver|dpd:countryCode","string")
$xml.UpdateChildContent("soapenv:Body|dpd:generateShipmentV2|dpd:openUMLFeV12|dpd:packages|dpd:receiver|dpd:email","string")
$xml.UpdateChildContentInt("soapenv:Body|dpd:generateShipmentV2|dpd:openUMLFeV12|dpd:packages|dpd:receiver|dpd:fid",1042)
$xml.UpdateChildContent("soapenv:Body|dpd:generateShipmentV2|dpd:openUMLFeV12|dpd:packages|dpd:receiver|dpd:name","string")
$xml.UpdateChildContent("soapenv:Body|dpd:generateShipmentV2|dpd:openUMLFeV12|dpd:packages|dpd:receiver|dpd:phone","string")
$xml.UpdateChildContent("soapenv:Body|dpd:generateShipmentV2|dpd:openUMLFeV12|dpd:packages|dpd:receiver|dpd:postalCode","string")
$xml.UpdateChildContent("soapenv:Body|dpd:generateShipmentV2|dpd:openUMLFeV12|dpd:packages|dpd:sender|dpd:address","string")
$xml.UpdateChildContent("soapenv:Body|dpd:generateShipmentV2|dpd:openUMLFeV12|dpd:packages|dpd:sender|dpd:city","string")
$xml.UpdateChildContent("soapenv:Body|dpd:generateShipmentV2|dpd:openUMLFeV12|dpd:packages|dpd:sender|dpd:company","string")
$xml.UpdateChildContent("soapenv:Body|dpd:generateShipmentV2|dpd:openUMLFeV12|dpd:packages|dpd:sender|dpd:countryCode","string")
$xml.UpdateChildContent("soapenv:Body|dpd:generateShipmentV2|dpd:openUMLFeV12|dpd:packages|dpd:sender|dpd:email","string")
$xml.UpdateChildContentInt("soapenv:Body|dpd:generateShipmentV2|dpd:openUMLFeV12|dpd:packages|dpd:sender|dpd:fid",1042)
$xml.UpdateChildContent("soapenv:Body|dpd:generateShipmentV2|dpd:openUMLFeV12|dpd:packages|dpd:sender|dpd:name","string")
$xml.UpdateChildContent("soapenv:Body|dpd:generateShipmentV2|dpd:openUMLFeV12|dpd:packages|dpd:sender|dpd:phone","string")
$xml.UpdateChildContent("soapenv:Body|dpd:generateShipmentV2|dpd:openUMLFeV12|dpd:packages|dpd:sender|dpd:postalCode","string")
$xml.UpdateChildContent("soapenv:Body|dpd:generateShipmentV2|dpd:openUMLFeV12|dpd:packages|dpd:Payertype","RECEIVER")
$xml.UpdateChildContentInt("soapenv:Body|dpd:generateShipmentV2|dpd:openUMLFeV12|dpd:packages|dpd:Thirdpartyfid",1042)
$xml.UpdateChildContent("soapenv:Body|dpd:generateShipmentV2|dpd:openUMLFeV12|dpd:packages|dpd:ref1","string")
$xml.UpdateChildContent("soapenv:Body|dpd:generateShipmentV2|dpd:openUMLFeV12|dpd:packages|dpd:ref2","string")
$xml.UpdateChildContent("soapenv:Body|dpd:generateShipmentV2|dpd:openUMLFeV12|dpd:packages|dpd:ref3","string")
$xml.UpdateChildContent("soapenv:Body|dpd:generateShipmentV2|dpd:openUMLFeV12|dpd:packages|dpd:services|dpd:carryIn","")
$xml.UpdateChildContent("soapenv:Body|dpd:generateShipmentV2|dpd:openUMLFeV12|dpd:packages|dpd:services|dpd:cod|dpd:amount","string")
$xml.UpdateChildContent("soapenv:Body|dpd:generateShipmentV2|dpd:openUMLFeV12|dpd:packages|dpd:services|dpd:cod|dpd:currency","PLN")
$xml.UpdateChildContent("soapenv:Body|dpd:generateShipmentV2|dpd:openUMLFeV12|dpd:packages|dpd:services|dpd:codDedicatedAccount|dpd:accountNumber","string")
$xml.UpdateChildContent("soapenv:Body|dpd:generateShipmentV2|dpd:openUMLFeV12|dpd:packages|dpd:services|dpd:codDedicatedAccount|dpd:amount","string")
$xml.UpdateChildContent("soapenv:Body|dpd:generateShipmentV2|dpd:openUMLFeV12|dpd:packages|dpd:services|dpd:codDedicatedAccount|dpd:currency","PLN")
$xml.UpdateChildContent("soapenv:Body|dpd:generateShipmentV2|dpd:openUMLFeV12|dpd:packages|dpd:services|dpd:cud","")
$xml.UpdateChildContent("soapenv:Body|dpd:generateShipmentV2|dpd:openUMLFeV12|dpd:packages|dpd:services|dpd:declaredValue|dpd:amount","string")
$xml.UpdateChildContent("soapenv:Body|dpd:generateShipmentV2|dpd:openUMLFeV12|dpd:packages|dpd:services|dpd:declaredValue|dpd:currency","PLN")
$xml.UpdateChildContent("soapenv:Body|dpd:generateShipmentV2|dpd:openUMLFeV12|dpd:packages|dpd:services|dpd:dedicatedDelivery","")
$xml.UpdateChildContent("soapenv:Body|dpd:generateShipmentV2|dpd:openUMLFeV12|dpd:packages|dpd:services|dpd:digitalLabel","")
$xml.UpdateChildContent("soapenv:Body|dpd:generateShipmentV2|dpd:openUMLFeV12|dpd:packages|dpd:services|dpd:documentsInternational","")
$xml.UpdateChildContent("soapenv:Body|dpd:generateShipmentV2|dpd:openUMLFeV12|dpd:packages|dpd:services|dpd:dox","")
$xml.UpdateChildContent("soapenv:Body|dpd:generateShipmentV2|dpd:openUMLFeV12|dpd:packages|dpd:services|dpd:dpdExpress","")
$xml.UpdateChildContent("soapenv:Body|dpd:generateShipmentV2|dpd:openUMLFeV12|dpd:packages|dpd:services|dpd:dpdFood|dpd:limitDate","string")
$xml.UpdateChildContent("soapenv:Body|dpd:generateShipmentV2|dpd:openUMLFeV12|dpd:packages|dpd:services|dpd:dpdLQ","")
$xml.UpdateChildContent("soapenv:Body|dpd:generateShipmentV2|dpd:openUMLFeV12|dpd:packages|dpd:services|dpd:dpdPickup|dpd:pudo","string")
$xml.UpdateChildContent("soapenv:Body|dpd:generateShipmentV2|dpd:openUMLFeV12|dpd:packages|dpd:services|dpd:duty|dpd:amount","string")
$xml.UpdateChildContent("soapenv:Body|dpd:generateShipmentV2|dpd:openUMLFeV12|dpd:packages|dpd:services|dpd:duty|dpd:currency","PLN")
$xml.UpdateChildContent("soapenv:Body|dpd:generateShipmentV2|dpd:openUMLFeV12|dpd:packages|dpd:services|dpd:guarantee|dpd:type","TIME0930")
$xml.UpdateChildContent("soapenv:Body|dpd:generateShipmentV2|dpd:openUMLFeV12|dpd:packages|dpd:services|dpd:guarantee|dpd:value","string")
$xml.UpdateChildContent("soapenv:Body|dpd:generateShipmentV2|dpd:openUMLFeV12|dpd:packages|dpd:services|dpd:inPers","")
$xml.UpdateChildContent("soapenv:Body|dpd:generateShipmentV2|dpd:openUMLFeV12|dpd:packages|dpd:services|dpd:pallet","")
$xml.UpdateChildContent("soapenv:Body|dpd:generateShipmentV2|dpd:openUMLFeV12|dpd:packages|dpd:services|dpd:privPers","")
$xml.UpdateChildContent("soapenv:Body|dpd:generateShipmentV2|dpd:openUMLFeV12|dpd:packages|dpd:services|dpd:pudoToSend","")
$xml.UpdateChildContent("soapenv:Body|dpd:generateShipmentV2|dpd:openUMLFeV12|dpd:packages|dpd:services|dpd:rod","")
$xml.UpdateChildContent("soapenv:Body|dpd:generateShipmentV2|dpd:openUMLFeV12|dpd:packages|dpd:services|dpd:selfCol|dpd:receiver","PRIV")
$xml.UpdateChildContent("soapenv:Body|dpd:generateShipmentV2|dpd:openUMLFeV12|dpd:packages|dpd:services|dpd:tires","")
$xml.UpdateChildContent("soapenv:Body|dpd:generateShipmentV2|dpd:openUMLFeV12|dpd:packages|dpd:services|dpd:tiresExport","")
$xml.UpdateChildContent("soapenv:Body|dpd:generateShipmentV2|dpd:openUMLFeV12|dpd:packages|dpd:parcels|dpd:reference","string")
$xml.UpdateChildContent("soapenv:Body|dpd:generateShipmentV2|dpd:openUMLFeV12|dpd:packages|dpd:parcels|dpd:weight","string")
$xml.UpdateChildContent("soapenv:Body|dpd:generateShipmentV2|dpd:openUMLFeV12|dpd:packages|dpd:parcels|dpd:sizeX","string")
$xml.UpdateChildContent("soapenv:Body|dpd:generateShipmentV2|dpd:openUMLFeV12|dpd:packages|dpd:parcels|dpd:sizeY","string")
$xml.UpdateChildContent("soapenv:Body|dpd:generateShipmentV2|dpd:openUMLFeV12|dpd:packages|dpd:parcels|dpd:sizeZ","string")
$xml.UpdateChildContent("soapenv:Body|dpd:generateShipmentV2|dpd:openUMLFeV12|dpd:packages|dpd:parcels|dpd:content","string")
$xml.UpdateChildContent("soapenv:Body|dpd:generateShipmentV2|dpd:openUMLFeV12|dpd:packages|dpd:parcels|dpd:customerData1","string")
$xml.UpdateChildContent("soapenv:Body|dpd:generateShipmentV2|dpd:openUMLFeV12|dpd:packages|dpd:parcels|dpd:customerData2","string")
$xml.UpdateChildContent("soapenv:Body|dpd:generateShipmentV2|dpd:openUMLFeV12|dpd:packages|dpd:parcels|dpd:customerData3","string")
$xml.UpdateChildContent("soapenv:Body|dpd:generateShipmentV2|dpd:openUMLFeV12|dpd:packages|dpd:parcels|dpd:weightAdr","string")
$xml.UpdateChildContent("soapenv:Body|dpd:generateShipmentV2|dpd:openUMLFeV12|dpd:packages|dpd:parcels|dpd:waybill","string")
$xml.UpdateChildContent("soapenv:Body|dpd:generateShipmentV2|dpd:openUMLFeV12|dpd:parser","")
$xml.UpdateChildContent("soapenv:Body|dpd:generateShipmentV2|dpd:pkgNumsGenerationPolicyV1","STOP_ON_FIRST_ERROR")
$xml.UpdateChildContent("soapenv:Body|dpd:generateShipmentV2|dpd:langCode","string")
$xml.UpdateChildContent("soapenv:Body|dpd:generateShipmentV2|dpd:outputDocFormatV1","PDF")
$xml.UpdateChildContent("soapenv:Body|dpd:generateShipmentV2|dpd:outputDocPageFormatV1","A4")
$xml.UpdateChildContent("soapenv:Body|dpd:generateShipmentV2|dpd:outputLabelType","BIC3")
$xml.UpdateChildContent("soapenv:Body|dpd:generateShipmentV2|dpd:labelVariant","string")
$xml.UpdateChildContent("soapenv:Body|dpd:generateShipmentV2|dpd:authDataV1|dpd:login","string")
$xml.UpdateChildContentInt("soapenv:Body|dpd:generateShipmentV2|dpd:authDataV1|dpd:masterFid",1042)
$xml.UpdateChildContent("soapenv:Body|dpd:generateShipmentV2|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. 
$xml.EmitXmlDecl = $false
$soapRequestBody = $xml.GetXml()

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

$http = New-Object Chilkat.Http

$http.ClearHeaders()
$http.SetRequestHeader("Content-Type",$contentType)
$http.SetRequestHeader("SOAPAction",$soapAction)

$resp = $http.PostXml($endpoint,$soapRequestBody,"utf-8")
if ($http.LastMethodSuccess -eq $false) {
    $($http.LastErrorText)
    $("Failed to send SOAP request.")
    exit
}

# Get the XML response body.
$responseXml = New-Object Chilkat.Xml
$resp.GetBodyXml($responseXml)

$statusCode = $resp.StatusCode
$("response status code: " + $statusCode)

# If the status code does not indicate succcess, then show the response XML,
# which probably contains error information.
if ($statusCode -ne 200) {
    $($responseXml.GetXml())
    exit
}

$($responseXml.GetXml())

# 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).

$documentData = $responseXml.GetChildContent("*:Body|*:generateShipmentV2Response|*:return|*:documentData")
$documentId = $responseXml.GetChildContent("*:Body|*:generateShipmentV2Response|*:return|*:documentId")
$packageId = $responseXml.GetChildIntValue("*:Body|*:generateShipmentV2Response|*:return|*:session|*:packages|*:packageId")
$parcelId = $responseXml.GetChildIntValue("*:Body|*:generateShipmentV2Response|*:return|*:session|*:packages|*:parcels|*:parcelId")
$reference = $responseXml.GetChildContent("*:Body|*:generateShipmentV2Response|*:return|*:session|*:packages|*:parcels|*:reference")
$description = $responseXml.GetChildContent("*:Body|*:generateShipmentV2Response|*:return|*:session|*:packages|*:parcels|*:statusInfo|*:description")
$status = $responseXml.GetChildContent("*:Body|*:generateShipmentV2Response|*:return|*:session|*:packages|*:parcels|*:statusInfo|*:status")
$waybill = $responseXml.GetChildContent("*:Body|*:generateShipmentV2Response|*:return|*:session|*:packages|*:parcels|*:waybill")
$reference = $responseXml.GetChildContent("*:Body|*:generateShipmentV2Response|*:return|*:session|*:packages|*:reference")
$description = $responseXml.GetChildContent("*:Body|*:generateShipmentV2Response|*:return|*:session|*:packages|*:statusInfo|*:description")
$status = $responseXml.GetChildContent("*:Body|*:generateShipmentV2Response|*:return|*:session|*:packages|*:statusInfo|*:status")
$sessionId = $responseXml.GetChildIntValue("*:Body|*:generateShipmentV2Response|*:return|*:session|*:sessionId")
$description = $responseXml.GetChildContent("*:Body|*:generateShipmentV2Response|*:return|*:session|*:statusInfo|*:description")
$status = $responseXml.GetChildContent("*:Body|*:generateShipmentV2Response|*: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:generateShipmentV2>
            <dpd:openUMLFeV12>
                <dpd:packages>
                    <dpd:reference>string</dpd:reference>
                    <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: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:Payertype>RECEIVER</dpd:Payertype>
                    <dpd:Thirdpartyfid>1042</dpd:Thirdpartyfid>
                    <dpd:ref1>string</dpd:ref1>
                    <dpd:ref2>string</dpd:ref2>
                    <dpd:ref3>string</dpd:ref3>
                    <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:pudoToSend/>
                        <dpd:rod/>
                        <dpd:selfCol>
                            <dpd:receiver>PRIV</dpd:receiver>
                        </dpd:selfCol>
                        <dpd:tires/>
                        <dpd:tiresExport/>
                    </dpd:services>
                    <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:packages>
                <dpd:parser/>
            </dpd:openUMLFeV12>
            <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:generateShipmentV2>
    </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:generateShipmentV2Response>
            <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:generateShipmentV2Response>
    </soapenv:Body>
</soapenv:Envelope>