I noticed an error message in the console when switching to debug mode:

DEBUG - DeliveryChannelImpl            - Send
ID:172.20.17.237-11647d81984-21:0 in DeliveryChannel{servicemix-http}
DEBUG - SedaFlow                       - Called Flow send
WARN  - jetty                          - /upload/:
javax.activation.UnsupportedDataTypeException: no object DCH for MIME type
application/pdf
DEBUG - SedaQueue                      -
[EMAIL PROTECTED] dequeued
exchange: InOut[


Maybe it has something to do with that message 
WARN  - jetty                          - /upload/:
javax.activation.UnsupportedDataTypeException: no object DCH for MIME type
application/pdf

LG
Lars



lhe77 wrote:
> 
> Freeman,
> 
> first of all thank you for the help. This fixed the exception.
> But another issue occured afterwards. The result is now a stream with this
> content:
> 
> 
> ------=_Part_0_21950399.1195205581181
> Content-Type: text/xml; charset=UTF-8
> Content-Transfer-Encoding: 8bit
> Content-ID: <soap-request>
> 
> <?xml version='1.0' encoding='UTF-8'?><payload />
> ------=_Part_0_21950399.1195205581181
> Content-Type: application/pdf
> Content-Transfer-Encoding: 8bit
> Content-ID: <Part0>
> 
> 
> I expected that I will receive the file now to show it or to save it
> somewhere. 
> What do I have to do for this?
> 
> Thanks in advance
> Lars
> 
> 
> 
> Freeman Fang wrote:
>> 
>> For your HandlerBean.java,
>> change
>> DataHandler dh = new DataHandler(new 
>> StreamDataSource(content.getInputStream()));
>> to
>> DataHandler dh = new DataHandler(new 
>> StreamDataSource(content.getInputStream()), content.getContentType());
>> 
>> Cheers
>> Freeman
>> 
>> lhe77 wrote:
>>> Wow, really strange thing. Maybe it got destroyed when uploading it.
>>>
>>> So this is now another try :)
>>> http://www.nabble.com/file/p13788208/cp-http.tar cp-http.tar 
>>>
>>> Thanks in advance
>>> Lars
>>>
>>>
>>>
>>>
>>> Freeman Fang wrote:
>>>   
>>>> Hi,
>>>> Can't extract the attachment you append here
>>>>
>>>> http://www.nabble.com/file/p13762773/cp-http.tar.gz
>>>>
>>>>
>>>> Freeman
>>>>
>>>> lhe77 wrote:
>>>>     
>>>>> Hi,
>>>>>
>>>>> I try to make a http uploader which processes the uploaded file and
>>>>> sends
>>>>> back the file after processing it. 
>>>>>
>>>>> The http consumer is defined to use In-Out MEP and it works so far
>>>>> that I
>>>>> get the file in my processing bean. Then I fill it just for simplicity
>>>>> again
>>>>> to the out message and send it back to the http component.
>>>>>
>>>>> When doing so, the browser (I use a simple upload form html file)
>>>>> displays
>>>>> the following error message:
>>>>>
>>>>>
>>>>> HTTP ERROR: 500
>>>>>
>>>>> INTERNAL_SERVER_ERROR
>>>>>
>>>>> RequestURI=/upload/
>>>>> Caused by:
>>>>>
>>>>> javax.mail.internet.ParseException
>>>>>   at javax.mail.internet.ContentType.(ContentType.java:83)
>>>>>   at
>>>>> javax.mail.internet.MimeBodyPart.updateHeaders(MimeBodyPart.java:1249)
>>>>>   at
>>>>> javax.mail.internet.MimeBodyPart.updateHeaders(MimeBodyPart.java:1001)
>>>>>   at
>>>>> javax.mail.internet.MimeMultipart.updateHeaders(MimeMultipart.java:333)
>>>>>   at
>>>>> javax.mail.internet.MimeBodyPart.updateHeaders(MimeBodyPart.java:1255)
>>>>>   at
>>>>> javax.mail.internet.MimeMessage.updateHeaders(MimeMessage.java:2012)
>>>>>   at javax.mail.internet.MimeMessage.saveChanges(MimeMessage.java:1980)
>>>>>   at
>>>>> org.apache.servicemix.soap.marshalers.SoapWriter.writeMultipartMessage(SoapWriter.java:166)
>>>>>   at
>>>>> org.apache.servicemix.soap.marshalers.SoapWriter.write(SoapWriter.java:90)
>>>>>   at
>>>>> org.apache.servicemix.http.processors.ConsumerProcessor.processResponse(ConsumerProcessor.java:222)
>>>>>   at
>>>>> org.apache.servicemix.http.processors.ConsumerProcessor.process(ConsumerProcessor.java:203)
>>>>>   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)
>>>>>
>>>>> Powered by Jetty://
>>>>>
>>>>>
>>>>> I attached the whole project to that posting for better testing. The
>>>>> servicemix version is 3.2 release version.
>>>>>
>>>>> Thanks in advance for any help,
>>>>> Lars
>>>>>
>>>>>
>>>>> Here is the ready to compile project for testing:
>>>>> http://www.nabble.com/file/p13762773/cp-http.tar.gz cp-http.tar.gz 
>>>>>   
>>>>>       
>>>>     
>>>
>>>   
>> 
>> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Help-with-http-upload-component-tf4810196s12049.html#a13791430
Sent from the ServiceMix - User mailing list archive at Nabble.com.

Reply via email to