views:

89

answers:

1

Hi,

I just wondering if anyone has already tried of doing something like schema inheritance in BizTalk schemas?

I am using WCF Adapter and using 'consume adapter service' to generate a schema automatically, what I wanted is instead of always generating a schema and since most of my schema is the same then I want to have something like a base schema.

I have this scenario that I'm testing flat file debatching, for debatching I need to set maxoccur property of the schema to '1' but for batch processing it should be '*', instead of creating a two different schemas I want just to create a base schema and inherit from it and then change the maxoccur property in the derived schema.

Any help would be appreciated.

Many Thanks

A: 

Can you envelope your base schema? Then you can make the pipeline do the debatching for you .... define the envelope structure with any "any" repeating inside it.

<?xml version="1.0" encoding="utf-16" ?>
<xs:schema xmlns:b="http://schemas.microsoft.com/BizTalk/2003"&gt;
xmlns="urn:SomeProject:Schemas:1.0" targetNamespace="urn:SomeProject:Schemas:1.0" xmlns:xs="http://www.w3.org/2001/XMLSchema"&gt;
<xs:annotation>
<xs:appinfo>
<b:schemaInfo is_envelope="yes" xmlns:b="http://schemas.microsoft.com/BizTalk/2003" />
</xs:appinfo>
</xs:annotation>
<xs:element name="Envelope">
<xs:annotation>
<xs:appinfo>
<b:recordInfo body_xpath="/*[local-name()='Envelope' and namespace-uri()='urn:SomeProject:Schemas:1.0']" />
</xs:appinfo>
</xs:annotation>
<xs:complexType>
<xs:sequence>
**<xs:any />** 
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>

then add to the collection in XMLDisassemble of the pipeline...

silverbugg