简体   繁体   中英

Schema Inheritance in BizTalk Server

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

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">
xmlns="urn:SomeProject:Schemas:1.0" targetNamespace="urn:SomeProject:Schemas:1.0" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<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...

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM