Return-Path: X-Original-To: apmail-axis-java-commits-archive@minotaur.apache.org Delivered-To: apmail-axis-java-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 4FE54DB9E for ; Thu, 30 Aug 2012 21:36:17 +0000 (UTC) Received: (qmail 64298 invoked by uid 500); 30 Aug 2012 21:36:17 -0000 Delivered-To: apmail-axis-java-commits-archive@axis.apache.org Received: (qmail 64272 invoked by uid 500); 30 Aug 2012 21:36:17 -0000 Mailing-List: contact java-commits-help@axis.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: java-dev@axis.apache.org Delivered-To: mailing list java-commits@axis.apache.org Received: (qmail 64262 invoked by uid 99); 30 Aug 2012 21:36:17 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 30 Aug 2012 21:36:17 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 30 Aug 2012 21:36:12 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id ADF6723889C5 for ; Thu, 30 Aug 2012 21:35:27 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1379166 - in /axis/axis2/java/core/branches/1_6: ./ modules/integration/test/org/apache/axis2/mtom/ modules/integration/test/org/apache/axis2/swa/ modules/jaxws/src/org/apache/axis2/jaxws/message/impl/ modules/jaxws/test/org/apache/axis2/j... Date: Thu, 30 Aug 2012 21:35:27 -0000 To: java-commits@axis.apache.org From: veithen@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20120830213527.ADF6723889C5@eris.apache.org> Author: veithen Date: Thu Aug 30 21:35:26 2012 New Revision: 1379166 URL: http://svn.apache.org/viewvc?rev=1379166&view=rev Log: Merged a couple of changes to ensure that the 1.6 branch can be built with Axiom 1.2.14-SNAPSHOT. Modified: axis/axis2/java/core/branches/1_6/ (props changed) axis/axis2/java/core/branches/1_6/modules/integration/test/org/apache/axis2/mtom/EchoRawMTOMCommonsChunkingTest.java axis/axis2/java/core/branches/1_6/modules/integration/test/org/apache/axis2/mtom/EchoRawMTOMLoadTest.java axis/axis2/java/core/branches/1_6/modules/integration/test/org/apache/axis2/mtom/EchoRawMTOMStreamingTest.java axis/axis2/java/core/branches/1_6/modules/integration/test/org/apache/axis2/mtom/EchoRawMTOMTest.java axis/axis2/java/core/branches/1_6/modules/integration/test/org/apache/axis2/mtom/EchoRawMTOMToBase64Test.java axis/axis2/java/core/branches/1_6/modules/integration/test/org/apache/axis2/mtom/MessageSaveAndRestoreWithMTOMTest.java axis/axis2/java/core/branches/1_6/modules/integration/test/org/apache/axis2/swa/EchoRawSwATest.java axis/axis2/java/core/branches/1_6/modules/integration/test/org/apache/axis2/swa/EchoSwA.java axis/axis2/java/core/branches/1_6/modules/jaxws/src/org/apache/axis2/jaxws/message/impl/XMLSpineImpl.java axis/axis2/java/core/branches/1_6/modules/jaxws/test/org/apache/axis2/jaxws/context/listener/ParserInputStreamCustomBuilderTests.java axis/axis2/java/core/branches/1_6/modules/kernel/src/org/apache/axis2/util/WSDL20Util.java axis/axis2/java/core/branches/1_6/modules/saaj/ (props changed) Propchange: axis/axis2/java/core/branches/1_6/ ------------------------------------------------------------------------------ Merged /axis/axis2/java/core/trunk:r1337975,1355706,1355710,1358413 Modified: axis/axis2/java/core/branches/1_6/modules/integration/test/org/apache/axis2/mtom/EchoRawMTOMCommonsChunkingTest.java URL: http://svn.apache.org/viewvc/axis/axis2/java/core/branches/1_6/modules/integration/test/org/apache/axis2/mtom/EchoRawMTOMCommonsChunkingTest.java?rev=1379166&r1=1379165&r2=1379166&view=diff ============================================================================== --- axis/axis2/java/core/branches/1_6/modules/integration/test/org/apache/axis2/mtom/EchoRawMTOMCommonsChunkingTest.java (original) +++ axis/axis2/java/core/branches/1_6/modules/integration/test/org/apache/axis2/mtom/EchoRawMTOMCommonsChunkingTest.java Thu Aug 30 21:35:26 2012 @@ -27,7 +27,6 @@ import org.apache.axiom.om.OMElement; import org.apache.axiom.om.OMFactory; import org.apache.axiom.om.OMNamespace; import org.apache.axiom.om.OMText; -import org.apache.axiom.om.impl.llom.OMTextImpl; import org.apache.axiom.soap.SOAP12Constants; import org.apache.axis2.Constants; import org.apache.axis2.client.Options; @@ -84,7 +83,7 @@ public class EchoRawMTOMCommonsChunkingT FileDataSource dataSource = new FileDataSource(fileName); expectedDH = new DataHandler(dataSource); OMElement subData = fac.createOMElement("subData", omNs); - OMText textData = new OMTextImpl(expectedDH, fac); + OMText textData = fac.createOMText(expectedDH, true); subData.addChild(textData); data.addChild(subData); rpcWrapEle.addChild(data); Modified: axis/axis2/java/core/branches/1_6/modules/integration/test/org/apache/axis2/mtom/EchoRawMTOMLoadTest.java URL: http://svn.apache.org/viewvc/axis/axis2/java/core/branches/1_6/modules/integration/test/org/apache/axis2/mtom/EchoRawMTOMLoadTest.java?rev=1379166&r1=1379165&r2=1379166&view=diff ============================================================================== --- axis/axis2/java/core/branches/1_6/modules/integration/test/org/apache/axis2/mtom/EchoRawMTOMLoadTest.java (original) +++ axis/axis2/java/core/branches/1_6/modules/integration/test/org/apache/axis2/mtom/EchoRawMTOMLoadTest.java Thu Aug 30 21:35:26 2012 @@ -26,7 +26,6 @@ import org.apache.axiom.om.OMElement; import org.apache.axiom.om.OMFactory; import org.apache.axiom.om.OMNamespace; import org.apache.axiom.om.OMText; -import org.apache.axiom.om.impl.llom.OMTextImpl; import org.apache.axiom.soap.SOAP12Constants; import org.apache.axis2.Constants; import org.apache.axis2.client.Options; @@ -96,7 +95,7 @@ public class EchoRawMTOMLoadTest extends OMElement subData = fac.createOMElement("subData", omNs); DataHandler dataHandler = new DataHandler("Thilina", "text/plain"); //new ByteArrayDataSource(expectedByteArray)); - textData = new OMTextImpl(dataHandler, true, fac); + textData = fac.createOMText(dataHandler, true); subData.addChild(textData); data.addChild(subData); Modified: axis/axis2/java/core/branches/1_6/modules/integration/test/org/apache/axis2/mtom/EchoRawMTOMStreamingTest.java URL: http://svn.apache.org/viewvc/axis/axis2/java/core/branches/1_6/modules/integration/test/org/apache/axis2/mtom/EchoRawMTOMStreamingTest.java?rev=1379166&r1=1379165&r2=1379166&view=diff ============================================================================== --- axis/axis2/java/core/branches/1_6/modules/integration/test/org/apache/axis2/mtom/EchoRawMTOMStreamingTest.java (original) +++ axis/axis2/java/core/branches/1_6/modules/integration/test/org/apache/axis2/mtom/EchoRawMTOMStreamingTest.java Thu Aug 30 21:35:26 2012 @@ -28,7 +28,6 @@ import org.apache.axiom.om.OMElement; import org.apache.axiom.om.OMFactory; import org.apache.axiom.om.OMNamespace; import org.apache.axiom.om.OMText; -import org.apache.axiom.om.impl.llom.OMTextImpl; import org.apache.axiom.soap.SOAP12Constants; import org.apache.axis2.Constants; import org.apache.axis2.addressing.EndpointReference; @@ -94,7 +93,7 @@ public class EchoRawMTOMStreamingTest ex new ByteArrayDataSource(new byte[] { 13, 56, 65, 32, 12, 12, 7, -3, -2, -1, 98 })); OMElement subData = fac.createOMElement("subData", omNs); - OMText textData = new OMTextImpl(expectedDH, fac); + OMText textData = fac.createOMText(expectedDH, true); subData.addChild(textData); data.addChild(subData); rpcWrapEle.addChild(data); Modified: axis/axis2/java/core/branches/1_6/modules/integration/test/org/apache/axis2/mtom/EchoRawMTOMTest.java URL: http://svn.apache.org/viewvc/axis/axis2/java/core/branches/1_6/modules/integration/test/org/apache/axis2/mtom/EchoRawMTOMTest.java?rev=1379166&r1=1379165&r2=1379166&view=diff ============================================================================== --- axis/axis2/java/core/branches/1_6/modules/integration/test/org/apache/axis2/mtom/EchoRawMTOMTest.java (original) +++ axis/axis2/java/core/branches/1_6/modules/integration/test/org/apache/axis2/mtom/EchoRawMTOMTest.java Thu Aug 30 21:35:26 2012 @@ -27,7 +27,6 @@ import org.apache.axiom.om.OMElement; import org.apache.axiom.om.OMFactory; import org.apache.axiom.om.OMNamespace; import org.apache.axiom.om.OMText; -import org.apache.axiom.om.impl.llom.OMTextImpl; import org.apache.axiom.soap.SOAP12Constants; import org.apache.axiom.soap.SOAPEnvelope; import org.apache.axis2.AxisFault; @@ -62,7 +61,7 @@ public class EchoRawMTOMTest extends Uti private AxisService service; - private OMTextImpl expectedTextData; + private OMText expectedTextData; private boolean finish = false; @@ -99,7 +98,7 @@ public class EchoRawMTOMTest extends Uti OMElement data = fac.createOMElement("data", omNs); FileDataSource fileDataSource = new FileDataSource(TestingUtils.prefixBaseDirectory("test-resources/mtom/test.jpg")); expectedDH = new DataHandler(fileDataSource); - expectedTextData = new OMTextImpl(expectedDH, true, fac); + expectedTextData = fac.createOMText(expectedDH, true); data.addChild(expectedTextData); rpcWrapEle.addChild(data); return rpcWrapEle; Modified: axis/axis2/java/core/branches/1_6/modules/integration/test/org/apache/axis2/mtom/EchoRawMTOMToBase64Test.java URL: http://svn.apache.org/viewvc/axis/axis2/java/core/branches/1_6/modules/integration/test/org/apache/axis2/mtom/EchoRawMTOMToBase64Test.java?rev=1379166&r1=1379165&r2=1379166&view=diff ============================================================================== --- axis/axis2/java/core/branches/1_6/modules/integration/test/org/apache/axis2/mtom/EchoRawMTOMToBase64Test.java (original) +++ axis/axis2/java/core/branches/1_6/modules/integration/test/org/apache/axis2/mtom/EchoRawMTOMToBase64Test.java Thu Aug 30 21:35:26 2012 @@ -28,7 +28,6 @@ import org.apache.axiom.om.OMElement; import org.apache.axiom.om.OMFactory; import org.apache.axiom.om.OMNamespace; import org.apache.axiom.om.OMText; -import org.apache.axiom.om.impl.llom.OMTextImpl; import org.apache.axiom.soap.SOAP12Constants; import org.apache.axiom.soap.SOAPEnvelope; import org.apache.axis2.AxisFault; @@ -98,7 +97,7 @@ public class EchoRawMTOMToBase64Test ext OMElement data = fac.createOMElement("data", omNs); byte[] byteArray = new byte[] { 13, 56, 65, 32, 12, 12, 7, 98 }; DataHandler dataHandler = new DataHandler(new ByteArrayDataSource(byteArray)); - expectedTextData = new OMTextImpl(dataHandler, true, fac); + expectedTextData = fac.createOMText(dataHandler, true); data.addChild(expectedTextData); rpcWrapEle.addChild(data); return rpcWrapEle; Modified: axis/axis2/java/core/branches/1_6/modules/integration/test/org/apache/axis2/mtom/MessageSaveAndRestoreWithMTOMTest.java URL: http://svn.apache.org/viewvc/axis/axis2/java/core/branches/1_6/modules/integration/test/org/apache/axis2/mtom/MessageSaveAndRestoreWithMTOMTest.java?rev=1379166&r1=1379165&r2=1379166&view=diff ============================================================================== --- axis/axis2/java/core/branches/1_6/modules/integration/test/org/apache/axis2/mtom/MessageSaveAndRestoreWithMTOMTest.java (original) +++ axis/axis2/java/core/branches/1_6/modules/integration/test/org/apache/axis2/mtom/MessageSaveAndRestoreWithMTOMTest.java Thu Aug 30 21:35:26 2012 @@ -27,7 +27,6 @@ import org.apache.axiom.om.OMElement; import org.apache.axiom.om.OMFactory; import org.apache.axiom.om.OMNamespace; import org.apache.axiom.om.OMText; -import org.apache.axiom.om.impl.llom.OMTextImpl; import org.apache.axiom.soap.SOAP12Constants; import org.apache.axis2.AxisFault; import org.apache.axis2.Constants; @@ -69,7 +68,7 @@ import java.util.ArrayList; */ public class MessageSaveAndRestoreWithMTOMTest extends UtilServerBasedTestCase implements TestConstants { - private OMTextImpl expectedTextData = null; + private OMText expectedTextData = null; public MessageSaveAndRestoreWithMTOMTest() { super(MessageSaveAndRestoreWithMTOMTest.class.getName()); @@ -165,7 +164,7 @@ public class MessageSaveAndRestoreWithMT FileDataSource fileDataSource = new FileDataSource(TestingUtils.prefixBaseDirectory("test-resources/mtom/test.jpg")); DataHandler expectedDataHandler = new DataHandler(fileDataSource); - expectedTextData = new OMTextImpl(expectedDataHandler, true, omFactory); + expectedTextData = omFactory.createOMText(expectedDataHandler, true); data.addChild(expectedTextData); rpcWrapperElement.addChild(data); return rpcWrapperElement; Modified: axis/axis2/java/core/branches/1_6/modules/integration/test/org/apache/axis2/swa/EchoRawSwATest.java URL: http://svn.apache.org/viewvc/axis/axis2/java/core/branches/1_6/modules/integration/test/org/apache/axis2/swa/EchoRawSwATest.java?rev=1379166&r1=1379165&r2=1379166&view=diff ============================================================================== --- axis/axis2/java/core/branches/1_6/modules/integration/test/org/apache/axis2/swa/EchoRawSwATest.java (original) +++ axis/axis2/java/core/branches/1_6/modules/integration/test/org/apache/axis2/swa/EchoRawSwATest.java Thu Aug 30 21:35:26 2012 @@ -23,9 +23,9 @@ import junit.framework.Test; import junit.framework.TestSuite; import org.apache.axiom.om.OMAbstractFactory; import org.apache.axiom.om.OMElement; +import org.apache.axiom.om.OMFactory; import org.apache.axiom.om.OMNamespace; import org.apache.axiom.om.OMText; -import org.apache.axiom.om.impl.llom.OMTextImpl; import org.apache.axiom.soap.SOAP11Constants; import org.apache.axiom.soap.SOAPEnvelope; import org.apache.axiom.soap.SOAPFactory; @@ -132,8 +132,9 @@ public class EchoRawSwATest extends Util } protected void compareDataHandlers(DataHandler dataHandler, DataHandler dataHandler2) { - String originalTextValue = new OMTextImpl(dataHandler, true, null).getText(); - String returnedTextValue = new OMTextImpl(dataHandler2, true, null).getText(); + OMFactory factory = OMAbstractFactory.getOMFactory(); + String originalTextValue = factory.createOMText(dataHandler, true).getText(); + String returnedTextValue = factory.createOMText(dataHandler2, true).getText(); assertEquals(returnedTextValue, originalTextValue); } } \ No newline at end of file Modified: axis/axis2/java/core/branches/1_6/modules/integration/test/org/apache/axis2/swa/EchoSwA.java URL: http://svn.apache.org/viewvc/axis/axis2/java/core/branches/1_6/modules/integration/test/org/apache/axis2/swa/EchoSwA.java?rev=1379166&r1=1379165&r2=1379166&view=diff ============================================================================== --- axis/axis2/java/core/branches/1_6/modules/integration/test/org/apache/axis2/swa/EchoSwA.java (original) +++ axis/axis2/java/core/branches/1_6/modules/integration/test/org/apache/axis2/swa/EchoSwA.java Thu Aug 30 21:35:26 2012 @@ -23,7 +23,6 @@ import org.apache.axiom.attachments.Atta import org.apache.axiom.om.OMAttribute; import org.apache.axiom.om.OMElement; import org.apache.axiom.om.OMText; -import org.apache.axiom.om.impl.llom.OMTextImpl; import org.apache.axis2.AxisFault; import org.apache.axis2.context.MessageContext; import org.apache.axis2.wsdl.WSDLConstants; @@ -51,7 +50,7 @@ public class EchoSwA { Attachments attachment = (msgCtx).getAttachmentMap(); DataHandler dataHandler = attachment.getDataHandler(contentID); - OMText textNode = new OMTextImpl(dataHandler, omEle.getOMFactory()); + OMText textNode = omEle.getOMFactory().createOMText(dataHandler, true); omEle.build(); child.detach(); omEle.addChild(textNode); Modified: axis/axis2/java/core/branches/1_6/modules/jaxws/src/org/apache/axis2/jaxws/message/impl/XMLSpineImpl.java URL: http://svn.apache.org/viewvc/axis/axis2/java/core/branches/1_6/modules/jaxws/src/org/apache/axis2/jaxws/message/impl/XMLSpineImpl.java?rev=1379166&r1=1379165&r2=1379166&view=diff ============================================================================== --- axis/axis2/java/core/branches/1_6/modules/jaxws/src/org/apache/axis2/jaxws/message/impl/XMLSpineImpl.java (original) +++ axis/axis2/java/core/branches/1_6/modules/jaxws/src/org/apache/axis2/jaxws/message/impl/XMLSpineImpl.java Thu Aug 30 21:35:26 2012 @@ -617,53 +617,56 @@ class XMLSpineImpl implements XMLSpine { // Get the business object to force a parse block.getBusinessObject(false); - // Replace the OMElement with the OMSourcedElement that delegates to the block - OMElement newOM = _createOMElementFromBlock(qName.getLocalPart(), ns, block, soapFactory, - (om.getParent() instanceof SOAPHeader)); - om.insertSiblingBefore(newOM); - - // We want to set the om element and its parents to complete to - // shutdown the parsing. - if (setComplete) { - - // Get the root of the document - OMElement root = om; - while(root.getParent() instanceof OMElement) { - root = (OMElement) root.getParent(); - } - - try { - if (!root.isComplete() && root.getBuilder() != null && - !root.getBuilder().isCompleted()) { - // Forward the parser to the end so it will close - while (root.getBuilder().next() != XMLStreamConstants.END_DOCUMENT) { - //do nothing - } + if (!(om instanceof SOAPFault)) { + // Replace the OMElement with the OMSourcedElement that delegates to the block. Note that + // this can be done for plain OMElements and SOAPHeaderBlocks, but not SOAPFaults. + OMElement newOM = _createOMElementFromBlock(qName.getLocalPart(), ns, block, soapFactory, + (om.getParent() instanceof SOAPHeader)); + om.insertSiblingBefore(newOM); + + // We want to set the om element and its parents to complete to + // shutdown the parsing. + if (setComplete) { + + // Get the root of the document + OMElement root = om; + while(root.getParent() instanceof OMElement) { + root = (OMElement) root.getParent(); } - } catch (Exception e) { - // Log and continue - if (log.isDebugEnabled()) { - log.debug("Builder next error:" + e.getMessage()); - log.trace(JavaUtils.stackToString(e)); + + try { + if (!root.isComplete() && root.getBuilder() != null && + !root.getBuilder().isCompleted()) { + // Forward the parser to the end so it will close + while (root.getBuilder().next() != XMLStreamConstants.END_DOCUMENT) { + //do nothing + } + } + } catch (Exception e) { + // Log and continue + if (log.isDebugEnabled()) { + log.debug("Builder next error:" + e.getMessage()); + log.trace(JavaUtils.stackToString(e)); + } + } - } - - - OMContainer o = om; - while (o != null && o instanceof OMContainerEx) { - ((OMContainerEx)o).setComplete(true); - if ((o instanceof OMNode) && - (((OMNode)o).getParent()) instanceof OMContainer) { - o = ((OMNode)o).getParent(); - } else { - o = null; + + OMContainer o = om; + while (o != null && o instanceof OMContainerEx) { + ((OMContainerEx)o).setComplete(true); + if ((o instanceof OMNode) && + (((OMNode)o).getParent()) instanceof OMContainer) { + o = ((OMNode)o).getParent(); + } else { + o = null; + } } } + + + om.detach(); } - - - om.detach(); return block; } catch (XMLStreamException xse) { throw ExceptionFactory.makeWebServiceException(xse); Modified: axis/axis2/java/core/branches/1_6/modules/jaxws/test/org/apache/axis2/jaxws/context/listener/ParserInputStreamCustomBuilderTests.java URL: http://svn.apache.org/viewvc/axis/axis2/java/core/branches/1_6/modules/jaxws/test/org/apache/axis2/jaxws/context/listener/ParserInputStreamCustomBuilderTests.java?rev=1379166&r1=1379165&r2=1379166&view=diff ============================================================================== --- axis/axis2/java/core/branches/1_6/modules/jaxws/test/org/apache/axis2/jaxws/context/listener/ParserInputStreamCustomBuilderTests.java (original) +++ axis/axis2/java/core/branches/1_6/modules/jaxws/test/org/apache/axis2/jaxws/context/listener/ParserInputStreamCustomBuilderTests.java Thu Aug 30 21:35:26 2012 @@ -50,7 +50,7 @@ public class ParserInputStreamCustomBuil private String mockenvelope= ""+ ""+ ""+ - "Hello Provider OM"+ + "Hello Provider OM"+ ""+ ""; Modified: axis/axis2/java/core/branches/1_6/modules/kernel/src/org/apache/axis2/util/WSDL20Util.java URL: http://svn.apache.org/viewvc/axis/axis2/java/core/branches/1_6/modules/kernel/src/org/apache/axis2/util/WSDL20Util.java?rev=1379166&r1=1379165&r2=1379166&view=diff ============================================================================== --- axis/axis2/java/core/branches/1_6/modules/kernel/src/org/apache/axis2/util/WSDL20Util.java (original) +++ axis/axis2/java/core/branches/1_6/modules/kernel/src/org/apache/axis2/util/WSDL20Util.java Thu Aug 30 21:35:26 2012 @@ -138,7 +138,7 @@ public class WSDL20Util { if (httpURLParam != null) { httpURLParam.detach(); - if (parentElement.getFirstOMChild() == null) { + if (parentElement.getFirstOMChild() == null && parentElement.getParent() != null) { parentElement.detach(); } return httpURLParam.getText(); Propchange: axis/axis2/java/core/branches/1_6/modules/saaj/ ------------------------------------------------------------------------------ Merged /axis/axis2/java/core/trunk/modules/saaj:r1337975,1355706,1355710,1358413