SOAP WSDL Generate Code

DataServiceEndpointSoapBinding / getMaintenanceTasksV5

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
LOCAL loXml
LOCAL lcSoapRequestBody
LOCAL lcEndpoint
LOCAL lcSoapAction
LOCAL lcContentType
LOCAL loHttp
LOCAL loResp
LOCAL loResponseXml
LOCAL lnStatusCode
LOCAL lcAttributeTypeDescription
LOCAL lcKeyTableDescription
LOCAL lcKeyValue
LOCAL lcKeyValueDescription
LOCAL lcKritnr
LOCAL lcTabnr
LOCAL lcDescriptionId
LOCAL lcAwNumber
LOCAL lcDescription
LOCAL lcId
LOCAL lcMandatory
LOCAL lcHasInfoGroups
LOCAL lcHasSubnodes
LOCAL lcOrder
LOCAL lcConfirmationLink
LOCAL lcStatusCode
LOCAL lcValue
LOCAL lcItem
LOCAL lcMandatoryReplacement
LOCAL lcName
LOCAL lcRemark
LOCAL lcRepairTimesTaskId
LOCAL lcFilter
LOCAL lcId1
LOCAL lcId2
LOCAL lcOperation
LOCAL lcCode
LOCAL lcSelected
LOCAL lcV_type

loXml = CreateObject('Chilkat_9_5_0.Xml')
loXml.Tag = "soapenv:Envelope"
loXml.AddAttribute("xmlns:intf","http://data.webservice.workshop.vivid.nl")
loXml.AddAttribute("xmlns:soapenv","http://schemas.xmlsoap.org/soap/envelope/")
loXml.UpdateChildContent("soapenv:Header","")
loXml.UpdateChildContent("soapenv:Body|intf:getMaintenanceTasksV5|intf:vrid","xml")
loXml.UpdateChildContent("soapenv:Body|intf:getMaintenanceTasksV5|intf:descriptionLanguage","xml")
loXml.UpdateChildContent("soapenv:Body|intf:getMaintenanceTasksV5|intf:carTypeId","xml")
loXml.UpdateChildContent("soapenv:Body|intf:getMaintenanceTasksV5|intf:repairtimesTypeId","xml")
loXml.UpdateChildContent("soapenv:Body|intf:getMaintenanceTasksV5|intf:rtTypeCategory","xml")
loXml.UpdateChildContent("soapenv:Body|intf:getMaintenanceTasksV5|intf:systemId","xml")
loXml.UpdateChildContent("soapenv:Body|intf:getMaintenanceTasksV5|intf:periodId","xml")
loXml.UpdateChildContent("soapenv:Body|intf:getMaintenanceTasksV5|intf:includeSmartLinks","xml")
loXml.UpdateChildContent("soapenv:Body|intf:getMaintenanceTasksV5|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. 
loXml.EmitXmlDecl = 0
lcSoapRequestBody = loXml.GetXml()

lcEndpoint = "http://www.haynespro-services.com/workshopServices3/services/DataServiceEndpoint"
lcSoapAction = ""
*  For SOAP requests, the standard Content-Type is usually set to "text/xml" or "application/soap+xml"
lcContentType = "text/xml"

loHttp = CreateObject('Chilkat_9_5_0.Http')

loHttp.ClearHeaders()
loHttp.SetRequestHeader("Content-Type",lcContentType)
loHttp.SetRequestHeader("SOAPAction",lcSoapAction)

loResp = loHttp.PostXml(lcEndpoint,lcSoapRequestBody,"utf-8")
IF (loHttp.LastMethodSuccess = 0) THEN
    ? loHttp.LastErrorText
    ? "Failed to send SOAP request."
    RELEASE loXml
    RELEASE loHttp
    CANCEL
ENDIF

* Get the XML response body.
loResponseXml = CreateObject('Chilkat_9_5_0.Xml')
loResp.GetBodyXml(loResponseXml)

lnStatusCode = loResp.StatusCode
? "response status code: " + STR(lnStatusCode)

RELEASE loResp

* If the status code does not indicate succcess, then show the response XML,
* which probably contains error information.
IF (lnStatusCode <> 200) THEN
    ? loResponseXml.GetXml()
    RELEASE loXml
    RELEASE loHttp
    RELEASE loResponseXml
    CANCEL
ENDIF

? loResponseXml.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).

