SOAP WSDL Generate Code

DataServiceEndpointSoapBinding / getMaintenanceSystemsV7

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
func chilkatTest() {
    let xml = CkoXml()
    xml.Tag = "soapenv:Envelope"
    xml.AddAttribute("xmlns:intf", value: "http://data.webservice.workshop.vivid.nl")
    xml.AddAttribute("xmlns:soapenv", value: "http://schemas.xmlsoap.org/soap/envelope/")
    xml.UpdateChildContent("soapenv:Header", value: "")
    xml.UpdateChildContent("soapenv:Body|intf:getMaintenanceSystemsV7|intf:vrid", value: "xml")
    xml.UpdateChildContent("soapenv:Body|intf:getMaintenanceSystemsV7|intf:descriptionLanguage", value: "xml")
    xml.UpdateChildContent("soapenv:Body|intf:getMaintenanceSystemsV7|intf:carTypeId", value: "xml")
    xml.UpdateChildContent("soapenv:Body|intf:getMaintenanceSystemsV7|intf:repairtimesTypeId", value: "xml")
    xml.UpdateChildContent("soapenv:Body|intf:getMaintenanceSystemsV7|intf:rtTypeCategory", value: "xml")
    xml.UpdateChildContent("soapenv:Body|intf:getMaintenanceSystemsV7|intf:countryCodes", value: "xml")
    xml.UpdateChildContent("soapenv:Body|intf:getMaintenanceSystemsV7|intf:useImperial", value: "xml")
    xml.UpdateChildContent("soapenv:Body|intf:getMaintenanceSystemsV7|intf:includeServiceTimes", value: "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
    var soapRequestBody: String? = xml.GetXml()

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

    let http = CkoHttp()

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

    var resp: CkoHttpResponse? = http.PostXml(endpoint, xmlDoc: soapRequestBody, charset: "utf-8")
    if http.LastMethodSuccess == false {
        print("\(http.LastErrorText)")
        print("Failed to send SOAP request.")
        return
    }

    // Get the XML response body.
    let responseXml = CkoXml()
    resp!.GetBodyXml(responseXml)

    var statusCode: Int = resp!.StatusCode.intValue
    print("response status code: \(statusCode)")

    resp = nil

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

    print("\(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).

    var attributeTypeDescription: String? = responseXml.GetChildContent("*:Body|*:getMaintenanceSystemsV7Response|*:getMaintenanceSystemsV7Return|*:criteria|*:item|*:attributeTypeDescription")
    var keyTableDescription: String? = responseXml.GetChildContent("*:Body|*:getMaintenanceSystemsV7Response|*:getMaintenanceSystemsV7Return|*:criteria|*:item|*:keyTableDescription")
    var keyValue: String? = responseXml.GetChildContent("*:Body|*:getMaintenanceSystemsV7Response|*:getMaintenanceSystemsV7Return|*:criteria|*:item|*:keyValue")
    var keyValueDescription: String? = responseXml.GetChildContent("*:Body|*:getMaintenanceSystemsV7Response|*:getMaintenanceSystemsV7Return|*:criteria|*:item|*:keyValueDescription")
    var kritnr: String? = responseXml.GetChildContent("*:Body|*:getMaintenanceSystemsV7Response|*:getMaintenanceSystemsV7Return|*:criteria|*:item|*:kritnr")
    var tabnr: String? = responseXml.GetChildContent("*:Body|*:getMaintenanceSystemsV7Response|*:getMaintenanceSystemsV7Return|*:criteria|*:item|*:tabnr")
    var criteriaId: String? = responseXml.GetChildContent("*:Body|*:getMaintenanceSystemsV7Response|*:getMaintenanceSystemsV7Return|*:generalCriterias|*:item|*:groupCriterias|*:item|*:criteriaId")
    var criteriaLevel: String? = responseXml.GetChildContent("*:Body|*:getMaintenanceSystemsV7Response|*:getMaintenanceSystemsV7Return|*:generalCriterias|*:item|*:groupCriterias|*:item|*:criteriaLevel")
    var description: String? = responseXml.GetChildContent("*:Body|*:getMaintenanceSystemsV7Response|*:getMaintenanceSystemsV7Return|*:generalCriterias|*:item|*:groupCriterias|*:item|*:description")
    var value1: String? = responseXml.GetChildContent("*:Body|*:getMaintenanceSystemsV7Response|*:getMaintenanceSystemsV7Return|*:generalCriterias|*:item|*:groupCriterias|*:item|*:value1")
    var value2: String? = responseXml.GetChildContent("*:Body|*:getMaintenanceSystemsV7Response|*:getMaintenanceSystemsV7Return|*:generalCriterias|*:item|*:groupCriterias|*:item|*:value2")
    var groupDescription: String? = responseXml.GetChildContent("*:Body|*:getMaintenanceSystemsV7Response|*:getMaintenanceSystemsV7Return|*:generalCriterias|*:item|*:groupDescription")
    var groupId: String? = responseXml.GetChildContent("*:Body|*:getMaintenanceSystemsV7Response|*:getMaintenanceSystemsV7Return|*:generalCriterias|*:item|*:groupId")
    var id: String? = responseXml.GetChildContent("*:Body|*:getMaintenanceSystemsV7Response|*:getMaintenanceSystemsV7Return|*:id")
    var combinable: String? = responseXml.GetChildContent("*:Body|*:getMaintenanceSystemsV7Response|*:getMaintenanceSystemsV7Return|*:maintenancePeriods|*:item|*:combinable")
    criteriaId = responseXml.GetChildContent("*:Body|*:getMaintenanceSystemsV7Response|*:getMaintenanceSystemsV7Return|*:maintenancePeriods|*:item|*:generalCriterias|*:item|*:groupCriterias|*:item|*:criteriaId")
    criteriaLevel = responseXml.GetChildContent("*:Body|*:getMaintenanceSystemsV7Response|*:getMaintenanceSystemsV7Return|*:maintenancePeriods|*:item|*:generalCriterias|*:item|*:groupCriterias|*:item|*:criteriaLevel")
    description = responseXml.GetChildContent("*:Body|*:getMaintenanceSystemsV7Response|*:getMaintenanceSystemsV7Return|*:maintenancePeriods|*:item|*:generalCriterias|*:item|*:groupCriterias|*:item|*:description")
    value1 = responseXml.GetChildContent("*:Body|*:getMaintenanceSystemsV7Response|*:getMaintenanceSystemsV7Return|*:maintenancePeriods|*:item|*:generalCriterias|*:item|*:groupCriterias|*:item|*:value1")
    value2 = responseXml.GetChildContent("*:Body|*:getMaintenanceSystemsV7Response|*:getMaintenanceSystemsV7Return|*:maintenancePeriods|*:item|*:generalCriterias|*:item|*:groupCriterias|*:item|*:value2")
    groupDescription = responseXml.GetChildContent("*:Body|*:getMaintenanceSystemsV7Response|*:getMaintenanceSystemsV7Return|*:maintenancePeriods|*:item|*:generalCriterias|*:item|*:groupDescription")
    groupId = responseXml.GetChildContent("*:Body|*:getMaintenanceSystemsV7Response|*:getMaintenanceSystemsV7Return|*:maintenancePeriods|*:item|*:generalCriterias|*:item|*:groupId")
    id = responseXml.GetChildContent("*:Body|*:getMaintenanceSystemsV7Response|*:getMaintenanceSystemsV7Return|*:maintenancePeriods|*:item|*:id")
    var name: String? = responseXml.GetChildContent("*:Body|*:getMaintenanceSystemsV7Response|*:getMaintenanceSystemsV7Return|*:maintenancePeriods|*:item|*:name")
    var periodSentenceId: String? = responseXml.GetChildContent("*:Body|*:getMaintenanceSystemsV7Response|*:getMaintenanceSystemsV7Return|*:maintenancePeriods|*:item|*:periodSentenceId")
    var code: String? = responseXml.GetChildContent("*:Body|*:getMaintenanceSystemsV7Response|*:getMaintenanceSystemsV7Return|*:maintenancePeriods|*:item|*:times|*:item|*:code")
    var selected: String? = responseXml.GetChildContent("*:Body|*:getMaintenanceSystemsV7Response|*:getMaintenanceSystemsV7Return|*:maintenancePeriods|*:item|*:times|*:item|*:selected")
    var v_type: String? = responseXml.GetChildContent("*:Body|*:getMaintenanceSystemsV7Response|*:getMaintenanceSystemsV7Return|*:maintenancePeriods|*:item|*:times|*:item|*:type")
    var value: String? = responseXml.GetChildContent("*:Body|*:getMaintenanceSystemsV7Response|*:getMaintenanceSystemsV7Return|*:maintenancePeriods|*:item|*:times|*:item|*:value")
    name = responseXml.GetChildContent("*:Body|*:getMaintenanceSystemsV7Response|*:getMaintenanceSystemsV7Return|*:name")
    var confirmationLink: String? = responseXml.GetChildContent("*:Body|*:getMaintenanceSystemsV7Response|*:getMaintenanceSystemsV7Return|*:status|*:confirmationLink")
    var statusCode: String? = responseXml.GetChildContent("*:Body|*:getMaintenanceSystemsV7Response|*:getMaintenanceSystemsV7Return|*: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:getMaintenanceSystemsV7>
            <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:countryCodes>xml</intf:countryCodes>
            <intf:useImperial>xml</intf:useImperial>
            <intf:includeServiceTimes>xml</intf:includeServiceTimes>
        </intf:getMaintenanceSystemsV7>
    </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:getMaintenanceSystemsV7Response>
            <intf:getMaintenanceSystemsV7Return>
                <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:getMaintenanceSystemsV7Return>
        </intf:getMaintenanceSystemsV7Response>
    </soapenv:Body>
</soapenv:Envelope>