SOAP WSDL Generate Code

DataServiceEndpointSoapBinding / getMaintenanceTasksWithTimes

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
xml: HCkXml;
soapRequestBody: PWideChar;
endpoint: PWideChar;
soapAction: PWideChar;
contentType: PWideChar;
http: HCkHttp;
resp: HCkHttpResponse;
responseXml: HCkXml;
statusCode: Integer;
awNumber: PWideChar;
description: PWideChar;
item: PWideChar;
hasInfoGroups: PWideChar;
hasSubnodes: PWideChar;
id: PWideChar;
order: PWideChar;
confirmationLink: PWideChar;
statusCode: PWideChar;
value: PWideChar;
mandatoryReplacement: PWideChar;
name: PWideChar;
remark: PWideChar;
filter: PWideChar;
id1: PWideChar;
id2: PWideChar;
operation: PWideChar;
time: PWideChar;

begin
xml := CkXml_Create();
CkXml_putTag(xml,'soapenv:Envelope');
CkXml_AddAttribute(xml,'xmlns:intf','http://data.webservice.workshop.vivid.nl');
CkXml_AddAttribute(xml,'xmlns:soapenv','http://schemas.xmlsoap.org/soap/envelope/');
CkXml_UpdateChildContent(xml,'soapenv:Header','');
CkXml_UpdateChildContent(xml,'soapenv:Body|intf:getMaintenanceTasksWithTimes|intf:vrid','xml');
CkXml_UpdateChildContent(xml,'soapenv:Body|intf:getMaintenanceTasksWithTimes|intf:descriptionLanguage','xml');
CkXml_UpdateChildContent(xml,'soapenv:Body|intf:getMaintenanceTasksWithTimes|intf:carTypeId','xml');
CkXml_UpdateChildContent(xml,'soapenv:Body|intf:getMaintenanceTasksWithTimes|intf:systemId','xml');
CkXml_UpdateChildContent(xml,'soapenv:Body|intf:getMaintenanceTasksWithTimes|intf:periodId','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. 
CkXml_putEmitXmlDecl(xml,False);
soapRequestBody := CkXml__getXml(xml);

endpoint := 'http://www.haynespro-services.com/workshopServices3/services/DataServiceEndpoint';
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) then
  begin
    Memo1.Lines.Add(CkHttp__lastErrorText(http));
    Memo1.Lines.Add('Failed to send SOAP request.');
    Exit;
  end;

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

