473,503 Members | 1,705 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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

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.Ge tPrimitiveType(XmlQualifiedName typeName, Boolean throwOnUnknown)
at System.Xml.Serialization.XmlSerializationReader.Re adArray(String typeName, String typeNs)
at System.Xml.Serialization.XmlSerializationReader.Re adReferencingElement(String name, String ns, Boolean elementCanBeType, String& fixupReference)
at System.Xml.Serialization.XmlSerializationReader.Re adReferencingElement(String name, String ns, String& fixupReference)
at Microsoft.Xml.Serialization.GeneratedAssembly.XmlS erializationReader1.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.SoapHttpClientProtoc ol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall)
at System.Web.Services.Protocols.SoapHttpClientProtoc ol.Invoke(String methodName, Object[] parameters)
at DotNetWSAPITest.MyAPIRpcEnc.MyAPIRpcEncService.who ami(MyPrincipal principal)
at DotNetWSAPITest.DotNetWSAPITest.actualTests(MyPrin cipal 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
Jul 21 '05 #1
0 2184

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
2177
by: CS | last post by:
Hi I need to connect to an AXIS server using SSL. I've registered their certificate in trusted roots, added the web reference and tried both this: Dim oService As New <webservice>...
0
315
by: Anand Natrajan | last post by:
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...
0
4653
by: Daniel Thune, MCSE | last post by:
I am having a problem with formatting a SOAP Header in a .Net client. The client calls a Java Axis 1.1 based web service. In order to authenticate the caller, the web service call is intercepted by...
0
2616
by: jennifer.perkins | last post by:
I've seen a couple posts by people having similar problems, but the suggested solutions I've tried so far haven't worked. I'm using a SOAP client in VB.Net (constructed by wsdl.exe) and the...
1
3635
by: BeckyB00 | last post by:
Slightly different situation from the question of the 11/18/05 but the same error. (I'm just learning about web services so this is based on a 'quick tutorial') I'm running a web service using...
5
4136
by: vthakur | last post by:
Hello: I have a Axis Web Service that sets the sessionid in the SOAP header for persisting the session. The client is a .Net client that processes the header as an Unknown Header. It sets the...
11
3216
by: David R | last post by:
This is a repost, with additional information. I have a Net 2.0 client (C# Winform) calling an Axis web service. The .NET client can authenticate, create requested objects, serialize the objects...
0
1222
by: andreas.baus | last post by:
Hi. I created a web service (using Apache Axis) and a client for accessing it (using .NET 1.1, C# and WSE2.0), and I noticed a strange phenomenon: When the service sends it's responses using the...
0
2426
by: Siyodia | last post by:
This is a java program which i need to run facing compilation error Its consuming a third party web service method I have the supported files(folder) which contain necessary class files...
0
7202
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7330
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
7460
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5578
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
4672
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3167
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
1512
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
736
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
380
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.