Yeah, I noticed that the class adds headers before I sent the email out.  I am 
using release 1.0, which has the header logic in it.  I am adding the property 
via an XSLT router.  Here's a snippet:

<jbi:invoke service="bwnet:dest">
        <jbi:setOutProperty name="MyHeader" select="string(//@router-id)" />
        <xsl:copy-of select="."/>
</jbi:invoke>

If I invoke the "Script" service, as in the online example, it does output my 
property as a member of the property collection.

Does anyone have a working example that adds an HTTP header (preferably from an 
XSLT router)?




-----Original Message-----
From: James Strachan [mailto:[EMAIL PROTECTED] 
Sent: Friday, August 26, 2005 11:21 AM
To: [email protected]
Subject: Re: [servicemix-user] Adding HTTP Headers

On 25 Aug 2005, at 23:48, Schweter, Ryan wrote:
> Anyone have experience adding HTTP headers to an HTTP client  
> request?  I'm under the impression that the properties on the  
> message are added as headers to the POST request, but they aren't  
> showing up.

This is the current HttpClientMarshaler which takes properties from  
the NormalizedMessage and adds them as HTTP headers...

http://cvs.servicemix.codehaus.org/servicemix/base/src/main/java/org/ 
servicemix/components/http/HttpClientMarshaler.java?rev=HEAD&view=auto

one thing to note is there's a pluggable filter strategy method,  
shouldIncludeHeader() which you can overload to so whatever you like.  
Right now it allows any String headers through. Maybe it should just  
turn every value into a String?

>
>
> _____________________________________________________
> |\| R Y A N  S C H W E T E R                      |\|
> |/|¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯                |/|
> |\| developer                                      \|
> |/| IT Application Delivery
> |\| .: 512.742.7875
> |/| .: [EMAIL PROTECTED]
> |\|
> ¯¯¯
>
>
>
>


James
-------
http://radio.weblogs.com/0112098/


Reply via email to