Hi Espen, In another thread I related that I have working Axis code that includes the service/client as used for returning DIME attachments from an Axis web service. This was generating a "substantial-in-size" PDF document that was being returned to the client. If you would like me to send it to you, let me know.
Tami -----Original Message----- From: Espen Westgaard [mailto:[EMAIL PROTECTED] Sent: Wednesday, September 29, 2004 4:03 AM To: [EMAIL PROTECTED] Subject: WS Attachment (DIME) error when receiving large attachments (The device is not ready) Hi, I've created a web service that has been running for some time now (using Axis 1.2beta), accepting attachments using both MIME and DIME as attachment types. However, I've encountered a problem with large attachments (larger than 20 KB). I can parse the SOAP body part of the message just fine. The error occurs when I try to iterate through the attached DIME parts: org.apache.axis.attachments.Attachments attachments = org.apache.axis.MessageContext.getCurrentContext().getAttachmentsImpl(); The exception is thrown on the following line: for ( Iterator it = attachments.getAttachments().iterator(); it.hasNext(); ) {...} Exception.getMessage(): ; nested exception is: <LF><TAB>java.io.IOException: The device is not ready Exception stack trace: AxisFault<CR><LF> faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException<CR><LF> <http://schemas.xmlsoap.org/soap/envelope/}Server.userException<CR><LF>> faultSubcode: <CR><LF> faultString: java.io.IOException: The device is not ready<CR><LF> faultActor: <CR><LF> faultNode: <CR><LF> faultDetail: <CR><LF><TAB>{http://xml.apache.org/axis/}stackTrace:java.io.IOException : The device is not ready<CR><LF><TAB>at java.io.WinNTFileSystem.createFileExclusively(Native Method)<CR><LF><TAB>at java.io.File.checkAndCreate(File.java:1314)<CR><LF><TAB>at java.io.File.createTempFile(File.java:1402)<CR><LF><TAB>at org.apache.axis.attachments.ManagedMemoryDataSource.flushToDisk(ManagedM emor yDataSource.java:383)<CR><LF><TAB>at org.apache.axis.attachments.ManagedMemoryDataSource.write(ManagedMemoryD ataS ource.java:271)<CR><LF><TAB>at org.apache.axis.attachments.ManagedMemoryDataSource.<init>(Managed Memo ryDataSource.java:144)<CR><LF><TAB>at org.apache.axis.attachments.MultiPartDimeInputStream.readTillFound(Multi Part DimeInputStream.java:163)<CR><LF><TAB>at org.apache.axis.attachments.MultiPartDimeInputStream.readAll(MultiPartDi meIn putStream.java:100)<CR><LF><TAB>at org.apache.axis.attachments.MultiPartDimeInputStream.getAttachments(Mult iPar tDimeInputStream.java:108)<CR><LF><TAB>at org.apache.axis.attachments.AttachmentsImpl.mergeinAttachments(Attachmen tsIm pl.java:156)<CR><LF><TAB>at org.apache.axis.attachments.AttachmentsImpl.getAttachments(AttachmentsIm pl.j ava:361)<CR><LF><TAB>at com.datek.mms.interfaceHandler.soap.SoapInterfaceHandler.mtMessage(SoapI nter faceHandler.java:200)<CR><LF><TAB>at com.datek.mms.interfaceHandler.soap.SoapReceiver.mtMessage(SoapReceiver. java :155)<CR><LF><TAB>at sun.reflect.GeneratedMethodAccessor6.invoke(Unknown Source)<CR><LF><TAB>at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor Impl .java:25)<CR><LF><TAB>at java.lang.reflect.Method.invoke(Method.java:324)<CR><LF><TAB>at org.apache.axis.providers.java.MsgProvider.processMessage(MsgProvider.ja va:1 43)<CR><LF><TAB>at org.apache.axis.providers.java.JavaProvider.invoke(JavaProvider.java:290 )<CR ><LF><TAB>at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.j ava: 32)<CR><LF><TAB>at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)<CR><LF><TAB >at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)<CR><LF><TAB>at org.apache.axis.handlers.soap.SOAPService.invoke(SOAPService.java:481)<C R><L F><TAB>at org.apache.axis.server.AxisServer.invoke(AxisServer.java:285)<CR><LF><TA B>at org.apache.axis.transport.http.AxisServlet.doPost(AxisServlet.java:623)< CR>< LF><TAB>at javax.servlet.http.HttpServlet.service(HttpServlet.java:768)<CR><LF><TAB >at org.apache.axis.transport.http.AxisServletBase.service(AxisServletBase.j ava: 301)<CR><LF><TAB>at javax.servlet.http.HttpServlet.service(HttpServlet.java:861)<CR><LF><TAB >at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:354)<C R><L F><TAB>at org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplicationH andl er.java:294)<CR><LF><TAB>at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:567) <CR> <LF><TAB>at org.mortbay.http.HttpContext.handle(HttpContext.java:1807)<CR><LF><TAB>a t org.mortbay.jetty.servlet.WebApplicationContext.handle(WebApplicationCon text .java:525)<CR><LF><TAB>at org.mortbay.http.HttpContext.handle(HttpContext.java:1757)<CR><LF><TAB>a t org.mortbay.http.HttpServer.service(HttpServer.java:879)<CR><LF><TAB>at org.mortbay.http.HttpConnection.service(HttpConnection.java:790)<CR><LF> <TAB >at org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:961)<CR>< LF>< TAB>at org.mortbay.http.HttpConnection.handle(HttpConnection.java:807)<CR><LF>< TAB> at org.mortbay.http.SocketListener.handleConnection(SocketListener.java:197 )<CR ><LF><TAB>at org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:276)<CR><LF>< TAB> at org.mortbay.util.ThreadPool$PoolThread.run(ThreadPool.java:511)<CR><LF>< CR>< LF><CR><LF>java.io.IOException: The device is not ready<CR><LF><TAB>at org.apache.axis.AxisFault.makeFault(AxisFault.java:98)<CR><LF><TAB>at org.apache.axis.attachments.MultiPartDimeInputStream.readTillFound(Multi Part DimeInputStream.java:187)<CR><LF><TAB>at org.apache.axis.attachments.MultiPartDimeInputStream.readAll(MultiPartDi meIn putStream.java:100)<CR><LF><TAB>at org.apache.axis.attachments.MultiPartDimeInputStream.getAttachments(Mult iPar tDimeInputStream.java:108)<CR><LF><TAB>at org.apache.axis.attachments.AttachmentsImpl.mergeinAttachments(Attachmen tsIm pl.java:156)<CR><LF><TAB>at org.apache.axis.attachments.AttachmentsImpl.getAttachments(AttachmentsIm pl.j ava:361)<CR><LF><TAB>at com.datek.mms.interfaceHandler.soap.SoapInterfaceHandler.mtMessage(SoapI nter faceHandler.java:200)<CR><LF><TAB>at com.datek.mms.interfaceHandler.soap.SoapReceiver.mtMessage(SoapReceiver. java :155)<CR><LF><TAB>at sun.reflect.GeneratedMethodAccessor6.invoke(Unknown Source)<CR><LF><TAB>at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor Impl .java:25)<CR><LF><TAB>at java.lang.reflect.Method.invoke(Method.java:324)<CR><LF><TAB>at org.apache.axis.providers.java.MsgProvider.processMessage(MsgProvider.ja va:1 43)<CR><LF><TAB>at org.apache.axis.providers.java.JavaProvider.invoke(JavaProvider.java:290 )<CR ><LF><TAB>at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.j ava: 32)<CR><LF><TAB>at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)<CR><LF><TAB >at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)<CR><LF><TAB>at org.apache.axis.handlers.soap.SOAPService.invoke(SOAPService.java:481)<C R><L F><TAB>at org.apache.axis.server.AxisServer.invoke(AxisServer.java:285)<CR><LF><TA B>at org.apache.axis.transport.http.AxisServlet.doPost(AxisServlet.java:623)< CR>< LF><TAB>at javax.servlet.http.HttpServlet.service(HttpServlet.java:768)<CR><LF><TAB >at org.apache.axis.transport.http.AxisServletBase.service(AxisServletBase.j ava: 301)<CR><LF><TAB>at javax.servlet.http.HttpServlet.service(HttpServlet.java:861)<CR><LF><TAB >at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:354)<C R><L F><TAB>at org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplicationH andl er.java:294)<CR><LF><TAB>at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:567) <CR> <LF><TAB>at org.mortbay.http.HttpContext.handle(HttpContext.java:1807)<CR><LF><TAB>a t org.mortbay.jetty.servlet.WebApplicationContext.handle(WebApplicationCon text .java:525)<CR><LF><TAB>at org.mortbay.http.HttpContext.handle(HttpContext.java:1757)<CR><LF><TAB>a t org.mortbay.http.HttpServer.service(HttpServer.java:879)<CR><LF><TAB>at org.mortbay.http.HttpConnection.service(HttpConnection.java:790)<CR><LF> <TAB >at org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:961)<CR>< LF>< TAB>at org.mortbay.http.HttpConnection.handle(HttpConnection.java:807)<CR><LF>< TAB> at org.mortbay.http.SocketListener.handleConnection(SocketListener.java:197 )<CR ><LF><TAB>at org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:276)<CR><LF>< TAB> at org.mortbay.util.ThreadPool$PoolThread.run(ThreadPool.java:511)<CR><LF>C ause d by: java.io.IOException: The device is not ready<CR><LF><TAB>at java.io.WinNTFileSystem.createFileExclusively(Native Method)<CR><LF><TAB>at java.io.File.checkAndCreate(File.java:1314)<CR><LF><TAB>at java.io.File.createTempFile(File.java:1402)<CR><LF><TAB>at org.apache.axis.attachments.ManagedMemoryDataSource.flushToDisk(ManagedM emor yDataSource.java:383)<CR><LF><TAB>at org.apache.axis.attachments.ManagedMemoryDataSource.write(ManagedMemoryD ataS ource.java:271)<CR><LF><TAB>at org.apache.axis.attachments.ManagedMemoryDataSource.<init>(ManagedMemory Data Source.java:144)<CR><LF><TAB>at org.apache.axis.attachments.MultiPartDimeInputStream.readTillFound(Multi Part DimeInputStream.java:163)<CR><LF><TAB>... 33 more<CR><LF> Any help is much appreciated! Espen
