Problem with root node declaration in schema which contains an imported schema

Home Page Forums BizTalk 2004 – BizTalk 2010 Problem with root node declaration in schema which contains an imported schema

Viewing 2 reply threads
  • Author
    Posts
    • #21989

       

       

       

       

      Hello,

      I have the following problem:

      I have schema A (A.xsd).

      Schema B (B.xsd) is an extension of schema A and only contains simple and complex types.

      So I imported Schema A in Schema B. (I want to use Schema B later on in the BizTalk mapper)

      The Import happened through -> Advanced Properties -> Import.

      Both schemas are in the same folder of my BizTalk-Schema-Definition-Project (2006 R2).

      Now I want to declare the root_reference in B.xsd, which doesn’t contain the root element because it is in A.xsd which I imported.

      <

       

      xs:annotation>

       

       

      <xs:appinfo>

       

       

      <b:schemaInfo root_reference=”rootA displayroot_reference=”rootA xmlns:b=”http://schemas.microsoft.com/BizTalk/2003 standards_version=”3.2“/>

       

       

      </xs:appinfo>

       

       

      </xs:annotation>

      If I compile this assembly I get the following error: The Root property must contain the value of an existing node name.
       
      Why does BizTalk doesn’t look in the A.xsd and finds the root node there? Has someone a soultion for my problem without merging the B.xsd extensions with A.xsd?

      Thanks for your help in advance.

      Stevo

    • #22000

      Can I ask why you wish to specify the root reference in schema B for a node in schema A.?

      Typically in Xsd schema definition you would create a schema of simple and complex types and import this schema into a schema containing elements. Can I ask why you are doing this the other way?

      Biztalk will add all root level elements to the BiztalkMgmtDb as message types. It is generally a bad thing to have duplicate message types, not catastrophic but also not ideal. If you could specify a root reference from schema A in schema B then you would just be duplicating the configuration of this message type.

    • #22006

      Is it possible that when you created your complex types, in schema A, you started with an element and when finished named the “Data Structure Type” to get a complex type? That way your schema A gets the complex type, but also an element of that type.

      You have to manually delete the element in A (the complex type will be left) and then create your element in schema B of the complex type from schema A. That way you point out the root reference in the same schema and do not have duplicates, or you now will only have one root.

      Did anyone understand what I mean? 🙂

      Kind Regards
      Martin Bring

      • #22024

        Hello,

        thanks for your answers. The problem is that Schema A is a proprietary standard so I think it is hard to add there the import statement of the Schema B extension. The idea of moving the root element to Schema B is not realizable because it is to complex (it is like moving Schema A to Schema B). I think I will try to add the import statement to Schema A. This is the lesser evil! If you have any other recommendations please let me know.

        Thanks.

        Stevo

         

         

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