newbie question: XmlDocument not serializable?

Home Page Forums BizTalk 2004 – BizTalk 2010 newbie question: XmlDocument not serializable?

Viewing 1 reply thread
  • Author
    Posts
    • #15114

      Hello all!
      I have an orchestration which does the following:

      Receives a request as type System.Xml.XmlDocument (Doc1)
      Calls a C# class to parse this document to get the message subject
      Uses a decision shape to determine what to do based on the message
      subject.
      For the path I am having problems with, it then:
      Passes the OuterXml from the request to a C# class to process. This
      calls a DB2 database using HIS, then builds an XML document to return
      to the orchestration. (Doc2)
      Maps Doc2 to the Oracle adapter schema for update.
      Sends the message to an Oracle port
      Receives OracleResponse from port
      Assigns response to an Xml Document and returns it to calling
      application.

      When I try to run this, it gives me the error that
      System.Xml.XmlDocument is not marked as serializable. From what I’ve
      been able to find, Biztalk will persist the orchestration after the
      send to the Oracle port, which is where the problem is coming in since
      the XmlDocument is not serializable.

      How can I get around this? Is there any way to make the XmlDocument
      serializable? Or, is there a way to destroy the messages Doc1 and Doc2
      before attempting to send to the Oracle port?

      Thanks in advance,

      Amy

    • #15115

      This is usually a problem with something else – not the Xml Documents.

      Check your .net code. I’d pass Xml Documents in and get Xml Documents (or strings) out. Then, inside your code get the outer Xml.

      Also, make sure you are not passing any complex types with Xml Documents. That will give that error as well.

      Also, make sure you set your Xml document back to a message of type Xml Document before you send it out.

      Hope this helps.

Viewing 1 reply thread
  • The forum ‘BizTalk 2004 – BizTalk 2010’ is closed to new topics and replies.