locked
Configuration required to receive file from http location RRS feed

  • Question

  • Hi,

    I have a scenario, I have to receive/download a file from http location. I guess I need to use Http adapter, but I am not sure.
    Can you guys please suggest me how to proceed with this requirement. Also please give me some reference/sample from which I will learn how to implement that adapter.

    Thanks in advance.

    Thanks, Girish R. Patil.

    Thursday, March 13, 2014 11:25 AM

Answers

  • There's no built-in way in BizTalk to poll an HTTP location.  So, you have some options:

    1. Use the Scheduled Task Adapter from CodePlex which includes an http plugin: http://biztalkscheduledtask.codeplex.com/
    2. Trigger you process externally, by copying a file with a Windows Scheduled Task for example, and use a native BizTalk Adapter.
    Thursday, March 13, 2014 12:27 PM
    Moderator
  • Hi Girish,

    Generally BizTalk's process is initiated by the trigger from the source message. In your case you got the pull a message so you can consider using BizTalk Scheduled Task Adapter's HttpDownload for your requirement.

    In this case, the trigger for the pull/download from HTTP would come for the schedule time in the adapter configuration.


    If this answers your question please mark it accordingly. If this post is helpful, please vote as helpful by clicking the upward arrow mark next to my reply.

    Thursday, March 13, 2014 12:28 PM
  • Hi Girish,

    While configuring the schedule task adapter, in the task tab –

    • Click “Find Task” button.
    • In the “Assembly Qualified Type Name”  window click the Browse button. And browse to the location of your Scheduled Adapter installation folder, for example “C:\Program Files (x86)\Biztalk ScheduledTask Adapter” and chose ScheduledTaskAdapter.TaskComponents.dll.
    • Now you shall see “Assembly Qualified Type Name”  with four options enabled.
    • Select the HTTP Download task

    • You will get the window as below to configure:

    • In the URL text box provide “http://www.girish.com/locationFolder/ xyz.xml”

    Refer this article for more help:http://connectedenterprise.wordpress.com/2011/09/26/the-very-useful-biztalk-scheduled-task-adapter/


    If this answers your question please mark it accordingly. If this post is helpful, please vote as helpful by clicking the upward arrow mark next to my reply.


    Saturday, March 15, 2014 10:31 AM

All replies

  • There's no built-in way in BizTalk to poll an HTTP location.  So, you have some options:

    1. Use the Scheduled Task Adapter from CodePlex which includes an http plugin: http://biztalkscheduledtask.codeplex.com/
    2. Trigger you process externally, by copying a file with a Windows Scheduled Task for example, and use a native BizTalk Adapter.
    Thursday, March 13, 2014 12:27 PM
    Moderator
  • Hi Girish,

    Generally BizTalk's process is initiated by the trigger from the source message. In your case you got the pull a message so you can consider using BizTalk Scheduled Task Adapter's HttpDownload for your requirement.

    In this case, the trigger for the pull/download from HTTP would come for the schedule time in the adapter configuration.


    If this answers your question please mark it accordingly. If this post is helpful, please vote as helpful by clicking the upward arrow mark next to my reply.

    Thursday, March 13, 2014 12:28 PM
  • Hi,

    Thanks Boatseller, M.R. Ashwin Prabhu for your replies.

    As suggested by you, I have installed the Scheduled task adapter. But still not sure how to configure and use it. The point which is troubling me is, how and where to specify the URL (where the file to be picked is placed). Can you please help me in configuring this adapter. 

    Thanks in advance..


    Thanks, Girish R. Patil.

    Saturday, March 15, 2014 8:27 AM
  • For example Scenario is:

    My client places a file on some http location say: http://www.girish.com/locationFolder

    And name of file is "xyz.xml".

    I want to configure Scheduled Task Adapter to pick this file. Please give me your suggestions on this.


    Thanks, Girish R. Patil.

    Saturday, March 15, 2014 8:36 AM
  • Hi Girish,

    While configuring the schedule task adapter, in the task tab –

    • Click “Find Task” button.
    • In the “Assembly Qualified Type Name”  window click the Browse button. And browse to the location of your Scheduled Adapter installation folder, for example “C:\Program Files (x86)\Biztalk ScheduledTask Adapter” and chose ScheduledTaskAdapter.TaskComponents.dll.
    • Now you shall see “Assembly Qualified Type Name”  with four options enabled.
    • Select the HTTP Download task

    • You will get the window as below to configure:

    • In the URL text box provide “http://www.girish.com/locationFolder/ xyz.xml”

    Refer this article for more help:http://connectedenterprise.wordpress.com/2011/09/26/the-very-useful-biztalk-scheduled-task-adapter/


    If this answers your question please mark it accordingly. If this post is helpful, please vote as helpful by clicking the upward arrow mark next to my reply.


    Saturday, March 15, 2014 10:31 AM
  • Hi,

    Thanks M.R. Ashwin Prabhu for your help. I have followed the steps suggested by you.

    After all the configuration when I was testing the application, I am getting below error in application log of Biztalk Server.

    The receive location "ReceiveHTTPFiles" with URL "schedule://Daily/Scheduler" is shutting down. Details:"The remote server returned an error: (401) Unauthorized.".

    If you see URL in the above error, this is not what I have specified in the URL while configuring. Instead it is Sheduled Days(//Daily) and Name (Scheduler).

    Not sure why URL given by me is not showing up in the error? 


    Thanks, Girish R. Patil.

    Tuesday, March 18, 2014 11:35 AM
  • "The receive location "ReceiveHTTPFiles" with URL "schedule://Daily/Scheduler" is shutting down"

    Here's the deal with that.  "URL" in this message should really be "URI".  In this case "schedule://Daily/Scheduler" is not the URL you've configured to poll, rather, it's the URI of the Receive Location itself.

    So, it's not trying to connect to "schedule://Daily/Scheduler" which doesn't exist.

    The 401 - Unauthorized is still a problem.

    Tuesday, March 18, 2014 11:58 AM
    Moderator
  • Hi Girish,

    This error format is standard for Scheduled task adapter. Even if you use XMLStream you would error in this format.

    The actual error detail for you is "The remote server returned an error: (401) Unauthorized."

    If you use fiddler (or any network tracking tools) you would get to see the message-packets been passed across and received across the wire.

    Give relevant credentials in the "User Name" and "Password" text boxes of the HTTP task. Just FYI, which I hope you have already done is to add the “Biztalk.Adapter.ScheduledTaskProperties.dll” as a resource to your application in BizTalk admin console and select the Gac’ing options.


    If this answers your question please mark it accordingly. If this post is helpful, please vote as helpful by clicking the upward arrow mark next to my reply.

    Tuesday, March 18, 2014 12:06 PM