Return-Path: Delivered-To: apmail-ws-axis-dev-archive@www.apache.org Received: (qmail 27303 invoked from network); 14 Jun 2004 15:47:39 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 14 Jun 2004 15:47:39 -0000 Received: (qmail 26793 invoked by uid 500); 14 Jun 2004 15:47:46 -0000 Delivered-To: apmail-ws-axis-dev-archive@ws.apache.org Received: (qmail 26676 invoked by uid 500); 14 Jun 2004 15:47:45 -0000 Mailing-List: contact axis-cvs-help@ws.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: list-post: Delivered-To: mailing list axis-cvs@ws.apache.org Received: (qmail 26662 invoked by uid 99); 14 Jun 2004 15:47:45 -0000 Received: from [209.237.227.194] (HELO minotaur.apache.org) (209.237.227.194) by apache.org (qpsmtpd/0.27.1) with SMTP; Mon, 14 Jun 2004 08:47:45 -0700 Received: (qmail 27121 invoked by uid 1203); 14 Jun 2004 15:47:22 -0000 Date: 14 Jun 2004 15:47:22 -0000 Message-ID: <20040614154722.27120.qmail@minotaur.apache.org> From: dims@apache.org To: ws-axis-cvs@apache.org Subject: cvs commit: ws-axis/java/test/saaj TestEnvelope.java X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N dims 2004/06/14 08:47:22 Modified: java/src/org/apache/axis/utils ByteArray.java java/src/org/apache/axis SOAPPart.java java/test/saaj TestEnvelope.java Log: Up the DEFAULT_RESIDENT_SIZE and remove explicit cleanup (causes problems if you call get string and then get envelope) Revision Changes Path 1.3 +1 -3 ws-axis/java/src/org/apache/axis/utils/ByteArray.java Index: ByteArray.java =================================================================== RCS file: /home/cvs/ws-axis/java/src/org/apache/axis/utils/ByteArray.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- ByteArray.java 3 Jun 2004 15:26:41 -0000 1.2 +++ ByteArray.java 14 Jun 2004 15:47:21 -0000 1.3 @@ -35,7 +35,7 @@ public class ByteArray extends OutputStream { protected static double DEFAULT_CACHE_INCREMENT = 2.5; - protected static int DEFAULT_RESIDENT_SIZE = 1 * 1024 * 1024; // 1 MB + protected static int DEFAULT_RESIDENT_SIZE = 512 * 1024 * 1024; // 512 MB protected static boolean DEFAULT_ENABLE_BACKING_STORE = true; protected static int WORKING_BUFFER_SIZE = 8192; @@ -319,8 +319,6 @@ if (cache != null) { byte[] v = cache; int fp = cache_fp; - cache = null; - cache_fp = 0; return new ByteArrayInputStream(v, 0, fp); } else if (bs_handle != null) { return createBackingStoreInputStream(); 1.69 +0 -1 ws-axis/java/src/org/apache/axis/SOAPPart.java Index: SOAPPart.java =================================================================== RCS file: /home/cvs/ws-axis/java/src/org/apache/axis/SOAPPart.java,v retrieving revision 1.68 retrieving revision 1.69 diff -u -r1.68 -r1.69 --- SOAPPart.java 11 May 2004 01:25:14 -0000 1.68 +++ SOAPPart.java 14 Jun 2004 15:47:21 -0000 1.69 @@ -261,7 +261,6 @@ "\"?>").getBytes()); } ((ByteArray) currentMessage).writeTo(os); - ((ByteArray) currentMessage).discardBuffer(); } else { Writer writer = new OutputStreamWriter(os,charEncoding); writer = new BufferedWriter(new PrintWriter(writer)); 1.7 +14 -0 ws-axis/java/test/saaj/TestEnvelope.java Index: TestEnvelope.java =================================================================== RCS file: /home/cvs/ws-axis/java/test/saaj/TestEnvelope.java,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- TestEnvelope.java 7 Feb 2003 21:45:36 -0000 1.6 +++ TestEnvelope.java 14 Jun 2004 15:47:22 -0000 1.7 @@ -18,6 +18,7 @@ import javax.xml.soap.Detail; import javax.xml.soap.DetailEntry; import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; import java.util.Iterator; public class TestEnvelope extends junit.framework.TestCase { @@ -55,6 +56,19 @@ assertTrue(se != null); } + // Test JAXM methods... + public void testEnvelope2() throws Exception { + MessageFactory mf = MessageFactory.newInstance(); + SOAPMessage smsg = + mf.createMessage(new MimeHeaders(), new ByteArrayInputStream(xmlString.getBytes())); + SOAPPart sp = smsg.getSOAPPart(); + SOAPEnvelope se = (SOAPEnvelope)sp.getEnvelope(); + ByteArrayOutputStream baos = new ByteArrayOutputStream(); + smsg.writeTo(baos); + SOAPBody body = smsg.getSOAPPart().getEnvelope().getBody(); + assertTrue(body != null); + } + private SOAPEnvelope getSOAPEnvelope() throws Exception { SOAPConnectionFactory scFactory = SOAPConnectionFactory.newInstance(); SOAPConnection con = scFactory.createConnection();