LOCAL loXml
LOCAL lcSoapRequestBody
LOCAL lcEndpoint
LOCAL lcSoapAction
LOCAL lcContentType
LOCAL loHttp
LOCAL loResp
LOCAL loResponseXml
LOCAL lnStatusCode
LOCAL lcAwNumber
LOCAL lcDescription
LOCAL lcId
LOCAL lcMandatory
LOCAL lcHasInfoGroups
LOCAL lcHasSubnodes
LOCAL lcJobType
LOCAL lcOeCode
LOCAL lcOrder
LOCAL lcConfirmationLink
LOCAL lcStatusCode
LOCAL lcCriteriaId
LOCAL lcCriteriaLevel
LOCAL lcValue1
LOCAL lcValue2
LOCAL lcGroupDescription
LOCAL lcGroupId
LOCAL lcValue
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:getRepairtimeNodesByGenartsV4|intf:vrid","xml")
loXml.UpdateChildContent("soapenv:Body|intf:getRepairtimeNodesByGenartsV4|intf:descriptionLanguage","xml")
loXml.UpdateChildContent("soapenv:Body|intf:getRepairtimeNodesByGenartsV4|intf:repairtimeTypeId","xml")
loXml.UpdateChildContent("soapenv:Body|intf:getRepairtimeNodesByGenartsV4|intf:typeCategory","xml")
loXml.UpdateChildContent("soapenv:Body|intf:getRepairtimeNodesByGenartsV4|intf:genArtNumbers","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
CANCELENDIF* 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
CANCELENDIF
? 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).
lcAwNumber = loResponseXml.GetChildContent("*:Body|*:getRepairtimeNodesByGenartsV4Response|*:getRepairtimeNodesByGenartsV4Return|*:awNumber")
lcDescription = loResponseXml.GetChildContent("*:Body|*:getRepairtimeNodesByGenartsV4Response|*:getRepairtimeNodesByGenartsV4Return|*:description")
lcDescription = loResponseXml.GetChildContent("*:Body|*:getRepairtimeNodesByGenartsV4Response|*:getRepairtimeNodesByGenartsV4Return|*:genarts|*:item|*:description")
lcId = loResponseXml.GetChildContent("*:Body|*:getRepairtimeNodesByGenartsV4Response|*:getRepairtimeNodesByGenartsV4Return|*:genarts|*:item|*:id")
lcMandatory = loResponseXml.GetChildContent("*:Body|*:getRepairtimeNodesByGenartsV4Response|*:getRepairtimeNodesByGenartsV4Return|*:genarts|*:item|*:mandatory")
lcHasInfoGroups = loResponseXml.GetChildContent("*:Body|*:getRepairtimeNodesByGenartsV4Response|*:getRepairtimeNodesByGenartsV4Return|*:hasInfoGroups")
lcHasSubnodes = loResponseXml.GetChildContent("*:Body|*:getRepairtimeNodesByGenartsV4Response|*:getRepairtimeNodesByGenartsV4Return|*:hasSubnodes")
lcId = loResponseXml.GetChildContent("*:Body|*:getRepairtimeNodesByGenartsV4Response|*:getRepairtimeNodesByGenartsV4Return|*:id")
lcJobType = loResponseXml.GetChildContent("*:Body|*:getRepairtimeNodesByGenartsV4Response|*:getRepairtimeNodesByGenartsV4Return|*:jobType")
lcOeCode = loResponseXml.GetChildContent("*:Body|*:getRepairtimeNodesByGenartsV4Response|*:getRepairtimeNodesByGenartsV4Return|*:oeCode")
lcOrder = loResponseXml.GetChildContent("*:Body|*:getRepairtimeNodesByGenartsV4Response|*:getRepairtimeNodesByGenartsV4Return|*:order")
lcConfirmationLink = loResponseXml.GetChildContent("*:Body|*:getRepairtimeNodesByGenartsV4Response|*:getRepairtimeNodesByGenartsV4Return|*:status|*:confirmationLink")
lcStatusCode = loResponseXml.GetChildContent("*:Body|*:getRepairtimeNodesByGenartsV4Response|*:getRepairtimeNodesByGenartsV4Return|*:status|*:statusCode")
lcCriteriaId = loResponseXml.GetChildContent("*:Body|*:getRepairtimeNodesByGenartsV4Response|*:getRepairtimeNodesByGenartsV4Return|*:timeCriterias|*:item|*:groupCriterias|*:item|*:criteriaId")
lcCriteriaLevel = loResponseXml.GetChildContent("*:Body|*:getRepairtimeNodesByGenartsV4Response|*:getRepairtimeNodesByGenartsV4Return|*:timeCriterias|*:item|*:groupCriterias|*:item|*:criteriaLevel")
lcDescription = loResponseXml.GetChildContent("*:Body|*:getRepairtimeNodesByGenartsV4Response|*:getRepairtimeNodesByGenartsV4Return|*:timeCriterias|*:item|*:groupCriterias|*:item|*:description")
lcValue1 = loResponseXml.GetChildContent("*:Body|*:getRepairtimeNodesByGenartsV4Response|*:getRepairtimeNodesByGenartsV4Return|*:timeCriterias|*:item|*:groupCriterias|*:item|*:value1")
lcValue2 = loResponseXml.GetChildContent("*:Body|*:getRepairtimeNodesByGenartsV4Response|*:getRepairtimeNodesByGenartsV4Return|*:timeCriterias|*:item|*:groupCriterias|*:item|*:value2")
lcGroupDescription = loResponseXml.GetChildContent("*:Body|*:getRepairtimeNodesByGenartsV4Response|*:getRepairtimeNodesByGenartsV4Return|*:timeCriterias|*:item|*:groupDescription")
lcGroupId = loResponseXml.GetChildContent("*:Body|*:getRepairtimeNodesByGenartsV4Response|*:getRepairtimeNodesByGenartsV4Return|*:timeCriterias|*:item|*:groupId")
lcValue = loResponseXml.GetChildContent("*:Body|*:getRepairtimeNodesByGenartsV4Response|*:getRepairtimeNodesByGenartsV4Return|*:value")
RELEASE loXml
RELEASE loHttp
RELEASE loResponseXml