It seems like the generated WSDL is incorrect as it should indicate
nillable=true and minOccurs=0. The SOAP responses look fine to me. 

I suggest you try this out with Axis 1.4 as there were a few array
handling related bugs that were fixed, and it has better support for it.
Not sure if the specific bugs that you are encountering in the WSDL
generation have been fixed though. 

- Junaid

-----Original Message-----
From: Jarmo Doc [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, October 18, 2006 10:32 AM
To: [email protected]
Subject: java2wsdl bug in operation sig?

I have a Java method such as:

  public MyObject [] myOperation(int param);

Now Axis 1.3 java2wsdl for this yields a response signature as follows:

   <element name="myOperationResponse">
    <complexType>
     <sequence>
      <element maxOccurs="unbounded" name="myOperationReturn" 
type="impl:MyObject"/>
     </sequence>
    </complexType>
   </element>

If, at runtime, myOperation returns new MyObject[0] then this is
serialized 
as follows:

<soapenv:Body>
  <myOperationResponse xmlns="urn:xyz"/>
</soapenv:Body

If instead, at runtime, myOperation returns null then this is serialized
as 
follows:

<soapenv:Body>
  <myOperationResponse xmlns="urn:xyz">
    <myOperationReturn xsi:nil="true"/>
  </myOperationResponse>
</soapenv:Body>

Both of these seem on the surface to be wrong:

- the 1st appears to be wrong because the WSDL does not indicate
minoccurs=0 
hence minoccurs is by default 1 and hence there should be at least 
myOperationReturn element.

- the 2nd appears to be wrong because the WSDL does not indicate 
nillable=true hence nillable is by default false and hence the 
myOperationReturn element cannot be nil.

Am I missing something or are these both bugged?  Thanks very much.

_________________________________________________________________
Stay in touch with old friends and meet new ones with Windows Live
Spaces 
http://clk.atdmt.com/MSN/go/msnnkwsp0070000001msn/direct/01/?href=http:/
/spaces.live.com/spacesapi.aspx?wx_action=create&wx_url=/friends.aspx&mk
t=en-us


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to