BizTalk Server General - PLEASE HELP!!! =( -> Correlation, custom pipeline, and custom adapter

This is Interesting: Free IT Magazines  
Home > Archive > BizTalk Server General > December 2004 > PLEASE HELP!!! =( -> Correlation, custom pipeline, and custom adapter





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 PLEASE HELP!!! =( -> Correlation, custom pipeline, and custom adapter
paul

2004-12-29, 5:52 pm

Hey guys

There are three messages: InA, InB, and OutA.

Here's what happens sequentially:
a) Message InA arrives at a custom HTTP adapter, gets passed into a custom
pipeline where its schema is validated and digital signature verified, and
then it gets forwarded to the message box.
b) Message OutA gets sent out and its attribute 'Id' gets promoted so that
it can be used to correlate message InB later
c) Message InB arrives at the custom HTTP adapter, gets passed into the
custom pipeline... but:
i) it fails schema validation (although it passes digital signature
validation.. indicating that the message hasn't been tampered with)
ii) the messaging engine throws the following error as the custom
pipeline passes the message to it:
The Messaging engine failed to process a message submitted by
adapter:HTTP.NET Source URL:/HttpReceive/HttpReceive.aspx. Details:Could not
find a matching subscription for the message.


When I tried to validate that same message InB against the exact same schema
using a simple console application, the validation was successful.

I am utterly confused here.

Is there something I'm missing?

Thanks,
Paul


paul

2004-12-29, 5:52 pm

Question:

Suppose I promote the 'Id' attribute on outbound message A so that I can
correlate it to the 'Id' attribute of inbound message B.

If I am using a custom receive pipeline, will I need to promote the 'Id'
attribute of the inbound message B in my custom pipeline?

If the answer is yes to the above question, can someone tell me how this is
done? (I would very much appreciate some sample code or some link that has
some sample code).


Thanks,
Paul


Jon Flanders

2004-12-29, 5:52 pm

Paul - if you have registered the schema for the message B - all you have to
do is specify a promoted property in that schema - and then use the
XmlReceive pipeline. You shouldn't have to build a custom pipeline object
unless that value isn't in the incoming message.

--
Jon Flanders [DevelopMentor]
http://staff.develop.com/jfland/
http://www.develop.com/courses/biztalk
"paul" <boloh77@hotmail.com> wrote in message
news:%23pCIQAe7EHA.3756@TK2MSFTNGP14.phx.gbl...
> Question:
>
> Suppose I promote the 'Id' attribute on outbound message A so that I can
> correlate it to the 'Id' attribute of inbound message B.
>
> If I am using a custom receive pipeline, will I need to promote the 'Id'
> attribute of the inbound message B in my custom pipeline?
>
> If the answer is yes to the above question, can someone tell me how this

is
> done? (I would very much appreciate some sample code or some link that has
> some sample code).
>
>
> Thanks,
> Paul
>
>



Richard Blewett [DevelopMentor]

2004-12-29, 5:52 pm

What components do you have in your custom pipeline standard or custom ones?

How do you know the message is failing schema validation?

Is there an orchestration in this mix?

Regards

Richard Blewett - DevelopMentor
http://www.dotnetconsult.co.uk/weblog
http://www.dotnetconsult.co.uk

Hey guys

There are three messages: InA, InB, and OutA.

Here's what happens sequentially:
a) Message InA arrives at a custom HTTP adapter, gets passed into a custom
pipeline where its schema is validated and digital signature verified, and
then it gets forwarded to the message box.
b) Message OutA gets sent out and its attribute 'Id' gets promoted so that
it can be used to correlate message InB later
c) Message InB arrives at the custom HTTP adapter, gets passed into the
custom pipeline... but:
i) it fails schema validation (although it passes digital signature
validation.. indicating that the message hasn't been tampered with)
ii) the messaging engine throws the following error as the custom
pipeline passes the message to it:
The Messaging engine failed to process a message submitted by
adapter:HTTP.NET Source URL:/HttpReceive/HttpReceive.aspx. Details:Could not
find a matching subscription for the message.


When I tried to validate that same message InB against the exact same schema
using a simple console application, the validation was successful.

I am utterly confused here.

Is there something I'm missing?

Thanks,
Paul


paul

2004-12-29, 5:52 pm

Hi Jon

