I have a fairly simple Axis2 setup (running in Tomcat5.5), using POJO.  I've
written the java client code, which generated the proper WSDLs and have used
Ruby's wsdlDriver successfully to test my methods throughout my development
process, all with great success.

However, when attempting to consume this service from a .NET (2.0) client,
the client is unable to understand the result of my service.  I see the call
to my service, and the underlying database call succeeds, in fact.
Basically, everything succeeds "on my end" but the client cannot handle it
properly.  My .NET people are having issues because the .NET framework does
not want to call my logon method with four input parameters and have it
return a single int.  It's requiring them to send six input parameters, with
the latter two being passed by reference (these are the outputs).  No matter
what they do, they only see a single 1 returned as opposed to the ten-digit
UUID that they should be getting.  I've read other reports and issues from
people in similar situations but many of the solutions seem to pertain to
either the nillable property, or the minOccurs property; how can I specify
these if I'm using java2wsdl?

Relevant code follows ...

My method accepts four parameters, and returns a single int.

*the WSDL for the logon method:*
 <xs:element name="logon">
     <xs:complexType>
       <xs:sequence>
         <xs:element minOccurs="0" name="user" nillable="true"
type="xs:string"/>
         <xs:element minOccurs="0" name="pass" nillable="true"
type="xs:string"/>
         <xs:element minOccurs="0" name="device" nillable="true"
type="xs:string"/>
         <xs:element minOccurs="0" name="cell" nillable="true"
type="xs:string"/>
       </xs:sequence>
    </xs:complexType>
</xs:element>
<xs:element name="logonResponse">
    <xs:complexType>
     <xs:sequence>
       <xs:element minOccurs="0" name="return" type="xs:int"/>
     </xs:sequence>
    </xs:complexType>
</xs:element>

*The Java method:*
public int logon(String user, String password, String device, String cell){
     /* Database actions, create a session, etc.  */
     return int;  // An integer representation of a UUID.
}

*The XML response (in firefox)
*<ns:logonResponse>
    <ns:return>2046037248</ns:return>
</ns:logonResponse>

Reply via email to