Jump to content

Issues in Posting a SOAP XML and getting a Response


Recommended Posts

Hi ,

I am getting issues in posting a SOAP XML and getting/displaying the response back , here is the piece of code that i am trying to use

$xmlhttp = ObjCreate("Microsoft.XMLHTTP")

$oXML = ObjCreate("Msxml2.DOMdocument.3.0")

$XmlSourceDO="..\BEAST_DASHBOARD\ActivationReq.xml"

$oXML.load ($XmlSourceDO)

$xmlhttp.open ("post","https://IP:Port/services/CAPWsController",false)

$xmlhttp.setRequestHeader ("Content-type", "application/x-www-form-urlencoded; charset=UTF-8")

$xmlhttp.setRequestHeader ("Content-length", StringLen($oXML.xml))

$xmlhttp.setRequestHeader ("Connection", "close")

$xmlhttp.setRequestHeader ("SOAPMethodName", "processRequest")

$xmlhttp.send($oXML.xml)-----> gives an error in this line

If($xmlhttp.readyState = 4) then

$XMLResponse = $xmlhttp.responseXML.documentElement.text

$XMLResponse= $xmlhttp.responseText

EndIf

MsgBox(1,"asddf",$XMLResponse)

I have ighlightted the line where i get the error , any help is highly appreciated.

Thanks,

Rajib

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...