Yes you are absolutely right. Unfortunately, I need to validate if the
incoming messages conform to one of several schemas before it hits the
message box. Also, I need to perform custom digital signature validation,
and also to verify the source of the message (by probing the inbound
message's HTTP headers -> Microsoft has a hotfix for this by the way).

So yeah... I'm stuck with custom pipeline.

Any ideas?

Thanks,
Paul


"Jon Flanders" <jfland@develop.com> wrote in message
news:%23crN7Me7EHA.3644@TK2MSFTNGP09.phx.gbl...
> Paul - if you have registered the schema for the message B - all you have
> to
> do is specify a promoted property in that schema - and then use the
> XmlReceive pipeline. You shouldn't have to build a custom pipeline object
> unless that value isn't in the incoming message.
>
> --
> Jon Flanders [DevelopMentor]
> http://staff.develop.com/jfland/
> http://www.develop.com/courses/biztalk
> "paul" <boloh77@hotmail.com> wrote in message
> news:%23pCIQAe7EHA.3756@TK2MSFTNGP14.phx.gbl...
> is
>
>



paul

2004-12-29, 5:52 pm

Hey Richard,

I'm using a custom component (i.e. have to code it) in my pipeline.

The schema validation is actually a code I had to write to manually validate
the incoming message against pre-defined schemas before the message hits the
message box. It's working now... turns out the problem stemmed from the
validation code itself.

Yes, there is an orchestration in this mix. Messages that pass through the
pipeline successfully is supposed to trigger an orchestration. This is
supposed to happen twice. The first time when message InA arrives. And the
second time when the correlated message InB arrives. I was able to
successfully trigger the orchestration with message InA, but NOT with
message InB. I suspect that I may have to promote the 'Id' attribute from
within the custom receive pipeline before sending it off to the messaging
engine. However since I'm new at this I was hoping that someone can verify
(or correct me) with this, and hopefully show me some sample code so I have
an idea of how to go about it.

Thanks for the help. I really appreciate it.

-Paul





"Richard Blewett [DevelopMentor]" <richardb@NOSPAMdevelop.com> wrote in
message news:u2L7tNe7EHA.3076@TK2MSFTNGP15.phx.gbl...
> What components do you have in your custom pipeline standard or custom
> ones?
>
> How do you know the message is failing schema validation?
>
> Is there an orchestration in this mix?
>
> Regards
>
> Richard Blewett - DevelopMentor
> http://www.dotnetconsult.co.uk/weblog
> http://www.dotnetconsult.co.uk
>
> Hey guys
>
> There are three messages: InA, InB, and OutA.
>
> Here's what happens sequentially:
> a) Message InA arrives at a custom HTTP adapter, gets passed into a custom
> pipeline where its schema is validated and digital signature verified, and
> then it gets forwarded to the message box.
> b) Message OutA gets sent out and its attribute 'Id' gets promoted so that
> it can be used to correlate message InB later
> c) Message InB arrives at the custom HTTP adapter, gets passed into the
> custom pipeline... but:
> i) it fails schema validation (although it passes digital signature
> validation.. indicating that the message hasn't been tampered with)
> ii) the messaging engine throws the following error as the custom
> pipeline passes the message to it:
> The Messaging engine failed to process a message submitted by
> adapter:HTTP.NET Source URL:/HttpReceive/HttpReceive.aspx. Details:Could
> not
> find a matching subscription for the message.
>
>
> When I tried to validate that same message InB against the exact same
> schema
> using a simple console application, the validation was successful.
>
> I am utterly confused here.
>
> Is there something I'm missing?
>
> Thanks,
> Paul
>
>



Matt Milner

2004-12-29, 5:52 pm

Your components, or the XMLDisassembler need to promote this value into the
context, that is correct. If you are not using the xmldisassembler in your
pipeline, then you'll need to promote some other things to like the
MessageType.

I'd say use the XMLDisassembler in your pipeline and put your validation
component after it to do your schema validation. This is your easiest first
choice. If that is not possible, take a look at the Arbitrary XPath
component sample in the April 2004 version of the SDK. It shows how to get
and promote values from an inbound message into the context. There are more
performant ways of doing this using a streaming reader instead of waiting
for the entire stream to be read and loading it up to do work, but they are
much more involved.

Matt
http://www.m3technologypartners.com/blogs/


"paul" <boloh77@hotmail.com> wrote in message
news:OSO3pye7EHA.2316@TK2MSFTNGP15.phx.gbl...
> Hey Richard,
>
> I'm using a custom component (i.e. have to code it) in my pipeline.
>
> The schema validation is actually a code I had to write to manually
> validate the incoming message against pre-defined schemas before the
> message hits the message box. It's working now... turns out the problem
> stemmed from the validation code itself.
>
> Yes, there is an orchestration in this mix. Messages that pass through
> the pipeline successfully is supposed to trigger an orchestration. This
> is supposed to happen twice. The first time when message InA arrives.
> And the second time when the correlated message InB arrives. I was able
> to successfully trigger the orchestration with message InA, but NOT with
> message InB. I suspect that I may have to promote the 'Id' attribute from
> within the custom receive pipeline before sending it off to the messaging
> engine. However since I'm new at this I was hoping that someone can
> verify (or correct me) with this, and hopefully show me some sample code
> so I have an idea of how to go about it.
>
> Thanks for the help. I really appreciate it.
>
> -Paul
>
>
>
>
>
> "Richard Blewett [DevelopMentor]" <richardb@NOSPAMdevelop.com> wrote in
> message news:u2L7tNe7EHA.3076@TK2MSFTNGP15.phx.gbl...
>
>



Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com