none
Envelope Schema RRS feed

  • Question

  •  

    <orders>

       <order>

          <ordID>1</ordID>

          <date>10-17-2007</date>

      </order>

        <order>

          <ordID>2</ordID>

          <date>10-17-2007</date>

      </order>

    </orserds>

     

    if then incoming xml is something like this and i want to write to a location where i want two different orders in two different files

     

      <order>

          <ordID>1</ordID>

          <date>10-17-2007</date>

      </order>

     

      <order>

          <ordID>2</ordID>

          <date>10-17-2007</date>

      </order> 

     

    how can i do this??

    Wednesday, October 17, 2007 5:29 PM

Answers

  •  

    You can split the message using XmlReceive pipeline.

    You need to create an Orders envelope schema, and Order document schema for that.

     

    Steps:

    1- Create a new BizTalk project

    2- Add the Order schema with ordrId and date elements

    3- Add the Orders schema with only root element Orders

    4- Click on the Schema node and set its "Envelope" property to true

    5- Click on the Imports property and import the Order schema into Orders envelope schema

    [Edit] 5.1 - Click on the Orders node, and click on the body xPath property, choose Orders and click ok.

    6- Deploy the project

    7- Create a receive location and choose XmlReceive pipeline

    8- Open the pipeline properties dialog, and set envelope schema to the Orders schema, and document schema to Order schema (you need to use the fully qualified name for the schema names, you can get the fully qualifed names by going to the schemas node in BizTalk admin console . The names should look like EnvelopeSample.OrdersSchema, OrdersSample, Version=1.0.0.0, Culture=neutral, PublicKeyToken=8731dd9a9ec90860)

    9- You can generate a test input file by right clicking on the envelope schema in BizTalk VS project and choosing Generate Instance.

     

    You can also take a look at the BizTalk Envelope sample:

     

    http://msdn2.microsoft.com/en-us/library/aa578216.aspx

     

    -Karahan
    Wednesday, October 17, 2007 7:18 PM

All replies

  •  

    You can split the message using XmlReceive pipeline.

    You need to create an Orders envelope schema, and Order document schema for that.

     

    Steps:

    1- Create a new BizTalk project

    2- Add the Order schema with ordrId and date elements

    3- Add the Orders schema with only root element Orders

    4- Click on the Schema node and set its "Envelope" property to true

    5- Click on the Imports property and import the Order schema into Orders envelope schema

    [Edit] 5.1 - Click on the Orders node, and click on the body xPath property, choose Orders and click ok.

    6- Deploy the project

    7- Create a receive location and choose XmlReceive pipeline

    8- Open the pipeline properties dialog, and set envelope schema to the Orders schema, and document schema to Order schema (you need to use the fully qualified name for the schema names, you can get the fully qualifed names by going to the schemas node in BizTalk admin console . The names should look like EnvelopeSample.OrdersSchema, OrdersSample, Version=1.0.0.0, Culture=neutral, PublicKeyToken=8731dd9a9ec90860)

    9- You can generate a test input file by right clicking on the envelope schema in BizTalk VS project and choosing Generate Instance.

     

    You can also take a look at the BizTalk Envelope sample:

     

    http://msdn2.microsoft.com/en-us/library/aa578216.aspx

     

    -Karahan
    Wednesday, October 17, 2007 7:18 PM
  • Thanks Karahan

     

    Wednesday, October 17, 2007 9:43 PM
  •  

    I made a minor correction in the steps. I added the missing step 5.1.
    Thursday, October 18, 2007 1:02 AM
  • Hi Karahan,

     

       I did the same about envelope schema but this is the error i m getting.

     

    There was a failure executing the receive pipeline: "Microsoft.BizTalk.DefaultPipelines.XMLReceive, Microsoft.BizTalk.DefaultPipelines, Version=3.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" Source: "XML disassembler" Receive Port: "RcvPortSte" URI:  Reason: No Disassemble stage components can recognize the data.

     

    Any help????

    • Proposed as answer by Sreeni CH Sunday, July 22, 2012 5:30 AM
    Wednesday, October 24, 2007 5:12 PM
  • HI,

    (Find a way to sort what might have caused the problem)
    So it is the problem with the Disassemble -> Which is carried out in
    receive pipeline ->Go and check the Configurations for Disassembler
    -> Since the is error 'No Disassemble stage components can recognize
    the data', so it can be guess like, the inputs having problem -> Our inputs
    are doc schema and  envelope schema ->
    so need to check with it.
    (Problem Tracked)


    Cause could be:
     Schemas may not be with the fully qualified name.

    Friday, July 20, 2012 1:22 AM
  • Hi Praveen,

    By seeing your problem looks like Input data is not correct.Inorder to resolve this issue first generate the instance of your source schema and fill the data according to your requirement and validate the instance againast your source schema.Once you done successfull with validate instance,Please drop that file as a input,if the problem still exisist than check your envelope schema in the disassembler stage.


    • Edited by Sreeni CH Sunday, July 22, 2012 5:45 AM
    Sunday, July 22, 2012 5:42 AM