DataServiceEndpointSoapBinding / getRepairtimeNodesV4
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:getRepairtimeNodesV4|intf:vrid",L"xml");
xml.UpdateChildContent(L"soapenv:Body|intf:getRepairtimeNodesV4|intf:descriptionLanguage",L"xml");
xml.UpdateChildContent(L"soapenv:Body|intf:getRepairtimeNodesV4|intf:repairtimeTypeId",L"xml");
xml.UpdateChildContent(L"soapenv:Body|intf:getRepairtimeNodesV4|intf:typeCategory",L"xml");
xml.UpdateChildContent(L"soapenv:Body|intf:getRepairtimeNodesV4|intf:nodesIds",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 *awNumber = responseXml.getChildContent(L"*:Body|*:getRepairtimeNodesV4Response|*:getRepairtimeNodesV4Return|*:awNumber");
const wchar_t *description = responseXml.getChildContent(L"*:Body|*:getRepairtimeNodesV4Response|*:getRepairtimeNodesV4Return|*:description");
description = responseXml.getChildContent(L"*:Body|*:getRepairtimeNodesV4Response|*:getRepairtimeNodesV4Return|*:genarts|*:item|*:description");
const wchar_t *id = responseXml.getChildContent(L"*:Body|*:getRepairtimeNodesV4Response|*:getRepairtimeNodesV4Return|*:genarts|*:item|*:id");
const wchar_t *mandatory = responseXml.getChildContent(L"*:Body|*:getRepairtimeNodesV4Response|*:getRepairtimeNodesV4Return|*:genarts|*:item|*:mandatory");
const wchar_t *hasInfoGroups = responseXml.getChildContent(L"*:Body|*:getRepairtimeNodesV4Response|*:getRepairtimeNodesV4Return|*:hasInfoGroups");
const wchar_t *hasSubnodes = responseXml.getChildContent(L"*:Body|*:getRepairtimeNodesV4Response|*:getRepairtimeNodesV4Return|*:hasSubnodes");
id = responseXml.getChildContent(L"*:Body|*:getRepairtimeNodesV4Response|*:getRepairtimeNodesV4Return|*:id");
const wchar_t *jobType = responseXml.getChildContent(L"*:Body|*:getRepairtimeNodesV4Response|*:getRepairtimeNodesV4Return|*:jobType");
const wchar_t *oeCode = responseXml.getChildContent(L"*:Body|*:getRepairtimeNodesV4Response|*:getRepairtimeNodesV4Return|*:oeCode");
const wchar_t *order = responseXml.getChildContent(L"*:Body|*:getRepairtimeNodesV4Response|*:getRepairtimeNodesV4Return|*:order");
const wchar_t *confirmationLink = responseXml.getChildContent(L"*:Body|*:getRepairtimeNodesV4Response|*:getRepairtimeNodesV4Return|*:status|*:confirmationLink");
const wchar_t *statusCode = responseXml.getChildContent(L"*:Body|*:getRepairtimeNodesV4Response|*:getRepairtimeNodesV4Return|*:status|*:statusCode");
const wchar_t *criteriaId = responseXml.getChildContent(L"*:Body|*:getRepairtimeNodesV4Response|*:getRepairtimeNodesV4Return|*:timeCriterias|*:item|*:groupCriterias|*:item|*:criteriaId");
const wchar_t *criteriaLevel = responseXml.getChildContent(L"*:Body|*:getRepairtimeNodesV4Response|*:getRepairtimeNodesV4Return|*:timeCriterias|*:item|*:groupCriterias|*:item|*:criteriaLevel");
description = responseXml.getChildContent(L"*:Body|*:getRepairtimeNodesV4Response|*:getRepairtimeNodesV4Return|*:timeCriterias|*:item|*:groupCriterias|*:item|*:description");
const wchar_t *value1 = responseXml.getChildContent(L"*:Body|*:getRepairtimeNodesV4Response|*:getRepairtimeNodesV4Return|*:timeCriterias|*:item|*:groupCriterias|*:item|*:value1");
const wchar_t *value2 = responseXml.getChildContent(L"*:Body|*:getRepairtimeNodesV4Response|*:getRepairtimeNodesV4Return|*:timeCriterias|*:item|*:groupCriterias|*:item|*:value2");
const wchar_t *groupDescription = responseXml.getChildContent(L"*:Body|*:getRepairtimeNodesV4Response|*:getRepairtimeNodesV4Return|*:timeCriterias|*:item|*:groupDescription");
const wchar_t *groupId = responseXml.getChildContent(L"*:Body|*:getRepairtimeNodesV4Response|*:getRepairtimeNodesV4Return|*:timeCriterias|*:item|*:groupId");
const wchar_t *value = responseXml.getChildContent(L"*:Body|*:getRepairtimeNodesV4Response|*:getRepairtimeNodesV4Return|*:value");
}
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:getRepairtimeNodesV4>
<intf:vrid>xml</intf:vrid>
<intf:descriptionLanguage>xml</intf:descriptionLanguage>
<intf:repairtimeTypeId>xml</intf:repairtimeTypeId>
<intf:typeCategory>xml</intf:typeCategory>
<intf:nodesIds>xml</intf:nodesIds>
</intf:getRepairtimeNodesV4>
</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:getRepairtimeNodesV4Response>
<intf:getRepairtimeNodesV4Return>
<intf:awNumber>xml</intf:awNumber>
<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:hasInfoGroups>xml</intf:hasInfoGroups>
<intf:hasSubnodes>xml</intf:hasSubnodes>
<intf:id>xml</intf:id>
<intf:jobType>xml</intf:jobType>
<intf:oeCode>xml</intf:oeCode>
<intf:order>xml</intf:order>
<intf:status>
<intf:confirmationLink>xml</intf:confirmationLink>
<intf:statusCode>xml</intf:statusCode>
</intf:status>
<intf:timeCriterias>
<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:timeCriterias>
<intf:value>xml</intf:value>
</intf:getRepairtimeNodesV4Return>
</intf:getRepairtimeNodesV4Response>
</soapenv:Body>
</soapenv:Envelope>