You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Ricardo Brito Da Rocha <ri...@cern.ch> on 2006/01/11 21:08:47 UTC

wrapped and new method parameters

Hi all. I have a question regarding Axis document/literal wrapped, which i hope makes sense.

While trying to have a backward-compatibility aware WSDL, i'm using <xsd:any minOccurs="0" maxOccurs="unbounded"/> in all response
message elements. This is fine as Axis maps it to org.apache.axis.message.MessageElement object arrays. It is also fine if i pass an
element in the request message which has the same <xsd:any/> element inside.

Now what i would also like is to have the same flexibility regarding method parameters. I was expecting to get this by having:
  <xsd:element name="myCall">
    <xsd:complexType>
      <xsd:sequence>
        <xsd:element name="param1" type="xsd:boolean"/>
        <xsd:any namespace="##any" minOccurs="0" maxOccurs="unbounded" processContents="lax"/>
      </xsd:sequence>
    </xsd:complexType>
  </xsd:element>

, but it seems to make Axis forget about wrapped for this particular request message (it will still do the thing properly for all
other calls), and the result java code will look like:
public MyCallResponse myCall(MyCall parameters);

Is there a reason why wrapping is left out in this case and the following code is not generated:
public void myCall(boolean param1, org.apache.axis.message.MessageElement[] _any);

I can overcome this problem by having a single element in the request message, being defined as above with a <xsd:any/> element
inside and it will be nicely generated with a MessageElement array as for the response messages. But i'm wondering why the normal
wrapped mode is not followed if the flexibility is in the message element itself.

For reference, i'm using Axis 1.2.1.

Thanks in advance,
  Ricardo