statusCode := CkHttpResponse_getStatusCode(resp);
Memo1.Lines.Add('response status code: ' + IntToStr(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) then
  begin
    Memo1.Lines.Add(CkXml__getXml(responseXml));
    Exit;
  end;

Memo1.Lines.Add(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).

awNumber := CkXml__getChildContent(responseXml,'*:Body|*:getMaintenanceTasksWithTimesResponse|*:getMaintenanceTasksWithTimesReturn|*:followUpRepairs|*:item|*:awNumber');
description := CkXml__getChildContent(responseXml,'*:Body|*:getMaintenanceTasksWithTimesResponse|*:getMaintenanceTasksWithTimesReturn|*:followUpRepairs|*:item|*:description');
item := CkXml__getChildContent(responseXml,'*:Body|*:getMaintenanceTasksWithTimesResponse|*:getMaintenanceTasksWithTimesReturn|*:followUpRepairs|*:item|*:genarts|*:item');
hasInfoGroups := CkXml__getChildContent(responseXml,'*:Body|*:getMaintenanceTasksWithTimesResponse|*:getMaintenanceTasksWithTimesReturn|*:followUpRepairs|*:item|*:hasInfoGroups');
hasSubnodes := CkXml__getChildContent(responseXml,'*:Body|*:getMaintenanceTasksWithTimesResponse|*:getMaintenanceTasksWithTimesReturn|*:followUpRepairs|*:item|*:hasSubnodes');
id := CkXml__getChildContent(responseXml,'*:Body|*:getMaintenanceTasksWithTimesResponse|*:getMaintenanceTasksWithTimesReturn|*:followUpRepairs|*:item|*:id');
order := CkXml__getChildContent(responseXml,'*:Body|*:getMaintenanceTasksWithTimesResponse|*:getMaintenanceTasksWithTimesReturn|*:followUpRepairs|*:item|*:order');
confirmationLink := CkXml__getChildContent(responseXml,'*:Body|*:getMaintenanceTasksWithTimesResponse|*:getMaintenanceTasksWithTimesReturn|*:followUpRepairs|*:item|*:status|*:confirmationLink');
statusCode := CkXml__getChildContent(responseXml,'*:Body|*:getMaintenanceTasksWithTimesResponse|*:getMaintenanceTasksWithTimesReturn|*:followUpRepairs|*:item|*:status|*:statusCode');
value := CkXml__getChildContent(responseXml,'*:Body|*:getMaintenanceTasksWithTimesResponse|*:getMaintenanceTasksWithTimesReturn|*:followUpRepairs|*:item|*:value');
item := CkXml__getChildContent(responseXml,'*:Body|*:getMaintenanceTasksWithTimesResponse|*:getMaintenanceTasksWithTimesReturn|*:genArtNumbers|*:item');
item := CkXml__getChildContent(responseXml,'*:Body|*:getMaintenanceTasksWithTimesResponse|*:getMaintenanceTasksWithTimesReturn|*:longDescriptions|*:item');
mandatoryReplacement := CkXml__getChildContent(responseXml,'*:Body|*:getMaintenanceTasksWithTimesResponse|*:getMaintenanceTasksWithTimesReturn|*:mandatoryReplacement');
name := CkXml__getChildContent(responseXml,'*:Body|*:getMaintenanceTasksWithTimesResponse|*:getMaintenanceTasksWithTimesReturn|*:name');
order := CkXml__getChildContent(responseXml,'*:Body|*:getMaintenanceTasksWithTimesResponse|*:getMaintenanceTasksWithTimesReturn|*:order');
remark := CkXml__getChildContent(responseXml,'*:Body|*:getMaintenanceTasksWithTimesResponse|*:getMaintenanceTasksWithTimesReturn|*:remark');
filter := CkXml__getChildContent(responseXml,'*:Body|*:getMaintenanceTasksWithTimesResponse|*:getMaintenanceTasksWithTimesReturn|*:smartLinks|*:item|*:filter');
id1 := CkXml__getChildContent(responseXml,'*:Body|*:getMaintenanceTasksWithTimesResponse|*:getMaintenanceTasksWithTimesReturn|*:smartLinks|*:item|*:id1');
id2 := CkXml__getChildContent(responseXml,'*:Body|*:getMaintenanceTasksWithTimesResponse|*:getMaintenanceTasksWithTimesReturn|*:smartLinks|*:item|*:id2');
operation := CkXml__getChildContent(responseXml,'*:Body|*:getMaintenanceTasksWithTimesResponse|*:getMaintenanceTasksWithTimesReturn|*:smartLinks|*:item|*:operation');
item := CkXml__getChildContent(responseXml,'*:Body|*:getMaintenanceTasksWithTimesResponse|*:getMaintenanceTasksWithTimesReturn|*:smartLinks|*:item|*:text|*:item');
confirmationLink := CkXml__getChildContent(responseXml,'*:Body|*:getMaintenanceTasksWithTimesResponse|*:getMaintenanceTasksWithTimesReturn|*:status|*:confirmationLink');
statusCode := CkXml__getChildContent(responseXml,'*:Body|*:getMaintenanceTasksWithTimesResponse|*:getMaintenanceTasksWithTimesReturn|*:status|*:statusCode');
time := CkXml__getChildContent(responseXml,'*:Body|*:getMaintenanceTasksWithTimesResponse|*:getMaintenanceTasksWithTimesReturn|*:time');

CkXml_Dispose(xml);
CkHttp_Dispose(http);
CkXml_Dispose(responseXml);

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:getMaintenanceTasksWithTimes>
            <intf:vrid>xml</intf:vrid>
            <intf:descriptionLanguage>xml</intf:descriptionLanguage>
            <intf:carTypeId>xml</intf:carTypeId>
            <intf:systemId>xml</intf:systemId>
            <intf:periodId>xml</intf:periodId>
        </intf:getMaintenanceTasksWithTimes>
    </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:getMaintenanceTasksWithTimesResponse>
            <intf:getMaintenanceTasksWithTimesReturn>
                <intf:followUpRepairs>
                    <intf:item>
                        <intf:awNumber>xml</intf:awNumber>
                        <intf:description>xml</intf:description>
                        <intf:genarts>
                            <intf:item>xml</intf:item>
                        </intf:genarts>
                        <intf:hasInfoGroups>xml</intf:hasInfoGroups>
                        <intf:hasSubnodes>xml</intf:hasSubnodes>
                        <intf:id>xml</intf:id>
                        <intf:order>xml</intf:order>
                        <intf:status>
                            <intf:confirmationLink>xml</intf:confirmationLink>
                            <intf:statusCode>xml</intf:statusCode>
                        </intf:status>
                        <intf:value>xml</intf:value>
                    </intf:item>
                </intf:followUpRepairs>
                <intf:genArtNumbers>
                    <intf:item>xml</intf:item>
                </intf:genArtNumbers>
                <intf:longDescriptions>
                    <intf:item>xml</intf:item>
                </intf:longDescriptions>
                <intf:mandatoryReplacement>xml</intf:mandatoryReplacement>
                <intf:name>xml</intf:name>
                <intf:order>xml</intf:order>
                <intf:remark>xml</intf:remark>
                <intf:smartLinks>
                    <intf:item>
                        <intf:filter>xml</intf:filter>
                        <intf:id1>xml</intf:id1>
                        <intf:id2>xml</intf:id2>
                        <intf:operation>xml</intf:operation>
                        <intf:text>
                            <intf:item>xml</intf:item>
                        </intf:text>
                    </intf:item>
                </intf:smartLinks>
                <intf:status>
                    <intf:confirmationLink>xml</intf:confirmationLink>
                    <intf:statusCode>xml</intf:statusCode>
                </intf:status>
                <intf:subTasks>
                    <intf:item/>
                </intf:subTasks>
                <intf:time>xml</intf:time>
            </intf:getMaintenanceTasksWithTimesReturn>
        </intf:getMaintenanceTasksWithTimesResponse>
    </soapenv:Body>
</soapenv:Envelope>