InvalidOperationException when Axis web service returns null array

N

Nino Benvenuti

I am working on a .NET CF application that returns an InvalidOperationException
when the Axis(1.1) web service it consumes returns a null array (the return type
of the web service is an array of a complex type - see below).

The situation described here:
http://www.error-bank.com/microsoft.public.dotnet.framework.webservices/3575_Thread.aspx
is my issue.

Like the individual in that post, I can successfully consume the web service
with a full .NET Framework client without issue (even if a null array is returned).

The fixes in .NET CF 1.0 SP3 (http://blogs.msdn.com/onoj/articles/178293.aspx)
seemed like they might fit our issue, so we installed the .NET CF 1.0 SP3 beta
on to one of our devices (custom device running Windows CE.NET). Unfortunately,
we still experienced the issue.

One item that I thought may be cause for concern is that the namespace of the
object (app.foo.bar.com) and the array of oject (webservices.baz.bar.com) in the
WSDL were different. Might this be an issue?

Here is a snippet from the WSDL (some names have been changed):

<types>
<s:schema xmlns="http://www.w3.org/2001/XMLSchema"
targetNamespace="http://app.foo.bar.com">
<s:import namespace="http://schemas.xmlsoap.org/soap/encoding/" />
<s:complexType name="SomeSpiffyObj">
<s:sequence>
<s:element name="SQLTypeName" nillable="true" type="s:string" />
<s:element name="assetStsInd" nillable="true" type="s:string" />
<s:element name="finalDest" nillable="true" type="s:string" />
<s:element name="legNbr" type="s:int" />
<s:element name="operDate" nillable="true" type="s:dateTime" />
<s:element name="rteID" nillable="true" type="s:string" />
<s:element name="schedDTM" nillable="true" type="s:dateTime" />
<s:element name="tripID" nillable="true" type="s:string" />
</s:sequence>
</s:complexType>
</s:schema>
<s:schema xmlns="http://www.w3.org/2001/XMLSchema"
targetNamespace="http://webservices.baz.bar.com">
<s:import namespace="http://schemas.xmlsoap.org/soap/encoding/" />
<s:complexType name="ArrayOf_tns2_SomeSpiffyObj">
<s:complexContent mixed="false">
<s:restriction base="soapenc:Array">
<s:attribute d7p1:arrayType="s0:SomeSpiffyObj[]"
ref="soapenc:arrayType" xmlns:d7p1="http://schemas.xmlsoap.org/wsdl/" />
</s:restriction>
</s:complexContent>
</s:complexType>
</s:schema>
</types>

*** End snippet **

If the namespace issue is not a problem, what else might be problematic?

TIA,
Nino
 
G

Guest

Hi Nino,
Coul you please provide us with a live end-point (that points to the Axis
WebService) I could troubleshoot against.
The empty element array problem was solved in SP3 and this seems to be a
different issue and we will like to investigate further.

Thanks,
Mark.
 
N

Nino Benvenuti

Hi Mark,

Unfortunately, I am unable to provide a live end-point for this
service. We currently have a work around in place and proceeding down
that road.

Thanks,
Nino

Mark Ihimoyan said:
Hi Nino,
Coul you please provide us with a live end-point (that points to the Axis
WebService) I could troubleshoot against.
The empty element array problem was solved in SP3 and this seems to be a
different issue and we will like to investigate further.

Thanks,
Mark.


Nino Benvenuti said:
I am working on a .NET CF application that returns an InvalidOperationException
when the Axis(1.1) web service it consumes returns a null array (the return type
of the web service is an array of a complex type - see below).

The situation described here:
http://www.error-bank.com/microsoft.public.dotnet.framework.webservices/3575_Thread.aspx
is my issue.

Like the individual in that post, I can successfully consume the web service
with a full .NET Framework client without issue (even if a null array is returned).

The fixes in .NET CF 1.0 SP3 (http://blogs.msdn.com/onoj/articles/178293.aspx)
seemed like they might fit our issue, so we installed the .NET CF 1.0 SP3 beta
on to one of our devices (custom device running Windows CE.NET). Unfortunately,
we still experienced the issue.

One item that I thought may be cause for concern is that the namespace of the
object (app.foo.bar.com) and the array of oject (webservices.baz.bar.com) in the
WSDL were different. Might this be an issue?

Here is a snippet from the WSDL (some names have been changed):

<types>
<s:schema xmlns="http://www.w3.org/2001/XMLSchema"
targetNamespace="http://app.foo.bar.com">
<s:import namespace="http://schemas.xmlsoap.org/soap/encoding/" />
<s:complexType name="SomeSpiffyObj">
<s:sequence>
<s:element name="SQLTypeName" nillable="true" type="s:string" />
<s:element name="assetStsInd" nillable="true" type="s:string" />
<s:element name="finalDest" nillable="true" type="s:string" />
<s:element name="legNbr" type="s:int" />
<s:element name="operDate" nillable="true" type="s:dateTime" />
<s:element name="rteID" nillable="true" type="s:string" />
<s:element name="schedDTM" nillable="true" type="s:dateTime" />
<s:element name="tripID" nillable="true" type="s:string" />
</s:sequence>
</s:complexType>
</s:schema>
<s:schema xmlns="http://www.w3.org/2001/XMLSchema"
targetNamespace="http://webservices.baz.bar.com">
<s:import namespace="http://schemas.xmlsoap.org/soap/encoding/" />
<s:complexType name="ArrayOf_tns2_SomeSpiffyObj">
<s:complexContent mixed="false">
<s:restriction base="soapenc:Array">
<s:attribute d7p1:arrayType="s0:SomeSpiffyObj[]"
ref="soapenc:arrayType" xmlns:d7p1="http://schemas.xmlsoap.org/wsdl/" />
</s:restriction>
</s:complexContent>
</s:complexType>
</s:schema>
</types>

*** End snippet **

If the namespace issue is not a problem, what else might be problematic?

TIA,
Nino
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top