$oXml = ObjCreate("Chilkat.Xml")
$oXml.Tag = "soapenv:Envelope"
$oXml.AddAttribute("xmlns:soapenv","http://schemas.xmlsoap.org/soap/envelope/")
$oXml.AddAttribute("xmlns:wis","http://www.wisinspections.com/")
$oXml.UpdateChildContent"soapenv:Header|wis:AuthenticateHeader|wis:Username","string"
$oXml.UpdateChildContent"soapenv:Header|wis:AuthenticateHeader|wis:Password","string"
$oXml.UpdateChildContent"soapenv:Body|wis:SendRequestC|wis:RequesterName","string"
$oXml.UpdateChildContent"soapenv:Body|wis:SendRequestC|wis:RequesterExt","string"
$oXml.UpdateChildContent"soapenv:Body|wis:SendRequestC|wis:RequesterEmail","string"
$oXml.UpdateChildContent"soapenv:Body|wis:SendRequestC|wis:ContractHolder","string"
$oXml.UpdateChildContent"soapenv:Body|wis:SendRequestC|wis:ContractSale","dateTime"
$oXml.UpdateChildContent"soapenv:Body|wis:SendRequestC|wis:ContractMileage","string"
$oXml.UpdateChildContent"soapenv:Body|wis:SendRequestC|wis:VehicleYear","string"
$oXml.UpdateChildContent"soapenv:Body|wis:SendRequestC|wis:VehicleMake","string"
$oXml.UpdateChildContent"soapenv:Body|wis:SendRequestC|wis:VehicleModel","string"
$oXml.UpdateChildContent"soapenv:Body|wis:SendRequestC|wis:Mileage","string"
$oXml.UpdateChildContent"soapenv:Body|wis:SendRequestC|wis:VinNo","string"
$oXml.UpdateChildContent"soapenv:Body|wis:SendRequestC|wis:ContractNo","string"
$oXml.UpdateChildContent"soapenv:Body|wis:SendRequestC|wis:AuthorizationNo","string"
$oXml.UpdateChildContent"soapenv:Body|wis:SendRequestC|wis:InspectionType","string"
$oXml.UpdateChildContent"soapenv:Body|wis:SendRequestC|wis:Concern1","string"
$oXml.UpdateChildContent"soapenv:Body|wis:SendRequestC|wis:Concern2","string"
$oXml.UpdateChildContent"soapenv:Body|wis:SendRequestC|wis:Concern3","string"
$oXml.UpdateChildContent"soapenv:Body|wis:SendRequestC|wis:Concern4","string"
$oXml.UpdateChildContent"soapenv:Body|wis:SendRequestC|wis:Concern5","string"
$oXml.UpdateChildContent"soapenv:Body|wis:SendRequestC|wis:Concern6","string"
$oXml.UpdateChildContent"soapenv:Body|wis:SendRequestC|wis:Concern7","string"
$oXml.UpdateChildContent"soapenv:Body|wis:SendRequestC|wis:Concern8","string"
$oXml.UpdateChildContent"soapenv:Body|wis:SendRequestC|wis:Concern9","string"
$oXml.UpdateChildContent"soapenv:Body|wis:SendRequestC|wis:Concern10","string"
$oXml.UpdateChildContent"soapenv:Body|wis:SendRequestC|wis:RepairSite","string"
$oXml.UpdateChildContent"soapenv:Body|wis:SendRequestC|wis:Address1","string"
$oXml.UpdateChildContent"soapenv:Body|wis:SendRequestC|wis:Address2","string"
$oXml.UpdateChildContent"soapenv:Body|wis:SendRequestC|wis:City","string"
$oXml.UpdateChildContent"soapenv:Body|wis:SendRequestC|wis:State","string"
$oXml.UpdateChildContent"soapenv:Body|wis:SendRequestC|wis:Zip","string"
$oXml.UpdateChildContent"soapenv:Body|wis:SendRequestC|wis:Phone","string"
$oXml.UpdateChildContent"soapenv:Body|wis:SendRequestC|wis:Contact","string"; In a SOAP HTTP request, including the XML declaration (<?xml version="1.0" encoding="UTF-8"?>) in the XML body is generally not required.
$oXml.EmitXmlDecl = FalseLocal $soapRequestBody = $oXml.GetXml()
Local $sEndpoint = "http://www.wisinspections.com:8086/wiswebservice.asmx"Local $soapAction = "http://www.wisinspections.com/SendRequestC"; For SOAP requests, the standard Content-Type is usually set to "text/xml" or "application/soap+xml"Local $sContentType = "text/xml"
$oHttp = ObjCreate("Chilkat.Http")
$oHttp.ClearHeaders
$oHttp.SetRequestHeader"Content-Type",$sContentType
$oHttp.SetRequestHeader"SOAPAction",$soapAction
Local $oResp = $oHttp.PostXml($sEndpoint,$soapRequestBody,"utf-8")
If ($oHttp.LastMethodSuccess = False) Then
ConsoleWrite($oHttp.LastErrorText & @CRLF)
ConsoleWrite("Failed to send SOAP request." & @CRLF)
Exit
EndIf; Get the XML response body.
$oResponseXml = ObjCreate("Chilkat.Xml")
$oResp.GetBodyXml($oResponseXml)
Local $iStatusCode = $oResp.StatusCode
ConsoleWrite("response status code: " & $iStatusCode & @CRLF)
; If the status code does not indicate succcess, then show the response XML,
; which probably contains error information.If ($iStatusCode <> 200) Then
ConsoleWrite($oResponseXml.GetXml() & @CRLF)
Exit
EndIf
ConsoleWrite($oResponseXml.GetXml() & @CRLF)
; 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).Local $sSendRequestCResult = $oResponseXml.GetChildContent("*:Body|*:SendRequestCResponse|*:SendRequestCResult")