lcAttributeTypeDescription = loResponseXml.GetChildContent("*:Body|*:getMaintenanceTasksV5Response|*:getMaintenanceTasksV5Return|*:criteria|*:item|*:attributeTypeDescription")
lcKeyTableDescription = loResponseXml.GetChildContent("*:Body|*:getMaintenanceTasksV5Response|*:getMaintenanceTasksV5Return|*:criteria|*:item|*:keyTableDescription")
lcKeyValue = loResponseXml.GetChildContent("*:Body|*:getMaintenanceTasksV5Response|*:getMaintenanceTasksV5Return|*:criteria|*:item|*:keyValue")
lcKeyValueDescription = loResponseXml.GetChildContent("*:Body|*:getMaintenanceTasksV5Response|*:getMaintenanceTasksV5Return|*:criteria|*:item|*:keyValueDescription")
lcKritnr = loResponseXml.GetChildContent("*:Body|*:getMaintenanceTasksV5Response|*:getMaintenanceTasksV5Return|*:criteria|*:item|*:kritnr")
lcTabnr = loResponseXml.GetChildContent("*:Body|*:getMaintenanceTasksV5Response|*:getMaintenanceTasksV5Return|*:criteria|*:item|*:tabnr")
lcDescriptionId = loResponseXml.GetChildContent("*:Body|*:getMaintenanceTasksV5Response|*:getMaintenanceTasksV5Return|*:descriptionId")
lcAwNumber = loResponseXml.GetChildContent("*:Body|*:getMaintenanceTasksV5Response|*:getMaintenanceTasksV5Return|*:followUpRepairs|*:item|*:awNumber")
lcDescription = loResponseXml.GetChildContent("*:Body|*:getMaintenanceTasksV5Response|*:getMaintenanceTasksV5Return|*:followUpRepairs|*:item|*:description")
lcDescription = loResponseXml.GetChildContent("*:Body|*:getMaintenanceTasksV5Response|*:getMaintenanceTasksV5Return|*:followUpRepairs|*:item|*:genarts|*:item|*:description")
lcId = loResponseXml.GetChildContent("*:Body|*:getMaintenanceTasksV5Response|*:getMaintenanceTasksV5Return|*:followUpRepairs|*:item|*:genarts|*:item|*:id")
lcMandatory = loResponseXml.GetChildContent("*:Body|*:getMaintenanceTasksV5Response|*:getMaintenanceTasksV5Return|*:followUpRepairs|*:item|*:genarts|*:item|*:mandatory")
lcHasInfoGroups = loResponseXml.GetChildContent("*:Body|*:getMaintenanceTasksV5Response|*:getMaintenanceTasksV5Return|*:followUpRepairs|*:item|*:hasInfoGroups")
lcHasSubnodes = loResponseXml.GetChildContent("*:Body|*:getMaintenanceTasksV5Response|*:getMaintenanceTasksV5Return|*:followUpRepairs|*:item|*:hasSubnodes")
lcId = loResponseXml.GetChildContent("*:Body|*:getMaintenanceTasksV5Response|*:getMaintenanceTasksV5Return|*:followUpRepairs|*:item|*:id")
lcOrder = loResponseXml.GetChildContent("*:Body|*:getMaintenanceTasksV5Response|*:getMaintenanceTasksV5Return|*:followUpRepairs|*:item|*:order")
lcConfirmationLink = loResponseXml.GetChildContent("*:Body|*:getMaintenanceTasksV5Response|*:getMaintenanceTasksV5Return|*:followUpRepairs|*:item|*:status|*:confirmationLink")
lcStatusCode = loResponseXml.GetChildContent("*:Body|*:getMaintenanceTasksV5Response|*:getMaintenanceTasksV5Return|*:followUpRepairs|*:item|*:status|*:statusCode")
lcValue = loResponseXml.GetChildContent("*:Body|*:getMaintenanceTasksV5Response|*:getMaintenanceTasksV5Return|*:followUpRepairs|*:item|*:value")
lcDescription = loResponseXml.GetChildContent("*:Body|*:getMaintenanceTasksV5Response|*:getMaintenanceTasksV5Return|*:generalArticles|*:item|*:description")
lcId = loResponseXml.GetChildContent("*:Body|*:getMaintenanceTasksV5Response|*:getMaintenanceTasksV5Return|*:generalArticles|*:item|*:id")
lcMandatory = loResponseXml.GetChildContent("*:Body|*:getMaintenanceTasksV5Response|*:getMaintenanceTasksV5Return|*:generalArticles|*:item|*:mandatory")
lcItem = loResponseXml.GetChildContent("*:Body|*:getMaintenanceTasksV5Response|*:getMaintenanceTasksV5Return|*:longDescriptions|*:item")
lcMandatoryReplacement = loResponseXml.GetChildContent("*:Body|*:getMaintenanceTasksV5Response|*:getMaintenanceTasksV5Return|*:mandatoryReplacement")
lcName = loResponseXml.GetChildContent("*:Body|*:getMaintenanceTasksV5Response|*:getMaintenanceTasksV5Return|*:name")
lcOrder = loResponseXml.GetChildContent("*:Body|*:getMaintenanceTasksV5Response|*:getMaintenanceTasksV5Return|*:order")
lcRemark = loResponseXml.GetChildContent("*:Body|*:getMaintenanceTasksV5Response|*:getMaintenanceTasksV5Return|*:remark")
lcRepairTimesTaskId = loResponseXml.GetChildContent("*:Body|*:getMaintenanceTasksV5Response|*:getMaintenanceTasksV5Return|*:repairTimesTaskId")
lcFilter = loResponseXml.GetChildContent("*:Body|*:getMaintenanceTasksV5Response|*:getMaintenanceTasksV5Return|*:smartLinks|*:item|*:filter")
lcId1 = loResponseXml.GetChildContent("*:Body|*:getMaintenanceTasksV5Response|*:getMaintenanceTasksV5Return|*:smartLinks|*:item|*:id1")
lcId2 = loResponseXml.GetChildContent("*:Body|*:getMaintenanceTasksV5Response|*:getMaintenanceTasksV5Return|*:smartLinks|*:item|*:id2")
lcOperation = loResponseXml.GetChildContent("*:Body|*:getMaintenanceTasksV5Response|*:getMaintenanceTasksV5Return|*:smartLinks|*:item|*:operation")
lcItem = loResponseXml.GetChildContent("*:Body|*:getMaintenanceTasksV5Response|*:getMaintenanceTasksV5Return|*:smartLinks|*:item|*:text|*:item")
lcConfirmationLink = loResponseXml.GetChildContent("*:Body|*:getMaintenanceTasksV5Response|*:getMaintenanceTasksV5Return|*:status|*:confirmationLink")
lcStatusCode = loResponseXml.GetChildContent("*:Body|*:getMaintenanceTasksV5Response|*:getMaintenanceTasksV5Return|*:status|*:statusCode")
lcCode = loResponseXml.GetChildContent("*:Body|*:getMaintenanceTasksV5Response|*:getMaintenanceTasksV5Return|*:times|*:item|*:code")
lcSelected = loResponseXml.GetChildContent("*:Body|*:getMaintenanceTasksV5Response|*:getMaintenanceTasksV5Return|*:times|*:item|*:selected")
lcV_type = loResponseXml.GetChildContent("*:Body|*:getMaintenanceTasksV5Response|*:getMaintenanceTasksV5Return|*:times|*:item|*:type")
lcValue = loResponseXml.GetChildContent("*:Body|*:getMaintenanceTasksV5Response|*:getMaintenanceTasksV5Return|*:times|*:item|*:value")

