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
load ./chilkat.dll
set xml [new_CkXml]
CkXml_put_Tag $xml "soapenv:Envelope"
CkXml_AddAttribute $xml "xmlns:soapenv" "http://schemas.xmlsoap.org/soap/envelope/"
CkXml_AddAttribute $xml "xmlns:dpd" "http://dpdservices.dpd.com.pl/"
CkXml_UpdateChildContent $xml "soapenv:Header" ""
CkXml_UpdateChildContent $xml "soapenv:Body|dpd:generateShipmentV2|dpd:openUMLFeV12|dpd:packages|dpd:reference" "string"
CkXml_UpdateChildContent $xml "soapenv:Body|dpd:generateShipmentV2|dpd:openUMLFeV12|dpd:packages|dpd:receiver|dpd:address" "string"
CkXml_UpdateChildContent $xml "soapenv:Body|dpd:generateShipmentV2|dpd:openUMLFeV12|dpd:packages|dpd:receiver|dpd:city" "string"
CkXml_UpdateChildContent $xml "soapenv:Body|dpd:generateShipmentV2|dpd:openUMLFeV12|dpd:packages|dpd:receiver|dpd:company" "string"
CkXml_UpdateChildContent $xml "soapenv:Body|dpd:generateShipmentV2|dpd:openUMLFeV12|dpd:packages|dpd:receiver|dpd:countryCode" "string"
CkXml_UpdateChildContent $xml "soapenv:Body|dpd:generateShipmentV2|dpd:openUMLFeV12|dpd:packages|dpd:receiver|dpd:email" "string"
CkXml_UpdateChildContentInt $xml "soapenv:Body|dpd:generateShipmentV2|dpd:openUMLFeV12|dpd:packages|dpd:receiver|dpd:fid" 1042
CkXml_UpdateChildContent $xml "soapenv:Body|dpd:generateShipmentV2|dpd:openUMLFeV12|dpd:packages|dpd:receiver|dpd:name" "string"
CkXml_UpdateChildContent $xml "soapenv:Body|dpd:generateShipmentV2|dpd:openUMLFeV12|dpd:packages|dpd:receiver|dpd:phone" "string"
CkXml_UpdateChildContent $xml "soapenv:Body|dpd:generateShipmentV2|dpd:openUMLFeV12|dpd:packages|dpd:receiver|dpd:postalCode" "string"
CkXml_UpdateChildContent $xml "soapenv:Body|dpd:generateShipmentV2|dpd:openUMLFeV12|dpd:packages|dpd:sender|dpd:address" "string"
CkXml_UpdateChildContent $xml "soapenv:Body|dpd:generateShipmentV2|dpd:openUMLFeV12|dpd:packages|dpd:sender|dpd:city" "string"
CkXml_UpdateChildContent $xml "soapenv:Body|dpd:generateShipmentV2|dpd:openUMLFeV12|dpd:packages|dpd:sender|dpd:company" "string"
CkXml_UpdateChildContent $xml "soapenv:Body|dpd:generateShipmentV2|dpd:openUMLFeV12|dpd:packages|dpd:sender|dpd:countryCode" "string"
CkXml_UpdateChildContent $xml "soapenv:Body|dpd:generateShipmentV2|dpd:openUMLFeV12|dpd:packages|dpd:sender|dpd:email" "string"
CkXml_UpdateChildContentInt $xml "soapenv:Body|dpd:generateShipmentV2|dpd:openUMLFeV12|dpd:packages|dpd:sender|dpd:fid" 1042
CkXml_UpdateChildContent $xml "soapenv:Body|dpd:generateShipmentV2|dpd:openUMLFeV12|dpd:packages|dpd:sender|dpd:name" "string"
CkXml_UpdateChildContent $xml "soapenv:Body|dpd:generateShipmentV2|dpd:openUMLFeV12|dpd:packages|dpd:sender|dpd:phone" "string"
CkXml_UpdateChildContent $xml "soapenv:Body|dpd:generateShipmentV2|dpd:openUMLFeV12|dpd:packages|dpd:sender|dpd:postalCode" "string"
CkXml_UpdateChildContent $xml "soapenv:Body|dpd:generateShipmentV2|dpd:openUMLFeV12|dpd:packages|dpd:Payertype" "RECEIVER"
CkXml_UpdateChildContentInt $xml "soapenv:Body|dpd:generateShipmentV2|dpd:openUMLFeV12|dpd:packages|dpd:Thirdpartyfid" 1042
CkXml_UpdateChildContent $xml "soapenv:Body|dpd:generateShipmentV2|dpd:openUMLFeV12|dpd:packages|dpd:ref1" "string"
CkXml_UpdateChildContent $xml "soapenv:Body|dpd:generateShipmentV2|dpd:openUMLFeV12|dpd:packages|dpd:ref2" "string"
CkXml_UpdateChildContent $xml "soapenv:Body|dpd:generateShipmentV2|dpd:openUMLFeV12|dpd:packages|dpd:ref3" "string"
CkXml_UpdateChildContent $xml "soapenv:Body|dpd:generateShipmentV2|dpd:openUMLFeV12|dpd:packages|dpd:services|dpd:carryIn" ""
CkXml_UpdateChildContent $xml "soapenv:Body|dpd:generateShipmentV2|dpd:openUMLFeV12|dpd:packages|dpd:services|dpd:cod|dpd:amount" "string"
CkXml_UpdateChildContent $xml "soapenv:Body|dpd:generateShipmentV2|dpd:openUMLFeV12|dpd:packages|dpd:services|dpd:cod|dpd:currency" "PLN"
CkXml_UpdateChildContent $xml "soapenv:Body|dpd:generateShipmentV2|dpd:openUMLFeV12|dpd:packages|dpd:services|dpd:codDedicatedAccount|dpd:accountNumber" "string"
CkXml_UpdateChildContent $xml "soapenv:Body|dpd:generateShipmentV2|dpd:openUMLFeV12|dpd:packages|dpd:services|dpd:codDedicatedAccount|dpd:amount" "string"
CkXml_UpdateChildContent $xml "soapenv:Body|dpd:generateShipmentV2|dpd:openUMLFeV12|dpd:packages|dpd:services|dpd:codDedicatedAccount|dpd:currency" "PLN"
CkXml_UpdateChildContent $xml "soapenv:Body|dpd:generateShipmentV2|dpd:openUMLFeV12|dpd:packages|dpd:services|dpd:cud" ""
CkXml_UpdateChildContent $xml "soapenv:Body|dpd:generateShipmentV2|dpd:openUMLFeV12|dpd:packages|dpd:services|dpd:declaredValue|dpd:amount" "string"
CkXml_UpdateChildContent $xml "soapenv:Body|dpd:generateShipmentV2|dpd:openUMLFeV12|dpd:packages|dpd:services|dpd:declaredValue|dpd:currency" "PLN"
CkXml_UpdateChildContent $xml "soapenv:Body|dpd:generateShipmentV2|dpd:openUMLFeV12|dpd:packages|dpd:services|dpd:dedicatedDelivery" ""
CkXml_UpdateChildContent $xml "soapenv:Body|dpd:generateShipmentV2|dpd:openUMLFeV12|dpd:packages|dpd:services|dpd:digitalLabel" ""
CkXml_UpdateChildContent $xml "soapenv:Body|dpd:generateShipmentV2|dpd:openUMLFeV12|dpd:packages|dpd:services|dpd:documentsInternational" ""
CkXml_UpdateChildContent $xml "soapenv:Body|dpd:generateShipmentV2|dpd:openUMLFeV12|dpd:packages|dpd:services|dpd:dox" ""
CkXml_UpdateChildContent $xml "soapenv:Body|dpd:generateShipmentV2|dpd:openUMLFeV12|dpd:packages|dpd:services|dpd:dpdExpress" ""
CkXml_UpdateChildContent $xml "soapenv:Body|dpd:generateShipmentV2|dpd:openUMLFeV12|dpd:packages|dpd:services|dpd:dpdFood|dpd:limitDate" "string"
CkXml_UpdateChildContent $xml "soapenv:Body|dpd:generateShipmentV2|dpd:openUMLFeV12|dpd:packages|dpd:services|dpd:dpdLQ" ""
CkXml_UpdateChildContent $xml "soapenv:Body|dpd:generateShipmentV2|dpd:openUMLFeV12|dpd:packages|dpd:services|dpd:dpdPickup|dpd:pudo" "string"
CkXml_UpdateChildContent $xml "soapenv:Body|dpd:generateShipmentV2|dpd:openUMLFeV12|dpd:packages|dpd:services|dpd:duty|dpd:amount" "string"
CkXml_UpdateChildContent $xml "soapenv:Body|dpd:generateShipmentV2|dpd:openUMLFeV12|dpd:packages|dpd:services|dpd:duty|dpd:currency" "PLN"
CkXml_UpdateChildContent $xml "soapenv:Body|dpd:generateShipmentV2|dpd:openUMLFeV12|dpd:packages|dpd:services|dpd:guarantee|dpd:type" "TIME0930"
CkXml_UpdateChildContent $xml "soapenv:Body|dpd:generateShipmentV2|dpd:openUMLFeV12|dpd:packages|dpd:services|dpd:guarantee|dpd:value" "string"
CkXml_UpdateChildContent $xml "soapenv:Body|dpd:generateShipmentV2|dpd:openUMLFeV12|dpd:packages|dpd:services|dpd:inPers" ""
CkXml_UpdateChildContent $xml "soapenv:Body|dpd:generateShipmentV2|dpd:openUMLFeV12|dpd:packages|dpd:services|dpd:pallet" ""
CkXml_UpdateChildContent $xml "soapenv:Body|dpd:generateShipmentV2|dpd:openUMLFeV12|dpd:packages|dpd:services|dpd:privPers" ""
CkXml_UpdateChildContent $xml "soapenv:Body|dpd:generateShipmentV2|dpd:openUMLFeV12|dpd:packages|dpd:services|dpd:pudoToSend" ""
CkXml_UpdateChildContent $xml "soapenv:Body|dpd:generateShipmentV2|dpd:openUMLFeV12|dpd:packages|dpd:services|dpd:rod" ""
CkXml_UpdateChildContent $xml "soapenv:Body|dpd:generateShipmentV2|dpd:openUMLFeV12|dpd:packages|dpd:services|dpd:selfCol|dpd:receiver" "PRIV"
CkXml_UpdateChildContent $xml "soapenv:Body|dpd:generateShipmentV2|dpd:openUMLFeV12|dpd:packages|dpd:services|dpd:tires" ""
CkXml_UpdateChildContent $xml "soapenv:Body|dpd:generateShipmentV2|dpd:openUMLFeV12|dpd:packages|dpd:services|dpd:tiresExport" ""
CkXml_UpdateChildContent $xml "soapenv:Body|dpd:generateShipmentV2|dpd:openUMLFeV12|dpd:packages|dpd:parcels|dpd:reference" "string"
CkXml_UpdateChildContent $xml "soapenv:Body|dpd:generateShipmentV2|dpd:openUMLFeV12|dpd:packages|dpd:parcels|dpd:weight" "string"
CkXml_UpdateChildContent $xml "soapenv:Body|dpd:generateShipmentV2|dpd:openUMLFeV12|dpd:packages|dpd:parcels|dpd:sizeX" "string"
CkXml_UpdateChildContent $xml "soapenv:Body|dpd:generateShipmentV2|dpd:openUMLFeV12|dpd:packages|dpd:parcels|dpd:sizeY" "string"
CkXml_UpdateChildContent $xml "soapenv:Body|dpd:generateShipmentV2|dpd:openUMLFeV12|dpd:packages|dpd:parcels|dpd:sizeZ" "string"
CkXml_UpdateChildContent $xml "soapenv:Body|dpd:generateShipmentV2|dpd:openUMLFeV12|dpd:packages|dpd:parcels|dpd:content" "string"
CkXml_UpdateChildContent $xml "soapenv:Body|dpd:generateShipmentV2|dpd:openUMLFeV12|dpd:packages|dpd:parcels|dpd:customerData1" "string"
CkXml_UpdateChildContent $xml "soapenv:Body|dpd:generateShipmentV2|dpd:openUMLFeV12|dpd:packages|dpd:parcels|dpd:customerData2" "string"
CkXml_UpdateChildContent $xml "soapenv:Body|dpd:generateShipmentV2|dpd:openUMLFeV12|dpd:packages|dpd:parcels|dpd:customerData3" "string"
CkXml_UpdateChildContent $xml "soapenv:Body|dpd:generateShipmentV2|dpd:openUMLFeV12|dpd:packages|dpd:parcels|dpd:weightAdr" "string"
CkXml_UpdateChildContent $xml "soapenv:Body|dpd:generateShipmentV2|dpd:openUMLFeV12|dpd:packages|dpd:parcels|dpd:waybill" "string"
CkXml_UpdateChildContent $xml "soapenv:Body|dpd:generateShipmentV2|dpd:openUMLFeV12|dpd:parser" ""
CkXml_UpdateChildContent $xml "soapenv:Body|dpd:generateShipmentV2|dpd:pkgNumsGenerationPolicyV1" "STOP_ON_FIRST_ERROR"
CkXml_UpdateChildContent $xml "soapenv:Body|dpd:generateShipmentV2|dpd:langCode" "string"
CkXml_UpdateChildContent $xml "soapenv:Body|dpd:generateShipmentV2|dpd:outputDocFormatV1" "PDF"
CkXml_UpdateChildContent $xml "soapenv:Body|dpd:generateShipmentV2|dpd:outputDocPageFormatV1" "A4"
CkXml_UpdateChildContent $xml "soapenv:Body|dpd:generateShipmentV2|dpd:outputLabelType" "BIC3"
CkXml_UpdateChildContent $xml "soapenv:Body|dpd:generateShipmentV2|dpd:labelVariant" "string"
CkXml_UpdateChildContent $xml "soapenv:Body|dpd:generateShipmentV2|dpd:authDataV1|dpd:login" "string"
CkXml_UpdateChildContentInt $xml "soapenv:Body|dpd:generateShipmentV2|dpd:authDataV1|dpd:masterFid" 1042
CkXml_UpdateChildContent $xml "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.
CkXml_put_EmitXmlDecl $xml 0
set soapRequestBody [CkXml_getXml $xml]
set endpoint "https://dpdservicesdemo.dpd.com.pl/DPDPackageObjServicesService/DPDPackageObjServices"
set soapAction ""
# For SOAP requests, the standard Content-Type is usually set to "text/xml" or "application/soap+xml"
set contentType "text/xml"
set http [new_CkHttp]
CkHttp_ClearHeaders $http
CkHttp_SetRequestHeader $http "Content-Type" $contentType
CkHttp_SetRequestHeader $http "SOAPAction" $soapAction
# resp is a CkHttpResponse
set resp [CkHttp_PostXml $http $endpoint $soapRequestBody "utf-8"]
if {[CkHttp_get_LastMethodSuccess $http] == 0} then {
puts [CkHttp_lastErrorText $http]
puts "Failed to send SOAP request."
delete_CkXml $xml
delete_CkHttp $http
exit
}
# Get the XML response body.
set responseXml [new_CkXml]
CkHttpResponse_GetBodyXml $resp $responseXml
set statusCode [CkHttpResponse_get_StatusCode $resp]
puts "response status code: $statusCode"
delete_CkHttpResponse $resp
# If the status code does not indicate succcess, then show the response XML,
# which probably contains error information.
if {$statusCode != 200} then {
puts [CkXml_getXml $responseXml]
delete_CkXml $xml
delete_CkHttp $http
delete_CkXml $responseXml
exit
}
puts [CkXml_getXml $responseXml]
# 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).
set documentData [CkXml_getChildContent $responseXml "*:Body|*:generateShipmentV2Response|*:return|*:documentData"]
set documentId [CkXml_getChildContent $responseXml "*:Body|*:generateShipmentV2Response|*:return|*:documentId"]
set packageId [CkXml_GetChildIntValue $responseXml "*:Body|*:generateShipmentV2Response|*:return|*:session|*:packages|*:packageId"]
set parcelId [CkXml_GetChildIntValue $responseXml "*:Body|*:generateShipmentV2Response|*:return|*:session|*:packages|*:parcels|*:parcelId"]
set reference [CkXml_getChildContent $responseXml "*:Body|*:generateShipmentV2Response|*:return|*:session|*:packages|*:parcels|*:reference"]
set description [CkXml_getChildContent $responseXml "*:Body|*:generateShipmentV2Response|*:return|*:session|*:packages|*:parcels|*:statusInfo|*:description"]
set status [CkXml_getChildContent $responseXml "*:Body|*:generateShipmentV2Response|*:return|*:session|*:packages|*:parcels|*:statusInfo|*:status"]
set waybill [CkXml_getChildContent $responseXml "*:Body|*:generateShipmentV2Response|*:return|*:session|*:packages|*:parcels|*:waybill"]
set reference [CkXml_getChildContent $responseXml "*:Body|*:generateShipmentV2Response|*:return|*:session|*:packages|*:reference"]
set description [CkXml_getChildContent $responseXml "*:Body|*:generateShipmentV2Response|*:return|*:session|*:packages|*:statusInfo|*:description"]
set status [CkXml_getChildContent $responseXml "*:Body|*:generateShipmentV2Response|*:return|*:session|*:packages|*:statusInfo|*:status"]
set sessionId [CkXml_GetChildIntValue $responseXml "*:Body|*:generateShipmentV2Response|*:return|*:session|*:sessionId"]
set description [CkXml_getChildContent $responseXml "*:Body|*:generateShipmentV2Response|*:return|*:session|*:statusInfo|*:description"]
set status [CkXml_getChildContent $responseXml "*:Body|*:generateShipmentV2Response|*:return|*:session|*:statusInfo|*:status"]
delete_CkXml $xml
delete_CkHttp $http
delete_CkXml $responseXml
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>