SOAP WSDL Generate Code

DataServiceEndpointSoapBinding / getMaintenanceSystemsV4

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
Chilkat.Xml xml = new Chilkat.Xml();
xml.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:getMaintenanceSystemsV4|intf:vrid","xml");
xml.UpdateChildContent("soapenv:Body|intf:getMaintenanceSystemsV4|intf:descriptionLanguage","xml");
xml.UpdateChildContent("soapenv:Body|intf:getMaintenanceSystemsV4|intf:carTypeId","xml");
xml.UpdateChildContent("soapenv:Body|intf:getMaintenanceSystemsV4|intf:repairtimesTypeId","xml");
xml.UpdateChildContent("soapenv:Body|intf:getMaintenanceSystemsV4|intf:rtTypeCategory","xml");
xml.UpdateChildContent("soapenv:Body|intf:getMaintenanceSystemsV4|intf:useImperial","xml");
xml.UpdateChildContent("soapenv:Body|intf:getMaintenanceSystemsV4|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.EmitXmlDecl = false;
string soapRequestBody = xml.GetXml();

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

Chilkat.Http http = new Chilkat.Http();

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

Chilkat.HttpResponse resp = http.PostXml(endpoint,soapRequestBody,"utf-8");
if (http.LastMethodSuccess == false) {
    Debug.WriteLine(http.LastErrorText);
    Debug.WriteLine("Failed to send SOAP request.");
    return;
}

// Get the XML response body.
Chilkat.Xml responseXml = new Chilkat.Xml();
resp.GetBodyXml(responseXml);

int statusCode = resp.StatusCode;
Debug.WriteLine("response status code: " + Convert.ToString(statusCode));

// If the status code does not indicate succcess, then show the response XML,
// which probably contains error information.
if (statusCode != 200) {
    Debug.WriteLine(responseXml.GetXml());
    return;
}

Debug.WriteLine(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).

string attributeTypeDescription = responseXml.GetChildContent("*:Body|*:getMaintenanceSystemsV4Response|*:getMaintenanceSystemsV4Return|*:criteria|*:item|*:attributeTypeDescription");
string keyTableDescription = responseXml.GetChildContent("*:Body|*:getMaintenanceSystemsV4Response|*:getMaintenanceSystemsV4Return|*:criteria|*:item|*:keyTableDescription");
string keyValue = responseXml.GetChildContent("*:Body|*:getMaintenanceSystemsV4Response|*:getMaintenanceSystemsV4Return|*:criteria|*:item|*:keyValue");
string keyValueDescription = responseXml.GetChildContent("*:Body|*:getMaintenanceSystemsV4Response|*:getMaintenanceSystemsV4Return|*:criteria|*:item|*:keyValueDescription");
string kritnr = responseXml.GetChildContent("*:Body|*:getMaintenanceSystemsV4Response|*:getMaintenanceSystemsV4Return|*:criteria|*:item|*:kritnr");
string tabnr = responseXml.GetChildContent("*:Body|*:getMaintenanceSystemsV4Response|*:getMaintenanceSystemsV4Return|*:criteria|*:item|*:tabnr");
string id = responseXml.GetChildContent("*:Body|*:getMaintenanceSystemsV4Response|*:getMaintenanceSystemsV4Return|*:id");
string combinable = responseXml.GetChildContent("*:Body|*:getMaintenanceSystemsV4Response|*:getMaintenanceSystemsV4Return|*:maintenancePeriods|*:item|*:combinable");
id = responseXml.GetChildContent("*:Body|*:getMaintenanceSystemsV4Response|*:getMaintenanceSystemsV4Return|*:maintenancePeriods|*:item|*:id");
string name = responseXml.GetChildContent("*:Body|*:getMaintenanceSystemsV4Response|*:getMaintenanceSystemsV4Return|*:maintenancePeriods|*:item|*:name");
string code = responseXml.GetChildContent("*:Body|*:getMaintenanceSystemsV4Response|*:getMaintenanceSystemsV4Return|*:maintenancePeriods|*:item|*:times|*:item|*:code");
string selected = responseXml.GetChildContent("*:Body|*:getMaintenanceSystemsV4Response|*:getMaintenanceSystemsV4Return|*:maintenancePeriods|*:item|*:times|*:item|*:selected");
string v_type = responseXml.GetChildContent("*:Body|*:getMaintenanceSystemsV4Response|*:getMaintenanceSystemsV4Return|*:maintenancePeriods|*:item|*:times|*:item|*:type");
string value = responseXml.GetChildContent("*:Body|*:getMaintenanceSystemsV4Response|*:getMaintenanceSystemsV4Return|*:maintenancePeriods|*:item|*:times|*:item|*:value");
name = responseXml.GetChildContent("*:Body|*:getMaintenanceSystemsV4Response|*:getMaintenanceSystemsV4Return|*:name");
string confirmationLink = responseXml.GetChildContent("*:Body|*:getMaintenanceSystemsV4Response|*:getMaintenanceSystemsV4Return|*:status|*:confirmationLink");
string statusCode = responseXml.GetChildContent("*:Body|*:getMaintenanceSystemsV4Response|*:getMaintenanceSystemsV4Return|*: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:getMaintenanceSystemsV4>
            <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:getMaintenanceSystemsV4>
    </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:getMaintenanceSystemsV4Response>
            <intf:getMaintenanceSystemsV4Return>
                <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:id>xml</intf:id>
                <intf:maintenancePeriods>
                    <intf:item>
                        <intf:combinable>xml</intf:combinable>
                        <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:getMaintenanceSystemsV4Return>
        </intf:getMaintenanceSystemsV4Response>
    </soapenv:Body>
</soapenv:Envelope>