|
Home > Archive > BizTalk Server Orchestration > April 2004 > Custom Disassembler, Missing Messages
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 |
Custom Disassembler, Missing Messages
|
|
| Eric Z. Beard 2004-04-23, 2:36 pm |
| Hello,
I've recently jumped into Biztalk 2004, and I'm following along with
the webcasts and samples fairly well. Ive run into a problem while
writing a custom disassembler.
I implemented all the component interfaces, and my new pipeline
component shows up in the toolbox. All it does is convert a text file
into the XML format expected by the initial Receive shape in my
orchestration. I'm not using the bundled flat file disassembler, this
is all custom. I can attach to biztalk and see that my disassembler
is running, and the Disassemble method gets called, constructing my
in-memory copy of the XML file. But the Read method on my stream
never gets called, and after my text file disappears from the Input
folder, nothing else happens.. no error messages or anything. HAT
doesn't even display my schemas as a choice in the menu for queries.
If it was receiving the XML stream and couldn't find a subscription
for it, I would get an error, right? Since my Read method on the
stream never gets called, I assume something isn't wired up correctly
with the pipeline.
Here's the code from my component's Disassemble method (which I have
confirmed is running when I drop in a text file)
Stream stream = new FlatFileDasmStream
(baseMessage.BodyPart.GetOriginalDataStream());
baseMessage.BodyPart.Data = stream;
pipelineContext.ResourceTracker.AddResource(stream);
Any ideas why Biztalk ignores the stream after this?
Thanks!
EZB
| |
| Matt Milner 2004-04-23, 11:35 pm |
| You need to implement the Getnext method and have that return a new
IBaseMessage for each message in your original message. You'll want to copy
the context and the (see the pipelineutil class).
You are disassembling one message and creating one or more messages from it,
so the initial message is going to be ignored for all intents and purposes.
Matt
"Eric Z. Beard" <ericzbeard@yahoo.com> wrote in message
news:8684f290.0404231004.6eb63301@posting.google.com...
> Hello,
>
> I've recently jumped into Biztalk 2004, and I'm following along with
> the webcasts and samples fairly well. Ive run into a problem while
> writing a custom disassembler.
>
> I implemented all the component interfaces, and my new pipeline
> component shows up in the toolbox. All it does is convert a text file
> into the XML format expected by the initial Receive shape in my
> orchestration. I'm not using the bundled flat file disassembler, this
> is all custom. I can attach to biztalk and see that my disassembler
> is running, and the Disassemble method gets called, constructing my
> in-memory copy of the XML file. But the Read method on my stream
> never gets called, and after my text file disappears from the Input
> folder, nothing else happens.. no error messages or anything. HAT
> doesn't even display my schemas as a choice in the menu for queries.
>
> If it was receiving the XML stream and couldn't find a subscription
> for it, I would get an error, right? Since my Read method on the
> stream never gets called, I assume something isn't wired up correctly
> with the pipeline.
>
> Here's the code from my component's Disassemble method (which I have
> confirmed is running when I drop in a text file)
>
> Stream stream = new FlatFileDasmStream
> (baseMessage.BodyPart.GetOriginalDataStream());
> baseMessage.BodyPart.Data = stream;
> pipelineContext.ResourceTracker.AddResource(stream);
>
> Any ideas why Biztalk ignores the stream after this?
>
> Thanks!
>
> EZB
| |
| Eric Z. Beard 2004-04-26, 11:38 am |
| > You are disassembling one message and creating one or more messages from it,
> so the initial message is going to be ignored for all intents and purposes.
Yes that's right, it makes sense.. I was manipulating the old
message's stream. The docs make it sound like you only need GetNext
after the first message.
I managed to get a little further by looking at Microsoft's IL for
their XML disassembler.. is this process documented anywhere?
Now my message is making it past the XML validation stage and gets
stuck when Biztalk tries to find a subscription for it. Since it
started as a text file, I have to promote the namespace of my XML
stream, but I'm getting an error that says "the parameter is
incorrect" related to this line of code:
message.Context.Promote("MessageType",
"http://WSPOSampleBizTalk.IncomingPO",
string.Concat("http://WSPOSampleBizTalk.IncomingPO" , "#", "PO"));
"PO" is the local name of the root node. I'm basing that call on
disassembled IL, I haven't found anywhere in the docs that describes
the format.
Any ideas of what's incorrect about it?
Thanks in advance!
EZB
[vbcol=seagreen]
> "Eric Z. Beard" <ericzbeard@yahoo.com> wrote in message
> news:8684f290.0404231004.6eb63301@posting.google.com...
| |
| Vikas Nahata [MSFT] 2004-04-26, 8:51 pm |
| You can promote the messagetype using something like:
message.Context.Promote("MessageType",
"http://schemas.microsoft.com/BizTalk/2003/system-properties", "PO")
The last parameter is the Root Node name.
Hope this helps.
| >>
| >>> You are disassembling one message and creating one or more messages
from it,
| >>> so the initial message is going to be ignored for all intents and
purposes.
| >>
| >>Yes that's right, it makes sense.. I was manipulating the old
| >>message's stream. The docs make it sound like you only need GetNext
| >>after the first message.
| >>
| >>I managed to get a little further by looking at Microsoft's IL for
| >>their XML disassembler.. is this process documented anywhere?
| >>
| >>Now my message is making it past the XML validation stage and gets
| >>stuck when Biztalk tries to find a subscription for it. Since it
| >>started as a text file, I have to promote the namespace of my XML
| >>stream, but I'm getting an error that says "the parameter is
| >>incorrect" related to this line of code:
| >>
| >>message.Context.Promote("MessageType",
| >>"http://WSPOSampleBizTalk.IncomingPO",
| >>string.Concat("http://WSPOSampleBizTalk.IncomingPO" , "#", "PO"));
| >>
| >>"PO" is the local name of the root node. I'm basing that call on
| >>disassembled IL, I haven't found anywhere in the docs that describes
| >>the format.
| >>
| >>Any ideas of what's incorrect about it?
| >>
| >>Thanks in advance!
| >>
| >>EZB
| >>
| >>> "Eric Z. Beard" <ericzbeard@yahoo.com> wrote in message
| >>> news:8684f290.0404231004.6eb63301@posting.google.com...
| >>> > Hello,
| >>> >
| >>> > I've recently jumped into Biztalk 2004, and I'm following along with
| >>> > the webcasts and samples fairly well. Ive run into a problem while
| >>> > writing a custom disassembler.
| >>> >
| >>> > I implemented all the component interfaces, and my new pipeline
| >>> > component shows up in the toolbox. All it does is convert a text
file
| >>> > into the XML format expected by the initial Receive shape in my
| >>> > orchestration. I'm not using the bundled flat file disassembler,
this
| >>> > is all custom. I can attach to biztalk and see that my disassembler
| >>> > is running, and the Disassemble method gets called, constructing my
| >>> > in-memory copy of the XML file. But the Read method on my stream
| >>> > never gets called, and after my text file disappears from the Input
| >>> > folder, nothing else happens.. no error messages or anything. HAT
| >>> > doesn't even display my schemas as a choice in the menu for queries.
| >>> >
| >>> > If it was receiving the XML stream and couldn't find a subscription
| >>> > for it, I would get an error, right? Since my Read method on the
| >>> > stream never gets called, I assume something isn't wired up
correctly
| >>> > with the pipeline.
| >>> >
| >>> > Here's the code from my component's Disassemble method (which I have
| >>> > confirmed is running when I drop in a text file)
| >>> >
| >>> > Stream stream = new FlatFileDasmStream
| >>> > (baseMessage.BodyPart.GetOriginalDataStream());
| >>> > baseMessage.BodyPart.Data = stream;
| >>> > pipelineContext.ResourceTracker.AddResource(stream);
| >>> >
| >>> > Any ideas why Biztalk ignores the stream after this?
| >>> >
| >>> > Thanks!
| >>> >
| >>> > EZB
| >>
This posting is provided "AS IS" with no warranties, and confers no rights.
EBusiness Server Team
| |
| Eric Z. Beard 2004-04-27, 8:36 am |
| That's close to what I ended up using to fix it; it also needed the
schema namespace and a # symbol:
message.Context.Promote("MessageType",
"http://schemas.microsoft.com/BizTalk/2003/system-properties",
"http://WSPOSampleBizTalk.IncomingPO#PO"));
EZB
vikasn@online.microsoft.com (Vikas Nahata [MSFT]) wrote in message news:<12uod$#KEHA.3064@cpmsftngxa10.phx.gbl>...
> You can promote the messagetype using something like:
>
> message.Context.Promote("MessageType",
> "http://schemas.microsoft.com/BizTalk/2003/system-properties", "PO")
>
> The last parameter is the Root Node name.
>
> Hope this helps.
>
> | >>
> | >>> You are disassembling one message and creating one or more messages
> from it,
> | >>> so the initial message is going to be ignored for all intents and
> purposes.
> | >>
> | >>Yes that's right, it makes sense.. I was manipulating the old
> | >>message's stream. The docs make it sound like you only need GetNext
> | >>after the first message.
> | >>
> | >>I managed to get a little further by looking at Microsoft's IL for
> | >>their XML disassembler.. is this process documented anywhere?
> | >>
> | >>Now my message is making it past the XML validation stage and gets
> | >>stuck when Biztalk tries to find a subscription for it. Since it
> | >>started as a text file, I have to promote the namespace of my XML
> | >>stream, but I'm getting an error that says "the parameter is
> | >>incorrect" related to this line of code:
> | >>
> | >>message.Context.Promote("MessageType",
> | >>"http://WSPOSampleBizTalk.IncomingPO",
> | >>string.Concat("http://WSPOSampleBizTalk.IncomingPO" , "#", "PO"));
> | >>
> | >>"PO" is the local name of the root node. I'm basing that call on
> | >>disassembled IL, I haven't found anywhere in the docs that describes
> | >>the format.
> | >>
> | >>Any ideas of what's incorrect about it?
> | >>
> | >>Thanks in advance!
> | >>
> | >>EZB
> | >>
> | >>> "Eric Z. Beard" <ericzbeard@yahoo.com> wrote in message
> | >>> news:8684f290.0404231004.6eb63301@posting.google.com...
> | >>> > Hello,
> | >>> >
> | >>> > I've recently jumped into Biztalk 2004, and I'm following along with
> | >>> > the webcasts and samples fairly well. Ive run into a problem while
> | >>> > writing a custom disassembler.
> | >>> >
> | >>> > I implemented all the component interfaces, and my new pipeline
> | >>> > component shows up in the toolbox. All it does is convert a text
> file
> | >>> > into the XML format expected by the initial Receive shape in my
> | >>> > orchestration. I'm not using the bundled flat file disassembler,
> this
> | >>> > is all custom. I can attach to biztalk and see that my disassembler
> | >>> > is running, and the Disassemble method gets called, constructing my
> | >>> > in-memory copy of the XML file. But the Read method on my stream
> | >>> > never gets called, and after my text file disappears from the Input
> | >>> > folder, nothing else happens.. no error messages or anything. HAT
> | >>> > doesn't even display my schemas as a choice in the menu for queries.
> | >>> >
> | >>> > If it was receiving the XML stream and couldn't find a subscription
> | >>> > for it, I would get an error, right? Since my Read method on the
> | >>> > stream never gets called, I assume something isn't wired up
> correctly
> | >>> > with the pipeline.
> | >>> >
> | >>> > Here's the code from my component's Disassemble method (which I have
> | >>> > confirmed is running when I drop in a text file)
> | >>> >
> | >>> > Stream stream = new FlatFileDasmStream
> | >>> > (baseMessage.BodyPart.GetOriginalDataStream());
> | >>> > baseMessage.BodyPart.Data = stream;
> | >>> > pipelineContext.ResourceTracker.AddResource(stream);
> | >>> >
> | >>> > Any ideas why Biztalk ignores the stream after this?
> | >>> >
> | >>> > Thanks!
> | >>> >
> | >>> > EZB
> | >>
>
> This posting is provided "AS IS" with no warranties, and confers no rights.
>
> EBusiness Server Team
|
|
|
|
|