SOAP WSDL Generate Code

DataServiceEndpointSoapBinding / processMaintenanceRepairTasks2

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
IncludeFile "CkHttp.pb"
IncludeFile "CkHttpResponse.pb"
IncludeFile "CkXml.pb"

Procedure ChilkatExample()

    xml.i = CkXml::ckCreate()
    If xml.i = 0
        Debug "Failed to create object."
        ProcedureReturn
    EndIf

    CkXml::setCkTag(xml, "soapenv:Envelope")
    CkXml::ckAddAttribute(xml,"xmlns:intf","http://data.webservice.workshop.vivid.nl")
    CkXml::ckAddAttribute(xml,"xmlns:soapenv","http://schemas.xmlsoap.org/soap/envelope/")
    CkXml::ckUpdateChildContent(xml,"soapenv:Header","")
    CkXml::ckUpdateChildContent(xml,"soapenv:Body|intf:processMaintenanceRepairTasks2|intf:vrid","xml")
    CkXml::ckUpdateChildContent(xml,"soapenv:Body|intf:processMaintenanceRepairTasks2|intf:descriptionLanguage","xml")
    CkXml::ckUpdateChildContent(xml,"soapenv:Body|intf:processMaintenanceRepairTasks2|intf:carTypeId","xml")
    CkXml::ckUpdateChildContent(xml,"soapenv:Body|intf:processMaintenanceRepairTasks2|intf:maintenanceSystemId","xml")
    CkXml::ckUpdateChildContent(xml,"soapenv:Body|intf:processMaintenanceRepairTasks2|intf:maintenancePeriodIds","xml")
    CkXml::ckUpdateChildContent(xml,"soapenv:Body|intf:processMaintenanceRepairTasks2|intf:repairtimeTypeId","xml")
    CkXml::ckUpdateChildContent(xml,"soapenv:Body|intf:processMaintenanceRepairTasks2|intf:ids","xml")
    CkXml::ckUpdateChildContent(xml,"soapenv:Body|intf:processMaintenanceRepairTasks2|intf:vatRate","xml")
    CkXml::ckUpdateChildContent(xml,"soapenv:Body|intf:processMaintenanceRepairTasks2|intf:labourRate","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::setCkEmitXmlDecl(xml, 0)
    soapRequestBody.s = CkXml::ckGetXml(xml)

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

    http.i = CkHttp::ckCreate()
    If http.i = 0
        Debug "Failed to create object."
        ProcedureReturn
    EndIf

    CkHttp::ckClearHeaders(http)
    CkHttp::ckSetRequestHeader(http,"Content-Type",contentType)
    CkHttp::ckSetRequestHeader(http,"SOAPAction",soapAction)

    resp.i = CkHttp::ckPostXml(http,endpoint,soapRequestBody,"utf-8")
    If CkHttp::ckLastMethodSuccess(http) = 0
        Debug CkHttp::ckLastErrorText(http)
        Debug "Failed to send SOAP request."
        CkXml::ckDispose(xml)
        CkHttp::ckDispose(http)
        ProcedureReturn
    EndIf

    ; Get the XML response body.
    responseXml.i = CkXml::ckCreate()
    If responseXml.i = 0
        Debug "Failed to create object."
        ProcedureReturn
    EndIf

    CkHttpResponse::ckGetBodyXml(resp,responseXml)

    statusCode.i = CkHttpResponse::ckStatusCode(resp)
    Debug "response status code: " + Str(statusCode)

    CkHttpResponse::ckDispose(resp)

    ; If the status code does not indicate succcess, then show the response XML,
    ; which probably contains error information.
    If statusCode <> 200
        Debug CkXml::ckGetXml(responseXml)
        CkXml::ckDispose(xml)
        CkHttp::ckDispose(http)
        CkXml::ckDispose(responseXml)
        ProcedureReturn
    EndIf

    Debug CkXml::ckGetXml(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).

    item.s = CkXml::ckGetChildContent(responseXml,"*:Body|*:processMaintenanceRepairTasks2Response|*:processMaintenanceRepairTasks2Return|*:calculatedTimes|*:item")
    item = CkXml::ckGetChildContent(responseXml,"*:Body|*:processMaintenanceRepairTasks2Response|*:processMaintenanceRepairTasks2Return|*:descriptions|*:item")
    item = CkXml::ckGetChildContent(responseXml,"*:Body|*:processMaintenanceRepairTasks2Response|*:processMaintenanceRepairTasks2Return|*:genarts|*:item")
    item = CkXml::ckGetChildContent(responseXml,"*:Body|*:processMaintenanceRepairTasks2Response|*:processMaintenanceRepairTasks2Return|*:ids|*:item")
    price.s = CkXml::ckGetChildContent(responseXml,"*:Body|*:processMaintenanceRepairTasks2Response|*:processMaintenanceRepairTasks2Return|*:price")
    awNumber.s = CkXml::ckGetChildContent(responseXml,"*:Body|*:processMaintenanceRepairTasks2Response|*:processMaintenanceRepairTasks2Return|*:repairtimesInfos|*:item|*:followUpWorkList|*:item|*:awNumber")
    description.s = CkXml::ckGetChildContent(responseXml,"*:Body|*:processMaintenanceRepairTasks2Response|*:processMaintenanceRepairTasks2Return|*:repairtimesInfos|*:item|*:followUpWorkList|*:item|*:description")
    direction.s = CkXml::ckGetChildContent(responseXml,"*:Body|*:processMaintenanceRepairTasks2Response|*:processMaintenanceRepairTasks2Return|*:repairtimesInfos|*:item|*:followUpWorkList|*:item|*:direction")
    item = CkXml::ckGetChildContent(responseXml,"*:Body|*:processMaintenanceRepairTasks2Response|*:processMaintenanceRepairTasks2Return|*:repairtimesInfos|*:item|*:followUpWorkList|*:item|*:genarts|*:item")
    hasInfoGroups.s = CkXml::ckGetChildContent(responseXml,"*:Body|*:processMaintenanceRepairTasks2Response|*:processMaintenanceRepairTasks2Return|*:repairtimesInfos|*:item|*:followUpWorkList|*:item|*:hasInfoGroups")
    value.s = CkXml::ckGetChildContent(responseXml,"*:Body|*:processMaintenanceRepairTasks2Response|*:processMaintenanceRepairTasks2Return|*:repairtimesInfos|*:item|*:followUpWorkList|*:item|*:value")
    awNumber = CkXml::ckGetChildContent(responseXml,"*:Body|*:processMaintenanceRepairTasks2Response|*:processMaintenanceRepairTasks2Return|*:repairtimesInfos|*:item|*:includedList|*:item|*:awNumber")
    description = CkXml::ckGetChildContent(responseXml,"*:Body|*:processMaintenanceRepairTasks2Response|*:processMaintenanceRepairTasks2Return|*:repairtimesInfos|*:item|*:includedList|*:item|*:description")
    direction = CkXml::ckGetChildContent(responseXml,"*:Body|*:processMaintenanceRepairTasks2Response|*:processMaintenanceRepairTasks2Return|*:repairtimesInfos|*:item|*:includedList|*:item|*:direction")
    item = CkXml::ckGetChildContent(responseXml,"*:Body|*:processMaintenanceRepairTasks2Response|*:processMaintenanceRepairTasks2Return|*:repairtimesInfos|*:item|*:includedList|*:item|*:genarts|*:item")
    hasInfoGroups = CkXml::ckGetChildContent(responseXml,"*:Body|*:processMaintenanceRepairTasks2Response|*:processMaintenanceRepairTasks2Return|*:repairtimesInfos|*:item|*:includedList|*:item|*:hasInfoGroups")
    value = CkXml::ckGetChildContent(responseXml,"*:Body|*:processMaintenanceRepairTasks2Response|*:processMaintenanceRepairTasks2Return|*:repairtimesInfos|*:item|*:includedList|*:item|*:value")
    nodeId.s = CkXml::ckGetChildContent(responseXml,"*:Body|*:processMaintenanceRepairTasks2Response|*:processMaintenanceRepairTasks2Return|*:repairtimesInfos|*:item|*:nodeId")
    awNumber = CkXml::ckGetChildContent(responseXml,"*:Body|*:processMaintenanceRepairTasks2Response|*:processMaintenanceRepairTasks2Return|*:repairtimesInfos|*:item|*:notIncludedList|*:item|*:awNumber")
    description = CkXml::ckGetChildContent(responseXml,"*:Body|*:processMaintenanceRepairTasks2Response|*:processMaintenanceRepairTasks2Return|*:repairtimesInfos|*:item|*:notIncludedList|*:item|*:description")
    direction = CkXml::ckGetChildContent(responseXml,"*:Body|*:processMaintenanceRepairTasks2Response|*:processMaintenanceRepairTasks2Return|*:repairtimesInfos|*:item|*:notIncludedList|*:item|*:direction")
    item = CkXml::ckGetChildContent(responseXml,"*:Body|*:processMaintenanceRepairTasks2Response|*:processMaintenanceRepairTasks2Return|*:repairtimesInfos|*:item|*:notIncludedList|*:item|*:genarts|*:item")
    hasInfoGroups = CkXml::ckGetChildContent(responseXml,"*:Body|*:processMaintenanceRepairTasks2Response|*:processMaintenanceRepairTasks2Return|*:repairtimesInfos|*:item|*:notIncludedList|*:item|*:hasInfoGroups")
    value = CkXml::ckGetChildContent(responseXml,"*:Body|*:processMaintenanceRepairTasks2Response|*:processMaintenanceRepairTasks2Return|*:repairtimesInfos|*:item|*:notIncludedList|*:item|*:value")
    awNumber = CkXml::ckGetChildContent(responseXml,"*:Body|*:processMaintenanceRepairTasks2Response|*:processMaintenanceRepairTasks2Return|*:repairtimesInfos|*:item|*:preliminaryList|*:item|*:awNumber")
    description = CkXml::ckGetChildContent(responseXml,"*:Body|*:processMaintenanceRepairTasks2Response|*:processMaintenanceRepairTasks2Return|*:repairtimesInfos|*:item|*:preliminaryList|*:item|*:description")
    direction = CkXml::ckGetChildContent(responseXml,"*:Body|*:processMaintenanceRepairTasks2Response|*:processMaintenanceRepairTasks2Return|*:repairtimesInfos|*:item|*:preliminaryList|*:item|*:direction")
    item = CkXml::ckGetChildContent(responseXml,"*:Body|*:processMaintenanceRepairTasks2Response|*:processMaintenanceRepairTasks2Return|*:repairtimesInfos|*:item|*:preliminaryList|*:item|*:genarts|*:item")
    hasInfoGroups = CkXml::ckGetChildContent(responseXml,"*:Body|*:processMaintenanceRepairTasks2Response|*:processMaintenanceRepairTasks2Return|*:repairtimesInfos|*:item|*:preliminaryList|*:item|*:hasInfoGroups")
    value = CkXml::ckGetChildContent(responseXml,"*:Body|*:processMaintenanceRepairTasks2Response|*:processMaintenanceRepairTasks2Return|*:repairtimesInfos|*:item|*:preliminaryList|*:item|*:value")
    confirmationLink.s = CkXml::ckGetChildContent(responseXml,"*:Body|*:processMaintenanceRepairTasks2Response|*:processMaintenanceRepairTasks2Return|*:repairtimesInfos|*:item|*:status|*:confirmationLink")
    statusCode.s = CkXml::ckGetChildContent(responseXml,"*:Body|*:processMaintenanceRepairTasks2Response|*:processMaintenanceRepairTasks2Return|*:repairtimesInfos|*:item|*:status|*:statusCode")
    confirmationLink = CkXml::ckGetChildContent(responseXml,"*:Body|*:processMaintenanceRepairTasks2Response|*:processMaintenanceRepairTasks2Return|*:status|*:confirmationLink")
    statusCode = CkXml::ckGetChildContent(responseXml,"*:Body|*:processMaintenanceRepairTasks2Response|*:processMaintenanceRepairTasks2Return|*:status|*:statusCode")
    item = CkXml::ckGetChildContent(responseXml,"*:Body|*:processMaintenanceRepairTasks2Response|*:processMaintenanceRepairTasks2Return|*:subtotal|*:item")
    totalPrice.s = CkXml::ckGetChildContent(responseXml,"*:Body|*:processMaintenanceRepairTasks2Response|*:processMaintenanceRepairTasks2Return|*:totalPrice")
    totalTime.s = CkXml::ckGetChildContent(responseXml,"*:Body|*:processMaintenanceRepairTasks2Response|*:processMaintenanceRepairTasks2Return|*:totalTime")
    vat.s = CkXml::ckGetChildContent(responseXml,"*:Body|*:processMaintenanceRepairTasks2Response|*:processMaintenanceRepairTasks2Return|*:vat")


    CkXml::ckDispose(xml)
    CkHttp::ckDispose(http)
    CkXml::ckDispose(responseXml)


    ProcedureReturn
EndProcedure
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:processMaintenanceRepairTasks2>
            <intf:vrid>xml</intf:vrid>
            <intf:descriptionLanguage>xml</intf:descriptionLanguage>
            <intf:carTypeId>xml</intf:carTypeId>
            <intf:maintenanceSystemId>xml</intf:maintenanceSystemId>
            <intf:maintenancePeriodIds>xml</intf:maintenancePeriodIds>
            <intf:repairtimeTypeId>xml</intf:repairtimeTypeId>
            <intf:ids>xml</intf:ids>
            <intf:vatRate>xml</intf:vatRate>
            <intf:labourRate>xml</intf:labourRate>
        </intf:processMaintenanceRepairTasks2>
    </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:processMaintenanceRepairTasks2Response>
            <intf:processMaintenanceRepairTasks2Return>
                <intf:calculatedTimes>
                    <intf:item>xml</intf:item>
                </intf:calculatedTimes>
                <intf:descriptions>
                    <intf:item>xml</intf:item>
                </intf:descriptions>
                <intf:genarts>
                    <intf:item>xml</intf:item>
                </intf:genarts>
                <intf:ids>
                    <intf:item>xml</intf:item>
                </intf:ids>
                <intf:price>xml</intf:price>
                <intf:repairtimesInfos>
                    <intf:item>
                        <intf:followUpWorkList>
                            <intf:item>
                                <intf:awNumber>xml</intf:awNumber>
                                <intf:description>xml</intf:description>
                                <intf:direction>xml</intf:direction>
                                <intf:genarts>
                                    <intf:item>xml</intf:item>
                                </intf:genarts>
                                <intf:hasInfoGroups>xml</intf:hasInfoGroups>
                                <intf:value>xml</intf:value>
                            </intf:item>
                        </intf:followUpWorkList>
                        <intf:includedList>
                            <intf:item>
                                <intf:awNumber>xml</intf:awNumber>
                                <intf:description>xml</intf:description>
                                <intf:direction>xml</intf:direction>
                                <intf:genarts>
                                    <intf:item>xml</intf:item>
                                </intf:genarts>
                                <intf:hasInfoGroups>xml</intf:hasInfoGroups>
                                <intf:value>xml</intf:value>
                            </intf:item>
                        </intf:includedList>
                        <intf:nodeId>xml</intf:nodeId>
                        <intf:notIncludedList>
                            <intf:item>
                                <intf:awNumber>xml</intf:awNumber>
                                <intf:description>xml</intf:description>
                                <intf:direction>xml</intf:direction>
                                <intf:genarts>
                                    <intf:item>xml</intf:item>
                                </intf:genarts>
                                <intf:hasInfoGroups>xml</intf:hasInfoGroups>
                                <intf:value>xml</intf:value>
                            </intf:item>
                        </intf:notIncludedList>
                        <intf:preliminaryList>
                            <intf:item>
                                <intf:awNumber>xml</intf:awNumber>
                                <intf:description>xml</intf:description>
                                <intf:direction>xml</intf:direction>
                                <intf:genarts>
                                    <intf:item>xml</intf:item>
                                </intf:genarts>
                                <intf:hasInfoGroups>xml</intf:hasInfoGroups>
                                <intf:value>xml</intf:value>
                            </intf:item>
                        </intf:preliminaryList>
                        <intf:status>
                            <intf:confirmationLink>xml</intf:confirmationLink>
                            <intf:statusCode>xml</intf:statusCode>
                        </intf:status>
                    </intf:item>
                </intf:repairtimesInfos>
                <intf:status>
                    <intf:confirmationLink>xml</intf:confirmationLink>
                    <intf:statusCode>xml</intf:statusCode>
                </intf:status>
                <intf:subtotal>
                    <intf:item>xml</intf:item>
                </intf:subtotal>
                <intf:totalPrice>xml</intf:totalPrice>
                <intf:totalTime>xml</intf:totalTime>
                <intf:vat>xml</intf:vat>
            </intf:processMaintenanceRepairTasks2Return>
        </intf:processMaintenanceRepairTasks2Response>
    </soapenv:Body>
</soapenv:Envelope>