Feed Icon  

Contact

  • Bryant Likes
  • Send mail to the author(s) E-mail
  • twitter
  • View Bryant Likes's profile on LinkedIn
  • del.icio.us
Get Microsoft Silverlight
by clicking "Install Microsoft Silverlight" you accept the
Silverlight license agreement

Hosting By

Hot Topics

Tags

Open Source Projects

Archives

Ads

Hello BizTalk File Transfer

Posted in BizTalk at Tuesday, March 23, 2004 11:05 AM Pacific Standard Time

This is a very basic example that will walk you through the steps to set up a simple file transfer using BizTalk Server 2004. This example assumes that you already have BizTalk setup correctly (unlike my first setup snafu). I'm running on Windows Server 2003 and running BizTalk Server 2004 Developer Edition.

I'm trying to start to follow the xp programming techniques, so when I started a new BizTalk project I decided to try the simplest thing first and just do a file transfer. Below are the steps I came up with for transferring a file just by using the BizTalk Explorer pane in Visual Studio.

1) In the BizTalk Server Explorer, expand your server by clicking the plus next to it.

2) Right click “Receive Ports” and select “Add Receive Port...” from the context menu as shown below.

3) In the Create Receive Port dialog, leave “One-Way Port” selected and click OK.

4) In the One-Way Receive Port Properties dialog, change the name to “ReceivePort_Static” as shown below.

5) Click OK.

6) Back in the BizTalk Explorer panel, under the ReceivePort_Static port, right click “Receive Locations” and select “Add Receive Location...” from the context menu as shown below.

7) In the Receive Location Properties dialog perform the following actions:

a) Change the Name: to “ReceiveLocation_Static“.

b) Change the Transport Type to “FILE”.

c) Change Receive Handler to “BizTalkServerApplication“. Note: if this option isn't available then your server might not be configured correctly. Read the documentation section on Configuring your server.

d) Change the Receive Pipeline to “Microsoft.BizTalk.DefaultPipelines.PassThruReceive”.

e) Finally, click in the Address (URI) field and then click the “...” button. For the receive folder you will need to put the path to a folder you want BizTalk to pickup the files from. I created a folder specifically for this at c:\tests\StaticTest\Receive. I would suggest you do the same. The file mask for this example will be "*.txt". This setup is shown below.

f) Click Ok on the File Transport Properties dialog. Your Recieve Location Properties Dialog should look something like the following.

g) Click Ok on the Receive Location Properties dialog.

8) Back in BizTalk Explorer, right click “Send Ports” and select “Add Send Port...” from the context menu as shown below.

9) In the Create New Send Port dialog, leave “Static One-Way Port” selected and click OK.

10) In the Static One-Way Send Port Properties dialog, perform the following actions:

a) Change the Name: to "SendPort_Static".

b) Change the Transport Type to "FILE".

c) Click in the Address (URI) field and then click the "..." button. For the destination folder you will need to put in the path to a folder you want BizTalk to deliver the files to. I created a folder specifically for this at c:\tests\StaticTest\Send. The file name for this example is %MessageID%.txt. This is shown below.

d) Click Ok on the File Transport Properties dialog. The Configure Static One-Way Send Port Properties dialog should look like the following.

e) Next click on the "Send" folder in the tree view control on the dialog. Change the Send Pipeline to "Microsoft.BizTalk.DefaultPipelines.PassThruTransmit" as shown below.

f) Next Click on the "Filters & Maps" folder in the same tree view control and then click on "Filters". Click where it says "Click here to add a new row!" In the Property dropdown select the "BTS.ReceivePortName" and in the Value field put "ReceivePort_Static" (without the quotes). This is shown below.

g) Click Ok on the Configure Static One-Way Send Port Properties dialog.

11) Back in the BizTalk Explorer, right click the ReceiveLocation_Static and select "Enable" from the context menu.

12) Next right click the "SendPort_Static" and select "Start" from the context menu.

At this point, assuming everything was done correctly, you should be ready to experience some of the BizTalk magic. Drop any file with the txt extension into the folder you specified on the receive location and it will quickly disappear. If you next look in the folder you specified for the send port and there should be a new text file there which is a copy of the file you dropped in the receive location. Magic!

Hopefully you will find this very simple example to be useful.

