I'm afraid you have to do it yourself with a customer processor or bean.

On 1/7/11 8:59 AM, Kazi, Iftekhar wrote:
Any help on how to do that using Spring xml or pointers. The help would be 
appreciated. Thanks

-----Original Message-----
From: Willem Jiang [mailto:[email protected]]
Sent: Thursday, January 06, 2011 7:54 PM
To: [email protected]
Subject: Re: Routing to a Servlet

Woo, in this case you need build up form post request before sending it to 
servlet.

On 1/7/11 8:39 AM, Kazi, Iftekhar wrote:
The Servlet Exists and when accessed comes up with an html form with a submit 
button. However, using the route below lends an error.

<route>
<from uri="direct:start" />
<to uri="xslt:sometransform.xsl"/>
<setHeader headerName="CamelHttpMethod">
        <constant>POST</constant>
</setHeader>
<to uri="http://tlsomnnstst01:8080/servletsample"; />

<to uri="http://localhost:8080/myApp/ServletSample"; />

-----Original Message-----
From: Willem Jiang [mailto:[email protected]]
Sent: Thursday, January 06, 2011 7:32 PM
To: [email protected]
Subject: Re: Routing to a Servlet

On 1/7/11 8:23 AM, Kazi, Iftekhar wrote:
Is it possible to post a payload to a existing Servlet on another server using 
Camel ?

Eg.

<route>
<from uri="direct:start" />
<to uri="xslt:sometransform.xsl"/>
<setHeader headerName="CamelHttpMethod">
                                <constant>POST</constant>
                        </setHeader>
        <to uri="http://tlsomnnstst01:8080/servletsample"; />

<to uri="http://localhost:8080/myApp/ServletSample"; />

Where http://localhost:8080/myApp/ServletSample is an existing
Servlet ? Thanks




Absolutely yes.
camel-http component can send the request to the existing servlet.
Please make sure the servlet can be accessed locally.



--
Willem
----------------------------------
FuseSource
Web: http://www.fusesource.com
Blog:    http://willemjiang.blogspot.com (English)
           http://jnn.javaeye.com (Chinese)
Twitter: willemjiang




--
Willem
----------------------------------
FuseSource
Web: http://www.fusesource.com
Blog:    http://willemjiang.blogspot.com (English)
         http://jnn.javaeye.com (Chinese)
Twitter: willemjiang

Reply via email to