Skip to content

How do I access multiple methods/operations in a SOAP service

This example demonstrates accessing multiple methods/operations in SOAP service. 

Multiple methods/operations for a SOAP service cannot be access in a single wsBlock. They have to be accessed separately. "wsSetRequestMethod" command can accept only one "operation" in a wsBlock.

In the example below, we are going to use multiple wsBlock's to access multiple methods/operations in the give SOAP service.

Solution:

# Command Target Value
Start of a web service block to access the first method/operation
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


Start of a new service block for accessing the other method/operation for the given SOAP Service 
13 wsBlockOpen

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

To set the request body format and output type. SOAP requests access only "XML" format
17 wsSetRequestHeaderParam Content-Type
application/json
Enter the values for the selected operation for the SOAP service
18 wsSetRequestPayload 10090900
Execute the Service Request
19 wsExecuteRequest
${URL}
Response
End of a web service Block
20 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