Results 1 to 2 of 2

Thread: How to authenticate and download a resouce from a website using http:inbound-channel

  1. #1

    Default How to authenticate and download a resouce from a website using http:inbound-channel

    Hi everyone ,


    Can someone help me in this my requirement is below

    1)Authenticate to a website(Foe example www.test.com/login)
    2)Download the resource from the website after authenticating(http://www.test.com/login/Home/Docum...D=2131 037941)

    A sample configuration/code will be really helpfull

  2. #2
    Join Date
    Mar 2010
    Location
    Gtr Philadelphia, PA
    Posts
    2,036

    Default

    If the web server uses cookies (e.g. jsessionid), there is a new feature on the http outbound gateway in 2.1 (Release Candidate 1 was released last week). Update your POMs to 2.1.0.RC1. GA will be out soon.

    If you set 'transfer-cookies="true"' on <int-http-outbound-gateway/> a set-cookie header on the first response becomes a cookie header in the reply message and is available on subsequent message sends to other gateways.

    A typical flow might be...

    ...->logonGateway->transformer(set up next request)->requestGateway->...

    Here's the doc from the reference manual...

    Cookies

    Basic cookie support is provided by the transfer-cookies attribute on the outbound gateway. When set to true (default is false), a Set-Cookie header received from the server in a response will be converted to Cookie in the reply message. This header will then be used on subsequent sends. This enables simple stateful interactions, such as...

    ...->logonGateway->...->doWorkGateway->...->logoffGateway->...

    If transfer-cookies is false, any Set-Cookie header received will remain as Set-Cookie in the reply message, and will be dropped on subsequent sends.
    Gary P. Russell
    Spring Integration Team
    SpringSource, a division of VMware

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •