Hi ,

I want to capture resetful webservice response. I am doing this with the help of below code but i get some 'SMPostPreserve' in response. I suppose this is because of authetication to this service.

Now how can i get the actual response here by eliminating this authetication step?

Set myRestBody = XMLUtil.CreateXMLFromFile("xml input path")


url ="restful service address"

contentType ="application/xml"

'1) Create reference to the WinHTTP request com object

Set oWinHttp = CreateObject("WinHttp.WinHttpRequest.5.1")

'2) Open a HTTP connection to a HTTP resource

oWinHttp.Open "POST", url, False

'’3) Add a HTTP request headers for endpoint and conent type

oWinHttp.setRequestHeader "Content-Type", contentType
oWinHttp.setRequestHeader "SOAPAction", url

'’4) Send a HTTP request to the HTTP server with the header and body info

oWinHttp.Send restRequest

'’5) Get response
response= oWinHttp.ResponseText

'’6) Close object reference
Set oWinHttp = Nothing

'’7) print the response
print response

Response received from service is :
<BODY onLoad="document.AUTOSUBMIT.submit();">This page is used to hold your data while you are being authorized for your request.<BR><BR>You will be forwarded to continue the authorization process. If this does not happen automatically, please click the Continue button below.
<FORM NAME="AUTOSUBMIT" METHOD="POST" ENCTYPE="application/x-www-form-urlencoded" ACTION="https://post.smlogin.sdfsdfds">
<INPUT TYPE="HIDDEN" NAME="SMPostPreserve" VALUE="uoasufodsaflsdkajflsdajf lsdaf klasjfldjsad">

I expect xml response here....