Skip to main content

Hi,

 

Been experimenting with WinHTTP (windows API) with the following codes;

object section.
class-control.
  WinHTTP is class "$OLE$WinHttp.WinHttpRequest.5.1".

   :
   :

invoke WinHTTP "new" returning ws-winhttp
move "www.mysite.com/mypagCall.asp?qFunc=review
    "&qString=THIS %IS %A %TEST"

  to ws-URLString
*>
*>BELOW CODE PART I'M NOT SO SURE
invoke ws-winhttp "Open"
    using z"POST"
ws-URLString
invoke ws-winhttp "Send"
invoke ws-winhttp "getResponseText" returning ws-String


From the URL, I'm passing two values, the qFunc and qStringto a classic ASP page and so far it is working. 

Question is: What I am after though is "how WinHTTP" could request to a classic ASP page with values.... AND how should (ws-String) it returns a value coming back from a Cobol program?

Tried using SOAP but Microsoft Windows Server 2012 R2 did not migrate the SOAP functionality since Windows Server 2003. Or did they (using the SOAP toolkit)? Could you please help me with this scenario and probably throw a sample code if any. Thanks.


#netexpress3.10

Hi,

 

Been experimenting with WinHTTP (windows API) with the following codes;

object section.
class-control.
  WinHTTP is class "$OLE$WinHttp.WinHttpRequest.5.1".

   :
   :

invoke WinHTTP "new" returning ws-winhttp
move "www.mysite.com/mypagCall.asp?qFunc=review
    "&qString=THIS %IS %A %TEST"

  to ws-URLString
*>
*>BELOW CODE PART I'M NOT SO SURE
invoke ws-winhttp "Open"
    using z"POST"
ws-URLString
invoke ws-winhttp "Send"
invoke ws-winhttp "getResponseText" returning ws-String


From the URL, I'm passing two values, the qFunc and qStringto a classic ASP page and so far it is working. 

Question is: What I am after though is "how WinHTTP" could request to a classic ASP page with values.... AND how should (ws-String) it returns a value coming back from a Cobol program?

Tried using SOAP but Microsoft Windows Server 2012 R2 did not migrate the SOAP functionality since Windows Server 2003. Or did they (using the SOAP toolkit)? Could you please help me with this scenario and probably throw a sample code if any. Thanks.


#netexpress3.10

Hi,

 

Using NetExpress V3.10, I tried calling an "http://www.mypageCall.asp?qFunc=review&qString=thisisatestONLY" (as ws-URLString) directly and it worked just fine with the codes as above and a bit of modifications as coded below;


invoke ws-winhttp "Open" using z"POST"
                               ws-URLString

invoke ws-winhttp "Send" using ws-URLString
                     returning ws-String

invoke ws-winhttp "getResponseText" returning ws-String


Upon execution of the "getResponseText" it returns the response value of ws-String. So WinHTTP works so far. I hope this will help others too using NetExpress V3.10 products. Thanks