DataServiceEndpointSoapBinding / getMaintenanceSystemsV6
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 <CkXml.h>
#include <CkHttp.h>
#include <CkHttpResponse.h>
void ChilkatSample(void)
{
CkXml xml;
xml.put_Tag("soapenv:Envelope");
xml.AddAttribute("xmlns:intf","http://data.webservice.workshop.vivid.nl");
xml.AddAttribute("xmlns:soapenv","http://schemas.xmlsoap.org/soap/envelope/");
xml.UpdateChildContent("soapenv:Header","");
xml.UpdateChildContent("soapenv:Body|intf:getMaintenanceSystemsV6|intf:vrid","xml");
xml.UpdateChildContent("soapenv:Body|intf:getMaintenanceSystemsV6|intf:descriptionLanguage","xml");
xml.UpdateChildContent("soapenv:Body|intf:getMaintenanceSystemsV6|intf:carTypeId","xml");
xml.UpdateChildContent("soapenv:Body|intf:getMaintenanceSystemsV6|intf:repairtimesTypeId","xml");
xml.UpdateChildContent("soapenv:Body|intf:getMaintenanceSystemsV6|intf:rtTypeCategory","xml");
xml.UpdateChildContent("soapenv:Body|intf:getMaintenanceSystemsV6|intf:useImperial","xml");
xml.UpdateChildContent("soapenv:Body|intf:getMaintenanceSystemsV6|intf:includeServiceTimes","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 char *soapRequestBody = xml.getXml();
const char *endpoint = "http://www.haynespro-services.com/workshopServices3/services/DataServiceEndpoint";
const char *soapAction = "";
// For SOAP requests, the standard Content-Type is usually set to "text/xml" or "application/soap+xml"
const char *contentType = "text/xml";
CkHttp http;
http.ClearHeaders();
http.SetRequestHeader("Content-Type",contentType);
http.SetRequestHeader("SOAPAction",soapAction);
CkHttpResponse *resp = http.PostXml(endpoint,soapRequestBody,"utf-8");
if (http.get_LastMethodSuccess() == false) {
std::cout << http.lastErrorText() << "\r\n";
std::cout << "Failed to send SOAP request." << "\r\n";
return;
}
// Get the XML response body.
CkXml responseXml;
resp->GetBodyXml(responseXml);
int statusCode = resp->get_StatusCode();
std::cout << "response status code: " << statusCode << "\r\n";
delete resp;
// If the status code does not indicate succcess, then show the response XML,
// which probably contains error information.
if (statusCode != 200) {
std::cout << responseXml.getXml() << "\r\n";
return;
}
std::cout << responseXml.getXml() << "\r\n";
// 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 char *attributeTypeDescription = responseXml.getChildContent("*:Body|*:getMaintenanceSystemsV6Response|*:getMaintenanceSystemsV6Return|*:criteria|*:item|*:attributeTypeDescription");
const char *keyTableDescription = responseXml.getChildContent("*:Body|*:getMaintenanceSystemsV6Response|*:getMaintenanceSystemsV6Return|*:criteria|*:item|*:keyTableDescription");
const char *keyValue = responseXml.getChildContent("*:Body|*:getMaintenanceSystemsV6Response|*:getMaintenanceSystemsV6Return|*:criteria|*:item|*:keyValue");
const char *keyValueDescription = responseXml.getChildContent("*:Body|*:getMaintenanceSystemsV6Response|*:getMaintenanceSystemsV6Return|*:criteria|*:item|*:keyValueDescription");
const char *kritnr = responseXml.getChildContent("*:Body|*:getMaintenanceSystemsV6Response|*:getMaintenanceSystemsV6Return|*:criteria|*:item|*:kritnr");
const char *tabnr = responseXml.getChildContent("*:Body|*:getMaintenanceSystemsV6Response|*:getMaintenanceSystemsV6Return|*:criteria|*:item|*:tabnr");
const char *criteriaId = responseXml.getChildContent("*:Body|*:getMaintenanceSystemsV6Response|*:getMaintenanceSystemsV6Return|*:generalCriterias|*:item|*:groupCriterias|*:item|*:criteriaId");
const char *criteriaLevel = responseXml.getChildContent("*:Body|*:getMaintenanceSystemsV6Response|*:getMaintenanceSystemsV6Return|*:generalCriterias|*:item|*:groupCriterias|*:item|*:criteriaLevel");
const char *description = responseXml.getChildContent("*:Body|*:getMaintenanceSystemsV6Response|*:getMaintenanceSystemsV6Return|*:generalCriterias|*:item|*:groupCriterias|*:item|*:description");
const char *value1 = responseXml.getChildContent("*:Body|*:getMaintenanceSystemsV6Response|*:getMaintenanceSystemsV6Return|*:generalCriterias|*:item|*:groupCriterias|*:item|*:value1");
const char *value2 = responseXml.getChildContent("*:Body|*:getMaintenanceSystemsV6Response|*:getMaintenanceSystemsV6Return|*:generalCriterias|*:item|*:groupCriterias|*:item|*:value2");
const char *groupDescription = responseXml.getChildContent("*:Body|*:getMaintenanceSystemsV6Response|*:getMaintenanceSystemsV6Return|*:generalCriterias|*:item|*:groupDescription");
const char *groupId = responseXml.getChildContent("*:Body|*:getMaintenanceSystemsV6Response|*:getMaintenanceSystemsV6Return|*:generalCriterias|*:item|*:groupId");
const char *id = responseXml.getChildContent("*:Body|*:getMaintenanceSystemsV6Response|*:getMaintenanceSystemsV6Return|*:id");
const char *combinable = responseXml.getChildContent("*:Body|*:getMaintenanceSystemsV6Response|*:getMaintenanceSystemsV6Return|*:maintenancePeriods|*:item|*:combinable");
criteriaId = responseXml.getChildContent("*:Body|*:getMaintenanceSystemsV6Response|*:getMaintenanceSystemsV6Return|*:maintenancePeriods|*:item|*:generalCriterias|*:item|*:groupCriterias|*:item|*:criteriaId");
criteriaLevel = responseXml.getChildContent("*:Body|*:getMaintenanceSystemsV6Response|*:getMaintenanceSystemsV6Return|*:maintenancePeriods|*:item|*:generalCriterias|*:item|*:groupCriterias|*:item|*:criteriaLevel");
description = responseXml.getChildContent("*:Body|*:getMaintenanceSystemsV6Response|*:getMaintenanceSystemsV6Return|*:maintenancePeriods|*:item|*:generalCriterias|*:item|*:groupCriterias|*:item|*:description");
value1 = responseXml.getChildContent("*:Body|*:getMaintenanceSystemsV6Response|*:getMaintenanceSystemsV6Return|*:maintenancePeriods|*:item|*:generalCriterias|*:item|*:groupCriterias|*:item|*:value1");
value2 = responseXml.getChildContent("*:Body|*:getMaintenanceSystemsV6Response|*:getMaintenanceSystemsV6Return|*:maintenancePeriods|*:item|*:generalCriterias|*:item|*:groupCriterias|*:item|*:value2");
groupDescription = responseXml.getChildContent("*:Body|*:getMaintenanceSystemsV6Response|*:getMaintenanceSystemsV6Return|*:maintenancePeriods|*:item|*:generalCriterias|*:item|*:groupDescription");
groupId = responseXml.getChildContent("*:Body|*:getMaintenanceSystemsV6Response|*:getMaintenanceSystemsV6Return|*:maintenancePeriods|*:item|*:generalCriterias|*:item|*:groupId");
id = responseXml.getChildContent("*:Body|*:getMaintenanceSystemsV6Response|*:getMaintenanceSystemsV6Return|*:maintenancePeriods|*:item|*:id");
const char *name = responseXml.getChildContent("*:Body|*:getMaintenanceSystemsV6Response|*:getMaintenanceSystemsV6Return|*:maintenancePeriods|*:item|*:name");
const char *periodSentenceId = responseXml.getChildContent("*:Body|*:getMaintenanceSystemsV6Response|*:getMaintenanceSystemsV6Return|*:maintenancePeriods|*:item|*:periodSentenceId");
const char *code = responseXml.getChildContent("*:Body|*:getMaintenanceSystemsV6Response|*:getMaintenanceSystemsV6Return|*:maintenancePeriods|*:item|*:times|*:item|*:code");
const char *selected = responseXml.getChildContent("*:Body|*:getMaintenanceSystemsV6Response|*:getMaintenanceSystemsV6Return|*:maintenancePeriods|*:item|*:times|*:item|*:selected");
const char *v_type = responseXml.getChildContent("*:Body|*:getMaintenanceSystemsV6Response|*:getMaintenanceSystemsV6Return|*:maintenancePeriods|*:item|*:times|*:item|*:type");
const char *value = responseXml.getChildContent("*:Body|*:getMaintenanceSystemsV6Response|*:getMaintenanceSystemsV6Return|*:maintenancePeriods|*:item|*:times|*:item|*:value");
name = responseXml.getChildContent("*:Body|*:getMaintenanceSystemsV6Response|*:getMaintenanceSystemsV6Return|*:name");
const char *confirmationLink = responseXml.getChildContent("*:Body|*:getMaintenanceSystemsV6Response|*:getMaintenanceSystemsV6Return|*:status|*:confirmationLink");
const char *statusCode = responseXml.getChildContent("*:Body|*:getMaintenanceSystemsV6Response|*:getMaintenanceSystemsV6Return|*: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:getMaintenanceSystemsV6>
<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:getMaintenanceSystemsV6>
</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:getMaintenanceSystemsV6Response>
<intf:getMaintenanceSystemsV6Return>
<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:periodSentenceId>xml</intf:periodSentenceId>
<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:getMaintenanceSystemsV6Return>
</intf:getMaintenanceSystemsV6Response>
</soapenv:Body>
</soapenv:Envelope>