Why is \"Property1\" always the first element?

Home Page Forums BizTalk 2004 – BizTalk 2010 Why is \"Property1\" always the first element?

Viewing 1 reply thread
  • Author
    Posts
    • #14365

      This is a general question about the \”PropertySchema.xsd\” document. I’ve noticed that no matter how many elements I promote using Quick Promotion, the PropertySchema document that is generated always has an element named \”Property1\”.

      For example, I created a schema document with a single root element and a single child field element. I named the child field element \”ConfigFile\”. When I right-clicked on the child field element and clicked \”Quick Promotion\” the following PropertySchema.xsd document was created:

      [code:1:b348294c0c]
      <?xml version=\"1.0\" encoding=\"utf-16\"?>
      <xs:schema xmlns:b=\"http://schemas.microsoft.com/BizTalk/2003\" xmlns=\"http://ETLOrchestration.PropertySchema.PropertySchema\" targetNamespace=\"http://ETLOrchestration.PropertySchema.PropertySchema\" xmlns:xs=\"http://www.w3.org/2001/XMLSchema\">
      <xs:annotation>
      <xs:appinfo>
      <b:schemaInfo schema_type=\"property\" xmlns:b=\"http://schemas.microsoft.com/BizTalk/2003\" />
      </xs:appinfo>
      </xs:annotation>
      <xs:element name=\"Property1\" type=\"xs:string\">
      <xs:annotation>
      <xs:appinfo>
      <b:fieldInfo propertyGuid=\"96a7e416-0499-47a4-b6dc-9f8ab2f6d50f\" />
      </xs:appinfo>
      </xs:annotation>
      </xs:element>
      <xs:element name=\"ConfigFile\" type=\"xs:string\">
      <xs:annotation>
      <xs:appinfo>
      <b:fieldInfo propertyGuid=\"1967c57e-10a9-416f-8260-44e8c00e500a\" />
      </xs:appinfo>
      </xs:annotation>
      </xs:element>
      </xs:schema>
      [/code:1:b348294c0c]

      I want to understand how BizTalk works, so could someone explain why this Property1 element appears along with the element I created? Is this a bug? How do I specify a value for the property I created?

      When I click \”Generate Instance\” this is what I see:

      [code:1:b348294c0c]
      <ns0:Property1 xmlns:ns0=\"http://ETLOrchestration.PropertySchema.PropertySchema\">Property1_0</ns0:Property1>[/code:1:b348294c0c]

      If I want to specify a value for \”ConfigFile\” do I have to add another line like this?

      [code:1:b348294c0c]
      <ns1:ConfigFile xmlns:ns1=\"http://ETLOrchestration.PropertySchema.PropertySchema\">ConfigFile_0</ns1:ConfigFile>[/code:1:b348294c0c]

      Any help the community could give me is greatly appreciated.

    • #14364

      This is not really a bug but an inconvenience.
      By default when Biztalk creates a schema it always add a root element.
      For normal schemas this element is called root and must be renamed.
      For property schemas it always creates a root element of Property1.

      If you use Quick Promotion then a file is created with a Property1 property and your ConfigFile property. This will have no effect on the operation of your assembly. It just means you have a property called Property1 that will never be used.
      To tidy things up you can edit propertyschema.xsd and delete Property1.

      If you pre-declare your property schema then you can just rename Property1

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