Connecting Tech Pros Worldwide Forums | Help | Site Map

How does one debug .NET deserialization problems?

frustratedWithDotNet
Guest
 
Posts: n/a
#1: Nov 23 '05
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?

Dilip Krishnan
Guest
 
Posts: n/a
#2: Nov 23 '05

re: How does one debug .NET deserialization problems?


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/


frustratedWithDotNet wrote:[color=blue]
> 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?[/color]

--
HTH
Regards,
Dilip Krishnan
MCAD, MCSD.net
dkrishnan at geniant dot com
http://www.geniant.com
frustratedWithDotNet
Guest
 
Posts: n/a
#3: Nov 23 '05

re: How does one debug .NET deserialization problems?


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:
[color=blue]
> 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/
>
>
> frustratedWithDotNet wrote:[color=green]
> > 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?[/color]
>
> --
> HTH
> Regards,
> Dilip Krishnan
> MCAD, MCSD.net
> dkrishnan at geniant dot com
> http://www.geniant.com
>[/color]
Dilip Krishnan
Guest
 
Posts: n/a
#4: Nov 23 '05

re: How does one debug .NET deserialization problems?


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?

frustratedWithDotNet wrote:[color=blue]
> 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:
>
>[color=green]
>>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/
>>
>>
>>frustratedWithDotNet wrote:
>>[color=darkred]
>>>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?[/color]
>>
>>--
>>HTH
>>Regards,
>>Dilip Krishnan
>>MCAD, MCSD.net
>>dkrishnan at geniant dot com
>>http://www.geniant.com
>>[/color][/color]

--
HTH
Regards,
Dilip Krishnan
MCAD, MCSD.net
dkrishnan at geniant dot com
http://www.geniant.com
frustratedWithDotNet
Guest
 
Posts: n/a
#5: Nov 23 '05

re: How does one debug .NET deserialization problems?


No, how does one manually invoke deserialization for a fragment of XML?

"Dilip Krishnan" wrote:
[color=blue]
> 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?
>
> frustratedWithDotNet wrote:[color=green]
> > 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:
> >
> >[color=darkred]
> >>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/
> >>
> >>
> >>frustratedWithDotNet 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
> >>[/color][/color]
>
> --
> HTH
> Regards,
> Dilip Krishnan
> MCAD, MCSD.net
> dkrishnan at geniant dot com
> http://www.geniant.com
>[/color]
Dilip Krishnan
Guest
 
Posts: n/a
#6: Nov 23 '05

re: How does one debug .NET deserialization problems?


Use the XmlSerializer class...

frustratedWithDotNet wrote:[color=blue]
> No, how does one manually invoke deserialization for a fragment of XML?
>
> "Dilip Krishnan" wrote:
>
>[color=green]
>>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?
>>
>>frustratedWithDotNet wrote:
>>[color=darkred]
>>>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/
>>>>
>>>>
>>>>frustratedWithDotNet 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
>>>>[/color]
>>
>>--
>>HTH
>>Regards,
>>Dilip Krishnan
>>MCAD, MCSD.net
>>dkrishnan at geniant dot com
>>http://www.geniant.com
>>[/color][/color]

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