Converting BTS2002 Preprocessor to BTS2004 Pipeline Component
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 General > Converting BTS2002 Preprocessor to BTS2004 Pipeline Component




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

    Converting BTS2002 Preprocessor to BTS2004 Pipeline Component  
Jeff Lynch


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


 
06-28-04 01:46 PM

In BTS2002 I wrote a simple custom preprocessor for a file receive function
(in C#) that copied the inbound message XML file to a "history" folder for
safekeeping. I'd like to convert this preprocessor to a custom pipeline
component to do the same in BTS2004 but I'm confused about the differences
between the BTS2002 "IBTSCustomProcess.Execute" method and the BTS2004
"IComponent.Execute" method as shown in the "FixMsg.cs" sample in the
BTS2004 SDK.

In my BTS2002 preprocessor I used the following code to copy the file to the
"history" directory.

FileInfo myFile = new FileInfo((string)vDataIn);
myFile.CopyTo(myFile.DirectoryName + @"\history\" + myFile.Name, true);

Can the same thing be done in the custom pipeline component and if so, how?

J. Lynch
E-Commerce Manager
Gulf Coast Seal







[ Post a follow-up to this message ]



    RE: Converting BTS2002 Preprocessor to BTS2004 Pipeline Component  
Gilles [MSFT]


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


 
06-28-04 01:46 PM

Hello,

>In BTS2002 I wrote a simple custom preprocessor for a file receive function
>(in C#) that copied the inbound message XML file to a "history" folder for
>safekeeping. I'd like to convert this preprocessor to a custom pipeline
>component to do the same in BTS2004 but I'm confused about the differences
>between the BTS2002 "IBTSCustomProcess.Execute" method and the BTS2004
>"IComponent.Execute" method as shown in the "FixMsg.cs" sample in the
>BTS2004 SDK.
>
>In my BTS2002 preprocessor I used the following code to copy the file to th
e
>"history" directory.
>
>FileInfo myFile = new FileInfo((string)vDataIn);
>myFile.CopyTo(myFile.DirectoryName + @"\history\" + myFile.Name, true);
>
>Can the same thing be done in the custom pipeline component and if so, how?

In BizTalk 2004, the message will be presented to you as a stream. Moreover,
 there
can be more than one part in the message (envelope, body ...) so make sure y
ou save the
one that is appropriate for your application.

You might have to deal with file system premissions issues (i.e. the
user under which the pipeline runs should have read/write access to the loca
tion) but this
is a minor issue.

Make sure you forward the message unchanged to BizTalk after you saved it an
d you should not have any problem.
One detail, the stream you receive should be rewinded before you hand it off
 to BizTalk or your pipeline will fail.

If you have specific problems, feel free to post here.

Thanks.
-Gilles.








[ Post a follow-up to this message ]



    Sponsored Links  




 





   All times are GMT. The time now is 08:59 AM.      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