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&mkt=en-us
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]