importing partial schemas

Home Page Forums BizTalk 2004 – BizTalk 2010 importing partial schemas

Viewing 1 reply thread
  • Author
    Posts
    • #17337

      The documentation states that to import a schema into another schema, one has to click the root node of the target schema, then goto the properties screen and select the schemas to be imported in the import collections section of the advanced section of the properties screen.

       Problem:

      when I follow the above procedure, all I get is a blank schema. When I try to include a section or one of the imported partial schemas, I can't find the process to include the partial schema into the target schema. I'm using the BS schema editor on VS2005

      What am I doing wrong.

      BTS: V2006, VS:2005, SQL:2005, OS:2003 ENTERPRISE SP1 with all current updates.

      Partial shemas. 

      <?xml version="1.0" encoding="utf-16"?>
      <xs:schema xmlns:b="http://schemas.microsoft.com/BizTalk/2003" xmlns="http://B5.PartialSchemas.Customer" targetNamespace="http://B5.PartialSchemas.Customer" xmlns:xs="http://www.w3.org/2001/XMLSchema">
        <xs:element name="Customer">
          <xs:complexType>
            <xs:sequence>
              <xs:element name="FirstName" type="xs:string" />
              <xs:element name="LastName" type="xs:string" />
              <xs:element name="MiddleInit" type="xs:string" />
              <xs:element name="Age" type="xs:string" />
            </xs:sequence>
          </xs:complexType>
        </xs:element>
      </xs:schema>

      <?xml version="1.0" encoding="utf-16"?>
      <xs:schema xmlns:b="http://schemas.microsoft.com/BizTalk/2003" xmlns="http://B5.PartialSchemas.Address" targetNamespace="http://B5.PartialSchemas.Address" xmlns:xs="http://www.w3.org/2001/XMLSchema">
        <xs:element name="Address">
          <xs:complexType>
            <xs:sequence>
              <xs:element name="AddressLine1" type="xs:string" />
              <xs:element name="AddressLine2" type="xs:string" />
              <xs:element name="AddressLine3" type="xs:string" />
              <xs:element name="City" type="xs:string" />
              <xs:element name="State" type="xs:string" />
              <xs:element name="Zip" type="xs:string" />
              <xs:element name="Country" type="xs:string" />
            </xs:sequence>
          </xs:complexType>
        </xs:element>
      </xs:schema>

      Target Schema

      <?xml version="1.0" encoding="utf-16"?>
      <xs:schema xmlns:aa="http://B5.PartialSchemas.Address" xmlns:b="http://schemas.microsoft.com/BizTalk/2003" xmlns="http://B5.Cannon" xmlns:bb="http://B5.PartialSchemas.Customer" targetNamespace="http://B5.Cannon" xmlns:xs="http://www.w3.org/2001/XMLSchema">
        <xs:import schemaLocation="partialschemas\customer.xsd" namespace="http://B5.PartialSchemas.Customer" />
        <xs:import schemaLocation="partialschemas\address.xsd" namespace="http://B5.PartialSchemas.Address" />
        <xs:annotation>
          <xs:appinfo>
            <b:references>
              <b:reference targetNamespace="http://B5.PartialSchemas.Address" />
              <b:reference targetNamespace="http://B5.PartialSchemas.Customer" />
            </b:references>
          </xs:appinfo>
        </xs:annotation>
        <xs:element name="Cannon">
          <xs:complexType>
            <xs:sequence>
              <xs:element name="Address">
                <xs:complexType />
              </xs:element>
              <xs:element name="Customer">
                <xs:complexType />
              </xs:element>
            </xs:sequence>
          </xs:complexType>
        </xs:element>
      </xs:schema>

      dcu.lcr

       

    • #17381

      I think it’s a namespace problem…  Try to change both the schema you want to import as “Qualified”.  It’s a property on the <schema> node I think.  It will apply the namespace to all the nodes and not just the root node.  I think then you import them, the all have a blank namespace and BizTalk doesn’t know what to do.

       

      Just a guess though, could be way off here.

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