none
regarding schema classes in biztalk

    Question

  • can i have a map using the schema classes instead of using xsd's?

    I wanna test the performance of using the schema classes in the orchestartion to xsd in orchestration. I am giving input message type for the rceive shape as .net class(schema classfor the xsd), now can i make a map using schema classes?

    Thursday, April 14, 2011 5:19 AM

Answers

  • Yes, definitely you can. Add the classes corresponding to the schemas, generated using xsd.exe utility, to the project which contains the schemas. Add another class having a method like the following:

    //Class for input schema is Input and for output schema is Output

    public Output TransformInput(Microsoft.BizTalk.XLANGs.XLANGMessage inpMsg)

    {

     // part 0 is the body part

        Input inp = inpMsg[0].RetrieveAs(typeof(Input));

       Output out = new Output();

      out.ProductName = inp.ProductName;

     out.ItemName = inp.ItemName;

    //etc

    //etc

    return out;

    }

    Now from orchestration you could call the above method in message assignment shape passing the input message as parameter and assigning the return value to output message.


    Please mark as answer if this helps you. Thanks and warm regards Ambar Ray Solution Architect - Microsoft Technologies
    Thursday, April 14, 2011 5:38 AM

All replies

  • Yes, definitely you can. Add the classes corresponding to the schemas, generated using xsd.exe utility, to the project which contains the schemas. Add another class having a method like the following:

    //Class for input schema is Input and for output schema is Output

    public Output TransformInput(Microsoft.BizTalk.XLANGs.XLANGMessage inpMsg)

    {

     // part 0 is the body part

        Input inp = inpMsg[0].RetrieveAs(typeof(Input));

       Output out = new Output();

      out.ProductName = inp.ProductName;

     out.ItemName = inp.ItemName;

    //etc

    //etc

    return out;

    }

    Now from orchestration you could call the above method in message assignment shape passing the input message as parameter and assigning the return value to output message.


    Please mark as answer if this helps you. Thanks and warm regards Ambar Ray Solution Architect - Microsoft Technologies
    Thursday, April 14, 2011 5:38 AM