How does one debug .NET deserialization problems?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • frustratedWithDotNet

    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?
  • Dilip Krishnan

    #2
    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/


    frustratedWithD otNet 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
    Experience is the advantage. AI is the multiplier.

    Comment

    • frustratedWithDotNet

      #3
      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/
      >
      >
      > frustratedWithD otNet 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]

      Comment

      • Dilip Krishnan

        #4
        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?

        frustratedWithD otNet 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/
        >>
        >>
        >>frustratedWit hDotNet 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
        Experience is the advantage. AI is the multiplier.

        Comment

        • frustratedWithDotNet

          #5
          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?
          >
          > frustratedWithD otNet 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/
          > >>
          > >>
          > >>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
          > >>[/color][/color]
          >
          > --
          > HTH
          > Regards,
          > Dilip Krishnan
          > MCAD, MCSD.net
          > dkrishnan at geniant dot com
          > http://www.geniant.com
          >[/color]

          Comment

          • Dilip Krishnan

            #6
            Re: How does one debug .NET deserialization problems?

            Use the XmlSerializer class...

            frustratedWithD otNet 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?
            >>
            >>frustratedWit hDotNet 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/
            >>>>
            >>>>
            >>>>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
            >>>>[/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
            Experience is the advantage. AI is the multiplier.

            Comment

            Working...