Try OpenEdge Now
skip to main content
Managed Adapters Guide
Web Service Managed Adapter : Using the Web Service Adapter : Configuring the Web Service Adapter : Using XML output for complex data types
 
Using XML output for complex data types
In case the Web Service you are using contains complex output and you do not want to use a custom Java class to handle it (see Dealingwith complex data types), you can select the Java Input and Soap Message Output option that is displayed in the Types and Mapping tab and shown in Figure 22.
Selecting the Java Input and Soap Message Output option indicates that you are expecting the result to be returned as an XML string and not as a Java object. All the complex data type outputs will disappear from the mapping table, as seen in Figure 22.
If you use the Java Input and Soap Message Output option, all result data will be returned as a single output that, when you are mapping dataslots (see Definingthe dataslot mapping), you can map to an CHARACTER dataslot. In some situations, returning XML may not be convenient or necessary; for instance, if you are interested in only a few values that are contained in the XML response. In this case, you can use the built-in XPath Editor to directly return the data of interest, instead of the complete response XML.
To use XML output for complex data types:
1. Select Java Input and Soap Message Output option in the Types and Mapping tab.
2. Open the Test tab.
3. Add values for each of the Java inputs listed.
4. Click Invoke, and the XML output appears in the lower text area, as shown in the following figure.
Figure 23. Web Service Adapter Configurator - Test Tab -Java Input
The Map Response fields option is available.
5. Check Map Respond fields. The Response Mapper option is available.
6. Click Respond Mapper. The XPath Wizard appears.
7. Click Add to add a parameter. The Parameter Editor dialog appears.
a. Enter the parameter name in the Name box.
b. Browse and select the X path and Click OK.
c. Select the type from the Type drop-down list.
8. Click OK to complete the configuration, and open the Dataslot Mapping dialog box (see Definingthe dataslot mapping).
For information on the XML Plugin, see Usingthe XML Format plug-in. Also, note that you cannot use XML plugin internal variables with the Web Service Adapter (for more information on use of variables, see the Using variables and conditions in XPath topic in Progress OpenEdge Business Process Modeler: User's Guide).
When using the XML plugin, all the selected fields are available for mapping to dataslots as adapter outputs. The response XML is not available as an output.