|
Home > Archive > BizTalk Server General > January 2005 > File Adapter - schema matching?
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
File Adapter - schema matching?
|
|
|
| Hi, a question for the experts!
When the File Adapter receives a message, and has the default XmlReceive
pipeline configured - it performs a neat little trick! It matches a Schema to
that message (if one exists). How does it no that?
Onviously I could specifiy a Schema in a Pipeline Dissassembler stage.
In BTS 2002 there was an architected component called a "Parser" into which
you could put custom code that could inspect the data and then identify a
correct schema for the message. Is there an equivalent component in 2004?
The Microsoft.BizTalk.ParsingEngine namespece looks like a hot prospect,
but it seems to be focussed more on customizing the parsing process. However
I don't need to customize - just to match?
regards
mark
| |
| Nabeel Prior 2005-01-25, 5:50 pm |
| Hi Mark,
The pipeline is independent of the file adapter - any message received from
any adapter is passed to a pipeline. In the standard XMLReceive pipeline
the pipeline will automatically perform a validation of the received XML
against a schema in the BizTalk database of assemblies. BizTalk will
determine which is the correct schema by looking for any schemas that have
been deployed with the same namespace and root node as the received XML.
In terms of a custom "Parser", you would develop a Validating pipeline
component, which you could use to identify a matching schema against which
validation is to occur, and then perform the validation as well.
--
Kind Regards,
Nabeel Prior
Web: http://www.brainjar.co.za
Blog: http://www.brainjar.co.za/blog.aspx
"Mark" <Mark@discussions.microsoft.com> wrote in message
news:07775140-4609-470C-86B0-4CA337826E95@microsoft.com...
> Hi, a question for the experts!
>
> When the File Adapter receives a message, and has the default XmlReceive
> pipeline configured - it performs a neat little trick! It matches a Schema
> to
> that message (if one exists). How does it no that?
>
> Onviously I could specifiy a Schema in a Pipeline Dissassembler stage.
>
> In BTS 2002 there was an architected component called a "Parser" into
> which
> you could put custom code that could inspect the data and then identify a
> correct schema for the message. Is there an equivalent component in 2004?
>
> The Microsoft.BizTalk.ParsingEngine namespece looks like a hot prospect,
> but it seems to be focussed more on customizing the parsing process.
> However
> I don't need to customize - just to match?
>
> regards
>
> mark
| |
|
| Nabeel,
thanks for that. Alas I am supplying a Flat-File and I need to put that in
to XML and then everything you say should happen. I have an appropriate
Schema deployed and if the same data is passed to the File Adapter then the
data is correctly interpreted. I presume that if I specify a Schema in the
Dissaembler it would match it as well. I should be a able to develop a
pipeline component that recogizes the data using the probe interface. The
File Adapter seems to manage all this without the need for any custom
pipeline development though. :-(
"Nabeel Prior" wrote:
> Hi Mark,
>
> The pipeline is independent of the file adapter - any message received from
> any adapter is passed to a pipeline. In the standard XMLReceive pipeline
> the pipeline will automatically perform a validation of the received XML
> against a schema in the BizTalk database of assemblies. BizTalk will
> determine which is the correct schema by looking for any schemas that have
> been deployed with the same namespace and root node as the received XML.
>
> In terms of a custom "Parser", you would develop a Validating pipeline
> component, which you could use to identify a matching schema against which
> validation is to occur, and then perform the validation as well.
> --
>
> Kind Regards,
>
> Nabeel Prior
> Web: http://www.brainjar.co.za
> Blog: http://www.brainjar.co.za/blog.aspx
>
| |
|
| Hi,
rooting around a bit more I see others have run into the same problem. What
you see in the error log is:
There was a failure executing the receive pipeline:
"Microsoft.BizTalk.DefaultPipelines.XMLReceive" Source: "XML disassembler"
Reason: None of the components at Disassemble stage can recognize the data.
The data is flat file so it's no surprise XmlDasm can't handle it. However
the File Adapter seems to handle the data just fine.
Does the File Adapter put a hint in hte context? so the pipeline uses the
flat file dissembler?
What is in the default receive pipeline?
thanks
mark
| |
| Nabeel Prior 2005-01-27, 5:50 pm |
| The default XML pipeline contains the XML Disassembler pipeline component
and the Party Resolution pipeline component. If you receive a positional or
delimited flat file from the File adapter, you need to create a custom
pipeline and use the Flat File Disassembler in that custom pipeline (with a
specified schema set in the properties) to convert the flat file into its
equivalent XML representation.
If you don't do this, then you will get the error described below.
--
Kind Regards,
Nabeel Prior
Web: http://www.brainjar.co.za
Blog: http://www.brainjar.co.za/blog.aspx
"Mark" <Mark@discussions.microsoft.com> wrote in message
news:1AFC957C-40AF-4BBB-9A46-AEEC607A80A4@microsoft.com...
> Hi,
> rooting around a bit more I see others have run into the same problem.
> What
> you see in the error log is:
>
> There was a failure executing the receive pipeline:
> "Microsoft.BizTalk.DefaultPipelines.XMLReceive" Source: "XML disassembler"
> Reason: None of the components at Disassemble stage can recognize the
> data.
>
> The data is flat file so it's no surprise XmlDasm can't handle it. However
> the File Adapter seems to handle the data just fine.
>
> Does the File Adapter put a hint in hte context? so the pipeline uses the
> flat file dissembler?
>
> What is in the default receive pipeline?
>
> thanks
>
> mark
>
>
>
| |
|
| Nabeel - thanks for that. I think I had an attack of wishfull thinking!
However my problem still stands - I need a way of finding out about
specifications that are deployed. I'm after a way of auto matching Schema to
my data.
The SchemaResolverSample shows the core technique but it has hard-coded
schema names. The EDI Adapters demonstrate a good pattern.
"Nabeel Prior" wrote:
> The default XML pipeline contains the XML Disassembler pipeline component
> and the Party Resolution pipeline component. If you receive a positional or
> delimited flat file from the File adapter, you need to create a custom
> pipeline and use the Flat File Disassembler in that custom pipeline (with a
> specified schema set in the properties) to convert the flat file into its
> equivalent XML representation.
>
> If you don't do this, then you will get the error described below.
>
> --
>
> Kind Regards,
>
> Nabeel Prior
> Web: http://www.brainjar.co.za
> Blog: http://www.brainjar.co.za/blog.aspx
>
>
> "Mark" <Mark@discussions.microsoft.com> wrote in message
> news:1AFC957C-40AF-4BBB-9A46-AEEC607A80A4@microsoft.com...
>
>
>
|
|
|
|
|