SOAP WSDL Generate Code

DataServiceEndpointSoapBinding / processRepairTasksV2

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 <CkXmlW.h>
#include <CkHttpW.h>
#include <CkHttpResponseW.h>

void ChilkatSample(void)
    {
    CkXmlW xml;
    xml.put_Tag(L"soapenv:Envelope");
    xml.AddAttribute(L"xmlns:intf",L"http://data.webservice.workshop.vivid.nl");
    xml.AddAttribute(L"xmlns:soapenv",L"http://schemas.xmlsoap.org/soap/envelope/");
    xml.UpdateChildContent(L"soapenv:Header",L"");
    xml.UpdateChildContent(L"soapenv:Body|intf:processRepairTasksV2|intf:vrid",L"xml");
    xml.UpdateChildContent(L"soapenv:Body|intf:processRepairTasksV2|intf:descriptionLanguage",L"xml");
    xml.UpdateChildContent(L"soapenv:Body|intf:processRepairTasksV2|intf:carTypeId",L"xml");
    xml.UpdateChildContent(L"soapenv:Body|intf:processRepairTasksV2|intf:maintenanceSystemId",L"xml");
    xml.UpdateChildContent(L"soapenv:Body|intf:processRepairTasksV2|intf:maintenancePeriodIds",L"xml");
    xml.UpdateChildContent(L"soapenv:Body|intf:processRepairTasksV2|intf:repairtimeTypeId",L"xml");
    xml.UpdateChildContent(L"soapenv:Body|intf:processRepairTasksV2|intf:typeCategory",L"xml");
    xml.UpdateChildContent(L"soapenv:Body|intf:processRepairTasksV2|intf:maintenanceTaskIds",L"xml");
    xml.UpdateChildContent(L"soapenv:Body|intf:processRepairTasksV2|intf:useMaintenanceTasks",L"xml");
    xml.UpdateChildContent(L"soapenv:Body|intf:processRepairTasksV2|intf:repairTaskIds",L"xml");
    xml.UpdateChildContent(L"soapenv:Body|intf:processRepairTasksV2|intf:repairVatRates",L"xml");
    xml.UpdateChildContent(L"soapenv:Body|intf:processRepairTasksV2|intf:repairLabourRates",L"xml");

    // 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.put_EmitXmlDecl(false);
    const wchar_t *soapRequestBody = xml.getXml();

    const wchar_t *endpoint = L"http://www.haynespro-services.com/workshopServices3/services/DataServiceEndpoint";
    const wchar_t *soapAction = L"";
    //  For SOAP requests, the standard Content-Type is usually set to "text/xml" or "application/soap+xml"
    const wchar_t *contentType = L"text/xml";

    CkHttpW http;

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

    CkHttpResponseW *resp = http.PostXml(endpoint,soapRequestBody,L"utf-8");
    if (http.get_LastMethodSuccess() == false) {
        wprintf(L"%s\n",http.lastErrorText());
        wprintf(L"Failed to send SOAP request.\n");
        return;
    }

    // Get the XML response body.
    CkXmlW responseXml;
    resp->GetBodyXml(responseXml);

    int statusCode = resp->get_StatusCode();
    wprintf(L"response status code: %d\n",statusCode);

    delete resp;

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

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

    const wchar_t *calculatedTime = responseXml.getChildContent(L"*:Body|*:processRepairTasksV2Response|*:processRepairTasksV2Return|*:basketItems|*:item|*:calculatedTime");
    const wchar_t *description = responseXml.getChildContent(L"*:Body|*:processRepairTasksV2Response|*:processRepairTasksV2Return|*:basketItems|*:item|*:description");
    description = responseXml.getChildContent(L"*:Body|*:processRepairTasksV2Response|*:processRepairTasksV2Return|*:basketItems|*:item|*:genarts|*:item|*:description");
    const wchar_t *id = responseXml.getChildContent(L"*:Body|*:processRepairTasksV2Response|*:processRepairTasksV2Return|*:basketItems|*:item|*:genarts|*:item|*:id");
    const wchar_t *mandatory = responseXml.getChildContent(L"*:Body|*:processRepairTasksV2Response|*:processRepairTasksV2Return|*:basketItems|*:item|*:genarts|*:item|*:mandatory");
    id = responseXml.getChildContent(L"*:Body|*:processRepairTasksV2Response|*:processRepairTasksV2Return|*:basketItems|*:item|*:id");
    const wchar_t *priceWithoutVat = responseXml.getChildContent(L"*:Body|*:processRepairTasksV2Response|*:processRepairTasksV2Return|*:basketItems|*:item|*:priceWithoutVat");
    const wchar_t *awNumber = responseXml.getChildContent(L"*:Body|*:processRepairTasksV2Response|*:processRepairTasksV2Return|*:basketItems|*:item|*:repairtimesInfo|*:followUpWorkList|*:item|*:awNumber");
    description = responseXml.getChildContent(L"*:Body|*:processRepairTasksV2Response|*:processRepairTasksV2Return|*:basketItems|*:item|*:repairtimesInfo|*:followUpWorkList|*:item|*:description");
    const wchar_t *direction = responseXml.getChildContent(L"*:Body|*:processRepairTasksV2Response|*:processRepairTasksV2Return|*:basketItems|*:item|*:repairtimesInfo|*:followUpWorkList|*:item|*:direction");
    description = responseXml.getChildContent(L"*:Body|*:processRepairTasksV2Response|*:processRepairTasksV2Return|*:basketItems|*:item|*:repairtimesInfo|*:followUpWorkList|*:item|*:generalArticles|*:item|*:description");
    id = responseXml.getChildContent(L"*:Body|*:processRepairTasksV2Response|*:processRepairTasksV2Return|*:basketItems|*:item|*:repairtimesInfo|*:followUpWorkList|*:item|*:generalArticles|*:item|*:id");
    mandatory = responseXml.getChildContent(L"*:Body|*:processRepairTasksV2Response|*:processRepairTasksV2Return|*:basketItems|*:item|*:repairtimesInfo|*:followUpWorkList|*:item|*:generalArticles|*:item|*:mandatory");
    const wchar_t *hasInfoGroups = responseXml.getChildContent(L"*:Body|*:processRepairTasksV2Response|*:processRepairTasksV2Return|*:basketItems|*:item|*:repairtimesInfo|*:followUpWorkList|*:item|*:hasInfoGroups");
    const wchar_t *value = responseXml.getChildContent(L"*:Body|*:processRepairTasksV2Response|*:processRepairTasksV2Return|*:basketItems|*:item|*:repairtimesInfo|*:followUpWorkList|*:item|*:value");
    awNumber = responseXml.getChildContent(L"*:Body|*:processRepairTasksV2Response|*:processRepairTasksV2Return|*:basketItems|*:item|*:repairtimesInfo|*:includedList|*:item|*:awNumber");
    description = responseXml.getChildContent(L"*:Body|*:processRepairTasksV2Response|*:processRepairTasksV2Return|*:basketItems|*:item|*:repairtimesInfo|*:includedList|*:item|*:description");
    direction = responseXml.getChildContent(L"*:Body|*:processRepairTasksV2Response|*:processRepairTasksV2Return|*:basketItems|*:item|*:repairtimesInfo|*:includedList|*:item|*:direction");
    description = responseXml.getChildContent(L"*:Body|*:processRepairTasksV2Response|*:processRepairTasksV2Return|*:basketItems|*:item|*:repairtimesInfo|*:includedList|*:item|*:generalArticles|*:item|*:description");
    id = responseXml.getChildContent(L"*:Body|*:processRepairTasksV2Response|*:processRepairTasksV2Return|*:basketItems|*:item|*:repairtimesInfo|*:includedList|*:item|*:generalArticles|*:item|*:id");
    mandatory = responseXml.getChildContent(L"*:Body|*:processRepairTasksV2Response|*:processRepairTasksV2Return|*:basketItems|*:item|*:repairtimesInfo|*:includedList|*:item|*:generalArticles|*:item|*:mandatory");
    hasInfoGroups = responseXml.getChildContent(L"*:Body|*:processRepairTasksV2Response|*:processRepairTasksV2Return|*:basketItems|*:item|*:repairtimesInfo|*:includedList|*:item|*:hasInfoGroups");
    value = responseXml.getChildContent(L"*:Body|*:processRepairTasksV2Response|*:processRepairTasksV2Return|*:basketItems|*:item|*:repairtimesInfo|*:includedList|*:item|*:value");
    const wchar_t *nodeId = responseXml.getChildContent(L"*:Body|*:processRepairTasksV2Response|*:processRepairTasksV2Return|*:basketItems|*:item|*:repairtimesInfo|*:nodeId");
    awNumber = responseXml.getChildContent(L"*:Body|*:processRepairTasksV2Response|*:processRepairTasksV2Return|*:basketItems|*:item|*:repairtimesInfo|*:notIncludedList|*:item|*:awNumber");
    description = responseXml.getChildContent(L"*:Body|*:processRepairTasksV2Response|*:processRepairTasksV2Return|*:basketItems|*:item|*:repairtimesInfo|*:notIncludedList|*:item|*:description");
    direction = responseXml.getChildContent(L"*:Body|*:processRepairTasksV2Response|*:processRepairTasksV2Return|*:basketItems|*:item|*:repairtimesInfo|*:notIncludedList|*:item|*:direction");
    description = responseXml.getChildContent(L"*:Body|*:processRepairTasksV2Response|*:processRepairTasksV2Return|*:basketItems|*:item|*:repairtimesInfo|*:notIncludedList|*:item|*:generalArticles|*:item|*:description");
    id = responseXml.getChildContent(L"*:Body|*:processRepairTasksV2Response|*:processRepairTasksV2Return|*:basketItems|*:item|*:repairtimesInfo|*:notIncludedList|*:item|*:generalArticles|*:item|*:id");
    mandatory = responseXml.getChildContent(L"*:Body|*:processRepairTasksV2Response|*:processRepairTasksV2Return|*:basketItems|*:item|*:repairtimesInfo|*:notIncludedList|*:item|*:generalArticles|*:item|*:mandatory");
    hasInfoGroups = responseXml.getChildContent(L"*:Body|*:processRepairTasksV2Response|*:processRepairTasksV2Return|*:basketItems|*:item|*:repairtimesInfo|*:notIncludedList|*:item|*:hasInfoGroups");
    value = responseXml.getChildContent(L"*:Body|*:processRepairTasksV2Response|*:processRepairTasksV2Return|*:basketItems|*:item|*:repairtimesInfo|*:notIncludedList|*:item|*:value");
    awNumber = responseXml.getChildContent(L"*:Body|*:processRepairTasksV2Response|*:processRepairTasksV2Return|*:basketItems|*:item|*:repairtimesInfo|*:preliminaryList|*:item|*:awNumber");
    description = responseXml.getChildContent(L"*:Body|*:processRepairTasksV2Response|*:processRepairTasksV2Return|*:basketItems|*:item|*:repairtimesInfo|*:preliminaryList|*:item|*:description");
    direction = responseXml.getChildContent(L"*:Body|*:processRepairTasksV2Response|*:processRepairTasksV2Return|*:basketItems|*:item|*:repairtimesInfo|*:preliminaryList|*:item|*:direction");
    description = responseXml.getChildContent(L"*:Body|*:processRepairTasksV2Response|*:processRepairTasksV2Return|*:basketItems|*:item|*:repairtimesInfo|*:preliminaryList|*:item|*:generalArticles|*:item|*:description");
    id = responseXml.getChildContent(L"*:Body|*:processRepairTasksV2Response|*:processRepairTasksV2Return|*:basketItems|*:item|*:repairtimesInfo|*:preliminaryList|*:item|*:generalArticles|*:item|*:id");
    mandatory = responseXml.getChildContent(L"*:Body|*:processRepairTasksV2Response|*:processRepairTasksV2Return|*:basketItems|*:item|*:repairtimesInfo|*:preliminaryList|*:item|*:generalArticles|*:item|*:mandatory");
    hasInfoGroups = responseXml.getChildContent(L"*:Body|*:processRepairTasksV2Response|*:processRepairTasksV2Return|*:basketItems|*:item|*:repairtimesInfo|*:preliminaryList|*:item|*:hasInfoGroups");
    value = responseXml.getChildContent(L"*:Body|*:processRepairTasksV2Response|*:processRepairTasksV2Return|*:basketItems|*:item|*:repairtimesInfo|*:preliminaryList|*:item|*:value");
    const wchar_t *confirmationLink = responseXml.getChildContent(L"*:Body|*:processRepairTasksV2Response|*:processRepairTasksV2Return|*:basketItems|*:item|*:repairtimesInfo|*:status|*:confirmationLink");
    const wchar_t *statusCode = responseXml.getChildContent(L"*:Body|*:processRepairTasksV2Response|*:processRepairTasksV2Return|*:basketItems|*:item|*:repairtimesInfo|*:status|*:statusCode");
    const wchar_t *subtotal = responseXml.getChildContent(L"*:Body|*:processRepairTasksV2Response|*:processRepairTasksV2Return|*:basketItems|*:item|*:subtotal");
    const wchar_t *vat = responseXml.getChildContent(L"*:Body|*:processRepairTasksV2Response|*:processRepairTasksV2Return|*:basketItems|*:item|*:vat");
    const wchar_t *repairPriceWithoutVat = responseXml.getChildContent(L"*:Body|*:processRepairTasksV2Response|*:processRepairTasksV2Return|*:repairPriceWithoutVat");
    const wchar_t *repairTasksVat = responseXml.getChildContent(L"*:Body|*:processRepairTasksV2Response|*:processRepairTasksV2Return|*:repairTasksVat");
    confirmationLink = responseXml.getChildContent(L"*:Body|*:processRepairTasksV2Response|*:processRepairTasksV2Return|*:status|*:confirmationLink");
    statusCode = responseXml.getChildContent(L"*:Body|*:processRepairTasksV2Response|*:processRepairTasksV2Return|*:status|*:statusCode");
    const wchar_t *totalRepairPrice = responseXml.getChildContent(L"*:Body|*:processRepairTasksV2Response|*:processRepairTasksV2Return|*:totalRepairPrice");
    const wchar_t *totalRepairTime = responseXml.getChildContent(L"*:Body|*:processRepairTasksV2Response|*:processRepairTasksV2Return|*:totalRepairTime");
    }
