Chapter 5. Building the base scenario: Stage 2 179
The outcome is a changed tag name (<GETCUSTINFOReturn> to <multiRef>) that must be
considered as creating bindings to the inner structure of the object.
For this project, the workaround used was relative addressing of any inner elements and
making code tolerant to changes of the relevant tags:
[GETCUSTINFOResponse][0][CUST_ID].value
in place of:
[GETCUSTINFOResponse][GETCUSTINFOReturn][CUST_ID].value
Another workaround would be a redefinition of the Web service description using an explicit
RCP datastructure with the following object definitions (Example 5-16).
Example 5-16 Redefined WSDL using simple data types only
<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions targetNamespace="http://WPFormsRedpaper"
xmlns="http://schemas.xmlsoap.org/wsdl/"
xmlns:apachesoap="http://xml.apache.org/xml-soap"
xmlns:impl="http://WPFormsRedpaper" xmlns:intf="http://WPFormsRedpaper"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<wsdl:types>
</wsdl:types>
<wsdl:message name="GETCUSTINFORequest">
<wsdl:part name="CUST_ID" type="xsd:string"/>
</wsdl:message>
<wsdl:message name="GETCUSTINFOResponse">
<part name="CUST_ID" type="xsd:string"/>
<part name="CUST_NAME" type="xsd:string"/>
<part name="CUST_AMGR" type="xsd:string"/>
<part name="CUST_CONTACT_NAME" type="xsd:string"/>
<part name="CUST_CONTACT_POSITION" type="xsd:string"/>
<part name="CUST_CONTACT_PHONE" type="xsd:string"/>
<part name="CUST_CONTACT_EMAIL" type="xsd:string"/>
<part name="CUST_CRM_NO" type="xsd:string"/>
</wsdl:message>
<wsdl:operation name="GETCUSTINFO" parameterOrder="CUST_ID">
<wsdl:input message="impl:GETCUSTINFORequest" name="GETCUSTINFORequest"/>
<wsdl:output message="impl:GETCUSTINFOResponse" name="GETCUSTINFOResponse"/>
</wsdl:operation>
</wsdl:portType>
Doing so would result in a complete new design of the J2EE Web service implementation
class switching from accessing objects with attributes of a basic type (String, int, ...) to work
with placeholder parameters (java.lang.String placeholder, ...). We did not take this approach.
After rewriting the binding definitions stored in XFDL form for customer and product detail
data, we considered the Web service implementation complete.
5.4 Servlet access to Form data
In this section we describe how to provide servlet access to the Form data.

Get IBM Workplace Forms: Guide to Building and Integrating a Sample Workplace Forms Application now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.