BizTalk Gurus

Orchestration Message with Message Type == '.Net class'

Latest post 07-07-2006 12:06 PM by easyTree. 3 replies.
  • 07-07-2006 12:06 PM In reply to

    Orchestration Message with Message Type == '.Net class'

    Hi :D

    I'm having some issues getting started with what seems to be basic BizTalk 2006. BizTalk doesn't seem to like the XSD's I've been supplied with so I'm hoping to type message objects within orchestrations using .net classes.



    I've generated classes from an xsd, then created a class library with the classes and used this within an orchestration to receive a message typed as one of these classes. If I send an xml message (which conforms to the xsd used to generate the classes) to the web service around the orchestration, should this be deserialized into the Message object received using a receive shape?

    or do I need to write a custom pipeline component to deserialize the incoming xml message and replace it with the deserialized .net object? :(


    Regards,
    Lee.
  • 07-09-2006 2:35 AM In reply to

    Orchestration Message with Message Type == '.Net class'

    Messages are made of two parts, a message context and a stream.

    Although you have defined your messages using .Net objects those objects are not deserialized from the message. You will receive an Xml serialization of that object in the data stream of the message - in fact the Xml that was posted to the web service.

    If you wish to access this data using your object you will need to deserialize this inside the orchestration and serialize it if you wish to send it anywhere.

     

  • 08-07-2006 6:37 PM

    Orchestration Message with Message Type == '.Net class'

    Hi greg.forsythe,

    You said \"If you wish to access this data using your object you will need to deserialize this inside the orchestration and serialize it if you wish to send it anywhere.\"

    Could you elaborate of how to accomplish that?

    Thank you.
  • 08-08-2006 1:35 AM In reply to

    Orchestration Message with Message Type == '.Net class'

    The easiest way is to let Biztalk do it for you:

    Create a message using your .Net class - Message1
    Create a variable using the same class - variable1

    Receive the message.
    In an expression shape:
    variable1 = Message1;
    This will deserialize the message into an object.


    In a message assignment shape:
    Message2 = variable1;
    This will serialize the object into a message.

    Alternatively you could pass the message to an external .Net class and use the XmlSerializer to do this.

     

Page 1 of 1 (4 items) | RSS