BizTalk Server Orchestration - Envelopes and Schemas and Pipelines, Oh My

This is Interesting: Free IT Magazines  
Home > Archive > BizTalk Server Orchestration > September 2004 > Envelopes and Schemas and Pipelines, Oh My





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 Envelopes and Schemas and Pipelines, Oh My
Silly_King

2004-09-22, 9:56 pm

Hi all,

after some (painful) envelope/document processing pipeline experimentation,
i have come to a (possibly erroneous) conclusion that the received XML file
has to explicitly identify appropriate elements as "having" the
document/envelope schema. Is my conclusion correct?

When adding the XML disassembler component to my pipeline, i specified that
the Document schema (for example) is SinglePerson.xsd (target namespace
http://tempuri.org/SinglePerson.xsd) and the envelope schema is
MultiPerson.xsd (target namespace http://tempuri.org/MultiPerson.xsd). The
envelope schema has had its envelope property set to Yes and the root element
identified properly w/ the Body Xpath expression. Furthermore, i've imported
the SinglePerson schema into the MultiPerson schema and referenced the
SinglePerson node.

The pipeline only seems to process an incoming XML file if all elements in
the file explicitly state which namespace they belong to:

<ns0:MultiPerson xmlns:ns0="http://tempuri.org/MultiPerson.xsd">
<ns1:SinglePerson xmlns:ns1="http://tempuri.org/SinglePerson.xsd">
<ns1:Name>Full name here</ns1:Name>
<ns1:Email>Email address here</ns1:Email>
</ns1:SinglePerson>
<ns1:SinglePerson xmlns:ns1="http://tempuri.org/SinglePerson.xsd">
<ns1:Name>Full name here</ns1:Name>
<ns1:Email>Email address here</ns1:Email>
</ns1:SinglePerson>
</ns0:MultiPerson>

Since the actual file that i get from the customer does not contain those
namespace declarations, the pipeline is unable to process it and fails w/
errors that state so. This behavior does make sense in terms of my
understanding of how the XML disassemlber works. However, perhaps someone
can help me and tell me either what i've done incorrectly to produce such
behavior *or* how i should transform the incoming file to get those namespace
declarations in there?

thanks much!
XUEZHAI NI

2004-09-22, 9:56 pm

take a look at the link
http://blogs.msdn.com/scottwoo/arch...2/06/68694.aspx

hope that blog will answer your question.

thanks

Ni

--------------------
| Thread-Topic: Envelopes and Schemas and Pipelines, Oh My
| thread-index: AcSgHG2zGnUi0egyTN2zoOrKsLFW2A==
| X-WBNR-Posting-Host: 68.54.158.86
| From: "=?Utf-8?B?U2lsbHlfS2luZw==?=" <SillyKing@discussions.microsoft.com>
| Subject: Envelopes and Schemas and Pipelines, Oh My
| Date: Tue, 21 Sep 2004 13:49:03 -0700
| Lines: 39
| Message-ID: <A3929353-14C0-437E-B7CB-405193C3DD9B@microsoft.com>
| MIME-Version: 1.0
| Content-Type: text/plain;
| charset="Utf-8"
| Content-Transfer-Encoding: 7bit
| X-Newsreader: Microsoft CDO for Windows 2000
| Content-Class: urn:content-classes:message
| Importance: normal
| Priority: normal
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
| Newsgroups: microsoft.public.biztalk.orchestration
| NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.1.29
| Path: cpmsftngxa06.phx.gbl!TK2MSFTNGXA03.phx.gbl
| Xref: cpmsftngxa06.phx.gbl microsoft.public.biztalk.orchestration:8261
| X-Tomcat-NG: microsoft.public.biztalk.orchestration
|
| Hi all,
|
| after some (painful) envelope/document processing pipeline
experimentation,
| i have come to a (possibly erroneous) conclusion that the received XML
file
| has to explicitly identify appropriate elements as "having" the
| document/envelope schema. Is my conclusion correct?
|
| When adding the XML disassembler component to my pipeline, i specified
that
| the Document schema (for example) is SinglePerson.xsd (target namespace
| http://tempuri.org/SinglePerson.xsd) and the envelope schema is
| MultiPerson.xsd (target namespace http://tempuri.org/MultiPerson.xsd).
The
| envelope schema has had its envelope property set to Yes and the root
element
| identified properly w/ the Body Xpath expression. Furthermore, i've
imported
| the SinglePerson schema into the MultiPerson schema and referenced the
| SinglePerson node.
|
| The pipeline only seems to process an incoming XML file if all elements
in
| the file explicitly state which namespace they belong to:
|
| <ns0:MultiPerson xmlns:ns0="http://tempuri.org/MultiPerson.xsd">
| <ns1:SinglePerson xmlns:ns1="http://tempuri.org/SinglePerson.xsd">
| <ns1:Name>Full name here</ns1:Name>
| <ns1:Email>Email address here</ns1:Email>
| </ns1:SinglePerson>
| <ns1:SinglePerson xmlns:ns1="http://tempuri.org/SinglePerson.xsd">
| <ns1:Name>Full name here</ns1:Name>
| <ns1:Email>Email address here</ns1:Email>
| </ns1:SinglePerson>
| </ns0:MultiPerson>
|
| Since the actual file that i get from the customer does not contain those
| namespace declarations, the pipeline is unable to process it and fails w/
| errors that state so. This behavior does make sense in terms of my
| understanding of how the XML disassemlber works. However, perhaps
someone
| can help me and tell me either what i've done incorrectly to produce such
| behavior *or* how i should transform the incoming file to get those
namespace
| declarations in there?
|
| thanks much!
|

Silly_King

2004-09-22, 9:56 pm

Thanks... that's a great blog but it doesn't really answer my question. in
fact, the question is confirmed by the following example (given by Andrei
Maksimenka) of the XML file participating in the interchange:

<ns0:envelope xmlns:ns0="ns0">
<header>
<firstName>Andrei</firstName>
<lastName>Maksimenka<lastName>
</header>
<documents>
<ns1:document xmlns:ns1="ns1">
<!-- some stuff-->
</ns1:document>
<ns1:document xmlns:ns1="ns1">
<!-- some stuff-->
</ns1:document>
<ns1:document xmlns:ns1="ns1">
<!-- some stuff-->
</ns1:document>
</ns0:envelope>

As you can see, namespaces are explicitly specified. How should i deal w/
the same data but if they come w/ no namespace specification?

<envelope>
<header>
<firstName>Andrei</firstName>
<lastName>Maksimenka<lastName>
</header>
<documents>
<document>
<!-- some stuff-->
</document>
<document>
<!-- some stuff-->
</document>
<document>
<!-- some stuff-->
</document>
</envelope>

thanks in advance!


"XUEZHAI NI" wrote:

> take a look at the link
> http://blogs.msdn.com/scottwoo/arch...2/06/68694.aspx
>
> hope that blog will answer your question.
>
> thanks
>
> Ni
>
> --------------------
> | Thread-Topic: Envelopes and Schemas and Pipelines, Oh My
> | thread-index: AcSgHG2zGnUi0egyTN2zoOrKsLFW2A==
> | X-WBNR-Posting-Host: 68.54.158.86
> | From: "=?Utf-8?B?U2lsbHlfS2luZw==?=" <SillyKing@discussions.microsoft.com>
> | Subject: Envelopes and Schemas and Pipelines, Oh My
> | Date: Tue, 21 Sep 2004 13:49:03 -0700
> | Lines: 39
> | Message-ID: <A3929353-14C0-437E-B7CB-405193C3DD9B@microsoft.com>
> | MIME-Version: 1.0
> | Content-Type: text/plain;
> | charset="Utf-8"
> | Content-Transfer-Encoding: 7bit
> | X-Newsreader: Microsoft CDO for Windows 2000
> | Content-Class: urn:content-classes:message
> | Importance: normal
> | Priority: normal
> | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
> | Newsgroups: microsoft.public.biztalk.orchestration
> | NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.1.29
> | Path: cpmsftngxa06.phx.gbl!TK2MSFTNGXA03.phx.gbl
> | Xref: cpmsftngxa06.phx.gbl microsoft.public.biztalk.orchestration:8261
> | X-Tomcat-NG: microsoft.public.biztalk.orchestration
> |
> | Hi all,
> |
> | after some (painful) envelope/document processing pipeline
> experimentation,
> | i have come to a (possibly erroneous) conclusion that the received XML
> file
> | has to explicitly identify appropriate elements as "having" the
> | document/envelope schema. Is my conclusion correct?
> |
> | When adding the XML disassembler component to my pipeline, i specified
> that
> | the Document schema (for example) is SinglePerson.xsd (target namespace
> | http://tempuri.org/SinglePerson.xsd) and the envelope schema is
> | MultiPerson.xsd (target namespace http://tempuri.org/MultiPerson.xsd).
> The
> | envelope schema has had its envelope property set to Yes and the root
> element
> | identified properly w/ the Body Xpath expression. Furthermore, i've
> imported
> | the SinglePerson schema into the MultiPerson schema and referenced the
> | SinglePerson node.
> |
> | The pipeline only seems to process an incoming XML file if all elements
> in
> | the file explicitly state which namespace they belong to:
> |
> | <ns0:MultiPerson xmlns:ns0="http://tempuri.org/MultiPerson.xsd">
> | <ns1:SinglePerson xmlns:ns1="http://tempuri.org/SinglePerson.xsd">
> | <ns1:Name>Full name here</ns1:Name>
> | <ns1:Email>Email address here</ns1:Email>
> | </ns1:SinglePerson>
> | <ns1:SinglePerson xmlns:ns1="http://tempuri.org/SinglePerson.xsd">
> | <ns1:Name>Full name here</ns1:Name>
> | <ns1:Email>Email address here</ns1:Email>
> | </ns1:SinglePerson>
> | </ns0:MultiPerson>
> |
> | Since the actual file that i get from the customer does not contain those
> | namespace declarations, the pipeline is unable to process it and fails w/
> | errors that state so. This behavior does make sense in terms of my
> | understanding of how the XML disassemlber works. However, perhaps
> someone
> | can help me and tell me either what i've done incorrectly to produce such
> | behavior *or* how i should transform the incoming file to get those
> namespace
> | declarations in there?
> |
> | thanks much!
> |
>
>

Greg Forsythe

2004-09-22, 9:56 pm

Try this:
Remove the target namespaces from the schemas you have created
(SinglePerson.xsd and MulitPerson.xsd). Just delete the contents of the
<Schema> property Target Namepsace
Create a custom pipeline, add the XML Disassembler component and specify the
document and envelope schemas.

Greg


"Silly_King" <SillyKing@discussions.microsoft.com> wrote in message
news:8836A253-2B55-4FD9-BD2F-4F12DDD669AB@microsoft.com...[vbcol=seagreen]
> Thanks... that's a great blog but it doesn't really answer my question. in
> fact, the question is confirmed by the following example (given by Andrei
> Maksimenka) of the XML file participating in the interchange:
>
> <ns0:envelope xmlns:ns0="ns0">
> <header>
> <firstName>Andrei</firstName>
> <lastName>Maksimenka<lastName>
> </header>
> <documents>
> <ns1:document xmlns:ns1="ns1">
> <!-- some stuff-->
> </ns1:document>
> <ns1:document xmlns:ns1="ns1">
> <!-- some stuff-->
> </ns1:document>
> <ns1:document xmlns:ns1="ns1">
> <!-- some stuff-->
> </ns1:document>
> </ns0:envelope>
>
> As you can see, namespaces are explicitly specified. How should i deal w/
> the same data but if they come w/ no namespace specification?
>
> <envelope>
> <header>
> <firstName>Andrei</firstName>
> <lastName>Maksimenka<lastName>
> </header>
> <documents>
> <document>
> <!-- some stuff-->
> </document>
> <document>
> <!-- some stuff-->
> </document>
> <document>
> <!-- some stuff-->
> </document>
> </envelope>
>
> thanks in advance!
>
>
> "XUEZHAI NI" wrote:
>
<SillyKing@discussions.microsoft.com>[vbcol=seagreen]
namespace[vbcol=seagreen]
elements[vbcol=seagreen]
those[vbcol=seagreen]
w/[vbcol=seagreen]
such[vbcol=seagreen]


Silly_King

2004-09-23, 5:51 pm

Thanks... Did that (had to switch Data Structure of SinglePerson to anyType
rather than the imported SinglePerson type), got a couple of warnings
compiling/deploying the pipeline. Now HAT tells me that routing failed
because no subscription is available... On a separate but possibly related
note: If the targetNamespace property of the schema used as the document
schema is empty, how is the resulting (processed) message identified once its
separated from the envelope message? Is there a way to debug that process so
i can see the contents of the document message that's being passed to the
orchestration?

"Greg Forsythe" wrote:

> Try this:
> Remove the target namespaces from the schemas you have created
> (SinglePerson.xsd and MulitPerson.xsd). Just delete the contents of the
> <Schema> property Target Namepsace
> Create a custom pipeline, add the XML Disassembler component and specify the
> document and envelope schemas.
>
> Greg
>
>
> "Silly_King" <SillyKing@discussions.microsoft.com> wrote in message
> news:8836A253-2B55-4FD9-BD2F-4F12DDD669AB@microsoft.com...
> <SillyKing@discussions.microsoft.com>
> namespace
> elements
> those
> w/
> such
>
>
>

Silly_King

2004-09-23, 5:51 pm

Ok, sorry to have turned this into a blog... Removing targetNamespace &
redeploying both the custom pipeline & the orchestration worked - thank you
for the help!

"Greg Forsythe" wrote:

> Try this:
> Remove the target namespaces from the schemas you have created
> (SinglePerson.xsd and MulitPerson.xsd). Just delete the contents of the
> <Schema> property Target Namepsace
> Create a custom pipeline, add the XML Disassembler component and specify the
> document and envelope schemas.
>
> Greg
>
>
> "Silly_King" <SillyKing@discussions.microsoft.com> wrote in message
> news:8836A253-2B55-4FD9-BD2F-4F12DDD669AB@microsoft.com...
> <SillyKing@discussions.microsoft.com>
> namespace
> elements
> those
> w/
> such
>
>
>

Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com