SOAP WSDL Generate Code

DPDPackageObjServicesServiceSoapBinding / packagesPickupCallV4

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
#include <C_CkXml.h>
#include <C_CkHttp.h>
#include <C_CkHttpResponse.h>

void ChilkatSample(void)
    {
    HCkXml xml;
    const char *soapRequestBody;
    const char *endpoint;
    const char *soapAction;
    const char *contentType;
    HCkHttp http;
    HCkHttpResponse resp;
    HCkXml responseXml;
    int statusCode;
    int checkSum;
    const char *orderNumber;
    const char *code;
    const char *description;
    const char *fields;
    const char *status;

    xml = CkXml_Create();
    CkXml_putTag(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_UpdateChildContentInt(xml,"soapenv:Body|dpd:packagesPickupCallV4|dpd:dpdPickupParamsV3|dpd:checkSum",1042);
    CkXml_UpdateChildContent(xml,"soapenv:Body|dpd:packagesPickupCallV4|dpd:dpdPickupParamsV3|dpd:operationType","INSERT");
    CkXml_UpdateChildContent(xml,"soapenv:Body|dpd:packagesPickupCallV4|dpd:dpdPickupParamsV3|dpd:orderNumber","string");
    CkXml_UpdateChildContent(xml,"soapenv:Body|dpd:packagesPickupCallV4|dpd:dpdPickupParamsV3|dpd:orderType","DOMESTIC");
    CkXml_UpdateChildContent(xml,"soapenv:Body|dpd:packagesPickupCallV4|dpd:dpdPickupParamsV3|dpd:pickupCallSimplifiedDetails|dpd:packagesParams|dpd:dox","true");
    CkXml_UpdateChildContentInt(xml,"soapenv:Body|dpd:packagesPickupCallV4|dpd:dpdPickupParamsV3|dpd:pickupCallSimplifiedDetails|dpd:packagesParams|dpd:doxCount",1042);
    CkXml_UpdateChildContent(xml,"soapenv:Body|dpd:packagesPickupCallV4|dpd:dpdPickupParamsV3|dpd:pickupCallSimplifiedDetails|dpd:packagesParams|dpd:pallet","true");
    CkXml_UpdateChildContent(xml,"soapenv:Body|dpd:packagesPickupCallV4|dpd:dpdPickupParamsV3|dpd:pickupCallSimplifiedDetails|dpd:packagesParams|dpd:palletMaxHeight","456.00");
    CkXml_UpdateChildContent(xml,"soapenv:Body|dpd:packagesPickupCallV4|dpd:dpdPickupParamsV3|dpd:pickupCallSimplifiedDetails|dpd:packagesParams|dpd:palletMaxWeight","456.00");
    CkXml_UpdateChildContentInt(xml,"soapenv:Body|dpd:packagesPickupCallV4|dpd:dpdPickupParamsV3|dpd:pickupCallSimplifiedDetails|dpd:packagesParams|dpd:palletsCount",1042);
    CkXml_UpdateChildContent(xml,"soapenv:Body|dpd:packagesPickupCallV4|dpd:dpdPickupParamsV3|dpd:pickupCallSimplifiedDetails|dpd:packagesParams|dpd:palletsWeight","456.00");
    CkXml_UpdateChildContent(xml,"soapenv:Body|dpd:packagesPickupCallV4|dpd:dpdPickupParamsV3|dpd:pickupCallSimplifiedDetails|dpd:packagesParams|dpd:parcelMaxDepth","456.00");
    CkXml_UpdateChildContent(xml,"soapenv:Body|dpd:packagesPickupCallV4|dpd:dpdPickupParamsV3|dpd:pickupCallSimplifiedDetails|dpd:packagesParams|dpd:parcelMaxHeight","456.00");
    CkXml_UpdateChildContent(xml,"soapenv:Body|dpd:packagesPickupCallV4|dpd:dpdPickupParamsV3|dpd:pickupCallSimplifiedDetails|dpd:packagesParams|dpd:parcelMaxWeight","456.00");
    CkXml_UpdateChildContent(xml,"soapenv:Body|dpd:packagesPickupCallV4|dpd:dpdPickupParamsV3|dpd:pickupCallSimplifiedDetails|dpd:packagesParams|dpd:parcelMaxWidth","456.00");
    CkXml_UpdateChildContentInt(xml,"soapenv:Body|dpd:packagesPickupCallV4|dpd:dpdPickupParamsV3|dpd:pickupCallSimplifiedDetails|dpd:packagesParams|dpd:parcelsCount",1042);
    CkXml_UpdateChildContent(xml,"soapenv:Body|dpd:packagesPickupCallV4|dpd:dpdPickupParamsV3|dpd:pickupCallSimplifiedDetails|dpd:packagesParams|dpd:parcelsWeight","456.00");
    CkXml_UpdateChildContent(xml,"soapenv:Body|dpd:packagesPickupCallV4|dpd:dpdPickupParamsV3|dpd:pickupCallSimplifiedDetails|dpd:packagesParams|dpd:standardParcel","true");
    CkXml_UpdateChildContent(xml,"soapenv:Body|dpd:packagesPickupCallV4|dpd:dpdPickupParamsV3|dpd:pickupCallSimplifiedDetails|dpd:pickupCustomer|dpd:customerFullName","string");
    CkXml_UpdateChildContent(xml,"soapenv:Body|dpd:packagesPickupCallV4|dpd:dpdPickupParamsV3|dpd:pickupCallSimplifiedDetails|dpd:pickupCustomer|dpd:customerName","string");
    CkXml_UpdateChildContent(xml,"soapenv:Body|dpd:packagesPickupCallV4|dpd:dpdPickupParamsV3|dpd:pickupCallSimplifiedDetails|dpd:pickupCustomer|dpd:customerPhone","string");
    CkXml_UpdateChildContent(xml,"soapenv:Body|dpd:packagesPickupCallV4|dpd:dpdPickupParamsV3|dpd:pickupCallSimplifiedDetails|dpd:pickupPayer|dpd:payerCostCenter","string");
    CkXml_UpdateChildContent(xml,"soapenv:Body|dpd:packagesPickupCallV4|dpd:dpdPickupParamsV3|dpd:pickupCallSimplifiedDetails|dpd:pickupPayer|dpd:payerName","string");
    CkXml_UpdateChildContentInt(xml,"soapenv:Body|dpd:packagesPickupCallV4|dpd:dpdPickupParamsV3|dpd:pickupCallSimplifiedDetails|dpd:pickupPayer|dpd:payerNumber",1042);
    CkXml_UpdateChildContent(xml,"soapenv:Body|dpd:packagesPickupCallV4|dpd:dpdPickupParamsV3|dpd:pickupCallSimplifiedDetails|dpd:pickupSender|dpd:senderAddress","string");
    CkXml_UpdateChildContent(xml,"soapenv:Body|dpd:packagesPickupCallV4|dpd:dpdPickupParamsV3|dpd:pickupCallSimplifiedDetails|dpd:pickupSender|dpd:senderCity","string");
    CkXml_UpdateChildContent(xml,"soapenv:Body|dpd:packagesPickupCallV4|dpd:dpdPickupParamsV3|dpd:pickupCallSimplifiedDetails|dpd:pickupSender|dpd:senderFullName","string");
    CkXml_UpdateChildContent(xml,"soapenv:Body|dpd:packagesPickupCallV4|dpd:dpdPickupParamsV3|dpd:pickupCallSimplifiedDetails|dpd:pickupSender|dpd:senderName","string");
    CkXml_UpdateChildContent(xml,"soapenv:Body|dpd:packagesPickupCallV4|dpd:dpdPickupParamsV3|dpd:pickupCallSimplifiedDetails|dpd:pickupSender|dpd:senderPhone","string");
    CkXml_UpdateChildContent(xml,"soapenv:Body|dpd:packagesPickupCallV4|dpd:dpdPickupParamsV3|dpd:pickupCallSimplifiedDetails|dpd:pickupSender|dpd:senderPostalCode","string");
    CkXml_UpdateChildContent(xml,"soapenv:Body|dpd:packagesPickupCallV4|dpd:dpdPickupParamsV3|dpd:pickupDate","string");
    CkXml_UpdateChildContent(xml,"soapenv:Body|dpd:packagesPickupCallV4|dpd:dpdPickupParamsV3|dpd:pickupTimeFrom","string");
    CkXml_UpdateChildContent(xml,"soapenv:Body|dpd:packagesPickupCallV4|dpd:dpdPickupParamsV3|dpd:pickupTimeTo","string");
    CkXml_UpdateChildContent(xml,"soapenv:Body|dpd:packagesPickupCallV4|dpd:dpdPickupParamsV3|dpd:updateMode","DONT_CREATE_NEW_IF_CLOSED");
    CkXml_UpdateChildContent(xml,"soapenv:Body|dpd:packagesPickupCallV4|dpd:dpdPickupParamsV3|dpd:waybillsReady","true");
    CkXml_UpdateChildContent(xml,"soapenv:Body|dpd:packagesPickupCallV4|dpd:authDataV1|dpd:login","string");
    CkXml_UpdateChildContentInt(xml,"soapenv:Body|dpd:packagesPickupCallV4|dpd:authDataV1|dpd:masterFid",1042);
    CkXml_UpdateChildContent(xml,"soapenv:Body|dpd:packagesPickupCallV4|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_putEmitXmlDecl(xml,FALSE);
    soapRequestBody = CkXml_getXml(xml);

    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 = CkHttp_Create();

    CkHttp_ClearHeaders(http);
    CkHttp_SetRequestHeader(http,"Content-Type",contentType);
    CkHttp_SetRequestHeader(http,"SOAPAction",soapAction);

    resp = CkHttp_PostXml(http,endpoint,soapRequestBody,"utf-8");
    if (CkHttp_getLastMethodSuccess(http) == FALSE) {
        printf("%s\n",CkHttp_lastErrorText(http));
        printf("Failed to send SOAP request.\n");
        CkXml_Dispose(xml);
        CkHttp_Dispose(http);
        return;
    }

    // Get the XML response body.
    responseXml = CkXml_Create();
    CkHttpResponse_GetBodyXml(resp,responseXml);

    statusCode = CkHttpResponse_getStatusCode(resp);
    printf("response status code: %d\n",statusCode);

    CkHttpResponse_Dispose(resp);

    // If the status code does not indicate succcess, then show the response XML,
    // which probably contains error information.
    if (statusCode != 200) {
        printf("%s\n",CkXml_getXml(responseXml));
        CkXml_Dispose(xml);
        CkHttp_Dispose(http);
        CkXml_Dispose(responseXml);
        return;
    }

    printf("%s\n",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).

    checkSum = CkXml_GetChildIntValue(responseXml,"*:Body|*:packagesPickupCallV4Response|*:return|*:checkSum");
    orderNumber = CkXml_getChildContent(responseXml,"*:Body|*:packagesPickupCallV4Response|*:return|*:orderNumber");
    code = CkXml_getChildContent(responseXml,"*:Body|*:packagesPickupCallV4Response|*:return|*:statusInfo|*:errorDetails|*:code");
    description = CkXml_getChildContent(responseXml,"*:Body|*:packagesPickupCallV4Response|*:return|*:statusInfo|*:errorDetails|*:description");
    fields = CkXml_getChildContent(responseXml,"*:Body|*:packagesPickupCallV4Response|*:return|*:statusInfo|*:errorDetails|*:fields");
    status = CkXml_getChildContent(responseXml,"*:Body|*:packagesPickupCallV4Response|*:return|*:statusInfo|*:status");


    CkXml_Dispose(xml);
    CkHttp_Dispose(http);
    CkXml_Dispose(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:packagesPickupCallV4>
            <dpd:dpdPickupParamsV3>
                <dpd:checkSum>1042</dpd:checkSum>
                <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:dpdPickupParamsV3>
            <dpd:authDataV1>
                <dpd:login>string</dpd:login>
                <dpd:masterFid>1042</dpd:masterFid>
                <dpd:password>string</dpd:password>
            </dpd:authDataV1>
        </dpd:packagesPickupCallV4>
    </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:packagesPickupCallV4Response>
            <dpd:return>
                <dpd:checkSum>1042</dpd:checkSum>
                <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:packagesPickupCallV4Response>
    </soapenv:Body>
</soapenv:Envelope>