Example of consuming a simple flat document
To consume a simple flat document
- InDeveloper 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
- In 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.
- 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.wsdlThis WSDL reference might not work if its website is not functioning.
- Click Reload. If prompted, enter the username 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. - In the Input Mapping table, highlight the cell adjacent to the symbol element.
Important: 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 as shown in the following figure:
Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*