PC Review


Reply
Thread Tools Rate Thread

VB client can't access results from Axis 1.2 service returning arr

 
 
=?Utf-8?B?QW5hbmQgTmF0cmFqYW4=?=
Guest
Posts: n/a
 
      3rd Aug 2004
Hi!

I have a VB .NET client that is accessing an rpc/encoded service deployed in Axis 1.2. One of the operations, whoami, returns a string array. The server-side Java signature of this method is
String[] whoami(MyPrincipal principal)
My .NET client is unable to access the results of that array. The odd thing is that the very same client was able to access the results when the same service was deloyed in Axis 1.1. I've asked the Axis folks what the problem may be and they insist that the response sent by Axis 1.2 is correct. According to them Axis 1.1 may have had a bug and .NET just accidentally happened to work. Below I show a snippet of the response that causes a problem.

When the VB .NET client accessed the same operation with Axis 1.1, the response snippet looked like this:
<ns1:whoamiResponse
soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:ns1="urn:MyAPIRpcEnc">
<whoamiReturn soapenc:arrayType="xsd:string[9]"
xsi:type="soapenc:Array"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">
...

When the same VB .NET client accesses the same operation with Axis 1.2, the response looks like this:
<ns1:whoamiResponse
soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:ns1="urn:MyAPIRpcEnc">
<whoamiReturn soapenc:arrayType="soapenc:string[9]"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">
...

As you can see the only significant difference is the namespace associated with "string" in the whoamiReturn segment - with 1.1 it is "xsd", and with 1.2 it is "soapenc".

The client works as expected with 1.1. With 1.2, when the whoami operation is executed, VB responds with the following error:
Unhandled Exception: System.InvalidOperationException: There is an error in XML
document (1, 308). ---> System.InvalidOperationException: The specified type was
not recognized: name='string', namespace='http://schemas.xmlsoap.org/soap/encoding/', at <whoamiReturn xmlns=''>.
at System.Xml.Serialization.XmlSerializationReader.GetPrimitiveType(XmlQualifiedName typeName, Boolean throwOnUnknown)
at System.Xml.Serialization.XmlSerializationReader.ReadArray(String typeName, String typeNs)
at System.Xml.Serialization.XmlSerializationReader.ReadReferencingElement(String name, String ns, Boolean elementCanBeType, String& fixupReference)
at System.Xml.Serialization.XmlSerializationReader.ReadReferencingElement(String name, String ns, String& fixupReference)
at Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationReader1.Read70_whoamiResponse()
--- End of inner exception stack trace ---
at System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader xmlReader, String encodingStyle)
at System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader xmlReader)
at System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall)
at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters)
at DotNetWSAPITest.MyAPIRpcEnc.MyAPIRpcEncService.whoami(MyPrincipal principal)
at DotNetWSAPITest.DotNetWSAPITest.actualTests(MyPrincipal principal)
at DotNetWSAPITest.DotNetWSAPITest.testMyWSAPI()
at DotNetWSAPITest.DotNetWSAPITest.Main()

Any ideas why this may be happening? Why isn't .NET able to recognise the namespace for "string"?

Thanks!

Anand
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Office 2007 Pro Plus 2007 (Beta) - getting small red and green arr =?Utf-8?B?QmRob29wZXIx?= Microsoft Excel Misc 1 19th Jul 2006 11:39 PM
IndexOutOfRangeException - Index was outside the bounds of the arr =?Utf-8?B?RG91ZyBNY0Nvcm1pY2s=?= Microsoft ADO .NET 0 31st Mar 2006 12:43 AM
How do I change MS Outlook setting to remove duplicate emails arr. =?Utf-8?B?cGxlYXNlYXNzaXN0?= Microsoft Outlook Installation 1 27th Sep 2004 05:31 PM
how to match an array of 1 row, to its counterpart in a larger arr =?Utf-8?B?bGdpbmRs?= Microsoft Excel Worksheet Functions 4 26th Sep 2004 09:39 AM
RE: arr/remove windows components Matt Hendrix [MSFT] Windows XP Setup 0 18th Nov 2003 03:22 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 04:55 AM.