Return-Path: Delivered-To: apmail-ws-axis-dev-archive@www.apache.org Received: (qmail 70450 invoked from network); 2 Jul 2004 13:33:39 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 2 Jul 2004 13:33:39 -0000 Received: (qmail 52059 invoked by uid 500); 2 Jul 2004 13:32:51 -0000 Delivered-To: apmail-ws-axis-dev-archive@ws.apache.org Received: (qmail 51828 invoked by uid 500); 2 Jul 2004 13:32:49 -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 51745 invoked by uid 99); 2 Jul 2004 13:32:47 -0000 X-ASF-Spam-Status: No, hits=0.5 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received: from [209.237.227.194] (HELO minotaur.apache.org) (209.237.227.194) by apache.org (qpsmtpd/0.27.1) with SMTP; Fri, 02 Jul 2004 06:32:45 -0700 Received: (qmail 70082 invoked by uid 1766); 2 Jul 2004 13:32:41 -0000 Date: 2 Jul 2004 13:32:41 -0000 Message-ID: <20040702133241.70081.qmail@minotaur.apache.org> From: ias@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 ias 2004/07/02 06:32:41 Modified: java/test/saaj TestEnvelope.java Log: Add a test case for http://marc.theaimsgroup.com/?l=axis-dev&m=108486748914915&w=2 . Revision Changes Path 1.8 +21 -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.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- TestEnvelope.java 14 Jun 2004 15:47:22 -0000 1.7 +++ TestEnvelope.java 2 Jul 2004 13:32:41 -0000 1.8 @@ -69,6 +69,27 @@ assertTrue(body != null); } + public void testEnvelopeWithLeadingComment() throws Exception { + String soapMessageWithLeadingComment = + "" + + "" + + "" + + "Hello" + + ""; + + SOAPConnectionFactory scFactory = SOAPConnectionFactory.newInstance(); + SOAPConnection con = scFactory.createConnection(); + + MessageFactory factory = MessageFactory.newInstance(); + SOAPMessage message = + factory.createMessage(new MimeHeaders(), + new ByteArrayInputStream(soapMessageWithLeadingComment.getBytes())); + SOAPPart part = message.getSOAPPart(); + SOAPEnvelope envelope = (SOAPEnvelope) part.getEnvelope(); + //message.writeTo(System.out); + assertTrue(envelope != null); + } + private SOAPEnvelope getSOAPEnvelope() throws Exception { SOAPConnectionFactory scFactory = SOAPConnectionFactory.newInstance(); SOAPConnection con = scFactory.createConnection();