RELEASE loXml
RELEASE loHttp
RELEASE loResponseXml

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:getMaintenanceTasksV5>
            <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:systemId>xml</intf:systemId>
            <intf:periodId>xml</intf:periodId>
            <intf:includeSmartLinks>xml</intf:includeSmartLinks>
            <intf:includeServiceTimes>xml</intf:includeServiceTimes>
        </intf:getMaintenanceTasksV5>
    </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:getMaintenanceTasksV5Response>
            <intf:getMaintenanceTasksV5Return>
                <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:descriptionId>xml</intf:descriptionId>
                <intf:followUpRepairs>
                    <intf:item>
                        <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:order>xml</intf:order>
                        <intf:status>
                            <intf:confirmationLink>xml</intf:confirmationLink>
                            <intf:statusCode>xml</intf:statusCode>
                        </intf:status>
                        <intf:value>xml</intf:value>
                    </intf:item>
                </intf:followUpRepairs>
                <intf:generalArticles>
                    <intf:item>
                        <intf:description>xml</intf:description>
                        <intf:id>xml</intf:id>
                        <intf:mandatory>xml</intf:mandatory>
                    </intf:item>
                </intf:generalArticles>
                <intf:longDescriptions>
                    <intf:item>xml</intf:item>
                </intf:longDescriptions>
                <intf:mandatoryReplacement>xml</intf:mandatoryReplacement>
                <intf:name>xml</intf:name>
                <intf:order>xml</intf:order>
                <intf:remark>xml</intf:remark>
                <intf:repairTimesTaskId>xml</intf:repairTimesTaskId>
                <intf:smartLinks>
                    <intf:item>
                        <intf:filter>xml</intf:filter>
                        <intf:id1>xml</intf:id1>
                        <intf:id2>xml</intf:id2>
                        <intf:operation>xml</intf:operation>
                        <intf:text>
                            <intf:item>xml</intf:item>
                        </intf:text>
                    </intf:item>
                </intf:smartLinks>
                <intf:status>
                    <intf:confirmationLink>xml</intf:confirmationLink>
                    <intf:statusCode>xml</intf:statusCode>
                </intf:status>
                <intf:subTasks>
                    <intf:item/>
                </intf:subTasks>
                <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:getMaintenanceTasksV5Return>
        </intf:getMaintenanceTasksV5Response>
    </soapenv:Body>
</soapenv:Envelope>