Elements of List<Object> are not added to a WebService Request of a SOAPClient Action

Solution Verified - Updated -

Issue

I have a SOAPClient action. The request object is created in method createRequest() of the WSRequestAction.java class.

The schema contains a complex type such as the one below:

<s:complexType name="AddObjectData">
        <s:sequence>
          <s:choice minOccurs="0" maxOccurs="unbounded">
            <s:element minOccurs="0" maxOccurs="1" name="BoolVal" type="tns:BoolVal" />
            <s:element minOccurs="0" maxOccurs="1" name="SingleVal" type="tns:SingleVal" />

When the StringVal Object is set as follows:

Parameters.setStringVal(stringVal1);

then a single element <v1:StringVal> appears in request which is OK so far.

But as the request has to be sent with 2 StringVal elements, the request object is created as follows:

Parameters.getLongIntValOrStringValOrCurrencyVal().add(stringVal1);
Parameters.getLongIntValOrStringValOrCurrencyVal().add(stringVal2);

Then no single <v1:StringVal> element appears in request.

Why aren't the object elements of object list longIntValOrStringValOrCurrencyVal not added to request?

Note: longIntValOrStringValOrCurrencyVal was generated by wsdl2java from the given schema.

Environment

  • Red Hat JBoss SOA Platform 5

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In
Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.