Enabling web service data to appear in a form
To use an external web service, you create a Set Fields filter action with WEB SERVICE as the data source to enter data from the web service into the base form. You can then view the form in an AR System client. The Set Fields filter action invokes the web service using its WSDL. Make sure that other filters are not acting on the same form that might skew the data from the external web service or prevent the data from appearing.
The web service might not give the expected result if you have the form and field level mapping in the root element as well as in the header element. We recommend to have the form and field level mapping in the root element.
To create a Set Fields web service filter action
- In Developer Studio, create a form to use as your base form for the external web service.
Before you create fields to hold the web service data, review the XML element types in the WSDL file of your external web service. You can map only fields and elements of the same type. See Automatically-mapping-XML-elements. - Select File > New > Filter.
- Select the server on which you want to create the filter, and click Finish.
- Right-click the Associated Forms panel, then select Expand All Panels.
- In the Associated Forms panel, click the Add button.
In the Form Selector dialog box, select the base form and click OK.
The data is set to this form. To push the data to other forms, create workflow.- In the State list, select Enabled.
You might want to disable the filter during development, or when you detect a problem. - In the Execution Order field, enter the execution order for the filter.
The value you enter in this field determines the order in which the filter executes relative to other filters with the same triggering condition. Numbers between 0 and 1000 are valid values; lower numbers are processed first. Some filter actions might be queued and performed at a later time. - Select a check box corresponding to the operation that activates the filter.
If you select multiple options, the filter executes when any of your selected operations runs. To refine the selection criteria, enter a qualification statement in the Run If Qualification panel.
When the qualification is met, If Actions are executed. When the qualification is not met, Else Actions are executed.- In the Error Handler panel, verify that error handling is disabled.
- Right-click the If Actions panel or the Else Actions panel, select Add Action > Set Fields.
- From the Data Source list, select WEB SERVICE.
- From the Server Name list, select the server on which to store the web service mappings as a server object.
In the WSDL File field, enter the URL for the WSDL file of your external web service.
- To select a WSDL file located on your local hard drive or LAN, click the ellipsis button and navigate to the WSDL file.
- To search for the WSDL of a web service that is registered in the BMC Atrium Web Service Registry, use the AR System Web Services Registry Query form. See Querying-the-registry. Cut and paste the resulting WSDL URL into the WSDL File field.
When Developer Studio parses the WSDL, the End Point field appears and is populated with the end point stored in the WSDL. You can use the existing end point or modify it as follows:
- Directly enter a different end point URL.
- Enter an expression to cause AR System server to query the registry at runtime to obtain the end point URL. See Querying-the-registry.
- Click Reload.
Developer Studio parses the WSDL file, identifies viable operations, and lists them in the Operation list. - If prompted, enter the user name and password required by the remote web server for basic authentication.
- From the Port list, select the web service port from which to select the operation.
- From the Operation list, select the operation for the web service to perform.
- From the Authentication list, select an authentication method. (See Specifying-authentication-information.)
- Create input and output mappings. For mapping procedures, see Mapping-web-service-data.
- Click File > Save to save the filter.
To view the web service data in an AR System client, open the base form and other forms to which the data is pushed.
For information on using operators such as LIKE, AND, or OR when consuming a web service, see Knowledge Base article ID 000276286.