Dim fso, outFile
Set fso = CreateObject("Scripting.FileSystemObject")
Set outFile = fso.CreateTextFile("output.txt", True)
set xml = CreateObject("Chilkat_9_5_0.Xml")
xml.Tag = "soapenv:Envelope"
success = xml.AddAttribute("xmlns:intf","http://data.webservice.workshop.vivid.nl")
success = xml.AddAttribute("xmlns:soapenv","http://schemas.xmlsoap.org/soap/envelope/")
xml.UpdateChildContent"soapenv:Header",""
xml.UpdateChildContent"soapenv:Body|intf:processRepairTasksV3|intf:vrid","xml"
xml.UpdateChildContent"soapenv:Body|intf:processRepairTasksV3|intf:descriptionLanguage","xml"
xml.UpdateChildContent"soapenv:Body|intf:processRepairTasksV3|intf:carTypeId","xml"
xml.UpdateChildContent"soapenv:Body|intf:processRepairTasksV3|intf:maintenanceSystemId","xml"
xml.UpdateChildContent"soapenv:Body|intf:processRepairTasksV3|intf:maintenancePeriodIds","xml"
xml.UpdateChildContent"soapenv:Body|intf:processRepairTasksV3|intf:repairtimeTypeId","xml"
xml.UpdateChildContent"soapenv:Body|intf:processRepairTasksV3|intf:typeCategory","xml"
xml.UpdateChildContent"soapenv:Body|intf:processRepairTasksV3|intf:maintenanceTaskIds","xml"
xml.UpdateChildContent"soapenv:Body|intf:processRepairTasksV3|intf:useMaintenanceTasks","xml"
xml.UpdateChildContent"soapenv:Body|intf:processRepairTasksV3|intf:repairTaskIds","xml"
xml.UpdateChildContent"soapenv:Body|intf:processRepairTasksV3|intf:repairVatRates","xml"
xml.UpdateChildContent"soapenv:Body|intf:processRepairTasksV3|intf:labourRateMechanical","xml"
xml.UpdateChildContent"soapenv:Body|intf:processRepairTasksV3|intf:labourRateBody","xml"
xml.UpdateChildContent"soapenv:Body|intf:processRepairTasksV3|intf:labourRateElectronics","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 = 0
soapRequestBody = xml.GetXml()
endpoint = "http://www.haynespro-services.com/workshopServices3/services/DataServiceEndpoint"
soapAction = ""' For SOAP requests, the standard Content-Type is usually set to "text/xml" or "application/soap+xml"
contentType = "text/xml"set http = CreateObject("Chilkat_9_5_0.Http")
http.ClearHeaders
http.SetRequestHeader"Content-Type",contentType
http.SetRequestHeader"SOAPAction",soapAction
' resp is a Chilkat_9_5_0.HttpResponse
Set resp = http.PostXml(endpoint,soapRequestBody,"utf-8")
If (http.LastMethodSuccess = 0) Then
outFile.WriteLine(http.LastErrorText)
outFile.WriteLine("Failed to send SOAP request.")
WScript.Quit
End If' Get the XML response body.set responseXml = CreateObject("Chilkat_9_5_0.Xml")
success = resp.GetBodyXml(responseXml)
statusCode = resp.StatusCode
outFile.WriteLine("response status code: " & statusCode)
' If the status code does not indicate succcess, then show the response XML,
' which probably contains error information.If (statusCode <> 200) Then
outFile.WriteLine(responseXml.GetXml())
WScript.Quit
End If
outFile.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).
calculatedTime = responseXml.GetChildContent("*:Body|*:processRepairTasksV3Response|*:processRepairTasksV3Return|*:basketItems|*:item|*:calculatedTime")
description = responseXml.GetChildContent("*:Body|*:processRepairTasksV3Response|*:processRepairTasksV3Return|*:basketItems|*:item|*:description")
description = responseXml.GetChildContent("*:Body|*:processRepairTasksV3Response|*:processRepairTasksV3Return|*:basketItems|*:item|*:genarts|*:item|*:description")
id = responseXml.GetChildContent("*:Body|*:processRepairTasksV3Response|*:processRepairTasksV3Return|*:basketItems|*:item|*:genarts|*:item|*:id")
mandatory = responseXml.GetChildContent("*:Body|*:processRepairTasksV3Response|*:processRepairTasksV3Return|*:basketItems|*:item|*:genarts|*:item|*:mandatory")
id = responseXml.GetChildContent("*:Body|*:processRepairTasksV3Response|*:processRepairTasksV3Return|*:basketItems|*:item|*:id")
jobType = responseXml.GetChildContent("*:Body|*:processRepairTasksV3Response|*:processRepairTasksV3Return|*:basketItems|*:item|*:jobType")
priceWithoutVat = responseXml.GetChildContent("*:Body|*:processRepairTasksV3Response|*:processRepairTasksV3Return|*:basketItems|*:item|*:priceWithoutVat")
awNumber = responseXml.GetChildContent("*:Body|*:processRepairTasksV3Response|*:processRepairTasksV3Return|*:basketItems|*:item|*:repairtimesInfo|*:followUpWorkList|*:item|*:awNumber")
description = responseXml.GetChildContent("*:Body|*:processRepairTasksV3Response|*:processRepairTasksV3Return|*:basketItems|*:item|*:repairtimesInfo|*:followUpWorkList|*:item|*:description")
direction = responseXml.GetChildContent("*:Body|*:processRepairTasksV3Response|*:processRepairTasksV3Return|*:basketItems|*:item|*:repairtimesInfo|*:followUpWorkList|*:item|*:direction")
description = responseXml.GetChildContent("*:Body|*:processRepairTasksV3Response|*:processRepairTasksV3Return|*:basketItems|*:item|*:repairtimesInfo|*:followUpWorkList|*:item|*:generalArticles|*:item|*:description")
id = responseXml.GetChildContent("*:Body|*:processRepairTasksV3Response|*:processRepairTasksV3Return|*:basketItems|*:item|*:repairtimesInfo|*:followUpWorkList|*:item|*:generalArticles|*:item|*:id")
mandatory = responseXml.GetChildContent("*:Body|*:processRepairTasksV3Response|*:processRepairTasksV3Return|*:basketItems|*:item|*:repairtimesInfo|*:followUpWorkList|*:item|*:generalArticles|*:item|*:mandatory")
hasInfoGroups = responseXml.GetChildContent("*:Body|*:processRepairTasksV3Response|*:processRepairTasksV3Return|*:basketItems|*:item|*:repairtimesInfo|*:followUpWorkList|*:item|*:hasInfoGroups")
jobType = responseXml.GetChildContent("*:Body|*:processRepairTasksV3Response|*:processRepairTasksV3Return|*:basketItems|*:item|*:repairtimesInfo|*:followUpWorkList|*:item|*:jobType")
value = responseXml.GetChildContent("*:Body|*:processRepairTasksV3Response|*:processRepairTasksV3Return|*:basketItems|*:item|*:repairtimesInfo|*:followUpWorkList|*:item|*:value")
awNumber = responseXml.GetChildContent("*:Body|*:processRepairTasksV3Response|*:processRepairTasksV3Return|*:basketItems|*:item|*:repairtimesInfo|*:includedList|*:item|*:awNumber")
description = responseXml.GetChildContent("*:Body|*:processRepairTasksV3Response|*:processRepairTasksV3Return|*:basketItems|*:item|*:repairtimesInfo|*:includedList|*:item|*:description")
direction = responseXml.GetChildContent("*:Body|*:processRepairTasksV3Response|*:processRepairTasksV3Return|*:basketItems|*:item|*:repairtimesInfo|*:includedList|*:item|*:direction")
description = responseXml.GetChildContent("*:Body|*:processRepairTasksV3Response|*:processRepairTasksV3Return|*:basketItems|*:item|*:repairtimesInfo|*:includedList|*:item|*:generalArticles|*:item|*:description")
id = responseXml.GetChildContent("*:Body|*:processRepairTasksV3Response|*:processRepairTasksV3Return|*:basketItems|*:item|*:repairtimesInfo|*:includedList|*:item|*:generalArticles|*:item|*:id")
mandatory = responseXml.GetChildContent("*:Body|*:processRepairTasksV3Response|*:processRepairTasksV3Return|*:basketItems|*:item|*:repairtimesInfo|*:includedList|*:item|*:generalArticles|*:item|*:mandatory")
hasInfoGroups = responseXml.GetChildContent("*:Body|*:processRepairTasksV3Response|*:processRepairTasksV3Return|*:basketItems|*:item|*:repairtimesInfo|*:includedList|*:item|*:hasInfoGroups")
jobType = responseXml.GetChildContent("*:Body|*:processRepairTasksV3Response|*:processRepairTasksV3Return|*:basketItems|*:item|*:repairtimesInfo|*:includedList|*:item|*:jobType")
value = responseXml.GetChildContent("*:Body|*:processRepairTasksV3Response|*:processRepairTasksV3Return|*:basketItems|*:item|*:repairtimesInfo|*:includedList|*:item|*:value")
nodeId = responseXml.GetChildContent("*:Body|*:processRepairTasksV3Response|*:processRepairTasksV3Return|*:basketItems|*:item|*:repairtimesInfo|*:nodeId")
awNumber = responseXml.GetChildContent("*:Body|*:processRepairTasksV3Response|*:processRepairTasksV3Return|*:basketItems|*:item|*:repairtimesInfo|*:notIncludedList|*:item|*:awNumber")
description = responseXml.GetChildContent("*:Body|*:processRepairTasksV3Response|*:processRepairTasksV3Return|*:basketItems|*:item|*:repairtimesInfo|*:notIncludedList|*:item|*:description")
direction = responseXml.GetChildContent("*:Body|*:processRepairTasksV3Response|*:processRepairTasksV3Return|*:basketItems|*:item|*:repairtimesInfo|*:notIncludedList|*:item|*:direction")
description = responseXml.GetChildContent("*:Body|*:processRepairTasksV3Response|*:processRepairTasksV3Return|*:basketItems|*:item|*:repairtimesInfo|*:notIncludedList|*:item|*:generalArticles|*:item|*:description")
id = responseXml.GetChildContent("*:Body|*:processRepairTasksV3Response|*:processRepairTasksV3Return|*:basketItems|*:item|*:repairtimesInfo|*:notIncludedList|*:item|*:generalArticles|*:item|*:id")
mandatory = responseXml.GetChildContent("*:Body|*:processRepairTasksV3Response|*:processRepairTasksV3Return|*:basketItems|*:item|*:repairtimesInfo|*:notIncludedList|*:item|*:generalArticles|*:item|*:mandatory")
hasInfoGroups = responseXml.GetChildContent("*:Body|*:processRepairTasksV3Response|*:processRepairTasksV3Return|*:basketItems|*:item|*:repairtimesInfo|*:notIncludedList|*:item|*:hasInfoGroups")
jobType = responseXml.GetChildContent("*:Body|*:processRepairTasksV3Response|*:processRepairTasksV3Return|*:basketItems|*:item|*:repairtimesInfo|*:notIncludedList|*:item|*:jobType")
value = responseXml.GetChildContent("*:Body|*:processRepairTasksV3Response|*:processRepairTasksV3Return|*:basketItems|*:item|*:repairtimesInfo|*:notIncludedList|*:item|*:value")
awNumber = responseXml.GetChildContent("*:Body|*:processRepairTasksV3Response|*:processRepairTasksV3Return|*:basketItems|*:item|*:repairtimesInfo|*:preliminaryList|*:item|*:awNumber")
description = responseXml.GetChildContent("*:Body|*:processRepairTasksV3Response|*:processRepairTasksV3Return|*:basketItems|*:item|*:repairtimesInfo|*:preliminaryList|*:item|*:description")
direction = responseXml.GetChildContent("*:Body|*:processRepairTasksV3Response|*:processRepairTasksV3Return|*:basketItems|*:item|*:repairtimesInfo|*:preliminaryList|*:item|*:direction")
description = responseXml.GetChildContent("*:Body|*:processRepairTasksV3Response|*:processRepairTasksV3Return|*:basketItems|*:item|*:repairtimesInfo|*:preliminaryList|*:item|*:generalArticles|*:item|*:description")
id = responseXml.GetChildContent("*:Body|*:processRepairTasksV3Response|*:processRepairTasksV3Return|*:basketItems|*:item|*:repairtimesInfo|*:preliminaryList|*:item|*:generalArticles|*:item|*:id")
mandatory = responseXml.GetChildContent("*:Body|*:processRepairTasksV3Response|*:processRepairTasksV3Return|*:basketItems|*:item|*:repairtimesInfo|*:preliminaryList|*:item|*:generalArticles|*:item|*:mandatory")
hasInfoGroups = responseXml.GetChildContent("*:Body|*:processRepairTasksV3Response|*:processRepairTasksV3Return|*:basketItems|*:item|*:repairtimesInfo|*:preliminaryList|*:item|*:hasInfoGroups")
jobType = responseXml.GetChildContent("*:Body|*:processRepairTasksV3Response|*:processRepairTasksV3Return|*:basketItems|*:item|*:repairtimesInfo|*:preliminaryList|*:item|*:jobType")
value = responseXml.GetChildContent("*:Body|*:processRepairTasksV3Response|*:processRepairTasksV3Return|*:basketItems|*:item|*:repairtimesInfo|*:preliminaryList|*:item|*:value")
confirmationLink = responseXml.GetChildContent("*:Body|*:processRepairTasksV3Response|*:processRepairTasksV3Return|*:basketItems|*:item|*:repairtimesInfo|*:status|*:confirmationLink")
statusCode = responseXml.GetChildContent("*:Body|*:processRepairTasksV3Response|*:processRepairTasksV3Return|*:basketItems|*:item|*:repairtimesInfo|*:status|*:statusCode")
subtotal = responseXml.GetChildContent("*:Body|*:processRepairTasksV3Response|*:processRepairTasksV3Return|*:basketItems|*:item|*:subtotal")
vat = responseXml.GetChildContent("*:Body|*:processRepairTasksV3Response|*:processRepairTasksV3Return|*:basketItems|*:item|*:vat")
repairPriceWithoutVat = responseXml.GetChildContent("*:Body|*:processRepairTasksV3Response|*:processRepairTasksV3Return|*:repairPriceWithoutVat")
repairTasksVat = responseXml.GetChildContent("*:Body|*:processRepairTasksV3Response|*:processRepairTasksV3Return|*:repairTasksVat")
confirmationLink = responseXml.GetChildContent("*:Body|*:processRepairTasksV3Response|*:processRepairTasksV3Return|*:status|*:confirmationLink")
statusCode = responseXml.GetChildContent("*:Body|*:processRepairTasksV3Response|*:processRepairTasksV3Return|*:status|*:statusCode")
totalRepairPrice = responseXml.GetChildContent("*:Body|*:processRepairTasksV3Response|*:processRepairTasksV3Return|*:totalRepairPrice")
totalRepairTime = responseXml.GetChildContent("*:Body|*:processRepairTasksV3Response|*:processRepairTasksV3Return|*:totalRepairTime")
outFile.Close