Thanks for your answer. I will try filecaching. The Filesize is 27KB
> -----Ursprüngliche Nachricht----- > Von: [email protected] > Gesendet: 12.03.07 12:39:51 > An: [email protected] > Betreff: Re: [Axis2] ArrayIndexOutOfBounds with MTOM and session based Service > What is the size of the attachment you are trying to transfer... If it > is large please enable file caching at the server side [1].. > Make sure to use the latest Axiom jars when using the File Caching, as > they contain major performance improvements and bug fixes over the > Axiom 1.2 version.. > > ~Thilina > [1] http://wso2.org/library/264 > > On 3/12/07, Jochen Zink <[EMAIL PROTECTED]> wrote: > > Hallo, > > > > I have a session based WebService with scope="soapsession". I tried to send > > binary data with mtom from a client to the service. > > > > The client calls three methods: > > > > openTransferSession(); > > transferDocument(); > > closeTransferSession(); > > > > On transferDocument, a binary attachment is sendet with MTOM. > > > > If I enable MTOM an client side, a ArrayIndexOutOfBounds Exception is > > thrown on the Servers MessageReceiver (StackTrace on the end of message). > > If I disable MTOM, everythink is okay. No exception is thrown. > > > > I believe, that I do something wrong on the services wsdl, but I'm not sure. > > > > From the wsdl, I generate my Service Sekeleton and the MessageReceiver and > > some Types. > > > > > > Does anyone knows, what is wrong? > > > > Thanks for all! > > > > > > > > Here are the wsdl: > > <wsdl:definitions > > xmlns:axis2="http://comchannel.comserver.edocbox.nepatec.de" > > xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" > > xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" > > xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" > > xmlns:xmime="http://www.w3.org/2005/05/xmlmime" > > xmlns:ns="http://comchannel.comserver.edocbox.nepatec.de/xsd" > > xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" > > xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" > > targetNamespace="http://comchannel.comserver.edocbox.nepatec.de"> > > <wsdl:types> > > <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" > > attributeFormDefault="qualified" > > elementFormDefault="qualified" > > > > targetNamespace="http://comchannel.comserver.edocbox.nepatec.de/xsd"> > > > > <xs:import > > namespace="http://www.w3.org/2005/05/xmlmime" > > schemaLocation="xmime.xsd" /> > > > > > > > > <xs:element name="transferDocument"> > > <xs:complexType> > > <xs:sequence> > > <xs:element minOccurs="0" > > name="fileName" > > type="xs:string" /> > > <xs:element minOccurs="0" > > name="binaryData" > > > > type="xmime:base64Binary" /> > > <xs:element minOccurs="0" > > name="fileType" > > type="xs:int" /> > > </xs:sequence> > > </xs:complexType> > > </xs:element> > > > > > > > > <xs:element name="transferDocumentResponse"> > > <xs:complexType> > > <xs:sequence> > > <xs:element name="return" > > nillable="true" > > type="xs:boolean" /> > > </xs:sequence> > > </xs:complexType> > > </xs:element> > > <xs:element name="openTransferSession"> > > <xs:complexType> > > <xs:sequence> > > <xs:element name="param0" > > nillable="true" > > type="xs:string" /> > > </xs:sequence> > > </xs:complexType> > > </xs:element> > > <xs:element name="openTransferSessionResponse"> > > <xs:complexType> > > <xs:sequence> > > <xs:element name="return" > > nillable="true" > > type="xs:long" /> > > </xs:sequence> > > </xs:complexType> > > </xs:element> > > </xs:schema> > > </wsdl:types> > > <wsdl:message name="transferDocumentMessage"> > > <wsdl:part name="part1" element="ns:transferDocument" /> > > </wsdl:message> > > <wsdl:message name="transferDocumentResponseMessage"> > > <wsdl:part name="part1" > > element="ns:transferDocumentResponse" /> > > </wsdl:message> > > <wsdl:message name="openTransferSessionMessage"> > > <wsdl:part name="part1" element="ns:openTransferSession" /> > > </wsdl:message> > > <wsdl:message name="openTransferSessionResponseMessage"> > > <wsdl:part name="part1" > > element="ns:openTransferSessionResponse" /> > > </wsdl:message> > > <wsdl:message name="closeTransferSessionMessage" /> > > <wsdl:portType name="DocumentServicePortType"> > > <wsdl:operation name="transferDocument"> > > <wsdl:input message="axis2:transferDocumentMessage" > > /> > > <wsdl:output > > > > message="axis2:transferDocumentResponseMessage" /> > > </wsdl:operation> > > <wsdl:operation name="openTransferSession"> > > <wsdl:input > > message="axis2:openTransferSessionMessage" /> > > <wsdl:output > > > > message="axis2:openTransferSessionResponseMessage" /> > > </wsdl:operation> > > <wsdl:operation name="closeTransferSession"> > > <wsdl:input > > message="axis2:closeTransferSessionMessage" /> > > </wsdl:operation> > > </wsdl:portType> > > <wsdl:binding name="DocumentServiceSOAP11Binding" > > type="axis2:DocumentServicePortType"> > > <soap:binding > > transport="http://schemas.xmlsoap.org/soap/http" > > style="document" /> > > <wsdl:operation name="transferDocument"> > > <soap:operation soapAction="urn:transferDocument" > > style="document" /> > > <wsdl:input> > > <soap:body use="literal" > > > > namespace="http://comchannel.comserver.edocbox.nepatec.de" /> > > </wsdl:input> > > <wsdl:output> > > <soap:body use="literal" > > > > namespace="http://comchannel.comserver.edocbox.nepatec.de" /> > > </wsdl:output> > > </wsdl:operation> > > <wsdl:operation name="openTransferSession"> > > <soap:operation soapAction="urn:openTransferSession" > > style="document" /> > > <wsdl:input> > > <soap:body use="literal" > > > > namespace="http://comchannel.comserver.edocbox.nepatec.de" /> > > </wsdl:input> > > <wsdl:output> > > <soap:body use="literal" > > > > namespace="http://comchannel.comserver.edocbox.nepatec.de" /> > > </wsdl:output> > > </wsdl:operation> > > <wsdl:operation name="closeTransferSession"> > > <soap:operation > > soapAction="urn:closeTransferSession" > > style="document" /> > > <wsdl:input> > > <soap:body use="literal" > > > > namespace="http://comchannel.comserver.edocbox.nepatec.de" /> > > </wsdl:input> > > </wsdl:operation> > > </wsdl:binding> > > <wsdl:binding name="DocumentServiceSOAP12Binding" > > type="axis2:DocumentServicePortType"> > > <soap12:binding > > transport="http://schemas.xmlsoap.org/soap/http" > > style="document" /> > > <wsdl:operation name="transferDocument"> > > <soap12:operation soapAction="urn:transferDocument" > > style="document" /> > > <wsdl:input> > > <soap12:body use="literal" > > > > namespace="http://comchannel.comserver.edocbox.nepatec.de" /> > > </wsdl:input> > > <wsdl:output> > > <soap12:body use="literal" > > > > namespace="http://comchannel.comserver.edocbox.nepatec.de" /> > > </wsdl:output> > > </wsdl:operation> > > <wsdl:operation name="openTransferSession"> > > <soap12:operation > > soapAction="urn:openTransferSession" > > style="document" /> > > <wsdl:input> > > <soap12:body use="literal" > > > > namespace="http://comchannel.comserver.edocbox.nepatec.de" /> > > </wsdl:input> > > <wsdl:output> > > <soap12:body use="literal" > > > > namespace="http://comchannel.comserver.edocbox.nepatec.de" /> > > </wsdl:output> > > </wsdl:operation> > > <wsdl:operation name="closeTransferSession"> > > <soap12:operation > > soapAction="urn:closeTransferSession" > > style="document" /> > > <wsdl:input> > > <soap12:body use="literal" > > > > namespace="http://comchannel.comserver.edocbox.nepatec.de" /> > > </wsdl:input> > > </wsdl:operation> > > </wsdl:binding> > > <wsdl:service name="DocumentService"> > > <wsdl:port name="DocumentServiceSOAP11port" > > binding="axis2:DocumentServiceSOAP11Binding"> > > <soap:address > > > > location="http://localhost:8080/axis2/services/DocumentService" /> > > </wsdl:port> > > <wsdl:port name="DocumentServiceSOAP12port" > > binding="axis2:DocumentServiceSOAP12Binding"> > > <soap12:address > > > > location="http://localhost:8080/axis2/services/DocumentService" /> > > </wsdl:port> > > </wsdl:service> > > </wsdl:definitions> > > > > > > > > > > And the Stacktrace, thrown on calling the transferDocument() Method: > > > > > > org.apache.axis2.AxisFault: java.lang.ArrayIndexOutOfBoundsException > > at > > org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:271) > > at > > org.apache.axis2.description.OutInAxisOperationClient.execute(OutInAxisOperation.java:202) > > at > > de.nepatec.edocbox.comserver.client.DocumentServiceStub.transferDocument(DocumentServiceStub.java:166) > > at de.nepatec.edocbox.comserver.client.Client.doRun(Client.java:60) > > at de.nepatec.edocbox.comserver.client.Client.main(Client.java:72) > > Caused by: java.lang.Exception: org.apache.axis2.AxisFault: > > java.lang.ArrayIndexOutOfBoundsException; nested exception is: > > java.lang.RuntimeException: java.lang.ArrayIndexOutOfBoundsException > > at org.apache.axis2.AxisFault.makeFault(AxisFault.java:321) > > at > > de.nepatec.edocbox.comserver.comchannel.DocumentServiceMessageReceiverInOut.invokeBusinessLogic(DocumentServiceMessageReceiverInOut.java:86) > > at > > org.apache.axis2.receivers.AbstractInOutSyncMessageReceiver.receive(AbstractInOutSyncMessageReceiver.java:39) > > at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:497) > > at > > org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest(HTTPTransportUtils.java:328) > > at > > org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java:254) > > at javax.servlet.http.HttpServlet.service(HttpServlet.java:615) > > at javax.servlet.http.HttpServlet.service(HttpServlet.java:688) > > at > > org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252) > > at > > org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173) > > at > > org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213) > > at > > org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178) > > at > > org.apache.geronimo.tomcat.valve.DefaultSubjectValve.invoke(DefaultSubjectValve.java:56) > > at > > org.apache.geronimo.tomcat.GeronimoStandardContext$SystemMethodValve.invoke(GeronimoStandardContext.java:342) > > at > > org.apache.geronimo.tomcat.valve.GeronimoBeforeAfterValve.invoke(GeronimoBeforeAfterValve.java:31) > > at > > org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126) > > at > > org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105) > > at > > org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107) > > at > > org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:541) > > at > > org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148) > > at > > org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869) > > at > > org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:667) > > at > > org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527) > > at > > org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80) > > at > > org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684) > > at java.lang.Thread.run(Thread.java:595) > > Caused by: java.lang.RuntimeException: > > java.lang.ArrayIndexOutOfBoundsException > > at > > de.nepatec.edocbox.comserver.comchannel.DocumentServiceMessageReceiverInOut.fromOM(DocumentServiceMessageReceiverInOut.java:187) > > at > > de.nepatec.edocbox.comserver.comchannel.DocumentServiceMessageReceiverInOut.invokeBusinessLogic(DocumentServiceMessageReceiverInOut.java:47) > > ... 24 more > > Caused by: java.lang.ArrayIndexOutOfBoundsException > > at java.lang.System.arraycopy(Native Method) > > at > > org.apache.tomcat.util.buf.ByteChunk.substract(ByteChunk.java:413) > > at > > org.apache.catalina.connector.InputBuffer.read(InputBuffer.java:298) > > at > > org.apache.catalina.connector.CoyoteInputStream.read(CoyoteInputStream.java:192) > > at java.io.BufferedInputStream.fill(BufferedInputStream.java:218) > > at java.io.BufferedInputStream.read(BufferedInputStream.java:235) > > at java.io.FilterInputStream.read(FilterInputStream.java:66) > > at java.io.PushbackInputStream.read(PushbackInputStream.java:120) > > at > > org.apache.axiom.attachments.MIMEBodyPartInputStream.read(MIMEBodyPartInputStream.java:49) > > at java.io.InputStream.read(InputStream.java:164) > > at javax.mail.internet.MimeBodyPart.<init>(MimeBodyPart.java:77) > > at > > org.apache.axiom.attachments.PartOnMemory.<init>(PartOnMemory.java:31) > > at > > org.apache.axiom.attachments.Attachments.getPart(Attachments.java:493) > > at > > org.apache.axiom.attachments.Attachments.getNextPartDataHandler(Attachments.java:397) > > at > > org.apache.axiom.attachments.Attachments.getDataHandler(Attachments.java:240) > > at > > org.apache.axiom.soap.impl.builder.MTOMStAXSOAPModelBuilder.getDataHandler(MTOMStAXSOAPModelBuilder.java:105) > > at > > org.w3.www._2005._05.xmlmime.Base64Binary$Factory.parse(Base64Binary.java:347) > > at > > de.nepatec.edocbox.comserver.comchannel.xsd.TransferDocument$Factory.parse(TransferDocument.java:471) > > at > > de.nepatec.edocbox.comserver.comchannel.DocumentServiceMessageReceiverInOut.fromOM(DocumentServiceMessageReceiverInOut.java:160) > > ... 25 more > > > > at org.apache.axis2.AxisFault.<init>(AxisFault.java:159) > > ... 5 more > > Exception in thread "main" > > > > > > > > > > > > > > > > > > __________________________________________________________________________ > > Erweitern Sie FreeMail zu einem noch leistungsstärkeren E-Mail-Postfach! > > Mehr Infos unter http://freemail.web.de/home/landingpad/?mc=021131 > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > -- > Thilina Gunarathne - http://www.wso2.com - http://thilinag.blogspot.com > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > __________________________________________________________________________ Erweitern Sie FreeMail zu einem noch leistungsstärkeren E-Mail-Postfach! Mehr Infos unter http://freemail.web.de/home/landingpad/?mc=021131 --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
