473,804 Members | 3,745 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(MyPrinci pal 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:whoamiResp onse
soapenv:encodin gStyle="http://schemas.xmlsoap .org/soap/encoding/"
xmlns:ns1="urn: MyAPIRpcEnc">
<whoamiReturn soapenc:arrayTy pe="xsd:string[9]"
xsi:type="soape nc: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:whoamiResp onse
soapenv:encodin gStyle="http://schemas.xmlsoap .org/soap/encoding/"
xmlns:ns1="urn: MyAPIRpcEnc">
<whoamiReturn soapenc:arrayTy pe="soapenc:str ing[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.InvalidO perationExcepti on: There is an error in XML
document (1, 308). ---> System.InvalidO perationExcepti on: The specified type was
not recognized: name='string', namespace='http ://schemas.xmlsoap .org/soap/encoding/', at <whoamiReturn xmlns=''>.
at System.Xml.Seri alization.XmlSe rializationRead er.GetPrimitive Type(XmlQualifi edName typeName, Boolean throwOnUnknown)
at System.Xml.Seri alization.XmlSe rializationRead er.ReadArray(St ring typeName, String typeNs)
at System.Xml.Seri alization.XmlSe rializationRead er.ReadReferenc ingElement(Stri ng name, String ns, Boolean elementCanBeTyp e, String& fixupReference)
at System.Xml.Seri alization.XmlSe rializationRead er.ReadReferenc ingElement(Stri ng name, String ns, String& fixupReference)
at Microsoft.Xml.S erialization.Ge neratedAssembly .XmlSerializati onReader1.Read7 0_whoamiRespons e()
--- End of inner exception stack trace ---
at System.Xml.Seri alization.XmlSe rializer.Deseri alize(XmlReader xmlReader, String encodingStyle)
at System.Xml.Seri alization.XmlSe rializer.Deseri alize(XmlReader xmlReader)
at System.Web.Serv ices.Protocols. SoapHttpClientP rotocol.ReadRes ponse(SoapClien tMessage message, WebResponse response, Stream responseStream, Boolean asyncCall)
at System.Web.Serv ices.Protocols. SoapHttpClientP rotocol.Invoke( String methodName, Object[] parameters)
at DotNetWSAPITest .MyAPIRpcEnc.My APIRpcEncServic e.whoami(MyPrin cipal principal)
at DotNetWSAPITest .DotNetWSAPITes t.actualTests(M yPrincipal principal)
at DotNetWSAPITest .DotNetWSAPITes t.testMyWSAPI()
at DotNetWSAPITest .DotNetWSAPITes t.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 2207

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

Similar topics

0
2189
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> oService.PreAuthenticate = True oService.Credentials = New System.Net.NetworkCredential(<username>,<password>)
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 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...
0
4672
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 another web service that validates a security token in the header. I have pasted my current SOAP message that my code sends as captured from a trace function that I added. Below that is a sample SOAP message that the developer of the web...
0
2647
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 third party web service it's consuming is served by Axis. The request messages my client sends are processed fine by the server, and the SOAP response is making its way to my client - but when .Net finishes processing the message I end up with an...
1
3673
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 Axis and want to consume it with a .NET client. So I've created the web proxy using wsdl.exe and I can call the service and it responds but the client returns null. If I run a Java client then it gets the response fine and dandy. The web service...
5
4164
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 session id received from the Service request on subsequent requests to the service. However the Axis Web service does not process the SOAP header received from the .Net client and creates a new session id for each request from the .Net client. Below...
11
3256
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 and send. These are received without issue on the Axis server. The .NET client can also receive responses from the Axis web service when the response is a single value type (long, string, etc), or an array of value types. However if an object...
0
1239
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 multiref method for serializing complex data types, the client receives them without a problem. If I however set the service to send *without* multiref, the .NET side seems to be no longer able to properly deserialize the data, instead returning...
0
2445
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 org/apache/axis The following is what i need to do but am unable to do //////////////////////////////////////////////////////////////////////////////////////////// set classpath where the below jars are located.... axis.jar commons-discovery.jar
0
9706
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9584
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10337
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10323
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9160
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6854
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5654
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4301
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 we have to send another system
3
2995
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.