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:[EMAIL PROTECTED]
Sent: 17. juli 2008 16:26
To: [email protected]
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.