|
Home > Archive > BizTalk Server General > January 2005 > BT2004 - Envelope processing errors
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 |
BT2004 - Envelope processing errors
|
|
| J. Dudgeon 2005-01-25, 5:50 pm |
| Hello,
I've been (sadly) struggling with BT2004 envelope schemas all morning. I
would really appreciate it if someone could point me in the right direction.
What I'm looking to do is this:
<Envelope1>
<Header/>
<Body>
<any/>
</Body>
</Envelope1>
I've defined my schemas and have been able to successfully promote
properties in the various envelope <Header> sections. The problem I'm
running into, I believe, is with the <any> element.
When BizTalk strips the envelope off, I want whatever message that is
present in place of the <any> element to go into the message box (to be
picked up by the appropriate send port subscriptions.) I've defined a custom
pipeline with a XML disassembler component and the appropriate Envelope and
Document Schemas. Everytime I submit a document (FILE adapter), I receive
the following error in the Event Log:
"The Messaging engine failed to process a message submitted by adapter:FILE
Source URL:C:\My Projects
2\Research\BizTalk\Envelopes\Envelopes\F
ileDrop\In\*.xml. Details:Could not
find a matching subscription for the message. . This error occurs if the
subscribed orchestration schedule or send port has not been started, or if
some of the message properties necessary for subscription evaluation have not
been promoted. Please refer to Health and Activity Tracking tool for more
detailed information on this failure"
What is frustrating is that I'm sure I had this working this morning. It's
probably a case of staring at this for too long, but can anyone tell me why
I'm getting a subscription error?
I have the schemas, Envelope, ItemType1, ItemType2, and
EnvelopeReceivePipeline all defined in one assembly. The namespaces are all
different, I've specified the Body xpath, the Envelope flag (for the two
envelopes), and even fiddled with the Root Reference property. The schemas
are deployed correctly.
If you need anymore information, let me know.
Here is the document that I'm trying to submit:
<ns0:Envelope xmlns:ns0="http://Envelopes.Envelope">
<Header />
<Items>
<ns1:ItemType1 xmlns:ns1="http://Envelopes.ItemType1>
<Text>Testing 1, 2, 3</Text>
</ns1:itemType1>
</Items>
</ns0:Envelope>
Thank you in advance,
Joel
| |
| Stephen W. Thomas 2005-01-26, 2:47 am |
| Hello.
I can share your frustration. I find working with envelopes is so much more
difficult then it probably should be.
I have a few questions for you:
Do you have the Body of the envelope defined one level up from what you want
to break out?
Do you have the ItemType1 schema deployed?
What are you subscribing to on the send ports to route the messages?
I have some information on envelopes that might help you here:
http://www.geekswithblogs.net/sthom...8/22/10053.aspx
If you want, you can send me your schemas and sample files to
swthomas@NOSPAMbiztalkgurus.com. I’d be happy to take a look at them.
Stephen W. Thomas
http://www.geekswithblogs.net/sthomas
"J. Dudgeon" wrote:
> Hello,
>
> I've been (sadly) struggling with BT2004 envelope schemas all morning. I
> would really appreciate it if someone could point me in the right direction.
>
> What I'm looking to do is this:
>
> <Envelope1>
> <Header/>
> <Body>
> <any/>
> </Body>
> </Envelope1>
>
> I've defined my schemas and have been able to successfully promote
> properties in the various envelope <Header> sections. The problem I'm
> running into, I believe, is with the <any> element.
>
> When BizTalk strips the envelope off, I want whatever message that is
> present in place of the <any> element to go into the message box (to be
> picked up by the appropriate send port subscriptions.) I've defined a custom
> pipeline with a XML disassembler component and the appropriate Envelope and
> Document Schemas. Everytime I submit a document (FILE adapter), I receive
> the following error in the Event Log:
>
> "The Messaging engine failed to process a message submitted by adapter:FILE
> Source URL:C:\My Projects
> 2\Research\BizTalk\Envelopes\Envelopes\F
ileDrop\In\*.xml. Details:Could not
> find a matching subscription for the message. . This error occurs if the
> subscribed orchestration schedule or send port has not been started, or if
> some of the message properties necessary for subscription evaluation have not
> been promoted. Please refer to Health and Activity Tracking tool for more
> detailed information on this failure"
>
> What is frustrating is that I'm sure I had this working this morning. It's
> probably a case of staring at this for too long, but can anyone tell me why
> I'm getting a subscription error?
>
> I have the schemas, Envelope, ItemType1, ItemType2, and
> EnvelopeReceivePipeline all defined in one assembly. The namespaces are all
> different, I've specified the Body xpath, the Envelope flag (for the two
> envelopes), and even fiddled with the Root Reference property. The schemas
> are deployed correctly.
>
> If you need anymore information, let me know.
>
> Here is the document that I'm trying to submit:
>
> <ns0:Envelope xmlns:ns0="http://Envelopes.Envelope">
> <Header />
> <Items>
> <ns1:ItemType1 xmlns:ns1="http://Envelopes.ItemType1>
> <Text>Testing 1, 2, 3</Text>
> </ns1:itemType1>
> </Items>
> </ns0:Envelope>
>
> Thank you in advance,
>
> Joel
| |
| J. Dudgeon 2005-01-26, 5:54 pm |
| Thank you for the reply Stephen. I thought I regconized your name. Your
blog was the first one that I had read and I must say really helped get me
started with BT envelopes (especially with promoting properties from the
envelopes to the items themselves.)
What I'm trying to accomplish is to be able to have two top level envelopes,
say:
EventPackage (envelope)
EventItem (envelope)
Event
EventItem (envelope)
Event
Where each EventPackage envelope can contain one or more EventItem
envelopes. Within each EventItem envelope, there is a body section that has
a single <any> element defined with minOccurs set to "1" and maxOccurs set to
"unbounded".
The goal is to expose this EventPackage envelope as a Web service which will
allow clients to be able to submit any number and type of events. BizTalk
would strip the envelopes after promoting the properties (contained in some
<header> like section) and each now "naked" Event would be posted to the
MessageBox. This would allow us to pickup the posted events using
content-based routing or orchestrations.
When I first tested this solution, I was initially able to get it working
(thanks to your blog), as long as the XML instance document only contained
one EventItem envelope. So the following XML instance would work:
<EventPackage> (envelope)
<Header/>
<Body>
<EventItem> (envelope)
<Header/>
<Body>
<Event> (message)
</Body>
</EventItem>
</Body>
</EventPackage>
As soon as I tried to add another EventItem instance, I would get a parsing
error.
This led me to believe that BizTalk doesn't support multiple envelopes the
way I want:
<Envelope1>
<Envelope2><any/></Envelope2>
<Envelope2><any/></Envelope2>
</Envelope1>
That is what led me to trying out a more simplistic envelope (just one) and
defining it like:
<Envelope> (envelope)
<Header/>
<Body>
<ItemType1/> (message type 1)
<ItemType2/> (message type 2)
</Body>
</Envelope>
BizTalk does not seem to like instances of different types in an envelope
with the body defined as <any>. I don't understand this because my schemas
for each ItemTypex are deployed and the custom pipeline references them in
the Envelope and Document properties.
The problem I'm having now with not being able to *get even the most simple*
envelope working is driving me insane. I know at this point it is probably
something I'm overlooking as I've been working on this problem for almost 2
days now.
I'm going to setup two projects. One will contain a simple envelope schema
and the other will contain my EventPackage/EventItem/Event schema. I'll send
them to you later today so you can take a peek at them.
Thanks again,
Joel
"Stephen W. Thomas" wrote:
[vbcol=seagreen]
> Hello.
>
> I can share your frustration. I find working with envelopes is so much more
> difficult then it probably should be.
>
> I have a few questions for you:
> Do you have the Body of the envelope defined one level up from what you want
> to break out?
> Do you have the ItemType1 schema deployed?
> What are you subscribing to on the send ports to route the messages?
>
> I have some information on envelopes that might help you here:
> http://www.geekswithblogs.net/sthom...8/22/10053.aspx
>
> If you want, you can send me your schemas and sample files to
> swthomas@NOSPAMbiztalkgurus.com. I’d be happy to take a look at them.
>
> Stephen W. Thomas
> http://www.geekswithblogs.net/sthomas
>
>
> "J. Dudgeon" wrote:
>
| |
| J. Dudgeon 2005-01-28, 8:46 pm |
| UPDATE:
Well, I got the solution working. Apparently I BizTalk doesn't like you
submitting documents that don't have any subscriptions for them, which I
guess makes sense.
So I am now able to do this:
<envelope1>
<envelope2><itemtype1/></envelope2>
<envelope2><itemtype1/></envelope2>
<envelope2><itemtype2/></envelope2>
<envelope2><itemtype2/></envelope2>
</envelope1>
Basically my problem was that I didn't have a subscription for ItemType2; I
had only created a send port for ItemType1. BizTalk didn't like this at all.
I also discovered that I do not need to create a custom pipeline component
to specify the Document and Envelopes that will be received.
So basically the problem turned out to be me and I blame staring VS.NET for
too long! 
Thanks again for the pointers Stephen.
"Stephen W. Thomas" wrote:
[vbcol=seagreen]
> Hello.
>
> I can share your frustration. I find working with envelopes is so much more
> difficult then it probably should be.
>
> I have a few questions for you:
> Do you have the Body of the envelope defined one level up from what you want
> to break out?
> Do you have the ItemType1 schema deployed?
> What are you subscribing to on the send ports to route the messages?
>
> I have some information on envelopes that might help you here:
> http://www.geekswithblogs.net/sthom...8/22/10053.aspx
>
> If you want, you can send me your schemas and sample files to
> swthomas@NOSPAMbiztalkgurus.com. I’d be happy to take a look at them.
>
> Stephen W. Thomas
> http://www.geekswithblogs.net/sthomas
>
>
> "J. Dudgeon" wrote:
>
| |
| J. Dudgeon 2005-01-28, 8:46 pm |
| Holy smokes. I shouldn't try and post stuff to the newsgroups with only a
few hours of sleep. Look at those first few sentences...crappy mistakes. 
"J. Dudgeon" wrote:
[vbcol=seagreen]
> UPDATE:
>
> Well, I got the solution working. Apparently I BizTalk doesn't like you
> submitting documents that don't have any subscriptions for them, which I
> guess makes sense.
>
> So I am now able to do this:
>
> <envelope1>
> <envelope2><itemtype1/></envelope2>
> <envelope2><itemtype1/></envelope2>
> <envelope2><itemtype2/></envelope2>
> <envelope2><itemtype2/></envelope2>
> </envelope1>
>
> Basically my problem was that I didn't have a subscription for ItemType2; I
> had only created a send port for ItemType1. BizTalk didn't like this at all.
> I also discovered that I do not need to create a custom pipeline component
> to specify the Document and Envelopes that will be received.
>
> So basically the problem turned out to be me and I blame staring VS.NET for
> too long! 
>
> Thanks again for the pointers Stephen.
>
>
> "Stephen W. Thomas" wrote:
>
|
|
|
|
|