Define a Call a Web Service Action
Use the Call a Web Service One-Step™ Action to dynamically call a web service and save the results as a variable.
For example, call a web service that calculates currency, then use the results in a Field. The results can be saved as a variable in one of the following data types: number, string, or Boolean.
Currently, CSM supports REST and WSDL-based web services using either no authentication or Basic authentication.
To define a Call a Web Service Action for a One-Step Action:
- Open the One-Step Editor.
- Add a Call a Web Service Action to the Designer Board.
- Click the General page.
- Define general properties for the Call a Web Service Action:
Option Description Name Provide a display name for the Action (this is how the Action is identified within the One-Step Action). Service Select the web service to call by clicking the Ellipses button. The Web Service Manager opens, where you can select an existing web service or set up a web service. Account Select the Web Service Account to use to provide the User ID and password required to call the web service. This is only enabled if the web service requires authentication (Basic Security is selected for the web service) and Accounts were defined for the web service.
- Optional: Define how results are stored:
This is not required; however, in most cases, you want to store the result as a variable so that you can do something with it (example: Pop-up results, edit a Business Object, etc.). There are some cases where you might not save the result (example: Where posting data to the web service might not return anything; for example, Send a Tweet).
Option Description Store Results Select this check box to store the result of the web service call as a variable in the system using the specified name. Store Return Code Select this check box to store the error code if the web service call returns an error (example: Error code 403 indicates that you do not have sufficient rights, or 408 indicates that the server timed out). It is then available as a variable in the system using the specified name. Store Headers As Select this check box to store headers as variables in the system using the specified name. Don't Stop One-Step on Error Select this check box to have the One-Step Action continue executing even if the web service call returns an error. This allows for the creation of future steps that show details about the error, or try to handle the error in another way.
This option is only available if the Store Return Code As check box is selected.
- Click the Method page.
- Specify the Method to call on the web service:
Option Description Method Select Web Service Method. The Parameters tree on the left shows all the parameters for the selected Web Service Method. Define a value for each parameter. Blank Select this radio button to not set a value for the parameter. This might or might not be valid for different web services. If a required parameter is not provided, the web service will likely generate an error. Set Value Select this radio button to manually set the Method value. Provide text. Click the Selector button to insert Tokens (example: Fields, System Functions, Prompts, Expressions, Stored Values, Metrics, and Counters) directly into the text.
- Define the Annotations for a One-Step Action.
- Click Save.
Configuring the Call a Web Service Action for Trusted Agents
To configure the Call a Web Service Action to run on a remote network, follow the steps in Configure One-Step Actions to Run on Trusted Agents.