Need Help with Multiple Message Types through Single Pipeline
I am attempting to use a common xml disassembler. I have created distinct schemas for my envelopes and body parts.
For example:
Envelope A1
http://namespace1/#A1Elements
Body Part A1
http://namespace1/#A1Element
Envelope B1
http://differentnamespace/#B1Elements
Body Part B1
http://differentnamespace/#B1Element
Sample messages would look like:
<A1Elements xmlns="http://namespace1/">
<A1Element>someContent</A1Element>
<A1Element>otherContent</A1Element>
</A1Elements>
<B1Elements xmlns="http://differentnamespace/">
<B1Element>someContent</B1Element>
<B1Element>otherContent</B1Element>
</B1Elements>
I tried to construct a single pipeline to handle both A1 and B1 Envelopes. I added 1 - Xml Disassembler with both Envelope Schemas and I also tried adding 2 - Xml Disassemblers each with a distinct envelope schema. It seems that in either case whichever schema I add first is found and processed ok. Which ever comes second, I receive this error:
There was a failure executing the receive pipeline: "Lab_Sample.TestPipeline, Lab Sample, Version=1.0.0.0, Culture=neutral, PublicKeyToken=cb0ab58ff5124414" Source: "XML disassembler" Receive Port: "SampleIn" URI: "E:\Biztalk Test Data\SampleIn\B1\Copy*.xml" Reason: Document type "http://differentnamespace/#B1Elements" does not match any of the given schemas.
I currently have 1 Receive Port and 2 receive locations (a seperate file location for each of the above messages, but I would eventually like to combine to 1) each receive location uses the TestPipeline.
Thanks in advance for the help,
Erds
[1813 byte] By [
Erds] at [2008-1-7]
Thanks for the reply, however it still is not working. A1Elements processes just fine, but B1Elements generates:
There was a failure executing the receive pipeline: "msdnSample.TestPipeline, msdnSample, Version=1.0.0.0, Culture=neutral, PublicKeyToken=cb0ab58ff5124414" Source: "XML disassembler" Receive Port: "ReceivePort" URI: "E:\Biztalk Test Data\msdnIn\Copy*.xml" Reason: Document type "http://differentnamespace/#B1Elements" does not match any of the given schemas.
I will enclose my schemas:
<?xml version="1.0" encoding="utf-16"?>
<xs
chema xmlns:b="http://schemas.microsoft.com/BizTalk/2003" xmlns="http://namespace1/" targetNamespace="http://namespace1/" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:annotation>
<xs:appinfo>
<b
chemaInfo is_envelope="yes" />
</xs:appinfo>
</xs:annotation>
<xs:element name="A1Elements">
<xs:annotation>
<xs:appinfo>
<b:recordInfo body_xpath="/*[local-name()='A1Elements' and namespace-uri()='http://namespace1/']" />
</xs:appinfo>
</xs:annotation>
<xs:complexType>
<xs
equence>
<xs:any />
</xs
equence>
</xs:complexType>
</xs:element>
</xs
chema>
<?xml version="1.0" encoding="utf-16"?>
<xs
chema xmlns:b="http://schemas.microsoft.com/BizTalk/2003" xmlns="http://namespace1/" targetNamespace="http://namespace1/" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="A1Element">
<xs:complexType />
</xs:element>
</xs
chema>
<?xml version="1.0" encoding="utf-16"?>
<xs
chema xmlns:b="http://schemas.microsoft.com/BizTalk/2003" xmlns="http://differentnamespace/" targetNamespace="http://differentnamespace/" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:annotation>
<xs:appinfo>
<b
chemaInfo is_envelope="yes" />
</xs:appinfo>
</xs:annotation>
<xs:element name="B1Elements">
<xs:annotation>
<xs:appinfo>
<b:recordInfo body_xpath="/*[local-name()='B1Elements' and namespace-uri()='http://differentnamespace/']" />
</xs:appinfo>
</xs:annotation>
<xs:complexType>
<xs
equence>
<xs:any />
</xs
equence>
</xs:complexType>
</xs:element>
</xs
chema>
<?xml version="1.0" encoding="utf-16"?>
<xs
chema xmlns:b="http://schemas.microsoft.com/BizTalk/2003" xmlns="http://differentnamespace/" targetNamespace="http://differentnamespace/" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="B1Element">
<xs:complexType />
</xs:element>
</xs
chema>
And the Xml for my pipeline:
<?xml version="1.0" encoding="utf-16"?>
<
Document xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance
" xmlns:xsd="http://www.w3.org/2001/XMLSchema
" PolicyFilePath="BTSReceivePolicy.xml
" MajorVersion="1
" MinorVersion="0
"> <Description/>
<Stages>
<Stage CategoryId="9d0e4103-4cce-4536-83fa-4a5040674ad6">
<Components/>
</Stage>
<Stage CategoryId="9d0e4105-4cce-4536-83fa-4a5040674ad6">
<Components>
<Component>
<Name>Microsoft.BizTalk.Component.XmlDasmComp</Name>
<ComponentName>XML disassembler</ComponentName>
<Description>Streaming XML disassembler</Description>
<Version>1.0</Version>
<Properties>
<Property Name="EnvelopeSpecNames">
<Value xsi:type="xsd
tring">msdnSample.A1Elements</Value>
</Property>
<Property Name="EnvelopeSpecTargetNamespaces">
<Value xsi:type="xsd
tring">http://namespace1/</Value>
</Property>
<Property Name="DocumentSpecNames">
<Value xsi:type="xsd
tring"/>
</Property>
<Property Name="DocumentSpecTargetNamespaces">
<Value xsi:type="xsd
tring"/>
</Property>
<Property Name="AllowUnrecognizedMessage">
<Value xsi:type="xsd:boolean">false</Value>
</Property>
<Property Name="ValidateDocument">
<Value xsi:type="xsd:boolean">false</Value>
</Property>
<Property Name="RecoverableInterchangeProcessing">
<Value xsi:type="xsd:boolean">false</Value>
</Property>
<Property Name="HiddenProperties">
<Value xsi:type="xsd
tring">EnvelopeSpecTargetNamespaces,DocumentSpecTargetNamespaces</Value>
</Property>
</Properties>
<CachedDisplayName>XML disassembler</CachedDisplayName>
<CachedIsManaged>true</CachedIsManaged>
</Component>
<Component>
<Name>Microsoft.BizTalk.Component.XmlDasmComp</Name>
<ComponentName>XML disassembler</ComponentName>
<Description>Streaming XML disassembler</Description>
<Version>1.0</Version>
<Properties>
<Property Name="EnvelopeSpecNames">
<Value xsi:type="xsd
tring">msdnSample.B1Elements</Value>
</Property>
<Property Name="EnvelopeSpecTargetNamespaces">
<Value xsi:type="xsd
tring">http://differentnamespace/</Value>
</Property>
<Property Name="DocumentSpecNames">
<Value xsi:type="xsd
tring"/>
</Property>
<Property Name="DocumentSpecTargetNamespaces">
<Value xsi:type="xsd
tring"/>
</Property>
<Property Name="AllowUnrecognizedMessage">
<Value xsi:type="xsd:boolean">false</Value>
</Property>
<Property Name="ValidateDocument">
<Value xsi:type="xsd:boolean">false</Value>
</Property>
<Property Name="RecoverableInterchangeProcessing">
<Value xsi:type="xsd:boolean">false</Value>
</Property>
<Property Name="HiddenProperties">
<Value xsi:type="xsd
tring">EnvelopeSpecTargetNamespaces,DocumentSpecTargetNamespaces</Value>
</Property>
</Properties>
<CachedDisplayName>XML disassembler</CachedDisplayName>
<CachedIsManaged>true</CachedIsManaged>
</Component>
</Components>
</Stage>
<Stage CategoryId="9d0e410d-4cce-4536-83fa-4a5040674ad6">
<Components/>
</Stage>
<Stage CategoryId="9d0e410e-4cce-4536-83fa-4a5040674ad6">
<Components/>
</Stage>
</Stages>
</Document>