I have a TCP monitor on, now I disable TCP monito and the case of pdf file works, while for case of gif file I haven't a problem below, but cannot to open gif file.
Kid_79 wrote: > > 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. > Then, if I use a jpg file, its works, while if I use a gif file , its not > works. If I rename extension of jpg file in to gif file its works. > > Is it a encoding problem? > > This is my error: > 27-Lug-2009 12.38.01 java.lang.Throwable <init> > 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 > 27-Lug-2009 12.38.01 java.lang.Throwable <init> > INFO: Interceptor has thrown exception, unwinding now > org.apache.cxf.binding.soap.SoapFault: Error writing to XMLStreamWriter. > at > org.apache.cxf.binding.soap.interceptor.SoapOutInterceptor$SoapOutEndingInterceptor.handleMessage(SoapOutInterceptor.java:274) > at > org.apache.cxf.binding.soap.interceptor.SoapOutInterceptor$SoapOutEndingInterceptor.handleMessage(SoapOutInterceptor.java:256) > at > org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:236) > at > org.apache.cxf.interceptor.AbstractFaultChainInitiatorObserver.onMessage(AbstractFaultChainInitiatorObserver.java:96) > at > org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:284) > 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: com.ctc.wstx.exc.WstxIOException: null > at > com.ctc.wstx.sw.BaseStreamWriter.finishDocument(BaseStreamWriter.java:1692) > at > com.ctc.wstx.sw.BaseStreamWriter.writeEndDocument(BaseStreamWriter.java:585) > at > org.apache.cxf.binding.soap.interceptor.SoapOutInterceptor$SoapOutEndingInterceptor.handleMessage(SoapOutInterceptor.java:269) > ... 21 more > Caused by: org.mortbay.jetty.EofException > at > org.mortbay.jetty.AbstractGenerator$Output.write(AbstractGenerator.java:629) > at > org.mortbay.jetty.AbstractGenerator$Output.write(AbstractGenerator.java:577) > at > org.apache.cxf.io.AbstractWrappedOutputStream.write(AbstractWrappedOutputStream.java:46) > at com.ctc.wstx.io.UTF8Writer.flush(UTF8Writer.java:96) > at com.ctc.wstx.sw.BufferingXmlWriter.flush(BufferingXmlWriter.java:214) > at com.ctc.wstx.sw.BufferingXmlWriter.close(BufferingXmlWriter.java:194) > at > com.ctc.wstx.sw.BaseStreamWriter.finishDocument(BaseStreamWriter.java:1690) > ... 23 more > > Thank you for your time > > -- View this message in context: http://www.nabble.com/CXF-and-type%27s-Attachment-tp24678236p24678841.html Sent from the cxf-user mailing list archive at Nabble.com.
