How to test GSOAP webservice call

We have all had that issue with the Repository or the Orchestration Engine being unable to get to the gsoap web service URL.  And, this is with all SBM components installed on the same server.  Why can't it get to itself?  Or in the case orchestrations, maybe we cannot figure out why the OE is unable to reach a third party web service.


The following VB Script will mimic the process of making a web service call.  It then writes the result of the call to a file, so that we can see what is happening in the connection.

  • Copy the following script to a text file and name the file testGsoapCall.vbs.
function ReadXML
 strFile = "request.xml"
 strRequest ="" 

 Set objFSO=CreateObject("Scripting.FileSystemObject")
 Set objFile = objFSO.OpenTextFile(strFile)
 Do Until objFile.AtEndOfStream
  strRequest= strRequest + objFile.ReadLine

 objFSO = nil
 ReadXML = strRequest
end function

Dim XMLHttp 
dim strUrl 
dim strRequest
dim outFile, objFile, objFSO
REM  Set the strUrl variable to be your hostname URL
strUrl = ""
'strRequest = ReadXML
strRequest = "" &_
    "" &_
    "" &_
    "" &_
    "" &_

Set objFSO=CreateObject("Scripting.FileSystemObject")
Set objFile = objFSO.CreateTextFile(outFile,True)

set XMLHttp=createObject("Microsoft.xmlhttp") "POST",strUrl,false
XMLHttp.setRequestHeader "Content-Type","text/xml;charset=UTF-8"

   objFile.Write "REQUEST URL:     " & strUrl & vbCrLf
   objFile.Write "REQUEST:         " & strRequest & vbCrLf
   XMLHttp.send strRequest

   objFile.Write "RESPONSE Status: " & XMLHttp.Status & vbCrLf
   objFile.Write "RESPONSE ERR:    " & XMLHttp.statusText & vbCrLf
   objFile.Write "RESPONSE TEXT:   " & vbCrLf & XMLHttp.responseText & vbCrLf
   objFile.Write "RESPONSE XML:    " & vbCrLf & XMLHttp.responseXML.xml & vbCrLf

   Set xmlDoc = CreateObject("Microsoft.XMLDOM") 
   xmlDoc.SetProperty "ServerHTTPRequest", False
   xmlDoc.setProperty "SelectionLanguage", "XPath"
   xmlDoc.setProperty "SelectionNamespaces", "xmlns:env=''"
   xmlDoc.async = False
   if xmlDoc.parseError.errorcode=0 then
     objFile.Write "XML ELEMENTS:" & vbCrLf
     For Each x In xmlDoc.documentElement.childNodes
         objFile.Write x.nodename & ": " & x.text & vbCrLf
  set strResponse = xmlDoc.documentElement.selectSingleNode("//env:Body")

  '  objFile.Write  vbCrLf
  '  objFile.Write "XML BODY MSG: " & strResponse.text
     objFile.Write  vbCrLf
   End if



  • Modify the URL on the line after "REM  Set the strUrl variable to be your hostname URL". This should point to your SBM server.
  • Place the VBS file on the desktop of your server.
  • Execute the file by double-clicking it.  View the file output.txt to see the results of the query. The query just tries to get the version of SBM.

 Test a web service to a third party end point

  • Edit the file on your desktop
  • Set strURL to the web service endpoint.
  • Uncomment the line 'strRequest = ReadXML
  • Comment these lines by putting an apostrophe in front of each line
'strRequest = "" &_
'    "" &_
'    "" &_
'    "" &_
'    "" &_
'    "" 
  •  SBM web services requires a POST.  If the third party web service requires a GET then modify this line "POST",strUrl,false

as such "GET",strUrl,false

  • Create a file on your desktop called request.xml
  • Place the XML code that represents your SOAP web service call.
Dimensions Make
"Form action definition is out of date" Simple fix

Related Posts


No comments yet

Recent Tweets