interoperability problem .NET CF C# client with axis 1.1 webservice

interoperability problem .NET CF C# client with axis 1.1 webservice

Post by YnJlY2h » Wed, 28 Jan 2004 19:41:05


I am trying to convince the very much java minded people in my company to use .NET at least at at the client side and I said that it is very easy to interoperate while using webservices. For the full .NET framework I have no problems.

Could anyone point me to a solution for the following problem:

A .NET client (C#) for pocket pc 2003 returns the following exception while calling an Axis 1.1 web service:
An unhandled exception of type 'System.NullreferenceException' occurred in System.Web.Services.dll

Only one element of the SOAP response is nil and still the webservice method call returns a null reference. When I sniff the SOAP response I can see all the results with one element that is nil

The first part of the SOAP response (see below) shows that the element 'employees' is nil and of type ArrayOf_tns2_EmployeeInfo.

There's no problem when the elements are not nil.
I have also tried the same code and the same webservice but now used in the full .NET framework on a XP machine an there seems to be no problem handling this SOAP response. The specific element still is nil but at least the message returns correctly the result.

*** WSDL snippet ***

<complexType name="Activity"><sequence><element name="employees" nillable="true" type="impl:ArrayOf_tns2_EmployeeInfo" /><element name="employerInfo" nillable="true" type="tns1:EmployerInfo" /></sequence></complexType><complexType name="ArrayOf_tns2_EmployeeInfo"><complexContent><restriction base="soapenc:Array"><attribute ref="soapenc:arrayType" wsdl:arrayType="tns1:EmployeeInfo[]" /></restriction></complexContent></complexType>

*** SOAP response ***

<multiRef id="id4" soapenc:root="0" soapenv:encodingStyle=" " xsi:type="ns12:Activity" xmlns:ns12= " xmlns:soapenc=" "><employees xsi:type="ns13:ArrayOf_tns2_EmployeeInfo" xsi:nil="true" xmlns:ns13="urn:RIPWS"/><employerInfo href="#id19"/></multiRef><multiRef id="id5" soapenc:root="0" soapenv:encodingStyle=" " xsi:type="ns14:Activity" xmlns:ns14=" " xmlns:soapenc=" "><employees xsi:type="soapenc:Array" soapenc:arrayType="ns14:EmployeeInfo[1]" xmlns:ns15="urn:RIPWS"><item href="#id20"/></employees><employerInfo href="#id21"/></multiRef>