Zaq,
I have seen this similar problem. The culprit is actually that nillable="true" OR minOccurs = "0" or possibly both in those parameters(I don't' remember exactly which one(s) it was I had to modify to fix it). Unfortunately Axis2 produces this sort of wsdl and as far as I know you cannot easily change it. Let me guess.your .net client is adding to boolean parameters along the lines of isProvided? That is because .net proxy generator thinks some things are optional, and rightfully so according to the WSDL. The best thing to do is take your wsdl generated by axis 2 and hand tweak those attributes and .NET will produce cleaner clients for it. Of course you could always just provide TRUE for all cases of the "isProvided"(or whatever it is called) variables in your .net code. Hope this helps.I had a problem with this too and I just provided hand tweaked WSDL to clients to generate from. Chris _____ From: Zaq Rizer [mailto:[EMAIL PROTECTED] Sent: Friday, June 13, 2008 6:02 AM To: [email protected] Subject: Trouble with a .NET client. 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>
