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:getCompleteComponentV3|intf:vrid","xml"
xml.UpdateChildContent"soapenv:Body|intf:getCompleteComponentV3|intf:typeId","xml"
xml.UpdateChildContent"soapenv:Body|intf:getCompleteComponentV3|intf:si","xml"
xml.UpdateChildContent"soapenv:Body|intf:getCompleteComponentV3|intf:st","xml"
xml.UpdateChildContent"soapenv:Body|intf:getCompleteComponentV3|intf:language","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).
componentImageId = responseXml.GetChildContent("*:Body|*:getCompleteComponentV3Response|*:getCompleteComponentV3Return|*:completeComponentV3|*:componentImageId")
connectorSideImage = responseXml.GetChildContent("*:Body|*:getCompleteComponentV3Response|*:getCompleteComponentV3Return|*:completeComponentV3|*:connectorSideImage")
flashVarsString = responseXml.GetChildContent("*:Body|*:getCompleteComponentV3Response|*:getCompleteComponentV3Return|*:completeComponentV3|*:diagnosisSteps|*:item|*:diagnosisSteps|*:item|*:flashVarsString")
xvalue = responseXml.GetChildContent("*:Body|*:getCompleteComponentV3Response|*:getCompleteComponentV3Return|*:completeComponentV3|*:diagnosisSteps|*:item|*:diagnosisSteps|*:item|*:graph|*:points|*:item|*:xvalue")
ymaxvalue = responseXml.GetChildContent("*:Body|*:getCompleteComponentV3Response|*:getCompleteComponentV3Return|*:completeComponentV3|*:diagnosisSteps|*:item|*:diagnosisSteps|*:item|*:graph|*:points|*:item|*:ymaxvalue")
yminvalue = responseXml.GetChildContent("*:Body|*:getCompleteComponentV3Response|*:getCompleteComponentV3Return|*:completeComponentV3|*:diagnosisSteps|*:item|*:diagnosisSteps|*:item|*:graph|*:points|*:item|*:yminvalue")
xaxis = responseXml.GetChildContent("*:Body|*:getCompleteComponentV3Response|*:getCompleteComponentV3Return|*:completeComponentV3|*:diagnosisSteps|*:item|*:diagnosisSteps|*:item|*:graph|*:xaxis")
yaxis = responseXml.GetChildContent("*:Body|*:getCompleteComponentV3Response|*:getCompleteComponentV3Return|*:completeComponentV3|*:diagnosisSteps|*:item|*:diagnosisSteps|*:item|*:graph|*:yaxis")
name = responseXml.GetChildContent("*:Body|*:getCompleteComponentV3Response|*:getCompleteComponentV3Return|*:completeComponentV3|*:diagnosisSteps|*:item|*:diagnosisSteps|*:item|*:name")
item = responseXml.GetChildContent("*:Body|*:getCompleteComponentV3Response|*:getCompleteComponentV3Return|*:completeComponentV3|*:diagnosisSteps|*:item|*:diagnosisSteps|*:item|*:scopeImagesPaths|*:item")
sortOrder = responseXml.GetChildContent("*:Body|*:getCompleteComponentV3Response|*:getCompleteComponentV3Return|*:completeComponentV3|*:diagnosisSteps|*:item|*:diagnosisSteps|*:item|*:sortOrder")
value1 = responseXml.GetChildContent("*:Body|*:getCompleteComponentV3Response|*:getCompleteComponentV3Return|*:completeComponentV3|*:diagnosisSteps|*:item|*:diagnosisSteps|*:item|*:table|*:header|*:value1")
value2 = responseXml.GetChildContent("*:Body|*:getCompleteComponentV3Response|*:getCompleteComponentV3Return|*:completeComponentV3|*:diagnosisSteps|*:item|*:diagnosisSteps|*:item|*:table|*:header|*:value2")
value1 = responseXml.GetChildContent("*:Body|*:getCompleteComponentV3Response|*:getCompleteComponentV3Return|*:completeComponentV3|*:diagnosisSteps|*:item|*:diagnosisSteps|*:item|*:table|*:rows|*:item|*:value1")
value2 = responseXml.GetChildContent("*:Body|*:getCompleteComponentV3Response|*:getCompleteComponentV3Return|*:completeComponentV3|*:diagnosisSteps|*:item|*:diagnosisSteps|*:item|*:table|*:rows|*:item|*:value2")
text = responseXml.GetChildContent("*:Body|*:getCompleteComponentV3Response|*:getCompleteComponentV3Return|*:completeComponentV3|*:diagnosisSteps|*:item|*:diagnosisSteps|*:item|*:text")
title = responseXml.GetChildContent("*:Body|*:getCompleteComponentV3Response|*:getCompleteComponentV3Return|*:completeComponentV3|*:diagnosisSteps|*:item|*:diagnosisSteps|*:item|*:title")
pinNameId = responseXml.GetChildContent("*:Body|*:getCompleteComponentV3Response|*:getCompleteComponentV3Return|*:completeComponentV3|*:diagnosisSteps|*:item|*:diagnosisSteps|*:item|*:toolParameters|*:pins|*:item|*:pinNameId")
symbolInstanceId = responseXml.GetChildContent("*:Body|*:getCompleteComponentV3Response|*:getCompleteComponentV3Return|*:completeComponentV3|*:diagnosisSteps|*:item|*:diagnosisSteps|*:item|*:toolParameters|*:pins|*:item|*:symbolInstanceId")
state = responseXml.GetChildContent("*:Body|*:getCompleteComponentV3Response|*:getCompleteComponentV3Return|*:completeComponentV3|*:diagnosisSteps|*:item|*:diagnosisSteps|*:item|*:toolParameters|*:state")
tool = responseXml.GetChildContent("*:Body|*:getCompleteComponentV3Response|*:getCompleteComponentV3Return|*:completeComponentV3|*:diagnosisSteps|*:item|*:diagnosisSteps|*:item|*:toolParameters|*:tool")
unit = responseXml.GetChildContent("*:Body|*:getCompleteComponentV3Response|*:getCompleteComponentV3Return|*:completeComponentV3|*:diagnosisSteps|*:item|*:diagnosisSteps|*:item|*:toolParameters|*:unit")
value = responseXml.GetChildContent("*:Body|*:getCompleteComponentV3Response|*:getCompleteComponentV3Return|*:completeComponentV3|*:diagnosisSteps|*:item|*:diagnosisSteps|*:item|*:toolParameters|*:value")
v_type = responseXml.GetChildContent("*:Body|*:getCompleteComponentV3Response|*:getCompleteComponentV3Return|*:completeComponentV3|*:diagnosisSteps|*:item|*:diagnosisSteps|*:item|*:type")
wirediagramLink = responseXml.GetChildContent("*:Body|*:getCompleteComponentV3Response|*:getCompleteComponentV3Return|*:completeComponentV3|*:diagnosisSteps|*:item|*:diagnosisSteps|*:item|*:wirediagramLink")
title = responseXml.GetChildContent("*:Body|*:getCompleteComponentV3Response|*:getCompleteComponentV3Return|*:completeComponentV3|*:diagnosisSteps|*:item|*:title")
ecuSideImage = responseXml.GetChildContent("*:Body|*:getCompleteComponentV3Response|*:getCompleteComponentV3Return|*:completeComponentV3|*:ecuSideImage")
description = responseXml.GetChildContent("*:Body|*:getCompleteComponentV3Response|*:getCompleteComponentV3Return|*:completeComponentV3|*:genericParts|*:item|*:description")
id = responseXml.GetChildContent("*:Body|*:getCompleteComponentV3Response|*:getCompleteComponentV3Return|*:completeComponentV3|*:genericParts|*:item|*:id")
mandatory = responseXml.GetChildContent("*:Body|*:getCompleteComponentV3Response|*:getCompleteComponentV3Return|*:completeComponentV3|*:genericParts|*:item|*:mandatory")
hasLocationSystems = responseXml.GetChildContent("*:Body|*:getCompleteComponentV3Response|*:getCompleteComponentV3Return|*:completeComponentV3|*:hasLocationSystems")
localWiringImage = responseXml.GetChildContent("*:Body|*:getCompleteComponentV3Response|*:getCompleteComponentV3Return|*:completeComponentV3|*:localWiringImage")
description = responseXml.GetChildContent("*:Body|*:getCompleteComponentV3Response|*:getCompleteComponentV3Return|*:completeComponentV3|*:pinTable|*:componentsArray|*:item|*:description")
hyperlink = responseXml.GetChildContent("*:Body|*:getCompleteComponentV3Response|*:getCompleteComponentV3Return|*:completeComponentV3|*:pinTable|*:componentsArray|*:item|*:hyperlink")
name = responseXml.GetChildContent("*:Body|*:getCompleteComponentV3Response|*:getCompleteComponentV3Return|*:completeComponentV3|*:pinTable|*:componentsArray|*:item|*:name")
pinName = responseXml.GetChildContent("*:Body|*:getCompleteComponentV3Response|*:getCompleteComponentV3Return|*:completeComponentV3|*:pinTable|*:componentsArray|*:item|*:pinName")
pinNumber = responseXml.GetChildContent("*:Body|*:getCompleteComponentV3Response|*:getCompleteComponentV3Return|*:completeComponentV3|*:pinTable|*:componentsArray|*:item|*:pinNumber")
si = responseXml.GetChildContent("*:Body|*:getCompleteComponentV3Response|*:getCompleteComponentV3Return|*:completeComponentV3|*:pinTable|*:componentsArray|*:item|*:si")
st = responseXml.GetChildContent("*:Body|*:getCompleteComponentV3Response|*:getCompleteComponentV3Return|*:completeComponentV3|*:pinTable|*:componentsArray|*:item|*:st")
wireColor1 = responseXml.GetChildContent("*:Body|*:getCompleteComponentV3Response|*:getCompleteComponentV3Return|*:completeComponentV3|*:pinTable|*:componentsArray|*:item|*:wireColor1")
wireColor2 = responseXml.GetChildContent("*:Body|*:getCompleteComponentV3Response|*:getCompleteComponentV3Return|*:completeComponentV3|*:pinTable|*:componentsArray|*:item|*:wireColor2")
renderable = responseXml.GetChildContent("*:Body|*:getCompleteComponentV3Response|*:getCompleteComponentV3Return|*:completeComponentV3|*:renderable")
confirmationLink = responseXml.GetChildContent("*:Body|*:getCompleteComponentV3Response|*:getCompleteComponentV3Return|*:status|*:confirmationLink")
statusCode = responseXml.GetChildContent("*:Body|*:getCompleteComponentV3Response|*:getCompleteComponentV3Return|*:status|*:statusCode")
outFile.Close