473,795 Members | 2,867 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How does one debug .NET deserialization problems?

Why does .NET not issue messages or throw exceptions if it doesn't like
something in the response from a web service?? I am getting a response
object, but an array of custom objects within the response is null instead of
being populated. The SOAP response from the service looks good and I cannot
see anything wrong with the WSDL or XML schema. How do I get .NET to tell me
what it doesn't like? Is there a way to turn on some kind of tracing or
logging, or to get it to allow me to step into the deserialization code?
Nov 23 '05 #1
5 5535
You probably can in different ways... but I'd suggest u first use
tcpTrace [0] and check the soap messages and see if they conform to
schema (atleast visually); namespaces are right, elements are right.

[0] - http://www.pocketsoap.com/tcptrace/
frustratedWithD otNet wrote:
Why does .NET not issue messages or throw exceptions if it doesn't like
something in the response from a web service?? I am getting a response
object, but an array of custom objects within the response is null instead of
being populated. The SOAP response from the service looks good and I cannot
see anything wrong with the WSDL or XML schema. How do I get .NET to tell me
what it doesn't like? Is there a way to turn on some kind of tracing or
logging, or to get it to allow me to step into the deserialization code?


--
HTH
Regards,
Dilip Krishnan
MCAD, MCSD.net
dkrishnan at geniant dot com
http://www.geniant.com
Nov 23 '05 #2
Thanks, but I already did that. I have a trace tool for the XML, and it looks
fine and conformant to the schema. This is document literal, BTW. No weird
soap encoding nonsense.

"Dilip Krishnan" wrote:
You probably can in different ways... but I'd suggest u first use
tcpTrace [0] and check the soap messages and see if they conform to
schema (atleast visually); namespaces are right, elements are right.

[0] - http://www.pocketsoap.com/tcptrace/
frustratedWithD otNet wrote:
Why does .NET not issue messages or throw exceptions if it doesn't like
something in the response from a web service?? I am getting a response
object, but an array of custom objects within the response is null instead of
being populated. The SOAP response from the service looks good and I cannot
see anything wrong with the WSDL or XML schema. How do I get .NET to tell me
what it doesn't like? Is there a way to turn on some kind of tracing or
logging, or to get it to allow me to step into the deserialization code?


--
HTH
Regards,
Dilip Krishnan
MCAD, MCSD.net
dkrishnan at geniant dot com
http://www.geniant.com

Nov 23 '05 #3
Out of curiosity, did you also try taking your xml trace and writing a
small lil console app that tries to deserialize the trace that you have
into the expected type?

frustratedWithD otNet wrote:
Thanks, but I already did that. I have a trace tool for the XML, and it looks
fine and conformant to the schema. This is document literal, BTW. No weird
soap encoding nonsense.

"Dilip Krishnan" wrote:

You probably can in different ways... but I'd suggest u first use
tcpTrace [0] and check the soap messages and see if they conform to
schema (atleast visually); namespaces are right, elements are right.

[0] - http://www.pocketsoap.com/tcptrace/
frustratedWit hDotNet wrote:
Why does .NET not issue messages or throw exceptions if it doesn't like
something in the response from a web service?? I am getting a response
object, but an array of custom objects within the response is null instead of
being populated. The SOAP response from the service looks good and I cannot
see anything wrong with the WSDL or XML schema. How do I get .NET to tell me
what it doesn't like? Is there a way to turn on some kind of tracing or
logging, or to get it to allow me to step into the deserialization code?


--
HTH
Regards,
Dilip Krishnan
MCAD, MCSD.net
dkrishnan at geniant dot com
http://www.geniant.com


--
HTH
Regards,
Dilip Krishnan
MCAD, MCSD.net
dkrishnan at geniant dot com
http://www.geniant.com
Nov 23 '05 #4
No, how does one manually invoke deserialization for a fragment of XML?

"Dilip Krishnan" wrote:
Out of curiosity, did you also try taking your xml trace and writing a
small lil console app that tries to deserialize the trace that you have
into the expected type?

frustratedWithD otNet wrote:
Thanks, but I already did that. I have a trace tool for the XML, and it looks
fine and conformant to the schema. This is document literal, BTW. No weird
soap encoding nonsense.

"Dilip Krishnan" wrote:

You probably can in different ways... but I'd suggest u first use
tcpTrace [0] and check the soap messages and see if they conform to
schema (atleast visually); namespaces are right, elements are right.

[0] - http://www.pocketsoap.com/tcptrace/
frustratedWit hDotNet wrote:

Why does .NET not issue messages or throw exceptions if it doesn't like
something in the response from a web service?? I am getting a response
object, but an array of custom objects within the response is null instead of
being populated. The SOAP response from the service looks good and I cannot
see anything wrong with the WSDL or XML schema. How do I get .NET to tell me
what it doesn't like? Is there a way to turn on some kind of tracing or
logging, or to get it to allow me to step into the deserialization code?

--
HTH
Regards,
Dilip Krishnan
MCAD, MCSD.net
dkrishnan at geniant dot com
http://www.geniant.com


