473,320 Members | 1,961 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Client Error When Consuming Web Method

A little background.

This is a VB.Net client application , and it uses a web reference to a web
service, which has been properly refreshed.

My app takes collections of two serializable objects, and serializes them to
a XMLDocument object. The serializer uses Chris Lovett's XMLNodeWriter.dll to
write directly to the XMLDocument.

XMLDocument.DocumentElement is passed to the Web method which takes an
XML.XMLNode parameter. (Originally the XML was passed as a string. This was
changed based upon a GotDotNet thread I read, in which Dare Obasanjo states
that using an XML.XMLNode object is recommended for passing XML to a
webservice. The XML string also produced a slightly different server parsing
error).

Intermittently, the following error is sent up the call stack when making
the call from a client's machine. We have isolated the exception to specific
object instances, and can now reproduce the following.

System.Web.Services.Protocols.SoapException: Server was unable to read
request. --> There is an error in XML document (1, 754). --> The '<'
character, hexadecimal value 0x3C, cannot be included in a name. Line 1,
position 1025.
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)

First, is this actually a server side exception, or will the proxy code
generated by the web reference throw this exception? (Confusing since the
text of the exception includes : Server was unable to read request.)

Second, after encountering this exception I save the contents of the
XMLDocument. The client sends me this XML file, and loading this file into an
XMLDocument object, I can successfully execute the web service while
stepping through the client in the VS.Net IDE. One difference is that my
client's computer does not have the Framework 1.1. SP1 applied, and I do. I
googled the fixes introduced by SP1, but saw nothing related to this problem.
Did I miss something?

Third, the serializable classes are pretty straightforward. Their are two of
them. They inherit from base classes which contain only public fields of
native(?) types (String,Integer etc.) . They also contain arraylists of other
objects(email, address etc.) which are also simple classes containing only
public fields of native types. I use the XmlInclude attribute to include
these types. Am I missing a known bug in XMLSerialization which would explain
the exception?

Fourth, as I stated, we now have it isolated to a few different specific
object instances. What is frustrating is that the serialized XML can be
successfully saved at the time of the exception. Inspecting the XML, it is
well-formed. Could the XMLDocument be doing something under the hood when
saving that corrects the problem? Again, the DocumentElement property of the
XMLDocument is passed as the argument. You would think this would be an exact
replica of what would be saved to file.

Finally, if this is truly a server side exception, I am assuming it is
occuring in the .Net runtime before ever reaching the actual web method code.
What are my options for sniffing this low level?

Any contributions would be greatly appreciated.

Matthew
Nov 23 '05 #1
0 1446

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

Similar topics

10
by: Lakshmi Narayanan.R | last post by:
Hi Experts, Using keyword "To" in select case giving error.The following code is got from www.microsrosoft.com itself. What is the wrong with this?. <% Dim Number1 Number1 = 7 ' Initialize...
3
by: Matthew King | last post by:
Hi all I've written a asynchronous socket client class, but i've found that in order to consume it I have to use events, and cannot simply for example SocketClient client = new...
7
by: Jamie Phillips | last post by:
I'm sure this topic has been "around the block" a few times, but I have not been able to find ANY solutin that fits this particular problem. I have written a Java Axis web service that has a method...
0
by: Matthew Copeland | last post by:
A little background. This is a VB.Net client application , and it uses a web reference to a web service, which has been properly refreshed. My app takes collections of two serializable...
1
by: WebServiceSecurity | last post by:
The issue involves the following technologies: - 1. .NET 2.0 Framework 2. WSE2.0 (WS-Security) 3. X.509 certificates 4. BEA Weblogic 8.1.5
0
by: erik.erikson | last post by:
I am getting a compiler error that I can't well explain or even understand the origin of (though I boiled it down close...). Below is a bare-bones example. What I am doing is defining the...
3
by: Jeremy Chapman | last post by:
I've writtin a very simple web service in axis which returns an array of classes. I consume it in a .net app. When receiving the response, my .net app generates an error "Cannot assign object...
9
by: timor.super | last post by:
Hi group, I've written a client/server application, using the dotnet sockets. In my server, I have a thread waiting for messages with : ret = currSocket.Receive(buffer, 1024,...
1
by: =?Utf-8?B?R29yZG9u?= | last post by:
Hi; I am trying to consume a WS in a windows application. The application send a lookup value and the Ws returns a dataset. I can consume this WS in a asp.net app with no problems When I...
3
by: Lance Wynn | last post by:
Hello, I am receiving this error when trying to instantiate a webservice component. I have 2 development machines, both are XP sp2 with VS 2008 installed. On one machine, the code works fine. On...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.