udot wrote:
> 
> Hi, there.
> I'm new to ServiceMix. I've been, unsuccessfully, researching docs and
> forum trying to find the way to send requests and responses through HTTP
> in plain/arbitrary text.
> How can I achieve this?
> 
> Many thanks in advance.
> 
Hi,

You can use the 
https://cwiki.apache.org/SM/servicemix-http-new-endpoints.html new http
endpoints  which use jetty.

You will have to create a custom marshaler (see the section using a
marshaler).

Send requests and read responses
In this case your marshaler can extend the DefaultHttpProviderMarshaler and
override the methods
createRequest and handleResponse according to your likes. These methods use
the SmxHttpExchange which give you access to the content of both request and
response. So you can literaly do whatever you want.
Receive requests and send responses
Like the previous case only that you now can extend
DefaultHttpConsumerMarshaler and overide methods createExchange,
sendAccepted, sendError, sendFault. These methods use the HttpServletRequest
and HttpServletResponse so once again you can do whatever you want with
them.

Hope that helps.







-----
Ioannis Canellos
http://iocanel.blogspot.com/ http://iocanel.blogspot.com/ 
-- 
View this message in context: 
http://old.nabble.com/Arbitrary-plain-text-through-HTTP-tp28598523p28599343.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.

Reply via email to