SOAP WSDL Generate Code

DataServiceEndpointSoapBinding / getMaintenanceSystemsV5

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:getMaintenanceSystemsV5|intf:vrid",L"xml");
    xml.UpdateChildContent(L"soapenv:Body|intf:getMaintenanceSystemsV5|intf:descriptionLanguage",L"xml");
    xml.UpdateChildContent(L"soapenv:Body|intf:getMaintenanceSystemsV5|intf:carTypeId",L"xml");
    xml.UpdateChildContent(L"soapenv:Body|intf:getMaintenanceSystemsV5|intf:repairtimesTypeId",L"xml");
    xml.UpdateChildContent(L"soapenv:Body|intf:getMaintenanceSystemsV5|intf:rtTypeCategory",L"xml");
    xml.UpdateChildContent(L"soapenv:Body|intf:getMaintenanceSystemsV5|intf:useImperial",L"xml");
    xml.UpdateChildContent(L"soapenv:Body|intf:getMaintenanceSystemsV5|intf:includeServiceTimes",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 *attributeTypeDescription = responseXml.getChildContent(L"*:Body|*:getMaintenanceSystemsV5Response|*:getMaintenanceSystemsV5Return|*:criteria|*:item|*:attributeTypeDescription");
    const wchar_t *keyTableDescription = responseXml.getChildContent(L"*:Body|*:getMaintenanceSystemsV5Response|*:getMaintenanceSystemsV5Return|*:criteria|*:item|*:keyTableDescription");
    const wchar_t *keyValue = responseXml.getChildContent(L"*:Body|*:getMaintenanceSystemsV5Response|*:getMaintenanceSystemsV5Return|*:criteria|*:item|*:keyValue");
    const wchar_t *keyValueDescription = responseXml.getChildContent(L"*:Body|*:getMaintenanceSystemsV5Response|*:getMaintenanceSystemsV5Return|*:criteria|*:item|*:keyValueDescription");
    const wchar_t *kritnr = responseXml.getChildContent(L"*:Body|*:getMaintenanceSystemsV5Response|*:getMaintenanceSystemsV5Return|*:criteria|*:item|*:kritnr");
    const wchar_t *tabnr = responseXml.getChildContent(L"*:Body|*:getMaintenanceSystemsV5Response|*:getMaintenanceSystemsV5Return|*:criteria|*:item|*:tabnr");
    const wchar_t *criteriaId = responseXml.getChildContent(L"*:Body|*:getMaintenanceSystemsV5Response|*:getMaintenanceSystemsV5Return|*:generalCriterias|*:item|*:groupCriterias|*:item|*:criteriaId");
    const wchar_t *criteriaLevel = responseXml.getChildContent(L"*:Body|*:getMaintenanceSystemsV5Response|*:getMaintenanceSystemsV5Return|*:generalCriterias|*:item|*:groupCriterias|*:item|*:criteriaLevel");
    const wchar_t *description = responseXml.getChildContent(L"*:Body|*:getMaintenanceSystemsV5Response|*:getMaintenanceSystemsV5Return|*:generalCriterias|*:item|*:groupCriterias|*:item|*:description");
    const wchar_t *value1 = responseXml.getChildContent(L"*:Body|*:getMaintenanceSystemsV5Response|*:getMaintenanceSystemsV5Return|*:generalCriterias|*:item|*:groupCriterias|*:item|*:value1");
    const wchar_t *value2 = responseXml.getChildContent(L"*:Body|*:getMaintenanceSystemsV5Response|*:getMaintenanceSystemsV5Return|*:generalCriterias|*:item|*:groupCriterias|*:item|*:value2");
    const wchar_t *groupDescription = responseXml.getChildContent(L"*:Body|*:getMaintenanceSystemsV5Response|*:getMaintenanceSystemsV5Return|*:generalCriterias|*:item|*:groupDescription");
    const wchar_t *groupId = responseXml.getChildContent(L"*:Body|*:getMaintenanceSystemsV5Response|*:getMaintenanceSystemsV5Return|*:generalCriterias|*:item|*:groupId");
    const wchar_t *id = responseXml.getChildContent(L"*:Body|*:getMaintenanceSystemsV5Response|*:getMaintenanceSystemsV5Return|*:id");
    const wchar_t *combinable = responseXml.getChildContent(L"*:Body|*:getMaintenanceSystemsV5Response|*:getMaintenanceSystemsV5Return|*:maintenancePeriods|*:item|*:combinable");
    criteriaId = responseXml.getChildContent(L"*:Body|*:getMaintenanceSystemsV5Response|*:getMaintenanceSystemsV5Return|*:maintenancePeriods|*:item|*:generalCriterias|*:item|*:groupCriterias|*:item|*:criteriaId");
    criteriaLevel = responseXml.getChildContent(L"*:Body|*:getMaintenanceSystemsV5Response|*:getMaintenanceSystemsV5Return|*:maintenancePeriods|*:item|*:generalCriterias|*:item|*:groupCriterias|*:item|*:criteriaLevel");
    description = responseXml.getChildContent(L"*:Body|*:getMaintenanceSystemsV5Response|*:getMaintenanceSystemsV5Return|*:maintenancePeriods|*:item|*:generalCriterias|*:item|*:groupCriterias|*:item|*:description");
    value1 = responseXml.getChildContent(L"*:Body|*:getMaintenanceSystemsV5Response|*:getMaintenanceSystemsV5Return|*:maintenancePeriods|*:item|*:generalCriterias|*:item|*:groupCriterias|*:item|*:value1");
    value2 = responseXml.getChildContent(L"*:Body|*:getMaintenanceSystemsV5Response|*:getMaintenanceSystemsV5Return|*:maintenancePeriods|*:item|*:generalCriterias|*:item|*:groupCriterias|*:item|*:value2");
    groupDescription = responseXml.getChildContent(L"*:Body|*:getMaintenanceSystemsV5Response|*:getMaintenanceSystemsV5Return|*:maintenancePeriods|*:item|*:generalCriterias|*:item|*:groupDescription");
    groupId = responseXml.getChildContent(L"*:Body|*:getMaintenanceSystemsV5Response|*:getMaintenanceSystemsV5Return|*:maintenancePeriods|*:item|*:generalCriterias|*:item|*:groupId");
    id = responseXml.getChildContent(L"*:Body|*:getMaintenanceSystemsV5Response|*:getMaintenanceSystemsV5Return|*:maintenancePeriods|*:item|*:id");
    const wchar_t *name = responseXml.getChildContent(L"*:Body|*:getMaintenanceSystemsV5Response|*:getMaintenanceSystemsV5Return|*:maintenancePeriods|*:item|*:name");
    const wchar_t *code = responseXml.getChildContent(L"*:Body|*:getMaintenanceSystemsV5Response|*:getMaintenanceSystemsV5Return|*:maintenancePeriods|*:item|*:times|*:item|*:code");
    const wchar_t *selected = responseXml.getChildContent(L"*:Body|*:getMaintenanceSystemsV5Response|*:getMaintenanceSystemsV5Return|*:maintenancePeriods|*:item|*:times|*:item|*:selected");
    const wchar_t *v_type = responseXml.getChildContent(L"*:Body|*:getMaintenanceSystemsV5Response|*:getMaintenanceSystemsV5Return|*:maintenancePeriods|*:item|*:times|*:item|*:type");
    const wchar_t *value = responseXml.getChildContent(L"*:Body|*:getMaintenanceSystemsV5Response|*:getMaintenanceSystemsV5Return|*:maintenancePeriods|*:item|*:times|*:item|*:value");
    name = responseXml.getChildContent(L"*:Body|*:getMaintenanceSystemsV5Response|*:getMaintenanceSystemsV5Return|*:name");
    const wchar_t *confirmationLink = responseXml.getChildContent(L"*:Body|*:getMaintenanceSystemsV5Response|*:getMaintenanceSystemsV5Return|*:status|*:confirmationLink");
    const wchar_t *statusCode = responseXml.getChildContent(L"*:Body|*:getMaintenanceSystemsV5Response|*:getMaintenanceSystemsV5Return|*:status|*:statusCode");
    }
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:getMaintenanceSystemsV5>
            <intf:vrid>xml</intf:vrid>
            <intf:descriptionLanguage>xml</intf:descriptionLanguage>
            <intf:carTypeId>xml</intf:carTypeId>
            <intf:repairtimesTypeId>xml</intf:repairtimesTypeId>
            <intf:rtTypeCategory>xml</intf:rtTypeCategory>
            <intf:useImperial>xml</intf:useImperial>
            <intf:includeServiceTimes>xml</intf:includeServiceTimes>
        </intf:getMaintenanceSystemsV5>
    </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:getMaintenanceSystemsV5Response>
            <intf:getMaintenanceSystemsV5Return>
                <intf:criteria>
                    <intf:item>
                        <intf:attributeTypeDescription>xml</intf:attributeTypeDescription>
                        <intf:keyTableDescription>xml</intf:keyTableDescription>
                        <intf:keyValue>xml</intf:keyValue>
                        <intf:keyValueDescription>xml</intf:keyValueDescription>
                        <intf:kritnr>xml</intf:kritnr>
                        <intf:tabnr>xml</intf:tabnr>
                    </intf:item>
                </intf:criteria>
                <intf:generalCriterias>
                    <intf:item>
                        <intf:groupCriterias>
                            <intf:item>
                                <intf:criteriaId>xml</intf:criteriaId>
                                <intf:criteriaLevel>xml</intf:criteriaLevel>
                                <intf:description>xml</intf:description>
                                <intf:value1>xml</intf:value1>
                                <intf:value2>xml</intf:value2>
                            </intf:item>
                        </intf:groupCriterias>
                        <intf:groupDescription>xml</intf:groupDescription>
                        <intf:groupId>xml</intf:groupId>
                    </intf:item>
                </intf:generalCriterias>
                <intf:id>xml</intf:id>
                <intf:maintenancePeriods>
                    <intf:item>
                        <intf:combinable>xml</intf:combinable>
                        <intf:generalCriterias>
                            <intf:item>
                                <intf:groupCriterias>
                                    <intf:item>
                                        <intf:criteriaId>xml</intf:criteriaId>
                                        <intf:criteriaLevel>xml</intf:criteriaLevel>
                                        <intf:description>xml</intf:description>
                                        <intf:value1>xml</intf:value1>
                                        <intf:value2>xml</intf:value2>
                                    </intf:item>
                                </intf:groupCriterias>
                                <intf:groupDescription>xml</intf:groupDescription>
                                <intf:groupId>xml</intf:groupId>
                            </intf:item>
                        </intf:generalCriterias>
                        <intf:id>xml</intf:id>
                        <intf:name>xml</intf:name>
                        <intf:times>
                            <intf:item>
                                <intf:code>xml</intf:code>
                                <intf:selected>xml</intf:selected>
                                <intf:type>xml</intf:type>
                                <intf:value>xml</intf:value>
                            </intf:item>
                        </intf:times>
                    </intf:item>
                </intf:maintenancePeriods>
                <intf:name>xml</intf:name>
                <intf:status>
                    <intf:confirmationLink>xml</intf:confirmationLink>
                    <intf:statusCode>xml</intf:statusCode>
                </intf:status>
            </intf:getMaintenanceSystemsV5Return>
        </intf:getMaintenanceSystemsV5Response>
    </soapenv:Body>
</soapenv:Envelope>