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
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