Hi after tracing the Axis source code I can tell this: When the AxisClient call the .invoke method I receive an OutOfMemory exception (while the message I try to send is big one).
AxisClient.invoke() -> SimpleChain -> HTTPSender -> Message -> SOAPPart -> ByteArray -> ByteArrayOutputStream. The ByteArray's makeInputStream method calls the toByteArray in ByteArrayOutputStream: public synchronized byte toByteArray()[] { int remaining = count; int pos = 0; byte newbuf[] = new byte[count]; <--- the problem! for (int i = 0; i < buffers.size(); i++) { byte[] buf = getBuffer(i); int c = Math.min(buf.length, remaining); System.arraycopy(buf, 0, newbuf, pos, c); pos += c; remaining -= c; if (remaining == 0) { break; } } return newbuf; } The error raise when the byte newbuf[] = new byte[count]; is been called. While the count is high? I ve tried to increase the memory given to my application but the problem is still there. Please give me a work around for this! Thanks.