Consuming a simple flat document scenario
In this scenario, you access an external web service and, using a Set Fields filter action, set the data into a BMC Remedy AR System form. The external web service takes a stock ticker symbol as input and returns the 20-minute delayed stock quotation for that stock.
To consume a simple flat document
- In BMC Remedy Developer Studio, create a form called Stock Quote.
- Add two fields:
- A character field called Stock Ticker Symbol, in which you enter the stock ticker symbol (in this scenario, BMC)
- A decimal field called Delayed Stock Quote, in which the stock quotation is set when information is received from the external web service
Stock Quote form in BMC Remedy Developer Studio
(Click the image to expand it.)
- In BMC Remedy Developer Studio, create a filter as follows:
- Add the Stock Quote form to the Associated Forms panel.
- From the State list, select Enabled.
- In the Execution Order field, enter the execution order for the filter.
- In the Execution Options panel, select Modify.
Stock Quote filter — Associated Forms and Execution Options panels
(Click the image to expand it.) - Right-click the If Actions panel, select Add Action, and select Set Fields.
A new panel appears, where you configure the Set Fields action. - 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 the external web service.
http://services.xmethods.net/soap/urn:xmethods-delayed-quotes.wsdl- Click Reload. (If prompted, enter the user name and password required by the remote web server for basic authentication.)
- From the Port list, select the port for the web service.
- From the Operation list, select the getQuote operation.
The menu is automatically populated with the available operations for the web service. This scenario has only one operation.
Stock Quote filter — If Actions and Set Fields panels
(Click the image to expand it.) - In the Input Mapping table, highlight the cell adjacent to the symbol element.
Note that the ROOT element of the XML schema is automatically mapped to the Stock Quote form. - Click the ellipsis button.
- Use the Field Selector to choose the Stock Ticker Symbol field, which you created in step 2.
The field name appears in the Form/Field column. The symbol element (string type) is now mapped to the Stock Ticker Symbol field (designed to contain a string). - In the Output Mapping table, highlight the cell adjacent to the Result element.
- Click the ellipsis button.
- Use the Field Selector to choose the Delayed Stock Quote field, which you created in step 2.
The Result element (string type) is now mapped to the Stock Quote field (designed to contain a string). - Select File > Save, and name your filter Stock Quote Filter.
- Open a new Stock Quote form in a browser, and enter data in the required fields.
- Save the form.
- Run a search to open the form in Modify mode.
Recall that you created the Stock Quote Filter to execute on Modify (step 10). - Enter a symbol (in this scenario, BMC) in the Stock Ticker Symbol field.
- Click Save or Submit.
The quote for your stock is displayed in the Stock Ticker Symbol field (see the following figure).
Stock Quote form
(Click the image to expand it.)
Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*