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
Chilkat.Xml 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;
string soapRequestBody = xml.GetXml();

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

Chilkat.Http http = new Chilkat.Http();

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

Chilkat.HttpResponse resp = http.PostXml(endpoint,soapRequestBody,"utf-8");
if (http.LastMethodSuccess == false) {
    Debug.WriteLine(http.LastErrorText);
    Debug.WriteLine("Failed to send SOAP request.");
    return;
}

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

int statusCode = resp.StatusCode;
Debug.WriteLine("response status code: " + Convert.ToString(statusCode));

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

Debug.WriteLine(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).

string orderNumber = responseXml.GetChildContent("*:Body|*:packagesPickupCallV2Response|*:return|*:orderNumber");
string code = responseXml.GetChildContent("*:Body|*:packagesPickupCallV2Response|*:return|*:statusInfo|*:errorDetails|*:code");
string description = responseXml.GetChildContent("*:Body|*:packagesPickupCallV2Response|*:return|*:statusInfo|*:errorDetails|*:description");
string fields = responseXml.GetChildContent("*:Body|*:packagesPickupCallV2Response|*:return|*:statusInfo|*:errorDetails|*:fields");
string status = responseXml.GetChildContent("*:Body|*:packagesPickupCallV2Response|*:return|*: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: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>