Sunday, March 28, 2004 6:29:00 PM (Pacific Standard Time, UTC-08:00)
Thanks for the article! It really helped alot me in my project...
Younes Ouhbi
Tuesday, April 27, 2004 5:35:00 AM (Pacific Daylight Time, UTC-07:00)
my first biztalk experience. thanks a bunch!
Monday, May 03, 2004 4:26:00 AM (Pacific Daylight Time, UTC-07:00)
Where the heck were you about 5 hours of frustration ago!!!!
<br>
<br>THANKS A BUNCH MAN.
lyndon
Wednesday, May 12, 2004 1:07:00 AM (Pacific Daylight Time, UTC-07:00)
Is it possible to do it by creating a Orchestation
Sunil
Wednesday, May 12, 2004 3:34:00 AM (Pacific Daylight Time, UTC-07:00)
I know it is possible to do this with XML files via Orchestration, but it is a little more complex to do it with plain text files.
Saturday, July 03, 2004 5:03:00 PM (Pacific Daylight Time, UTC-07:00)
to Bryant lides:
<br> So how to do it using Orchestration in .NET,please demonstrat setp-by-setp,I`m just touch this technology!thanks!
zhouJian(come from china)
Monday, July 26, 2004 12:14:00 AM (Pacific Daylight Time, UTC-07:00)
I see that you mentioned that it is possible to do this in an Orchestration with plain text files. How is this done? I have tried this however I get an error when building the Orchestrarion - 'System.IO.File' must be XML serializable to be a message part type. Note that both my Inbound and Outbount message types are type 'System.IO.File' as are both my Inbound and Outbound Port Operation Request Message types. It almost seems as if Biztalk needs me to use a pipiline to translate the text file to xml, transform the xml to the exact same xml and then use a pipline to translate the xml back to the text file!!! It is as if anything that enters a Biztalk Orchestration must be xml or it must enter the Orchestration via a Port pipeline to make it xml. Any suggestions?
<br>
<br>
Tuesday, August 10, 2004 11:32:00 PM (Pacific Daylight Time, UTC-07:00)
hi,
<br>
<br>this is fine, i am trying to do file transfer from remote system to the local system. how to do that?. can you explain in the same way as you did before..
<br>
<br>thanks
<br>mani
manikandan
Monday, August 23, 2004 7:58:00 PM (Pacific Daylight Time, UTC-07:00)
hi, thanks a lot for this example, now, is it possible to add acquittment whitin an orchestration when the file are received ?
<br>you can contact me : olivier@sekence.net
<br>
<br>have a nice day.
olivier
Tuesday, September 28, 2004 11:43:00 PM (Pacific Daylight Time, UTC-07:00)
i am able to send the text files, it is picking up properly but i am not able to get the text file in the receive location.
Friday, November 12, 2004 6:05:00 PM (Pacific Standard Time, UTC-08:00)
Simply superb article I can say for starters.
<br>
<br>Byrant your important point "I created a folder specifically for this at c:\tests\StaticTest\Send." is really a good note to understand that two ports can not have the same configured locations , which was the issue in my project from last 3 days.
<br>
<br>Thanks a ton Byrant. Expecting more of this types.
SANJAR NIYAZI
Wednesday, December 15, 2004 9:12:00 PM (Pacific Standard Time, UTC-08:00)
Hi, i've gone through the tutorial word by word but the files won't transfer to Send Folder! i tried many time but couldn't get it to work. it's kinda urgent, any idea where i may be going wrong. i've restarted the BizTalk Service many time but didn't help... any help would be very much appreciated..
<br>
<br>thank you and keep up the good work..
<br>
<br>Kamal
Kamal
Wednesday, December 15, 2004 10:51:00 PM (Pacific Standard Time, UTC-08:00)
fixed it, security issue with the folders!
<br>
<br>by the way, do you need to specify the filter? i tried to not have the filter but it won't transfer the file, it keeps saying:
<br>
<br>The "FILE" adapter is suspending a message coming from Source URL:"C:\TestApp\BTS_Test\In\*.xml". Details:"Could not find a matching subscription for the message. ".
<br>
<br>Any idea???
<br>
<br>Thanks
Kamal
Wednesday, December 29, 2004 8:42:00 PM (Pacific Standard Time, UTC-08:00)
The Address (URI) you are specifying is from the same machine.
<br>
<br>But I hae the BizTalks server in a seperate machine and the Data comes from another machine. How to specify BizTalk to take the data from that machine ? Is there any option for this ?
<br>
<br>
<br>Thanks
<br>MankayarKarasi.C
MankayarKarasi
Tuesday, January 25, 2005 12:37:00 AM (Pacific Standard Time, UTC-08:00)
Hi Bryant,
<br>I have been messing around with BizTalk in a VM session for 2 weeks, I created mutilple samples using The File and other adapter. When I tried to replicate what I have done on a dev server it did not work. I tried your simple demo, it also failes to pick the file.
<br>
<br>I have sql, sharepoint, BizTalk on a dev server and I am on client machine connecting to it. I created a share with admin rights to the in/out folders. I must be missing a configuration, but no idea what it is.
<br>
<br>Thanks.
Floyd
Sunday, January 30, 2005 9:03:00 PM (Pacific Standard Time, UTC-08:00)
by the way, do you need to specify the filter? i tried to not have the filter but it won't transfer the file, it keeps saying:
<br>
<br>The "FILE" adapter is suspending a message coming from Source URL:"C:\TestApp\BTS_Test\In\*.xml". Details:"Could not find a matching subscription for the message. ".
<br>
<br>Any idea???
<br>
<br>Thanks
Wednesday, March 02, 2005 12:34:00 AM (Pacific Standard Time, UTC-08:00)
Good example.
<br>
<br>Here are problems I had, as a biztalk novice. Both rookie type mistakes, but they took me long enough to figure out I thought I would document them in case others encountered the same.
<br>
<br>
<br>------------------------------
<br>Problem 1:
<br>------------------------------
<br>Symptom:
<br>File would not get picked up, receive location kept shutting down.
<br>
<br>Problem:
<br>The user I setup to run Biztalk did not have the rights on my machine to delete the file.
<br>
<br>Research Steps:
<br>I checked the event log. The following error was the most useful:
<br>"File transport does not have read/write privileges for receive location 'c:\tests\StaticTest\Receive'. ".
<br>
<br>------------------------------
<br>Problem 2:
<br>------------------------------
<br>Symptom:
<br>File would get picked up, but would not appear in the send port location
<br>
<br>Problem:
<br>I had chosen the wrong filter. I had chosen "MessageTracking.PortName" instead of "BTS.PortName"
<br>
<br>Research Steps:
<br>I checked the event log and found the following message most helpful:
<br>"The Messaging engine failed to process a message submitted by adapter:FILE Source URL:c:\tests\StaticTest\Receive\*.txt. 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"
<br>
<br>------------------------------------------
<br>In summary
<br>------------------------------------------
<br>Here is what I learned...
<br>1) Look at the event log to find errors. Not knowing to look there wasted several hours of my life.
<br>2) Read the examples carefully :)
<br>
<br>
<br>
Shannon Gillar
Sunday, May 08, 2005 7:47:00 PM (Pacific Daylight Time, UTC-07:00)
Nice article.
<br>But I would like to know, how to make the deployment easy so that I do not need to reconfigure all the receive ports when I move from say test server to production server?
<br>
Sameer Borikar
Wednesday, August 24, 2005 4:52:00 AM (Pacific Daylight Time, UTC-07:00)
Hi Sameer,
<br>
<br>BizTalk server provides you with more than couple of options to deploy your applications to Production. These options can be chosen based on requirements.
<br>
<br>I guess, Configuration of the ports with binding file will be an easier option.
<br>
<br>Thanks
Niyazi Sanjar
Wednesday, October 01, 2008 2:39:23 AM (Pacific Daylight Time, UTC-07:00)
Man, these instructions continue to work with Biztalk 2006. Thanks so much!!!
BiztalkMan
Tuesday, November 04, 2008 11:14:23 PM (Pacific Standard Time, UTC-08:00)
As a matter of fact, it was, indeed very helpful the previous article, but I need the same function with BIZTALK, I mean I need a File Transfer BUT with out using orchestration, someone told me is really easy, but I just don't know how to do it... please can you help me? or anybody?
Tx a lot!!!!
Rocio
Comments are closed.