I didn't check, at wiki is draft of documentation for new endpoints:
http://cwiki.apache.org/confluence/display/SM/servicemix-http+new+endpoints

Releated issue:
https://issues.apache.org/activemq/browse/SM-1516

Regards,
Luke


splatch wrote:
> 
> From version 3.2 (i guess) http have marshaler property - this isn't
> documented yet at http://servicemix.apache.org/servicemix-http.html page,
> but you can extend default implementations to put you custom header to
> message property.
> 
> Try code (this only example, i didn't test it):
> <http:consumer ... marshaler="#myMarshaler" />
> 
> <bean id="myMarshaler" class="com.company.MyMarshaler">
>     <property name="headers">
>           <list>...</list>
>      </property>
> </bean>
> 
> class com.company.MyMarshaler extends DefaultHttpConsumerMarshaler {
>     private List<String> headers;
>     @Override
>     public MessageExchange createExchange(HttpServletRequest request,
> ComponentContext context) throws Exception {
>         MessageExchange exc = super.createExchange(request, context);
>         NormalizedMessage in = exc.getMessage("in");
>         for (String header : headers) {
>             String value = request.getHeader(header);
>             if (value != null) {
>                 in.setProperty(header, request.getHeader(header));
>             }
>         }
>     }
> }
> 
> 
> Peter Z wrote:
>> 
>> Hi
>> 
>> does http endpoint component (in consumer role) put Http Headers to
>> NormalizedMessage's Properties?
>> It seems that doesn't... But Why?
>> Should I use another component for read http headers inside "components
>> chain"?
>> 
>> Peter.
>> 
>> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/http-endpoint---headers-to-properties-tp19543064p19547153.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.

Reply via email to