--
HTH
Regards,
Dilip Krishnan
MCAD, MCSD.net
dkrishnan at geniant dot com
http://www.geniant.com

Nov 23 '05 #5
Use the XmlSerializer class...

frustratedWithD otNet wrote:
No, how does one manually invoke deserialization for a fragment of XML?

"Dilip Krishnan" wrote:

Out of curiosity, did you also try taking your xml trace and writing a
small lil console app that tries to deserialize the trace that you have
into the expected type?

frustratedWit hDotNet wrote:
Thanks, but I already did that. I have a trace tool for the XML, and it looks
fine and conformant to the schema. This is document literal, BTW. No weird
soap encoding nonsense.

"Dilip Krishnan" wrote:

You probably can in different ways... but I'd suggest u first use
tcpTrace [0] and check the soap messages and see if they conform to
schema (atleast visually); namespaces are right, elements are right.

[0] - http://www.pocketsoap.com/tcptrace/
frustratedW ithDotNet wrote:
>Why does .NET not issue messages or throw exceptions if it doesn't like
>somethin g in the response from a web service?? I am getting a response
>object, but an array of custom objects within the response is null instead of
>being populated. The SOAP response from the service looks good and I cannot
>see anything wrong with the WSDL or XML schema. How do I get .NET to tell me
>what it doesn't like? Is there a way to turn on some kind of tracing or
>logging, or to get it to allow me to step into the deserialization code?

--
HTH
Regards,
Dilip Krishnan
MCAD, MCSD.net
dkrishnan at geniant dot com
http://www.geniant.com


--
HTH
Regards,
Dilip Krishnan
MCAD, MCSD.net
dkrishnan at geniant dot com
http://www.geniant.com


--
HTH
Regards,
Dilip Krishnan
MCAD, MCSD.net
dkrishnan at geniant dot com
http://www.geniant.com
Nov 23 '05 #6

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

Similar topics

1
1550
by: Linus | last post by:
Hi, I'm having problems with some very simple deserialization code and would appreciate it very much if I could get some help here. The following is the code: ========================================================= XmlReader reader = new XmlTextReader("test.xml"); XmlValidatingReader vr = new XmlValidatingReader(reader);
3
8090
by: Chrigel | last post by:
Hi all, We have problems deseralizing objects previously serialized as XML. This did work fine with .NET 1.1 but since we have installed SP1, deserializing fails (but serializing works). The error occurs within the following line "return formatter.Deserialize(xmlReader) as ParameterList;" and the "innerexception" sais "The root element is missing.". Thanks for any hints
4
3156
by: Mike Sarbu | last post by:
Hello all, I have an XML file like this: <?xml version="1.0" encoding="utf-8"?> <SomeObject xmlns="http://www.abcinc.com/objectdefinition" xmlns:someobj=http://www.abcinc.com/objectdefinition> ...... </SomeObject>
1
12066
by: BH | last post by:
I'm trying a simple object serialization and deserialization, and keep getting this error: System.Runtime.Serialization.SerializationException: Binary stream does not contain a valid BinaryHeader, 0 possible causes, invalid stream or object version change between serialization and deserialization. Here's my code. it does nothing but to serialize a DataTable object into a byte array, and then read the byte array back for...
3
9796
by: parrot toes | last post by:
Summary: I have been trying to make requests of a web service provided by Axis using a dotnet client with code generated by wsdl.exe and have been getting exceptions when trying to process the response. As a result of seraching news groups I guessed that the SOAP response defines an array element in a way that causes the dotnet deserialization routines to put the content in a generic object array (object) BUT the content is supposed to...
5
2294
by: Greg Allen | last post by:
I am consuming a web service and using the generated Reference.cs to access the service and the objects associated with it. I have run into a problem where some inherited classes are not being deserialized. I have verified that the XML being returned by the service contains the tags I am expecting, but they don't show up in the resulting object. Here's the relevant portion of the Reference.cs file: public class FormSection {
6
2084
by: Marcus | last post by:
I have a couple of classes looking like this: ======================================== public class AdminSettingsData { public string adminSettingsPath; public string adminSettingsFile; public string usersSettingsPath;
0
936
by: beachdog | last post by:
I am building a client which accesses a web service (HTTP/SOAP), and I think the response message is somehow not in agreement with my wsdl/ proxy class. I am able to access SOAP headers ok from the deserialized response, but not elements in the body of the response. Is there some way I can get some sort of debug tracing out of the deserialization layer, or step thru it in debugger somehow, so I can see how it is parsing the message and...
0
1928
by: Vince Filby | last post by:
Hi, We are working with distributing Lucene.net. We have Master Index Server which takes responsibility of distributing the index searching to multiple Index Servers by calling the remote method Search(...) of the Index Server. It is when the Master Server de-serializing the response message from the Index Server, we got the following SerializationException. The Search method is overloaded:
0
9673
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
9522
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
9046
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...
1
7544
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6784
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
5440
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4114
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
2
3730
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2922
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.