Hi all,
I have another problem with attachments in CXF.
I use a txt file as attachment in CXF (file.txt), its works, while if I use
a pdf file as attachement (file.pdf), I cannot to open file after I received
and saved file from CXF's application. 
Is it a encoding problem?

This is my error:

INFO: Interceptor has thrown exception, unwinding now
java.lang.RuntimeException: org.mortbay.jetty.EofException
        at
org.apache.cxf.attachment.LazyAttachmentCollection$1.hasNext(LazyAttachmentCollection.java:81)
        at
org.apache.cxf.binding.soap.saaj.SAAJInInterceptor.handleMessage(SAAJInInterceptor.java:115)
        at
org.apache.cxf.binding.soap.saaj.SAAJInInterceptor.handleMessage(SAAJInInterceptor.java:68)
        at
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:236)
        at
org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:89)
        at
org.apache.cxf.transport.http_jetty.JettyHTTPDestination.serviceRequest(JettyHTTPDestination.java:302)
        at
org.apache.cxf.transport.http_jetty.JettyHTTPDestination.doService(JettyHTTPDestination.java:265)
        at
org.apache.cxf.transport.http_jetty.JettyHTTPHandler.handle(JettyHTTPHandler.java:70)
        at 
org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
        at 
org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:726)
        at
org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:206)
        at org.mortbay.jetty.handler.HandlerList.handle(HandlerList.java:49)
        at 
org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
        at org.mortbay.jetty.Server.handle(Server.java:320)
        at 
org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:505)
        at
org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:842)
        at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:648)
        at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211)
        at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:380)
        at
org.mortbay.jetty.bio.SocketConnector$Connection.run(SocketConnector.java:228)
        at
org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:450)
Caused by: org.mortbay.jetty.EofException
        at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:303)
        at 
org.mortbay.jetty.HttpParser$Input.blockForContent(HttpParser.java:1021)
        at org.mortbay.jetty.HttpParser$Input.read(HttpParser.java:999)
        at java.io.FilterInputStream.read(FilterInputStream.java:134)
        at java.io.PushbackInputStream.read(PushbackInputStream.java:182)
        at
org.apache.cxf.attachment.MimeBodyPartInputStream.read(MimeBodyPartInputStream.java:74)
        at java.io.InputStream.read(InputStream.java:112)
        at
org.apache.cxf.attachment.DelegatingInputStream.read(DelegatingInputStream.java:77)
        at org.apache.cxf.helpers.IOUtils.copy(IOUtils.java:112)
        at org.apache.cxf.helpers.IOUtils.copy(IOUtils.java:75)
        at
org.apache.cxf.attachment.AttachmentDataSource.<init>(AttachmentDataSource.java:39)
        at
org.apache.cxf.attachment.AttachmentUtil.createAttachment(AttachmentUtil.java:168)
        at
org.apache.cxf.attachment.AttachmentDeserializer.createAttachment(AttachmentDeserializer.java:283)
        at
org.apache.cxf.attachment.AttachmentDeserializer.readNext(AttachmentDeserializer.java:194)
        at
org.apache.cxf.attachment.LazyAttachmentCollection$1.hasNext(LazyAttachmentCollection.java:73)
        ... 20 more

Thank you for your time

-- 
View this message in context: 
http://www.nabble.com/CXF-and-type%27s-Attachment-tp24678236p24678236.html
Sent from the cxf-user mailing list archive at Nabble.com.

Reply via email to