Gert,
this was exactly what I was looking for.
I managed it now to implement such a marshaler.
But still there is a problem.
A download popup now apears, but if I save the file then, the content is
only some Java Exception.
The following exception occurs when trying to upload a pdf document.
<?xml version='1.0'
encoding='UTF-8'?><error><![CDATA[javax.activation.UnsupportedDataTypeException:
no object DCH for MIME type application/binary
at javax.activation.DataHandler.getInputStream(DataHandler.java:247)
at
javax.activation.DataHandlerDataSource.getInputStream(DataHandler.java:702)
at javax.activation.DataHandler.getInputStream(DataHandler.java:237)
at net.compart.jbi.HTTPMarshaler.sendOut(HTTPMarshaler.java:209)
at
org.apache.servicemix.http.endpoints.HttpConsumerEndpoint.sendOut(HttpConsumerEndpoint.java:392)
at
org.apache.servicemix.http.endpoints.HttpConsumerEndpoint.process(HttpConsumerEndpoint.java:273)
at
org.apache.servicemix.http.HttpBridgeServlet.doPost(HttpBridgeServlet.java:71)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
at
org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487)
at
org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:362)
at
org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:712)
at
org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:211)
at
org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
at
org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:139)
at org.mortbay.jetty.Server.handle(Server.java:313)
at
org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:506)
at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:375)
at
org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:396)
at
org.mortbay.jetty.nio.SelectChannelConnector$RetryContinuation.run(SelectChannelConnector.java:511)
at
org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:442)
]]></error>
Now I really have no idea whats again going wrong there. Maybe you have an
idea?
Find the updated version here:
http://www.nabble.com/file/p13897483/cp-http.tar cp-http.tar
Lars
Gert Vanthienen wrote:
>
> Lars,
>
>
> If you want the browser to receive the attachment file content, you
> probably need to build a custom HttpConsumerMarshaler (a new feature of
> ServiceMix 3.2). I'm afraid that particular is currently undocumented
> on the website, but a similar feature (the new JMS consumer endpoint and
> the use of a Marshaler there) is documented on
> http://servicemix.apache.org/servicemix-jms-new-endpoints.html
>
> The HttpConsumerMarshaler basically allows you to create your own
> MessageExchange with the HTTP request you receive and to build a custom
> HTTP response based on the MessageExchange that is returned to the
> <http:consumer/> endpoint. You need to build a class that implements
> this interface and configure it on the <http:consumer/> enpoint.
> There's no additional documentation/examples available, so just get back
> to us if you run into problems "en cours de route".
>
>
> Gert
>
--
View this message in context:
http://www.nabble.com/Help-with-http-upload-component-tf4810196s12049.html#a13897483
Sent from the ServiceMix - User mailing list archive at Nabble.com.