It's really strange - SMX should see DefaultHttpConsumerMarshaler class (should and must are programmers trap :)). Try clean "data" directory for you instance and restart container.
Regards, Luke Peter Z wrote: > > > Thanks splatch > > but I have one more problem: > When I defined my extMarshaler I got > > Bean 'extMarshaler'; nested exception is java.lang.NoClassDefFoundError: > org/apache/servicemix/http/endpoints/DefaultHttpConsumerMarshaler > > I have in hotdeploy directory servicemix-http-3.2.2-installer.zip, inside > this there is servicemix-http-3.2.2.jar which include > DefaultHttpConsumerMarshaler > This is printed out to the console during servicemix startup > "Setting running state for Component: servicemix-http to Started" > > Why DefaultHttpConsumerMarshaler class is not visible? > > P. > > > > > > > > > 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-tp19543064p19551923.html Sent from the ServiceMix - User mailing list archive at Nabble.com.
