camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Claus Ibsen" ...@silverbullet.dk>
Subject RE: How to define a HTTP Post destination in a route in spring
Date Thu, 17 Jul 2008 14:32:37 GMT
Hi

Ah looks like the header expects a sub element. You can either use this trick ( a bit ugly)

    <setHeader headerName="theHeader" value="a value">
      <expression/>
    </setHeader>

Or use this one
   <setHeader headerName="oldBodyValue">
        <simple>POST</simple>
      </setHeader>



Med venlig hilsen
 
Claus Ibsen
......................................
Silverbullet
Skovsgårdsvænget 21
8362 Hørning
Tlf. +45 2962 7576
Web: www.silverbullet.dk

-----Original Message-----
From: buchnerm [mailto:markus.buchner@gmx.at] 
Sent: 17. juli 2008 16:26
To: camel-user@activemq.apache.org
Subject: Re: How to define a HTTP Post destination in a route in spring


Thanks for the help but I still have issues:

my code now:

		<route>
			<from uri="direct:in" />
			
			<!-- write to a file  
			<to uri="file:c:\\tmp\\recMessage.txt?autoCreate=false" /> 
			-->
			
			<!-- write to http --> 
			<setHeader headerName="http.requestMethod" value="POST" /> 
			<to uri="http:localhost:8888/test.jsp" /> 
		</route>

with this xsd:
http://activemq.apache.org/camel/schema/spring/camel-spring-1.4-SNAPSHOT.xsd


Then I get this failure:

cvc-complex-type.2.4.b: The content of element 'setHeader' is not complete.
One of '{"http://
 activemq.apache.org/camel/schema/spring":description,
"http://activemq.apache.org/camel/
 schema/spring":el, "http://activemq.apache.org/camel/schema/spring":groovy,
"http://
 activemq.apache.org/camel/schema/spring":header,
"http://activemq.apache.org/camel/schema/
 spring":jxpath,
"http://activemq.apache.org/camel/schema/spring":javaScript, "http://
 activemq.apache.org/camel/schema/spring":expression,
"http://activemq.apache.org/camel/
 schema/spring":methodCall,
"http://activemq.apache.org/camel/schema/spring":ognl, "http://
 activemq.apache.org/camel/schema/spring":php,
"http://activemq.apache.org/camel/schema/
 spring":python, "http://activemq.apache.org/camel/schema/spring":ruby,
"http://
 activemq.apache.org/camel/schema/spring":simple,
"http://activemq.apache.org/camel/schema/
 spring":sql, "http://activemq.apache.org/camel/schema/spring":xpath,
"http://
 activemq.apache.org/camel/schema/spring":xquery}' is expected.
-- 
View this message in context: http://www.nabble.com/How-to-define-a-HTTP-Post-destination-in-a-route-in-spring-tp18506233s22882p18509696.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Mime
View raw message