Custom Disassembler, Missing Messages
Web Server forum
Back To The Forum Home!Search!Private Messaging System

Web Server Talk Web Server Talk > Web Servers reviews > BizTalk Server > BizTalk Server Orchestration > Custom Disassembler, Missing Messages




  Last Thread   Next Thread Next
  Show Printable Version Email this Page Subscribe to this Thread      Post New Thread    Post A Reply      

    Custom Disassembler, Missing Messages  
Eric Z. Beard


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
04-23-04 07: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





[ Post a follow-up to this message ]



    Re: Custom Disassembler, Missing Messages  
Matt Milner


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
04-24-04 04:35 AM

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







[ Post a follow-up to this message ]



    Re: Custom Disassembler, Missing Messages  
Eric Z. Beard


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
04-26-04 04:38 PM

> You are disassembling one message and creating one or more messages from it,[vbcol=seagree
n]
> so the initial message is going to be ignored for all intents and purposes.[/vbcol
]

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... 





[ Post a follow-up to this message ]



    Re: Custom Disassembler, Missing Messages  
Vikas Nahata [MSFT]


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
04-27-04 01:51 AM

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






[ Post a follow-up to this message ]



    Re: Custom Disassembler, Missing Messages  
Eric Z. Beard


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
04-27-04 01:36 PM

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.306
4@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 wi
th
> | >>> > the webcasts and samples fairly well.  Ive run into a problem whil
e
> | >>> > 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 disassembl
er
> | >>> > is running, and the Disassemble method gets called, constructing m
y
> | >>> > 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 Inpu
t
> | >>> > folder, nothing else happens.. no error messages or anything.  HAT
> | >>> > doesn't even display my schemas as a choice in the menu for querie
s.
> | >>> >
> | >>> > If it was receiving the XML stream and couldn't find a subscriptio
n
> | >>> > 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 ha
ve
> | >>> > 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





[ Post a follow-up to this message ]



    Sponsored Links  




 





   All times are GMT. The time now is 09:22 PM.      Post New Thread    Post A Reply      
  Last Thread   Next Thread Next


Most Popular forums 

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is OFF
 
Medical and Health forum | Computer Games Reviews | Graphics design forum

Back To The Top
Home | Usercp | Faq | Register