HI,

I am sending request to servlet which processing data like

    protected void doPost(HttpServletRequest req, HttpServletResponse resp)
throws ServletException, IOException {
                
                        // Decode incoming SOAP message
                        InputStream in = req.getInputStream();

I am using following to post data

    SOAPMessage soapMessage = messageFactory.createMessage(); 
    ...
   OutputStream out = httpUrlConnection.getOutputStream();
   soapMessage.writeTo(out);

Same i want to achieve with Camel like

from("timer:foo?period=5s")
        .process(       new Processor() {
                                       
                                        @Override
                                        public void process(Exchange
exchange) throws Exception {
                                        
                                                ...
                                              
exchange.getOut().setHeader(Exchange.HTTP_METHOD,"POST");
               
                                               exchange.getOut().setBody(
soapMessage );
                                               
                                        }
                                })
        .to("jetty:http://localhost:8180/app/sendStream";);

I verify Camel-http and camel-jetty, but couldn't find option to post
stream. 

Regards






--
View this message in context: 
http://camel.465427.n5.nabble.com/HTTP-Post-with-OutputStream-tp5772130.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to