Request XML
<soapenv:Envelope xmlns:intf="http://data.webservice.workshop.vivid.nl" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
    <soapenv:Header/>
    <soapenv:Body>
        <intf:processRepairTasksV2>
            <intf:vrid>xml</intf:vrid>
            <intf:descriptionLanguage>xml</intf:descriptionLanguage>
            <intf:carTypeId>xml</intf:carTypeId>
            <intf:maintenanceSystemId>xml</intf:maintenanceSystemId>
            <intf:maintenancePeriodIds>xml</intf:maintenancePeriodIds>
            <intf:repairtimeTypeId>xml</intf:repairtimeTypeId>
            <intf:typeCategory>xml</intf:typeCategory>
            <intf:maintenanceTaskIds>xml</intf:maintenanceTaskIds>
            <intf:useMaintenanceTasks>xml</intf:useMaintenanceTasks>
            <intf:repairTaskIds>xml</intf:repairTaskIds>
            <intf:repairVatRates>xml</intf:repairVatRates>
            <intf:repairLabourRates>xml</intf:repairLabourRates>
        </intf:processRepairTasksV2>
    </soapenv:Body>
</soapenv:Envelope>
Response XML
<soapenv:Envelope xmlns:intf="http://data.webservice.workshop.vivid.nl" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
    <soapenv:Header/>
    <soapenv:Body>
        <intf:processRepairTasksV2Response>
            <intf:processRepairTasksV2Return>
                <intf:basketItems>
                    <intf:item>
                        <intf:calculatedTime>xml</intf:calculatedTime>
                        <intf:description>xml</intf:description>
                        <intf:genarts>
                            <intf:item>
                                <intf:description>xml</intf:description>
                                <intf:id>xml</intf:id>
                                <intf:mandatory>xml</intf:mandatory>
                            </intf:item>
                        </intf:genarts>
                        <intf:id>xml</intf:id>
                        <intf:priceWithoutVat>xml</intf:priceWithoutVat>
                        <intf:repairtimesInfo>
                            <intf:followUpWorkList>
                                <intf:item>
                                    <intf:awNumber>xml</intf:awNumber>
                                    <intf:description>xml</intf:description>
                                    <intf:direction>xml</intf:direction>
                                    <intf:generalArticles>
                                        <intf:item>
                                            <intf:description>xml</intf:description>
                                            <intf:id>xml</intf:id>
                                            <intf:mandatory>xml</intf:mandatory>
                                        </intf:item>
                                    </intf:generalArticles>
                                    <intf:hasInfoGroups>xml</intf:hasInfoGroups>
                                    <intf:value>xml</intf:value>
                                </intf:item>
                            </intf:followUpWorkList>
                            <intf:includedList>
                                <intf:item>
                                    <intf:awNumber>xml</intf:awNumber>
                                    <intf:description>xml</intf:description>
                                    <intf:direction>xml</intf:direction>
                                    <intf:generalArticles>
                                        <intf:item>
                                            <intf:description>xml</intf:description>
                                            <intf:id>xml</intf:id>
                                            <intf:mandatory>xml</intf:mandatory>
                                        </intf:item>
                                    </intf:generalArticles>
                                    <intf:hasInfoGroups>xml</intf:hasInfoGroups>
                                    <intf:value>xml</intf:value>
                                </intf:item>
                            </intf:includedList>
                            <intf:nodeId>xml</intf:nodeId>
                            <intf:notIncludedList>
                                <intf:item>
                                    <intf:awNumber>xml</intf:awNumber>
                                    <intf:description>xml</intf:description>
                                    <intf:direction>xml</intf:direction>
                                    <intf:generalArticles>
                                        <intf:item>
                                            <intf:description>xml</intf:description>
                                            <intf:id>xml</intf:id>
                                            <intf:mandatory>xml</intf:mandatory>
                                        </intf:item>
                                    </intf:generalArticles>
                                    <intf:hasInfoGroups>xml</intf:hasInfoGroups>
                                    <intf:value>xml</intf:value>
                                </intf:item>
                            </intf:notIncludedList>
                            <intf:preliminaryList>
                                <intf:item>
                                    <intf:awNumber>xml</intf:awNumber>
                                    <intf:description>xml</intf:description>
                                    <intf:direction>xml</intf:direction>
                                    <intf:generalArticles>
                                        <intf:item>
                                            <intf:description>xml</intf:description>
                                            <intf:id>xml</intf:id>
                                            <intf:mandatory>xml</intf:mandatory>
                                        </intf:item>
                                    </intf:generalArticles>
                                    <intf:hasInfoGroups>xml</intf:hasInfoGroups>
                                    <intf:value>xml</intf:value>
                                </intf:item>
                            </intf:preliminaryList>
                            <intf:status>
                                <intf:confirmationLink>xml</intf:confirmationLink>
                                <intf:statusCode>xml</intf:statusCode>
                            </intf:status>
                        </intf:repairtimesInfo>
                        <intf:subtotal>xml</intf:subtotal>
                        <intf:vat>xml</intf:vat>
                    </intf:item>
                </intf:basketItems>
                <intf:repairPriceWithoutVat>xml</intf:repairPriceWithoutVat>
                <intf:repairTasksVat>xml</intf:repairTasksVat>
                <intf:status>
                    <intf:confirmationLink>xml</intf:confirmationLink>
                    <intf:statusCode>xml</intf:statusCode>
                </intf:status>
                <intf:totalRepairPrice>xml</intf:totalRepairPrice>
                <intf:totalRepairTime>xml</intf:totalRepairTime>
            </intf:processRepairTasksV2Return>
        </intf:processRepairTasksV2Response>
    </soapenv:Body>
</soapenv:Envelope>