SOAP WSDL Generate Code

DPDPackageObjServicesServiceSoapBinding / packagesPickupCallV2

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
var os = require('os');
if (os.platform() == 'win32') {  
    if (os.arch() == 'ia32') {
        var chilkat = require('@chilkat/ck-node21-win-ia32');
    } else {
        var chilkat = require('@chilkat/ck-node21-win64'); 
    }
} else if (os.platform() == 'linux') {
    if (os.arch() == 'arm') {
        var chilkat = require('@chilkat/ck-node21-arm');
    } else if (os.arch() == 'x86') {
        var chilkat = require('@chilkat/ck-node21-linux32');
    } else {
        var chilkat = require('@chilkat/ck-node21-linux64');
    }
} else if (os.platform() == 'darwin') {
    if (os.arch() == 'arm64') {
        var chilkat = require('@chilkat/ck-node21-mac-m1');
    } else {
        var chilkat = require('@chilkat/ck-node21-macosx');
    }
}


function chilkatExample() {

    var xml = new 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:packagesPickupCallV2|dpd:dpdPickupParamsV2|dpd:operationType","INSERT");
    xml.UpdateChildContent("soapenv:Body|dpd:packagesPickupCallV2|dpd:dpdPickupParamsV2|dpd:orderNumber","string");
    xml.UpdateChildContent("soapenv:Body|dpd:packagesPickupCallV2|dpd:dpdPickupParamsV2|dpd:orderType","DOMESTIC");
    xml.UpdateChildContent("soapenv:Body|dpd:packagesPickupCallV2|dpd:dpdPickupParamsV2|dpd:pickupCallSimplifiedDetails|dpd:packagesParams|dpd:dox","true");
    xml.UpdateChildContentInt("soapenv:Body|dpd:packagesPickupCallV2|dpd:dpdPickupParamsV2|dpd:pickupCallSimplifiedDetails|dpd:packagesParams|dpd:doxCount",1042);
    xml.UpdateChildContent("soapenv:Body|dpd:packagesPickupCallV2|dpd:dpdPickupParamsV2|dpd:pickupCallSimplifiedDetails|dpd:packagesParams|dpd:pallet","true");
    xml.UpdateChildContent("soapenv:Body|dpd:packagesPickupCallV2|dpd:dpdPickupParamsV2|dpd:pickupCallSimplifiedDetails|dpd:packagesParams|dpd:palletMaxHeight","456.00");
    xml.UpdateChildContent("soapenv:Body|dpd:packagesPickupCallV2|dpd:dpdPickupParamsV2|dpd:pickupCallSimplifiedDetails|dpd:packagesParams|dpd:palletMaxWeight","456.00");
    xml.UpdateChildContentInt("soapenv:Body|dpd:packagesPickupCallV2|dpd:dpdPickupParamsV2|dpd:pickupCallSimplifiedDetails|dpd:packagesParams|dpd:palletsCount",1042);
    xml.UpdateChildContent("soapenv:Body|dpd:packagesPickupCallV2|dpd:dpdPickupParamsV2|dpd:pickupCallSimplifiedDetails|dpd:packagesParams|dpd:palletsWeight","456.00");
    xml.UpdateChildContent("soapenv:Body|dpd:packagesPickupCallV2|dpd:dpdPickupParamsV2|dpd:pickupCallSimplifiedDetails|dpd:packagesParams|dpd:parcelMaxDepth","456.00");
    xml.UpdateChildContent("soapenv:Body|dpd:packagesPickupCallV2|dpd:dpdPickupParamsV2|dpd:pickupCallSimplifiedDetails|dpd:packagesParams|dpd:parcelMaxHeight","456.00");
    xml.UpdateChildContent("soapenv:Body|dpd:packagesPickupCallV2|dpd:dpdPickupParamsV2|dpd:pickupCallSimplifiedDetails|dpd:packagesParams|dpd:parcelMaxWeight","456.00");
    xml.UpdateChildContent("soapenv:Body|dpd:packagesPickupCallV2|dpd:dpdPickupParamsV2|dpd:pickupCallSimplifiedDetails|dpd:packagesParams|dpd:parcelMaxWidth","456.00");
    xml.UpdateChildContentInt("soapenv:Body|dpd:packagesPickupCallV2|dpd:dpdPickupParamsV2|dpd:pickupCallSimplifiedDetails|dpd:packagesParams|dpd:parcelsCount",1042);
    xml.UpdateChildContent("soapenv:Body|dpd:packagesPickupCallV2|dpd:dpdPickupParamsV2|dpd:pickupCallSimplifiedDetails|dpd:packagesParams|dpd:parcelsWeight","456.00");
    xml.UpdateChildContent("soapenv:Body|dpd:packagesPickupCallV2|dpd:dpdPickupParamsV2|dpd:pickupCallSimplifiedDetails|dpd:packagesParams|dpd:standardParcel","true");
    xml.UpdateChildContent("soapenv:Body|dpd:packagesPickupCallV2|dpd:dpdPickupParamsV2|dpd:pickupCallSimplifiedDetails|dpd:pickupCustomer|dpd:customerFullName","string");
    xml.UpdateChildContent("soapenv:Body|dpd:packagesPickupCallV2|dpd:dpdPickupParamsV2|dpd:pickupCallSimplifiedDetails|dpd:pickupCustomer|dpd:customerName","string");
    xml.UpdateChildContent("soapenv:Body|dpd:packagesPickupCallV2|dpd:dpdPickupParamsV2|dpd:pickupCallSimplifiedDetails|dpd:pickupCustomer|dpd:customerPhone","string");
    xml.UpdateChildContent("soapenv:Body|dpd:packagesPickupCallV2|dpd:dpdPickupParamsV2|dpd:pickupCallSimplifiedDetails|dpd:pickupPayer|dpd:payerCostCenter","string");
    xml.UpdateChildContent("soapenv:Body|dpd:packagesPickupCallV2|dpd:dpdPickupParamsV2|dpd:pickupCallSimplifiedDetails|dpd:pickupPayer|dpd:payerName","string");
    xml.UpdateChildContentInt("soapenv:Body|dpd:packagesPickupCallV2|dpd:dpdPickupParamsV2|dpd:pickupCallSimplifiedDetails|dpd:pickupPayer|dpd:payerNumber",1042);
    xml.UpdateChildContent("soapenv:Body|dpd:packagesPickupCallV2|dpd:dpdPickupParamsV2|dpd:pickupCallSimplifiedDetails|dpd:pickupSender|dpd:senderAddress","string");
    xml.UpdateChildContent("soapenv:Body|dpd:packagesPickupCallV2|dpd:dpdPickupParamsV2|dpd:pickupCallSimplifiedDetails|dpd:pickupSender|dpd:senderCity","string");
    xml.UpdateChildContent("soapenv:Body|dpd:packagesPickupCallV2|dpd:dpdPickupParamsV2|dpd:pickupCallSimplifiedDetails|dpd:pickupSender|dpd:senderFullName","string");
    xml.UpdateChildContent("soapenv:Body|dpd:packagesPickupCallV2|dpd:dpdPickupParamsV2|dpd:pickupCallSimplifiedDetails|dpd:pickupSender|dpd:senderName","string");
    xml.UpdateChildContent("soapenv:Body|dpd:packagesPickupCallV2|dpd:dpdPickupParamsV2|dpd:pickupCallSimplifiedDetails|dpd:pickupSender|dpd:senderPhone","string");
    xml.UpdateChildContent("soapenv:Body|dpd:packagesPickupCallV2|dpd:dpdPickupParamsV2|dpd:pickupCallSimplifiedDetails|dpd:pickupSender|dpd:senderPostalCode","string");
    xml.UpdateChildContent("soapenv:Body|dpd:packagesPickupCallV2|dpd:dpdPickupParamsV2|dpd:pickupDate","string");
    xml.UpdateChildContent("soapenv:Body|dpd:packagesPickupCallV2|dpd:dpdPickupParamsV2|dpd:pickupTimeFrom","string");
    xml.UpdateChildContent("soapenv:Body|dpd:packagesPickupCallV2|dpd:dpdPickupParamsV2|dpd:pickupTimeTo","string");
    xml.UpdateChildContent("soapenv:Body|dpd:packagesPickupCallV2|dpd:dpdPickupParamsV2|dpd:updateMode","DONT_CREATE_NEW_IF_CLOSED");
    xml.UpdateChildContent("soapenv:Body|dpd:packagesPickupCallV2|dpd:dpdPickupParamsV2|dpd:waybillsReady","true");
    xml.UpdateChildContent("soapenv:Body|dpd:packagesPickupCallV2|dpd:authDataV1|dpd:login","string");
    xml.UpdateChildContentInt("soapenv:Body|dpd:packagesPickupCallV2|dpd:authDataV1|dpd:masterFid",1042);
    xml.UpdateChildContent("soapenv:Body|dpd:packagesPickupCallV2|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;
    var soapRequestBody = xml.GetXml();

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

    var http = new chilkat.Http();

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

    // resp: HttpResponse
    var resp = http.PostXml(endpoint,soapRequestBody,"utf-8");
    if (http.LastMethodSuccess == false) {
        console.log(http.LastErrorText);
        console.log("Failed to send SOAP request.");
        return;
    }

    // Get the XML response body.
    var responseXml = new chilkat.Xml();
    resp.GetBodyXml(responseXml);

    var statusCode = resp.StatusCode;
    console.log("response status code: " + statusCode);

    // If the status code does not indicate succcess, then show the response XML,
    // which probably contains error information.
    if (statusCode !== 200) {
        console.log(responseXml.GetXml());
        return;
    }

    console.log(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).

    var orderNumber = responseXml.GetChildContent("*:Body|*:packagesPickupCallV2Response|*:return|*:orderNumber");
    var code = responseXml.GetChildContent("*:Body|*:packagesPickupCallV2Response|*:return|*:statusInfo|*:errorDetails|*:code");
    var description = responseXml.GetChildContent("*:Body|*:packagesPickupCallV2Response|*:return|*:statusInfo|*:errorDetails|*:description");
    var fields = responseXml.GetChildContent("*:Body|*:packagesPickupCallV2Response|*:return|*:statusInfo|*:errorDetails|*:fields");
    var status = responseXml.GetChildContent("*:Body|*:packagesPickupCallV2Response|*:return|*:statusInfo|*:status");

}

chilkatExample();
Request XML
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:dpd="http://dpdservices.dpd.com.pl/">
    <soapenv:Header/>
    <soapenv:Body>
        <dpd:packagesPickupCallV2>
            <dpd:dpdPickupParamsV2>
                <dpd:operationType>INSERT</dpd:operationType>
                <dpd:orderNumber>string</dpd:orderNumber>
                <dpd:orderType>DOMESTIC</dpd:orderType>
                <dpd:pickupCallSimplifiedDetails>
                    <dpd:packagesParams>
                        <dpd:dox>true</dpd:dox>
                        <dpd:doxCount>1042</dpd:doxCount>
                        <dpd:pallet>true</dpd:pallet>
                        <dpd:palletMaxHeight>456.00</dpd:palletMaxHeight>
                        <dpd:palletMaxWeight>456.00</dpd:palletMaxWeight>
                        <dpd:palletsCount>1042</dpd:palletsCount>
                        <dpd:palletsWeight>456.00</dpd:palletsWeight>
                        <dpd:parcelMaxDepth>456.00</dpd:parcelMaxDepth>
                        <dpd:parcelMaxHeight>456.00</dpd:parcelMaxHeight>
                        <dpd:parcelMaxWeight>456.00</dpd:parcelMaxWeight>
                        <dpd:parcelMaxWidth>456.00</dpd:parcelMaxWidth>
                        <dpd:parcelsCount>1042</dpd:parcelsCount>
                        <dpd:parcelsWeight>456.00</dpd:parcelsWeight>
                        <dpd:standardParcel>true</dpd:standardParcel>
                    </dpd:packagesParams>
                    <dpd:pickupCustomer>
                        <dpd:customerFullName>string</dpd:customerFullName>
                        <dpd:customerName>string</dpd:customerName>
                        <dpd:customerPhone>string</dpd:customerPhone>
                    </dpd:pickupCustomer>
                    <dpd:pickupPayer>
                        <dpd:payerCostCenter>string</dpd:payerCostCenter>
                        <dpd:payerName>string</dpd:payerName>
                        <dpd:payerNumber>1042</dpd:payerNumber>
                    </dpd:pickupPayer>
                    <dpd:pickupSender>
                        <dpd:senderAddress>string</dpd:senderAddress>
                        <dpd:senderCity>string</dpd:senderCity>
                        <dpd:senderFullName>string</dpd:senderFullName>
                        <dpd:senderName>string</dpd:senderName>
                        <dpd:senderPhone>string</dpd:senderPhone>
                        <dpd:senderPostalCode>string</dpd:senderPostalCode>
                    </dpd:pickupSender>
                </dpd:pickupCallSimplifiedDetails>
                <dpd:pickupDate>string</dpd:pickupDate>
                <dpd:pickupTimeFrom>string</dpd:pickupTimeFrom>
                <dpd:pickupTimeTo>string</dpd:pickupTimeTo>
                <dpd:updateMode>DONT_CREATE_NEW_IF_CLOSED</dpd:updateMode>
                <dpd:waybillsReady>true</dpd:waybillsReady>
            </dpd:dpdPickupParamsV2>
            <dpd:authDataV1>
                <dpd:login>string</dpd:login>
                <dpd:masterFid>1042</dpd:masterFid>
                <dpd:password>string</dpd:password>
            </dpd:authDataV1>
        </dpd:packagesPickupCallV2>
    </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:packagesPickupCallV2Response>
            <dpd:return>
                <dpd:orderNumber>string</dpd:orderNumber>
                <dpd:statusInfo>
                    <dpd:errorDetails>
                        <dpd:code>string</dpd:code>
                        <dpd:description>string</dpd:description>
                        <dpd:fields>string</dpd:fields>
                    </dpd:errorDetails>
                    <dpd:status>string</dpd:status>
                </dpd:statusInfo>
            </dpd:return>
        </dpd:packagesPickupCallV2Response>
    </soapenv:Body>
</soapenv:Envelope>