Read and Review Automation Anywhere Documentation

Automation 360

Close Contents

Contents

Open Contents

Example of using the SOAP web service action

  • Updated: 9/21/2021
    • Automation 360 v.x
    • Build
    • RPA Workspace
    • Examples

Example of using the SOAP web service action

Use the SOAP web service action to pass two numeric values and return the sum from an online calculator application.

Procedure

To make a SOAP web services call, perform the following steps:

  1. Double-click or drag the SOAP web services action.
  2. Select a connection method:
    • To connect using a URI, enter the URI, for example, http://www.dneonline.com/calculator.asmx?WSDL.
    • To connect using a file, select a file from the Control Room or the Desktop, or insert a variable.
  3. Optional: Enter the SOAP endpoint in the Address location field.
    If you specify the address location, the bot uses it during execution; otherwise, the bot uses the address location from the WSDL file.
    Note: If you are creating the SOAP URI manually and not using the Build SOAP request option, go to step 6.
  4. Click Build SOAP request.
    The SOAP request window appears, displaying the services and ports, with details about their operations and parameter.
  5. In the SOAP request window, expand the service for which you want to view the list of ports. Click the required port to display the list of available operations. Select the required operation and click Apply to retrieve the operation details from the SOAP request.
    If you use the Build SOAP request option, Services, Port, Operation, and Operation parameters fields are automatically populated with details based on the operation you selected. Go to step 10.
  6. In the Service field, enter the service name.
    This field identifies the collection of ports supported by the web service. It holds the @service name value for a SOAP web service call, for example, Calculator.
  7. Optional: In the Port field, enter the endpoint to connect with.
    If you do not specify a port, the bot will use the first port mentioned in the WSDL file based on the service selected. However, if that port is not supported by the SOAP web service, bot execution will fail.
    This field holds the @binding name value for a SOAP web service call, for example, CalculatorSoap.
  8. Select the SOAP version of the endpoint that you specified in the Port field.
    Choose either 1.1 or 1.2.
  9. In the Operation field, enter the name of the service function for the endpoint that you specified in the Port field.
    The bot execution fails if either of the following is true:
    • The port mentioned in the port field does not have any operations.
    • The operation mentioned in the SOAP request for the port is unavailable.
    This field holds the @operation name value for a SOAP web service call, for example, Add.
  10. Select Operation parameters or Raw data parameters to provide the parameter details.
    Note: If you have selected Build SOAP request, the parameter details table in the Operation tab is automatically populated with the parameters of the selected operation. Provide values for these parameters. You can also add, edit, or delete the parameters for a particular operation.
    • If you select Operation parameters, enter the name and value of each parameter. For example, enter the following values:
      1. intA in the first Name field
      2. 10 in the first Value field
      3. intB in the second Name field
      4. 20 in the second Value field
    • If you select Raw data parameters, enter the XML value.
  11. Select No Authentication or Basic from the Authentication Mode list.
    • If you select No Authentication, proceed to the next step.
    • If you select Basic, enter your credentials.
  12. Optional: Provide a Client certificate by selecting a file from the Control Room or your desktop, or insert a variable.
  13. Optional: Provide custom headers.
  14. Optional: Provide a file to save the XML output.
  15. Select Complete response or Selected response to narrow the scope of the response.
    • If you select Complete response, proceed to the next step.
    • If you select Selected response, perform the following steps:
      1. Provide the XPath expression. For example:
        /*[local-name()='Envelope' and namespace-uri()='http://schemas.xmlsoap.org/soap/envelope/']/*[local-name()='Body' and namespace-uri()='http://schemas.xmlsoap.org/soap/envelope/']/*[local-name()='AddResponse' and namespace-uri()='http://tempuri.org/']/*[local-name()='AddResult' and namespace-uri()='http://tempuri.org/']
      2. Select a section of the XML output: Values, Inner XML, or Outer XML.
      3. If you select Values, choose a delimiter option: Pipe or Semicolon.
  16. Select a variable to store the XML output,
    for example, prompt-assignment.
  17. Verify the output of the SOAP web service action by inserting a Message box action with the variable prompt-assignment in the body message.
    When you run the bot, the message box should show 30.
Send Feedback