Skip to content

How do I access a SOAP service request

This example demonstrates accessing a SOAP service.

In the solution shown below,the command "wsSetProtocol" takes input as “SOAP” for a SOAP request. The SOAP wsdl file is specified in the “wsSetRequestURL” command. The operation name is provided in the command “wsSetRequestMethod”. The values for the selected operation are provided in the command “wsSetRequestPayload”.

“wsExecuteRequest” command executes the SOAP service and fetches the response.

Solution:

# Command Target Value
Start of a web service block
1 wsBlockOpen

To set the Service Protocol
2 wsSetProtocol
SOAP
To set the request URL for getting the results of the test run
3 wsSetRequestURL
http://www.thomas-bayer.com/axis2/services/BLZService?wsdl
URL
Enter the appropriate operate which is offered by the SOAP service  
4 wsSetRequestMethod
BLZServiceHttpBinding_getBank

To set the request body format and output type. SOAP requests access only "XML" format
8 wsSetRequestHeaderParam Content-Type
application/json
Enter the values for the selected operation for the SOAP service
9 wsSetRequestPayload 10000000
Execute the Service Request
10 wsExecuteRequest
${URL}
Response
End of a web service Block
12 wsBlockEnd


Tips, Tricks, Gotchas & Best Practices:  

  • You can also Remotely trigger executions of automated tests in Worksoft SaaS and expect a Callback from Worksoft SaaS when execution completes/aborts using POST method.
  • You can prepare all the test runs of a test cycle (or a subset thereof) for execution. This step is also called 'preprocessing' the test runs using POST method.


    Feedback and Knowledge Base