Modified: axis/axis2/java/core/branches/AXIS2-4091/modules/metadata/src/org/apache/axis2/jaxws/util/CatalogWSDLLocator.java URL: http://svn.apache.org/viewvc/axis/axis2/java/core/branches/AXIS2-4091/modules/metadata/src/org/apache/axis2/jaxws/util/CatalogWSDLLocator.java?rev=1818518&r1=1818517&r2=1818518&view=diff ============================================================================== --- axis/axis2/java/core/branches/AXIS2-4091/modules/metadata/src/org/apache/axis2/jaxws/util/CatalogWSDLLocator.java (original) +++ axis/axis2/java/core/branches/AXIS2-4091/modules/metadata/src/org/apache/axis2/jaxws/util/CatalogWSDLLocator.java Sun Dec 17 22:34:08 2017 @@ -117,7 +117,7 @@ public class CatalogWSDLLocator extends if (is == null) { try { File file = new File(importPath); - is = file.toURL().openStream(); + is = file.toURI().toURL().openStream(); } catch (Throwable t) { // No FFDC required @@ -180,7 +180,7 @@ public class CatalogWSDLLocator extends if (is == null) { try { File file = new File(wsdlLocation); - streamURL = file.toURL(); + streamURL = file.toURI().toURL(); is = streamURL.openStream(); is.close(); }
Modified: axis/axis2/java/core/branches/AXIS2-4091/modules/metadata/src/org/apache/axis2/jaxws/util/ModuleWSDLLocator.java URL: http://svn.apache.org/viewvc/axis/axis2/java/core/branches/AXIS2-4091/modules/metadata/src/org/apache/axis2/jaxws/util/ModuleWSDLLocator.java?rev=1818518&r1=1818517&r2=1818518&view=diff ============================================================================== --- axis/axis2/java/core/branches/AXIS2-4091/modules/metadata/src/org/apache/axis2/jaxws/util/ModuleWSDLLocator.java (original) +++ axis/axis2/java/core/branches/AXIS2-4091/modules/metadata/src/org/apache/axis2/jaxws/util/ModuleWSDLLocator.java Sun Dec 17 22:34:08 2017 @@ -99,7 +99,7 @@ public class ModuleWSDLLocator extends B if (is == null) { try { File file = new File(importPath); - is = file.toURL().openStream(); + is = file.toURI().toURL().openStream(); } catch (Throwable t) { // No FFDC required @@ -156,7 +156,7 @@ public class ModuleWSDLLocator extends B if (is == null) { try { File file = new File(wsdlLocation); - streamURL = file.toURL(); + streamURL = file.toURI().toURL(); is = streamURL.openStream(); is.close(); } Modified: axis/axis2/java/core/branches/AXIS2-4091/modules/metadata/src/org/apache/axis2/jaxws/util/SoapUtils.java URL: http://svn.apache.org/viewvc/axis/axis2/java/core/branches/AXIS2-4091/modules/metadata/src/org/apache/axis2/jaxws/util/SoapUtils.java?rev=1818518&r1=1818517&r2=1818518&view=diff ============================================================================== --- axis/axis2/java/core/branches/AXIS2-4091/modules/metadata/src/org/apache/axis2/jaxws/util/SoapUtils.java (original) +++ axis/axis2/java/core/branches/AXIS2-4091/modules/metadata/src/org/apache/axis2/jaxws/util/SoapUtils.java Sun Dec 17 22:34:08 2017 @@ -21,23 +21,15 @@ package org.apache.axis2.jaxws.util; import org.apache.axiom.om.OMAbstractFactory; import org.apache.axiom.om.OMElement; -import org.apache.axiom.om.impl.builder.StAXOMBuilder; +import org.apache.axiom.om.OMXMLBuilderFactory; import org.apache.axiom.soap.SOAPEnvelope; import org.apache.axiom.soap.SOAPFactory; -import javax.xml.stream.XMLStreamReader; - public class SoapUtils { public static OMElement getOMElement(SOAPEnvelope response) { - XMLStreamReader parser = response.getXMLStreamReader(); - - StAXOMBuilder builder = - new StAXOMBuilder(OMAbstractFactory.getOMFactory(), parser); - - return builder.getDocumentElement(); - + return OMXMLBuilderFactory.createStAXOMBuilder(response.getXMLStreamReader()).getDocumentElement(); } public static SOAPFactory getSoapFactory(String soapVersionURI) { Modified: axis/axis2/java/core/branches/AXIS2-4091/modules/metadata/src/org/apache/axis2/jaxws/util/WSDL4JWrapper.java URL: http://svn.apache.org/viewvc/axis/axis2/java/core/branches/AXIS2-4091/modules/metadata/src/org/apache/axis2/jaxws/util/WSDL4JWrapper.java?rev=1818518&r1=1818517&r2=1818518&view=diff ============================================================================== --- axis/axis2/java/core/branches/AXIS2-4091/modules/metadata/src/org/apache/axis2/jaxws/util/WSDL4JWrapper.java (original) +++ axis/axis2/java/core/branches/AXIS2-4091/modules/metadata/src/org/apache/axis2/jaxws/util/WSDL4JWrapper.java Sun Dec 17 22:34:08 2017 @@ -32,6 +32,7 @@ import org.apache.axis2.jaxws.wsdl.WSDLR import org.apache.axis2.metadata.factory.ResourceFinderFactory; import org.apache.axis2.metadata.registry.MetadataFactoryRegistry; import org.apache.axis2.metadata.resource.ResourceFinder; +import org.apache.axis2.wsdl.WSDLUtil; import org.apache.axis2.wsdl.util.WSDLDefinitionWrapper; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; @@ -44,7 +45,6 @@ import javax.wsdl.Service; import javax.wsdl.WSDLException; import javax.wsdl.extensions.ExtensibilityElement; import javax.wsdl.extensions.soap.SOAPOperation; -import javax.wsdl.factory.WSDLFactory; import javax.wsdl.xml.WSDLReader; import javax.xml.namespace.QName; import java.io.File; @@ -464,8 +464,7 @@ public class WSDL4JWrapper implements WS reader = (WSDLReader)AccessController.doPrivileged( new PrivilegedExceptionAction() { public Object run() throws WSDLException { - WSDLFactory factory = WSDLFactory.newInstance(); - return factory.newWSDLReader(); + return WSDLUtil.newWSDLReaderWithPopulatedExtensionRegistry(); } }); } catch (PrivilegedActionException e) { Modified: axis/axis2/java/core/branches/AXIS2-4091/modules/metadata/src/org/apache/axis2/jaxws/wsdl/WSDLReaderConfiguratorImpl.java URL: http://svn.apache.org/viewvc/axis/axis2/java/core/branches/AXIS2-4091/modules/metadata/src/org/apache/axis2/jaxws/wsdl/WSDLReaderConfiguratorImpl.java?rev=1818518&r1=1818517&r2=1818518&view=diff ============================================================================== --- axis/axis2/java/core/branches/AXIS2-4091/modules/metadata/src/org/apache/axis2/jaxws/wsdl/WSDLReaderConfiguratorImpl.java (original) +++ axis/axis2/java/core/branches/AXIS2-4091/modules/metadata/src/org/apache/axis2/jaxws/wsdl/WSDLReaderConfiguratorImpl.java Sun Dec 17 22:34:08 2017 @@ -17,14 +17,18 @@ * under the License. */ -package org.apache.axis2.jaxws.wsdl; - -import javax.wsdl.WSDLException; -import javax.wsdl.xml.WSDLReader; - -/** - * An instance of this class will be registered with the MetadataFactoryRegistry - * and will be retrieved when a WSDLReader instance is created. This implementation +package org.apache.axis2.jaxws.wsdl; + +import javax.wsdl.WSDLException; +import javax.wsdl.extensions.ExtensionRegistry; +import javax.wsdl.factory.WSDLFactory; +import javax.wsdl.xml.WSDLReader; + +import org.apache.axis2.wsdl.WSDLUtil; + +/** + * An instance of this class will be registered with the MetadataFactoryRegistry + * and will be retrieved when a WSDLReader instance is created. This implementation * will be able to configure the instance as needed. * */ @@ -35,9 +39,18 @@ public class WSDLReaderConfiguratorImpl */ public void configureReaderInstance(WSDLReader reader) throws WSDLException { - // prevent the WSDLReader instance from using the System.out - // stream for messages and logging - reader.setFeature(com.ibm.wsdl.Constants.FEATURE_VERBOSE, false); - } - -} + // prevent the WSDLReader instance from using the System.out + // stream for messages and logging + reader.setFeature(com.ibm.wsdl.Constants.FEATURE_VERBOSE, false); + + WSDLFactory factory = WSDLFactory.newInstance(); + ExtensionRegistry extRegistry = reader.getExtensionRegistry(); + if (extRegistry == null) { + extRegistry = factory.newPopulatedExtensionRegistry(); + } + + WSDLUtil.registerDefaultExtensionAttributeTypes(extRegistry); + reader.setExtensionRegistry(extRegistry); + } + +} Modified: axis/axis2/java/core/branches/AXIS2-4091/modules/metadata/src/org/apache/axis2/metadata/registry/MetadataFactoryRegistry.java URL: http://svn.apache.org/viewvc/axis/axis2/java/core/branches/AXIS2-4091/modules/metadata/src/org/apache/axis2/metadata/registry/MetadataFactoryRegistry.java?rev=1818518&r1=1818517&r2=1818518&view=diff ============================================================================== --- axis/axis2/java/core/branches/AXIS2-4091/modules/metadata/src/org/apache/axis2/metadata/registry/MetadataFactoryRegistry.java (original) +++ axis/axis2/java/core/branches/AXIS2-4091/modules/metadata/src/org/apache/axis2/metadata/registry/MetadataFactoryRegistry.java Sun Dec 17 22:34:08 2017 @@ -99,7 +99,7 @@ public class MetadataFactoryRegistry { url = classLoader.getResource(configurationFileLoc); if(url == null) { File file = new File(configurationFileLoc); - url = file.toURL(); + url = file.toURI().toURL(); } // the presence of this file is optional if(url != null) { Modified: axis/axis2/java/core/branches/AXIS2-4091/modules/metadata/test-resources/log4j.properties URL: http://svn.apache.org/viewvc/axis/axis2/java/core/branches/AXIS2-4091/modules/metadata/test-resources/log4j.properties?rev=1818518&r1=1818517&r2=1818518&view=diff ============================================================================== --- axis/axis2/java/core/branches/AXIS2-4091/modules/metadata/test-resources/log4j.properties (original) +++ axis/axis2/java/core/branches/AXIS2-4091/modules/metadata/test-resources/log4j.properties Sun Dec 17 22:34:08 2017 @@ -25,7 +25,6 @@ log4j.rootCategory=ERROR, CONSOLE # Set the enterprise logger priority to FATAL log4j.logger.org.apache.axis2.enterprise=FATAL -log4j.logger.de.hunsicker.jalopy.io=FATAL log4j.logger.httpclient.wire.header=FATAL log4j.logger.org.apache.commons.httpclient=FATAL Modified: axis/axis2/java/core/branches/AXIS2-4091/modules/metadata/test/org/apache/axis2/jaxws/description/DescriptionTestUtils.java URL: http://svn.apache.org/viewvc/axis/axis2/java/core/branches/AXIS2-4091/modules/metadata/test/org/apache/axis2/jaxws/description/DescriptionTestUtils.java?rev=1818518&r1=1818517&r2=1818518&view=diff ============================================================================== --- axis/axis2/java/core/branches/AXIS2-4091/modules/metadata/test/org/apache/axis2/jaxws/description/DescriptionTestUtils.java (original) +++ axis/axis2/java/core/branches/AXIS2-4091/modules/metadata/test/org/apache/axis2/jaxws/description/DescriptionTestUtils.java Sun Dec 17 22:34:08 2017 @@ -21,9 +21,9 @@ package org.apache.axis2.jaxws.description; import org.apache.axis2.jaxws.description.builder.DescriptionBuilderComposite; +import org.apache.axis2.wsdl.WSDLUtil; import javax.wsdl.Definition; -import javax.wsdl.factory.WSDLFactory; import javax.wsdl.xml.WSDLReader; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; @@ -57,7 +57,7 @@ public class DescriptionTestUtils { String urlString = getWSDLLocation(wsdlFileName); // Get the URL to the WSDL file. Note that 'basedir' is setup by Maven try { - wsdlURL = new File(urlString).getAbsoluteFile().toURL(); + wsdlURL = new File(urlString).getAbsoluteFile().toURI().toURL(); } catch (Exception e) { System.out.println("Caught exception creating WSDL URL :" + urlString + "; exception: " + e.toString()); @@ -68,8 +68,7 @@ public class DescriptionTestUtils { static public Definition createWSDLDefinition(URL wsdlURL) { Definition wsdlDefinition = null; try { - WSDLFactory factory = WSDLFactory.newInstance(); - WSDLReader reader = factory.newWSDLReader(); + WSDLReader reader = WSDLUtil.newWSDLReaderWithPopulatedExtensionRegistry(); wsdlDefinition = reader.readWSDL(wsdlURL.toString()); wsdlDefinition.setDocumentBaseURI(wsdlURL.toString()); } Modified: axis/axis2/java/core/branches/AXIS2-4091/modules/metadata/test/org/apache/axis2/jaxws/description/impl/ClientDBCSupportEndpointTests.java URL: http://svn.apache.org/viewvc/axis/axis2/java/core/branches/AXIS2-4091/modules/metadata/test/org/apache/axis2/jaxws/description/impl/ClientDBCSupportEndpointTests.java?rev=1818518&r1=1818517&r2=1818518&view=diff ============================================================================== --- axis/axis2/java/core/branches/AXIS2-4091/modules/metadata/test/org/apache/axis2/jaxws/description/impl/ClientDBCSupportEndpointTests.java (original) +++ axis/axis2/java/core/branches/AXIS2-4091/modules/metadata/test/org/apache/axis2/jaxws/description/impl/ClientDBCSupportEndpointTests.java Sun Dec 17 22:34:08 2017 @@ -277,7 +277,7 @@ public class ClientDBCSupportEndpointTes fail("Exception creating File(WSDL): " + e.toString()); } File file = new File(wsdlLocation); - url = file.toURL(); + url = file.toURI().toURL(); } catch (MalformedURLException e) { e.printStackTrace(); fail("Exception converting WSDL file to URL: " + e.toString()); Modified: axis/axis2/java/core/branches/AXIS2-4091/modules/metadata/test/org/apache/axis2/jaxws/description/impl/ClientDBCSupportHandlersTests.java URL: http://svn.apache.org/viewvc/axis/axis2/java/core/branches/AXIS2-4091/modules/metadata/test/org/apache/axis2/jaxws/description/impl/ClientDBCSupportHandlersTests.java?rev=1818518&r1=1818517&r2=1818518&view=diff ============================================================================== --- axis/axis2/java/core/branches/AXIS2-4091/modules/metadata/test/org/apache/axis2/jaxws/description/impl/ClientDBCSupportHandlersTests.java (original) +++ axis/axis2/java/core/branches/AXIS2-4091/modules/metadata/test/org/apache/axis2/jaxws/description/impl/ClientDBCSupportHandlersTests.java Sun Dec 17 22:34:08 2017 @@ -121,7 +121,7 @@ public class ClientDBCSupportHandlersTes String sep = "/"; configLoc = sep + "test-resources" + sep + "test-handler.xml"; String baseDir = new File(System.getProperty("basedir",".")).getCanonicalPath(); - is = new File(baseDir + configLoc).toURL().openStream(); + is = new File(baseDir + configLoc).toURI().toURL().openStream(); } catch(Exception e) { e.printStackTrace(); Modified: axis/axis2/java/core/branches/AXIS2-4091/modules/metadata/test/org/apache/axis2/jaxws/description/impl/DescriptionFactoryImplTests.java URL: http://svn.apache.org/viewvc/axis/axis2/java/core/branches/AXIS2-4091/modules/metadata/test/org/apache/axis2/jaxws/description/impl/DescriptionFactoryImplTests.java?rev=1818518&r1=1818517&r2=1818518&view=diff ============================================================================== --- axis/axis2/java/core/branches/AXIS2-4091/modules/metadata/test/org/apache/axis2/jaxws/description/impl/DescriptionFactoryImplTests.java (original) +++ axis/axis2/java/core/branches/AXIS2-4091/modules/metadata/test/org/apache/axis2/jaxws/description/impl/DescriptionFactoryImplTests.java Sun Dec 17 22:34:08 2017 @@ -247,7 +247,7 @@ public class DescriptionFactoryImplTests String sep = "/"; configLoc = sep + "test-resources" + sep + "test-handler.xml"; String baseDir = new File(System.getProperty("basedir",".")).getCanonicalPath(); - is = new File(baseDir + configLoc).toURL().openStream(); + is = new File(baseDir + configLoc).toURI().toURL().openStream(); } catch(Exception e) { e.printStackTrace(); Modified: axis/axis2/java/core/branches/AXIS2-4091/modules/metadata/test/org/apache/axis2/jaxws/description/impl/ParameterDescriptionImplTests.java URL: http://svn.apache.org/viewvc/axis/axis2/java/core/branches/AXIS2-4091/modules/metadata/test/org/apache/axis2/jaxws/description/impl/ParameterDescriptionImplTests.java?rev=1818518&r1=1818517&r2=1818518&view=diff ============================================================================== --- axis/axis2/java/core/branches/AXIS2-4091/modules/metadata/test/org/apache/axis2/jaxws/description/impl/ParameterDescriptionImplTests.java (original) +++ axis/axis2/java/core/branches/AXIS2-4091/modules/metadata/test/org/apache/axis2/jaxws/description/impl/ParameterDescriptionImplTests.java Sun Dec 17 22:34:08 2017 @@ -28,9 +28,8 @@ import java.util.List; public class ParameterDescriptionImplTests extends TestCase { - public void test1() { - Method[] methods = TestInterface.class.getMethods(); - Method method1 = methods[0]; + public void test1() throws Exception { + Method method1 = TestInterface.class.getMethod("method1", Holder.class); ParameterDescription pdc1 = new ParameterDescriptionImpl(0, method1.getParameterTypes()[0], method1.getGenericParameterTypes()[0], method1.getAnnotations(), null); @@ -39,9 +38,8 @@ public class ParameterDescriptionImplTes } - public void test2() { - Method[] methods = TestInterface.class.getMethods(); - Method method2 = methods[1]; + public void test2() throws Exception { + Method method2 = TestInterface.class.getMethod("method2", Holder.class); ParameterDescription pdc2 = new ParameterDescriptionImpl(0, method2.getParameterTypes()[0], method2.getGenericParameterTypes()[0], method2.getAnnotations(), null); @@ -52,9 +50,8 @@ public class ParameterDescriptionImplTes } } - public void test3() { - Method[] methods = TestInterface.class.getMethods(); - Method method3 = methods[2]; + public void test3() throws Exception { + Method method3 = TestInterface.class.getMethod("method3", Holder.class); ParameterDescription pdc3 = new ParameterDescriptionImpl(0, method3.getParameterTypes()[0], method3.getGenericParameterTypes()[0], method3.getAnnotations(), null); @@ -62,9 +59,8 @@ public class ParameterDescriptionImplTes assertEquals(List[].class, pdc3.getParameterActualType()); } - public void test4() { - Method[] methods = TestInterface.class.getMethods(); - Method method4 = methods[3]; + public void test4() throws Exception { + Method method4 = TestInterface.class.getMethod("method4", String[].class); ParameterDescription pdc4 = new ParameterDescriptionImpl(0, method4.getParameterTypes()[0], method4.getGenericParameterTypes()[0], method4.getAnnotations(), null); @@ -72,9 +68,8 @@ public class ParameterDescriptionImplTes assertEquals(String[].class, pdc4.getParameterActualType()); } - public void test5() { - Method[] methods = TestInterface.class.getMethods(); - Method method5 = methods[4]; + public void test5() throws Exception { + Method method5 = TestInterface.class.getMethod("method5", List[].class); ParameterDescription pdc = new ParameterDescriptionImpl(0, method5.getParameterTypes()[0], method5.getGenericParameterTypes()[0], method5.getAnnotations(), null); Modified: axis/axis2/java/core/branches/AXIS2-4091/modules/metadata/test/org/apache/axis2/metadata/registry/MetadataFactoryRegistryTests.java URL: http://svn.apache.org/viewvc/axis/axis2/java/core/branches/AXIS2-4091/modules/metadata/test/org/apache/axis2/metadata/registry/MetadataFactoryRegistryTests.java?rev=1818518&r1=1818517&r2=1818518&view=diff ============================================================================== --- axis/axis2/java/core/branches/AXIS2-4091/modules/metadata/test/org/apache/axis2/metadata/registry/MetadataFactoryRegistryTests.java (original) +++ axis/axis2/java/core/branches/AXIS2-4091/modules/metadata/test/org/apache/axis2/metadata/registry/MetadataFactoryRegistryTests.java Sun Dec 17 22:34:08 2017 @@ -18,14 +18,14 @@ */ package org.apache.axis2.metadata.registry; - -import junit.framework.TestCase; -import org.apache.axis2.jaxws.wsdl.WSDLReaderConfigurator; - -import javax.wsdl.factory.WSDLFactory; -import javax.wsdl.xml.WSDLReader; -import java.io.File; - + +import junit.framework.TestCase; +import org.apache.axis2.jaxws.wsdl.WSDLReaderConfigurator; +import org.apache.axis2.wsdl.WSDLUtil; + +import javax.wsdl.xml.WSDLReader; +import java.io.File; + public class MetadataFactoryRegistryTests extends TestCase { @@ -50,14 +50,13 @@ public class MetadataFactoryRegistryTest } public void testRegisterWSDLReaderConfigurator() { - Exception e = null; - WSDLReader reader = null; - try { - WSDLFactory factory = WSDLFactory.newInstance(); - reader = factory.newWSDLReader(); - } - catch(Exception e2) { - e.printStackTrace(); + Exception e = null; + WSDLReader reader = null; + try { + reader = WSDLUtil.newWSDLReaderWithPopulatedExtensionRegistry(); + } + catch(Exception e2) { + e.printStackTrace(); e = e2; } assertNull(e); Modified: axis/axis2/java/core/branches/AXIS2-4091/modules/mex/pom.xml URL: http://svn.apache.org/viewvc/axis/axis2/java/core/branches/AXIS2-4091/modules/mex/pom.xml?rev=1818518&r1=1818517&r2=1818518&view=diff ============================================================================== --- axis/axis2/java/core/branches/AXIS2-4091/modules/mex/pom.xml (original) +++ axis/axis2/java/core/branches/AXIS2-4091/modules/mex/pom.xml Sun Dec 17 22:34:08 2017 @@ -23,9 +23,9 @@ <modelVersion>4.0.0</modelVersion> <parent> <groupId>org.apache.axis2</groupId> - <artifactId>axis2-parent</artifactId> - <version>1.7.0-SNAPSHOT</version> - <relativePath>../parent/pom.xml</relativePath> + <artifactId>axis2</artifactId> + <version>1.8.0-SNAPSHOT</version> + <relativePath>../../pom.xml</relativePath> </parent> <artifactId>mex</artifactId> <packaging>mar</packaging> Modified: axis/axis2/java/core/branches/AXIS2-4091/modules/mex/src/org/apache/axis2/mex/om/Metadata.java URL: http://svn.apache.org/viewvc/axis/axis2/java/core/branches/AXIS2-4091/modules/mex/src/org/apache/axis2/mex/om/Metadata.java?rev=1818518&r1=1818517&r2=1818518&view=diff ============================================================================== --- axis/axis2/java/core/branches/AXIS2-4091/modules/mex/src/org/apache/axis2/mex/om/Metadata.java (original) +++ axis/axis2/java/core/branches/AXIS2-4091/modules/mex/src/org/apache/axis2/mex/om/Metadata.java Sun Dec 17 22:34:08 2017 @@ -166,13 +166,13 @@ public class Metadata extends MexOM impl if (aFactory == null) { aFactory = factory; } - Iterator mexSections = mexElement.getChildrenWithName(new QName(namespaceValue, MexConstants.SPEC.METADATA_SECTION)); + Iterator<OMElement> mexSections = mexElement.getChildrenWithName(new QName(namespaceValue, MexConstants.SPEC.METADATA_SECTION)); if (mexSections == null){ throw new MexOMException("Metadata element does not contain MetadataSection element."); } while (mexSections.hasNext()){ - OMElement aSection = (OMElement) mexSections.next(); + OMElement aSection = mexSections.next(); MetadataSection metadataSection = new MetadataSection(aFactory, namespaceValue); addMetadatSection(metadataSection.fromOM(aSection)); } Modified: axis/axis2/java/core/branches/AXIS2-4091/modules/mex/src/org/apache/axis2/mex/util/MexUtil.java URL: http://svn.apache.org/viewvc/axis/axis2/java/core/branches/AXIS2-4091/modules/mex/src/org/apache/axis2/mex/util/MexUtil.java?rev=1818518&r1=1818517&r2=1818518&view=diff ============================================================================== --- axis/axis2/java/core/branches/AXIS2-4091/modules/mex/src/org/apache/axis2/mex/util/MexUtil.java (original) +++ axis/axis2/java/core/branches/AXIS2-4091/modules/mex/src/org/apache/axis2/mex/util/MexUtil.java Sun Dec 17 22:34:08 2017 @@ -241,12 +241,12 @@ public class MexUtil { return forms; OMElement mexConfig = mexParm.getParameterElement(); - Iterator ite = mexConfig.getChildrenWithName(new QName( + Iterator<OMElement> ite = mexConfig.getChildrenWithName(new QName( MexConstants.MEX_CONFIG.OUTPUT_FORM_PARM)); String dialectForm_configured = null; String serviceForm_configured = null; while (ite.hasNext()) { - OMElement elem = (OMElement) ite.next(); + OMElement elem = ite.next(); String form_value = elem.getAttributeValue(new QName( MexConstants.MEX_CONFIG.FORMS_PARM)); String dialect_value = elem.getAttributeValue(new QName( Modified: axis/axis2/java/core/branches/AXIS2-4091/modules/mtompolicy-mar/pom.xml URL: http://svn.apache.org/viewvc/axis/axis2/java/core/branches/AXIS2-4091/modules/mtompolicy-mar/pom.xml?rev=1818518&r1=1818517&r2=1818518&view=diff ============================================================================== --- axis/axis2/java/core/branches/AXIS2-4091/modules/mtompolicy-mar/pom.xml (original) +++ axis/axis2/java/core/branches/AXIS2-4091/modules/mtompolicy-mar/pom.xml Sun Dec 17 22:34:08 2017 @@ -23,9 +23,9 @@ <modelVersion>4.0.0</modelVersion> <parent> <groupId>org.apache.axis2</groupId> - <artifactId>axis2-parent</artifactId> - <version>1.7.0-SNAPSHOT</version> - <relativePath>../parent/pom.xml</relativePath> + <artifactId>axis2</artifactId> + <version>1.8.0-SNAPSHOT</version> + <relativePath>../../pom.xml</relativePath> </parent> <artifactId>mtompolicy</artifactId> <name>Apache Axis2 - MTOM Policy module</name> Modified: axis/axis2/java/core/branches/AXIS2-4091/modules/mtompolicy/pom.xml URL: http://svn.apache.org/viewvc/axis/axis2/java/core/branches/AXIS2-4091/modules/mtompolicy/pom.xml?rev=1818518&r1=1818517&r2=1818518&view=diff ============================================================================== --- axis/axis2/java/core/branches/AXIS2-4091/modules/mtompolicy/pom.xml (original) +++ axis/axis2/java/core/branches/AXIS2-4091/modules/mtompolicy/pom.xml Sun Dec 17 22:34:08 2017 @@ -23,9 +23,9 @@ <modelVersion>4.0.0</modelVersion> <parent> <groupId>org.apache.axis2</groupId> - <artifactId>axis2-parent</artifactId> - <version>1.7.0-SNAPSHOT</version> - <relativePath>../parent/pom.xml</relativePath> + <artifactId>axis2</artifactId> + <version>1.8.0-SNAPSHOT</version> + <relativePath>../../pom.xml</relativePath> </parent> <artifactId>axis2-mtompolicy</artifactId> <name>Apache Axis2 - MTOM Policy</name> Modified: axis/axis2/java/core/branches/AXIS2-4091/modules/mtompolicy/test/org/apache/axis2/policy/model/MTOMAssertionTest.java URL: http://svn.apache.org/viewvc/axis/axis2/java/core/branches/AXIS2-4091/modules/mtompolicy/test/org/apache/axis2/policy/model/MTOMAssertionTest.java?rev=1818518&r1=1818517&r2=1818518&view=diff ============================================================================== --- axis/axis2/java/core/branches/AXIS2-4091/modules/mtompolicy/test/org/apache/axis2/policy/model/MTOMAssertionTest.java (original) +++ axis/axis2/java/core/branches/AXIS2-4091/modules/mtompolicy/test/org/apache/axis2/policy/model/MTOMAssertionTest.java Sun Dec 17 22:34:08 2017 @@ -21,11 +21,13 @@ package org.apache.axis2.policy.model; import junit.framework.TestCase; import org.apache.axiom.om.OMElement; -import org.apache.axiom.om.impl.builder.StAXOMBuilder; +import org.apache.axiom.om.OMXMLBuilderFactory; +import org.apache.axiom.om.OMXMLParserWrapper; import org.apache.neethi.Assertion; import org.apache.neethi.Policy; import org.apache.neethi.PolicyEngine; +import java.io.FileInputStream; import java.util.Iterator; import java.util.List; @@ -152,7 +154,8 @@ public class MTOMAssertionTest extends T private Policy getPolicy(String filePath) throws Exception { - StAXOMBuilder builder = new StAXOMBuilder(filePath); + OMXMLParserWrapper builder = OMXMLBuilderFactory.createOMBuilder( + new FileInputStream(filePath)); OMElement elem = builder.getDocumentElement(); return PolicyEngine.getPolicy(elem); } Modified: axis/axis2/java/core/branches/AXIS2-4091/modules/osgi/pom.xml URL: http://svn.apache.org/viewvc/axis/axis2/java/core/branches/AXIS2-4091/modules/osgi/pom.xml?rev=1818518&r1=1818517&r2=1818518&view=diff ============================================================================== --- axis/axis2/java/core/branches/AXIS2-4091/modules/osgi/pom.xml (original) +++ axis/axis2/java/core/branches/AXIS2-4091/modules/osgi/pom.xml Sun Dec 17 22:34:08 2017 @@ -23,9 +23,9 @@ <parent> <groupId>org.apache.axis2</groupId> - <artifactId>axis2-parent</artifactId> - <version>1.7.0-SNAPSHOT</version> - <relativePath>../parent/pom.xml</relativePath> + <artifactId>axis2</artifactId> + <version>1.8.0-SNAPSHOT</version> + <relativePath>../../pom.xml</relativePath> </parent> <modelVersion>4.0.0</modelVersion> @@ -80,10 +80,9 @@ org.apache.axis2.*;-split-package:=merge-last; version=1.5, </Export-Package> <Import-Package> - !javax.xml.namespace, + javax.xml.namespace, !org.apache.axis2.*, - javax.ws.rs; version=1.0, - javax.xml.namespace; version=0.0.0, + javax.ws.rs; resolution:=optional, javax.servlet; version=2.4.0, javax.servlet.http; version=2.4.0, javax.transaction, @@ -94,9 +93,9 @@ org.osgi.service.log; version=1.3, org.osgi.service.cm; version=1.2.0, com.ibm.wsdl.util.xml, - javax.activation;version="1.1", + com.ibm.wsdl, + javax.activation, javax.jws;version="2.0", - javax.jms;version="1.1", javax.mail;version="1.4", javax.management, javax.mail.internet;version="1.4", @@ -109,42 +108,22 @@ javax.wsdl.xml, javax.net.*, javax.xml.parsers;resolution:=optional, - javax.xml.stream;resolution:=optional;version="1.0", + javax.xml.stream, javax.xml.transform;resolution:=optional, javax.xml.transform.dom;resolution:=optional, javax.xml.transform.stream;resolution:=optional, javax.xml.datatype.*, org.apache.axiom.*, org.apache.commons.fileupload.*, - org.apache.commons.httpclient.*, org.apache.commons.lang;resolution:=optional, org.apache.commons.logging, - org.apache.http;resolution:=optional, - org.apache.http.entity;resolution:=optional, - org.apache.http.impl;resolution:=optional, - org.apache.http.impl.entity;resolution:=optional, - org.apache.http.impl.io;resolution:=optional, - org.apache.http.impl.auth;resolution:=optional, - org.apache.http.impl.conn;resolution:=optional, - org.apache.http.io;resolution:=optional, - org.apache.http.message;resolution:=optional, - org.apache.http.params;resolution:=optional, - org.apache.http.protocol;resolution:=optional, - org.apache.http.util;resolution:=optional, org.apache.neethi, org.apache.woden.*;version="0.0.0", org.apache.ws.commons.schema.*, org.w3c.dom;resolution:=optional, org.w3c.dom.traversal;resolution:=optional, org.xml.sax;resolution:=optional, - org.apache.http.client.*, - org.apache.http.auth;resolution:=optional, - org.apache.http.conn;resolution:=optional, - org.apache.http.conn.params;resolution:=optional, - org.apache.http.conn.scheme;resolution:=optional, - org.apache.http.conn.ssl;resolution:=optional, - org.apache.http.impl.client;resolution:=optional, - org.apache.http.impl.conn.tsccm;resolution:=optional + * </Import-Package> <Private-Package> org.apache.axis2.osgi.internal, @@ -156,18 +135,11 @@ org.apache.axis2.context.ConfigurationContext </Export-Service> <Bundle-RequiredExecutionEnvironment> - J2SE-1.5 + J2SE-1.6 </Bundle-RequiredExecutionEnvironment> </instructions> </configuration> </plugin> - <plugin> - <artifactId>maven-compiler-plugin</artifactId> - <configuration> - <source>1.5</source> - <target>1.5</target> - </configuration> - </plugin> </plugins> </build> Modified: axis/axis2/java/core/branches/AXIS2-4091/modules/osgi/resources/org/apache/axis2/osgi/deployment/axis2.xml URL: http://svn.apache.org/viewvc/axis/axis2/java/core/branches/AXIS2-4091/modules/osgi/resources/org/apache/axis2/osgi/deployment/axis2.xml?rev=1818518&r1=1818517&r2=1818518&view=diff ============================================================================== --- axis/axis2/java/core/branches/AXIS2-4091/modules/osgi/resources/org/apache/axis2/osgi/deployment/axis2.xml (original) +++ axis/axis2/java/core/branches/AXIS2-4091/modules/osgi/resources/org/apache/axis2/osgi/deployment/axis2.xml Sun Dec 17 22:34:08 2017 @@ -201,7 +201,7 @@ <transportSender name="local" class="org.apache.axis2.transport.local.LocalTransportSender"/> <transportSender name="http" - class="org.apache.axis2.transport.http.CommonsHTTPTransportSender"> + class="org.apache.axis2.transport.http.impl.httpclient4.HTTPClient4TransportSender"> <parameter name="PROTOCOL">HTTP/1.1</parameter> <parameter name="Transfer-Encoding">chunked</parameter> @@ -210,7 +210,7 @@ </transportSender> <transportSender name="https" - class="org.apache.axis2.transport.http.CommonsHTTPTransportSender"> + class="org.apache.axis2.transport.http.impl.httpclient4.HTTPClient4TransportSender"> <parameter name="PROTOCOL">HTTP/1.1</parameter> <parameter name="Transfer-Encoding">chunked</parameter> </transportSender> Modified: axis/axis2/java/core/branches/AXIS2-4091/modules/osgi/src/org/apache/axis2/osgi/OSGiAxisServlet.java URL: http://svn.apache.org/viewvc/axis/axis2/java/core/branches/AXIS2-4091/modules/osgi/src/org/apache/axis2/osgi/OSGiAxisServlet.java?rev=1818518&r1=1818517&r2=1818518&view=diff ============================================================================== --- axis/axis2/java/core/branches/AXIS2-4091/modules/osgi/src/org/apache/axis2/osgi/OSGiAxisServlet.java (original) +++ axis/axis2/java/core/branches/AXIS2-4091/modules/osgi/src/org/apache/axis2/osgi/OSGiAxisServlet.java Sun Dec 17 22:34:08 2017 @@ -17,12 +17,7 @@ package org.apache.axis2.osgi; import org.apache.axis2.AxisFault; import org.apache.axis2.context.ConfigurationContext; -import org.apache.axis2.engine.AxisConfigurator; -import org.apache.axis2.osgi.deployment.OSGiConfigurationContextFactory; import org.apache.axis2.transport.http.AxisServlet; -import org.apache.axis2.transport.http.ListingAgent; -import org.osgi.framework.BundleContext; -import org.osgi.framework.ServiceReference; import javax.servlet.ServletConfig; import javax.servlet.ServletContext; @@ -34,34 +29,36 @@ import javax.servlet.ServletException; */ public class OSGiAxisServlet extends AxisServlet { - private BundleContext context; + private ConfigurationContext configurationContext; - /** - * OSGiAxisServlet needs an referenc to OSGi environmentb - * - * @param context BundleContext - */ - public OSGiAxisServlet(BundleContext context) { - this.context = context; + public OSGiAxisServlet(ConfigurationContext configurationContext) { + this.configurationContext = configurationContext; } + @Override + protected ConfigurationContext initConfigContext(ServletConfig config) throws ServletException { + return configurationContext; + } + + @Override + protected void initTransports() throws AxisFault { + // Not sure if this is correct, but the original OSGiAxisServlet code effectively skipped + // the invocation of the initTransports method. + } public void init(ServletConfig servletConfig) throws ServletException { - this.servletConfig = servletConfig; - ServiceReference reference = - context.getServiceReference(ConfigurationContext.class.getName()); - if (reference == null) { - throw new ServletException( - "An instance of ConfigurationContext is not available to continue the proccess."); - } - configContext = (ConfigurationContext) context.getService(reference); - axisConfiguration = configContext.getAxisConfiguration(); - agent = new ListingAgent(configContext); - initParams(); + super.init(servletConfig); ServletContext servletContext = servletConfig.getServletContext(); if (servletContext != null) { servletContext.setAttribute(this.getClass().getName(), this); } } + + @Override + public void destroy() { + // Do nothing. This prevents AxisServlet from terminating the configuration context. + // The configuration context is terminated by OSGiConfigurationContextFactory, and + // invoking the terminate method twice (potentially concurrently) causes problems. + } } Modified: axis/axis2/java/core/branches/AXIS2-4091/modules/osgi/src/org/apache/axis2/osgi/deployment/OSGiConfigurationContextFactory.java URL: http://svn.apache.org/viewvc/axis/axis2/java/core/branches/AXIS2-4091/modules/osgi/src/org/apache/axis2/osgi/deployment/OSGiConfigurationContextFactory.java?rev=1818518&r1=1818517&r2=1818518&view=diff ============================================================================== --- axis/axis2/java/core/branches/AXIS2-4091/modules/osgi/src/org/apache/axis2/osgi/deployment/OSGiConfigurationContextFactory.java (original) +++ axis/axis2/java/core/branches/AXIS2-4091/modules/osgi/src/org/apache/axis2/osgi/deployment/OSGiConfigurationContextFactory.java Sun Dec 17 22:34:08 2017 @@ -56,6 +56,8 @@ public class OSGiConfigurationContextFac private ServiceRegistration mngServiceRegistration; + private ServiceRegistration transportServiceRegistration; + private ConfigurationContext configCtx; private ServiceRegistration configCtxServiceRegistration; @@ -72,11 +74,20 @@ public class OSGiConfigurationContextFac } public synchronized void stop() { + if (configCtxServiceRegistration != null) { + configCtxServiceRegistration.unregister(); + } + + if (transportServiceRegistration != null) { + transportServiceRegistration.unregister(); + } + if (mngServiceRegistration != null) { mngServiceRegistration.unregister(); } bundleTracker.close(); if (configCtx != null) { + log.debug("Terminating configuration context"); try { configCtx.terminate(); configCtx = null; @@ -119,7 +130,7 @@ public class OSGiConfigurationContextFac Dictionary prop = new Properties(); prop.put(PROTOCOL, "http"); //adding the default listener - context.registerService(TransportListener.class.getName(), new HttpListener(context), + transportServiceRegistration = context.registerService(TransportListener.class.getName(), new HttpListener(context), prop); log.info("Axis2 environment has started."); } catch (AxisFault e) { Modified: axis/axis2/java/core/branches/AXIS2-4091/modules/osgi/src/org/apache/axis2/osgi/deployment/OSGiServerConfigurator.java URL: http://svn.apache.org/viewvc/axis/axis2/java/core/branches/AXIS2-4091/modules/osgi/src/org/apache/axis2/osgi/deployment/OSGiServerConfigurator.java?rev=1818518&r1=1818517&r2=1818518&view=diff ============================================================================== --- axis/axis2/java/core/branches/AXIS2-4091/modules/osgi/src/org/apache/axis2/osgi/deployment/OSGiServerConfigurator.java (original) +++ axis/axis2/java/core/branches/AXIS2-4091/modules/osgi/src/org/apache/axis2/osgi/deployment/OSGiServerConfigurator.java Sun Dec 17 22:34:08 2017 @@ -73,20 +73,32 @@ public class OSGiServerConfigurator exte } public AxisConfiguration populateAxisConfiguration(InputStream in) throws DeploymentException { - axisConfig = new AxisConfiguration(); - AxisConfigBuilder builder = - new AxisConfigBuilder(in, axisConfig, this); - builder.populateConfig(); + // Dirty hack necessary because class loading in AxisConfigBuilder is completely broken: + // although it is possible to configure the class loaders explicitly in the AxisConfiguration, + // the AxisConfigBuilder will still use the thread context class loader in some places. + // On the other hand, in an OSGi environment, the TCCL is not well defined. To avoid problems, + // we set it to the class loader of the Axis2 OSGi bundle. + Thread currentThread = Thread.currentThread(); + ClassLoader savedTCCL = currentThread.getContextClassLoader(); + currentThread.setContextClassLoader(OSGiServerConfigurator.class.getClassLoader()); try { - if (in != null) { - in.close(); + axisConfig = new AxisConfiguration(); + AxisConfigBuilder builder = + new AxisConfigBuilder(in, axisConfig, this); + builder.populateConfig(); + try { + if (in != null) { + in.close(); + } + } catch (IOException e) { + String msg = "Error in closing input stream"; + throw new DeploymentException(msg, e); } - } catch (IOException e) { - String msg = "Error in closing input stream"; - throw new DeploymentException(msg, e); + //TODO: if module deployer neede to set it should be set here. + return axisConfig; + } finally { + currentThread.setContextClassLoader(savedTCCL); } - //TODO: if module deployer neede to set it should be set here. - return axisConfig; } public void loadServices() { Modified: axis/axis2/java/core/branches/AXIS2-4091/modules/osgi/src/org/apache/axis2/osgi/deployment/OSGiServiceGroupBuilder.java URL: http://svn.apache.org/viewvc/axis/axis2/java/core/branches/AXIS2-4091/modules/osgi/src/org/apache/axis2/osgi/deployment/OSGiServiceGroupBuilder.java?rev=1818518&r1=1818517&r2=1818518&view=diff ============================================================================== --- axis/axis2/java/core/branches/AXIS2-4091/modules/osgi/src/org/apache/axis2/osgi/deployment/OSGiServiceGroupBuilder.java (original) +++ axis/axis2/java/core/branches/AXIS2-4091/modules/osgi/src/org/apache/axis2/osgi/deployment/OSGiServiceGroupBuilder.java Sun Dec 17 22:34:08 2017 @@ -60,25 +60,25 @@ public class OSGiServiceGroupBuilder ext try { // Processing service level parameters - Iterator itr = serviceElement.getChildrenWithName(new QName(TAG_PARAMETER)); + Iterator<OMElement> itr = serviceElement.getChildrenWithName(new QName(TAG_PARAMETER)); processParameters(itr, axisServiceGroup, axisServiceGroup.getParent()); - Iterator moduleConfigs = + Iterator<OMElement> moduleConfigs = serviceElement.getChildrenWithName(new QName(TAG_MODULE_CONFIG)); processServiceModuleConfig(moduleConfigs, axisServiceGroup.getParent(), axisServiceGroup); // processing service-wide modules which required to engage globally - Iterator moduleRefs = serviceElement.getChildrenWithName(new QName(TAG_MODULE)); + Iterator<OMElement> moduleRefs = serviceElement.getChildrenWithName(new QName(TAG_MODULE)); processModuleRefs(moduleRefs, axisServiceGroup); - Iterator serviceitr = serviceElement.getChildrenWithName(new QName(TAG_SERVICE)); + Iterator<OMElement> serviceitr = serviceElement.getChildrenWithName(new QName(TAG_SERVICE)); while (serviceitr.hasNext()) { - OMElement service = (OMElement) serviceitr.next(); + OMElement service = serviceitr.next(); OMAttribute serviceNameatt = service.getAttribute(new QName(ATTRIBUTE_NAME)); if (serviceNameatt == null) { throw new DeploymentException( Modified: axis/axis2/java/core/branches/AXIS2-4091/modules/osgi/src/org/apache/axis2/osgi/deployment/ServiceRegistry.java URL: http://svn.apache.org/viewvc/axis/axis2/java/core/branches/AXIS2-4091/modules/osgi/src/org/apache/axis2/osgi/deployment/ServiceRegistry.java?rev=1818518&r1=1818517&r2=1818518&view=diff ============================================================================== --- axis/axis2/java/core/branches/AXIS2-4091/modules/osgi/src/org/apache/axis2/osgi/deployment/ServiceRegistry.java (original) +++ axis/axis2/java/core/branches/AXIS2-4091/modules/osgi/src/org/apache/axis2/osgi/deployment/ServiceRegistry.java Sun Dec 17 22:34:08 2017 @@ -174,17 +174,19 @@ public class ServiceRegistry extends Abs unreslovedBundles.add(bundle); } try { - for (Iterator iterator = axisServiceGroup.getServices(); - iterator.hasNext();) { - AxisService service = (AxisService) iterator.next(); - log.info("[Axis2/OSGi] Service - " + service.getName()); + if (log.isInfoEnabled()) { + List<String> serviceNames = new ArrayList<String>(); + for (Iterator<AxisService> iterator = axisServiceGroup.getServices(); + iterator.hasNext(); ) { + AxisService service = (AxisService) iterator.next(); + serviceNames.add(service.getName()); + } + log.info("Stopping service group " + + axisServiceGroup.getServiceGroupName() + " with services " + + serviceNames + " in bundle " + bundle.getSymbolicName()); } configCtx.getAxisConfiguration() .removeServiceGroup(axisServiceGroup.getServiceGroupName()); - log.info("[Axis2/OSGi] Stopping " + - axisServiceGroup.getServiceGroupName() + - " service group in Bundle - " + - bundle.getSymbolicName()); } catch (AxisFault e) { String msg = "Error while removing the service group"; log.error(msg, e); Modified: axis/axis2/java/core/branches/AXIS2-4091/modules/osgi/src/org/apache/axis2/osgi/internal/Activator.java URL: http://svn.apache.org/viewvc/axis/axis2/java/core/branches/AXIS2-4091/modules/osgi/src/org/apache/axis2/osgi/internal/Activator.java?rev=1818518&r1=1818517&r2=1818518&view=diff ============================================================================== --- axis/axis2/java/core/branches/AXIS2-4091/modules/osgi/src/org/apache/axis2/osgi/internal/Activator.java (original) +++ axis/axis2/java/core/branches/AXIS2-4091/modules/osgi/src/org/apache/axis2/osgi/internal/Activator.java Sun Dec 17 22:34:08 2017 @@ -15,18 +15,20 @@ */ package org.apache.axis2.osgi.internal; +import java.util.Hashtable; + import org.apache.axis2.context.ConfigurationContext; import org.apache.axis2.osgi.OSGiAxisServlet; + import static org.apache.axis2.osgi.deployment.OSGiAxis2Constants.AXIS2_OSGi_ROOT_CONTEXT; + import org.apache.axis2.osgi.deployment.OSGiConfigurationContextFactory; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.osgi.framework.*; -import org.osgi.service.http.HttpService; -import org.osgi.service.http.NamespaceException; import org.osgi.util.tracker.ServiceTracker; -import javax.servlet.ServletException; +import javax.servlet.Servlet; /** * Activator will set the necessary parameters that initiate Axis2 OSGi integration @@ -35,7 +37,7 @@ public class Activator implements Bundle private static Log log = LogFactory.getLog(Activator.class); - private HttpServiceTracker tracker; + private ConfigurationContextTracker tracker; private final OSGiConfigurationContextFactory managedService; @@ -45,61 +47,49 @@ public class Activator implements Bundle public void start(BundleContext context) throws Exception { managedService.start(context); - managedService.updated(null); - tracker = new HttpServiceTracker(context); + tracker = new ConfigurationContextTracker(context); tracker.open(); } public void stop(BundleContext context) { tracker.close(); managedService.stop(); - //ungetService ConfigurationContext.class.getName() - ServiceReference configCtxRef = - context.getServiceReference(ConfigurationContext.class.getName()); - if (configCtxRef != null) { - context.ungetService(configCtxRef); - } } - //HttpServiceTracker - - class HttpServiceTracker extends ServiceTracker { + class ConfigurationContextTracker extends ServiceTracker { - public HttpServiceTracker(BundleContext context) { - super(context, HttpService.class.getName(), null); + public ConfigurationContextTracker(BundleContext context) { + super(context, ConfigurationContext.class.getName(), null); } public Object addingService(ServiceReference serviceReference) { - HttpService httpService = (HttpService) context.getService(serviceReference); - try { - OSGiAxisServlet axisServlet = new OSGiAxisServlet(context); - ServiceReference configCtxRef = - context.getServiceReference(ConfigurationContext.class.getName()); - ConfigurationContext configCtx = - (ConfigurationContext) context.getService(configCtxRef); - String propServiceContextRoot = context.getProperty(AXIS2_OSGi_ROOT_CONTEXT); - String serviceContextRoot = "services"; - if (propServiceContextRoot != null && propServiceContextRoot.length() != 0) { - if (propServiceContextRoot.startsWith("/")) { - serviceContextRoot = propServiceContextRoot.substring(1); - } else { - serviceContextRoot = propServiceContextRoot; - } + ConfigurationContext configCtx = (ConfigurationContext) context.getService(serviceReference); + OSGiAxisServlet axisServlet = new OSGiAxisServlet(configCtx); + String propServiceContextRoot = context.getProperty(AXIS2_OSGi_ROOT_CONTEXT); + String serviceContextRoot = "services"; + if (propServiceContextRoot != null && propServiceContextRoot.length() != 0) { + if (propServiceContextRoot.startsWith("/")) { + serviceContextRoot = propServiceContextRoot.substring(1); + } else { + serviceContextRoot = propServiceContextRoot; } - configCtx.setServicePath(serviceContextRoot); - String contextRoot = "/" + serviceContextRoot; - log.info("Registering SOAP message listener servlet to context : " + contextRoot); - httpService.registerServlet(contextRoot, axisServlet, null, null); - } catch (ServletException e) { - String msg = "Error while registering servlets"; - log.error(msg, e); - } catch (NamespaceException e) { - String msg = "Namespace missmatch when registering servlets"; - log.error(msg, e); } - return httpService; + configCtx.setServicePath(serviceContextRoot); + String contextRoot = "/" + serviceContextRoot; + log.info("Registering SOAP message listener servlet to context : " + contextRoot); + Hashtable props = new Hashtable(); + props.put("alias", contextRoot); + // Register the servlet as an OSGi service to be picked up by the HTTP whiteboard service. + // We return the ServiceRegistration so that we can unregister the servlet later. + return context.registerService(Servlet.class.getName(), axisServlet, props); } + @Override + public void removedService(ServiceReference reference, Object service) { + // Unregister the servlet and unget the reference to the ConfigurationContext. + ((ServiceRegistration)service).unregister(); + context.ungetService(reference); + } } } Modified: axis/axis2/java/core/branches/AXIS2-4091/modules/ping/pom.xml URL: http://svn.apache.org/viewvc/axis/axis2/java/core/branches/AXIS2-4091/modules/ping/pom.xml?rev=1818518&r1=1818517&r2=1818518&view=diff ============================================================================== --- axis/axis2/java/core/branches/AXIS2-4091/modules/ping/pom.xml (original) +++ axis/axis2/java/core/branches/AXIS2-4091/modules/ping/pom.xml Sun Dec 17 22:34:08 2017 @@ -23,9 +23,9 @@ <modelVersion>4.0.0</modelVersion> <parent> <groupId>org.apache.axis2</groupId> - <artifactId>axis2-parent</artifactId> - <version>1.7.0-SNAPSHOT</version> - <relativePath>../parent/pom.xml</relativePath> + <artifactId>axis2</artifactId> + <version>1.8.0-SNAPSHOT</version> + <relativePath>../../pom.xml</relativePath> </parent> <artifactId>ping</artifactId> <packaging>mar</packaging> Modified: axis/axis2/java/core/branches/AXIS2-4091/modules/ping/src/org/apache/axis2/ping/PingMessageReceiver.java URL: http://svn.apache.org/viewvc/axis/axis2/java/core/branches/AXIS2-4091/modules/ping/src/org/apache/axis2/ping/PingMessageReceiver.java?rev=1818518&r1=1818517&r2=1818518&view=diff ============================================================================== --- axis/axis2/java/core/branches/AXIS2-4091/modules/ping/src/org/apache/axis2/ping/PingMessageReceiver.java (original) +++ axis/axis2/java/core/branches/AXIS2-4091/modules/ping/src/org/apache/axis2/ping/PingMessageReceiver.java Sun Dec 17 22:34:08 2017 @@ -95,12 +95,12 @@ public class PingMessageReceiver extends if (!serviceLevel && element != null) { //Operations to be pinged has been specified in the ping request - Iterator<?> elementIterator = pingRequestElement.getChildrenWithName(new QName(TAG_OPERATION)); + Iterator<OMElement> elementIterator = pingRequestElement.getChildrenWithName(new QName(TAG_OPERATION)); ArrayList<AxisOperation> operationList = new ArrayList<AxisOperation>(); AxisOperation axisOperation; while (elementIterator.hasNext()) { - OMElement opElement = (OMElement) elementIterator.next(); + OMElement opElement = elementIterator.next(); String operationName = opElement.getText(); axisOperation = inMessage.getAxisService().getOperation(new QName(operationName)); Modified: axis/axis2/java/core/branches/AXIS2-4091/modules/resource-bundle/pom.xml URL: http://svn.apache.org/viewvc/axis/axis2/java/core/branches/AXIS2-4091/modules/resource-bundle/pom.xml?rev=1818518&r1=1818517&r2=1818518&view=diff ============================================================================== --- axis/axis2/java/core/branches/AXIS2-4091/modules/resource-bundle/pom.xml (original) +++ axis/axis2/java/core/branches/AXIS2-4091/modules/resource-bundle/pom.xml Sun Dec 17 22:34:08 2017 @@ -23,9 +23,9 @@ <modelVersion>4.0.0</modelVersion> <parent> <groupId>org.apache.axis2</groupId> - <artifactId>axis2-parent</artifactId> - <version>1.7.0-SNAPSHOT</version> - <relativePath>../parent/pom.xml</relativePath> + <artifactId>axis2</artifactId> + <version>1.8.0-SNAPSHOT</version> + <relativePath>../../pom.xml</relativePath> </parent> <artifactId>axis2-resource-bundle</artifactId> <name>Apache Axis2 - Resource bundle</name> Modified: axis/axis2/java/core/branches/AXIS2-4091/modules/saaj/pom.xml URL: http://svn.apache.org/viewvc/axis/axis2/java/core/branches/AXIS2-4091/modules/saaj/pom.xml?rev=1818518&r1=1818517&r2=1818518&view=diff ============================================================================== --- axis/axis2/java/core/branches/AXIS2-4091/modules/saaj/pom.xml (original) +++ axis/axis2/java/core/branches/AXIS2-4091/modules/saaj/pom.xml Sun Dec 17 22:34:08 2017 @@ -23,9 +23,9 @@ <modelVersion>4.0.0</modelVersion> <parent> <groupId>org.apache.axis2</groupId> - <artifactId>axis2-parent</artifactId> - <version>1.7.0-SNAPSHOT</version> - <relativePath>../parent/pom.xml</relativePath> + <artifactId>axis2</artifactId> + <version>1.8.0-SNAPSHOT</version> + <relativePath>../../pom.xml</relativePath> </parent> <artifactId>axis2-saaj</artifactId> <name>Apache Axis2 - SAAJ</name> @@ -38,10 +38,6 @@ </scm> <dependencies> <dependency> - <groupId>org.apache.geronimo.specs</groupId> - <artifactId>geronimo-saaj_1.3_spec</artifactId> - </dependency> - <dependency> <groupId>org.apache.ws.commons.axiom</groupId> <artifactId>axiom-dom</artifactId> <scope>runtime</scope> @@ -90,6 +86,11 @@ <scope>test</scope> </dependency> <dependency> + <groupId>commons-httpclient</groupId> + <artifactId>commons-httpclient</artifactId> + <scope>test</scope> + </dependency> + <dependency> <groupId>com.sun.xml.messaging.saaj</groupId> <artifactId>saaj-impl</artifactId> <version>1.3.2</version> @@ -101,6 +102,12 @@ </exclusion> </exclusions> </dependency> + <dependency> + <groupId>org.apache.ws.commons.axiom</groupId> + <artifactId>saaj-testsuite</artifactId> + <version>${axiom.version}</version> + <scope>test</scope> + </dependency> <!-- This is required on IBM JDKs (and potentially others) because saaj-impl depends on Sun's internal copy of Xerces. See AXIS2-4228. --> <dependency> @@ -140,12 +147,28 @@ </executions> </plugin> <plugin> - <artifactId>maven-compiler-plugin</artifactId> - <inherited>true</inherited> - <configuration> - <source>1.5</source> - <target>1.5</target> - </configuration> + <groupId>com.github.veithen.alta</groupId> + <artifactId>alta-maven-plugin</artifactId> + <executions> + <execution> + <goals> + <goal>generate-properties</goal> + </goals> + <configuration> + <name>surefire.bootclasspath</name> + <value>%file%</value> + <separator>${path.separator}</separator> + <artifacts> + <artifact> + <!-- TODO: make the test cases compatible with the SAAJ API in the JRE and remove this --> + <groupId>org.apache.geronimo.specs</groupId> + <artifactId>geronimo-saaj_1.3_spec</artifactId> + <version>1.0.1</version> + </artifact> + </artifacts> + </configuration> + </execution> + </executions> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> @@ -160,7 +183,7 @@ presence of jaxp-ri on the classpath. * Please leave this on a single line. Adding a newline between the two options causes a build failure. --> - <argLine>-Djava.endorsed.dirs=${m2Repository}/org/apache/geronimo/specs/geronimo-saaj_1.3_spec/${geronimo.spec.saaj.version}/ -Dcom.sun.org.apache.xerces.internal.xni.parser.XMLParserConfiguration=com.sun.org.apache.xerces.internal.parsers.XIncludeParserConfiguration</argLine> + <argLine>-Xbootclasspath/p:${surefire.bootclasspath} -Dcom.sun.org.apache.xerces.internal.xni.parser.XMLParserConfiguration=com.sun.org.apache.xerces.internal.parsers.XIncludeParserConfiguration</argLine> <systemProperties> <!-- Prevent Mac OS X from showing an icon in the dock during the test run --> <property> Modified: axis/axis2/java/core/branches/AXIS2-4091/modules/saaj/src/org/apache/axis2/saaj/CommentImpl.java URL: http://svn.apache.org/viewvc/axis/axis2/java/core/branches/AXIS2-4091/modules/saaj/src/org/apache/axis2/saaj/CommentImpl.java?rev=1818518&r1=1818517&r2=1818518&view=diff ============================================================================== --- axis/axis2/java/core/branches/AXIS2-4091/modules/saaj/src/org/apache/axis2/saaj/CommentImpl.java (original) +++ axis/axis2/java/core/branches/AXIS2-4091/modules/saaj/src/org/apache/axis2/saaj/CommentImpl.java Sun Dec 17 22:34:08 2017 @@ -18,19 +18,16 @@ */ package org.apache.axis2.saaj; -import javax.xml.soap.SOAPElement; - +import org.apache.axiom.om.OMComment; import org.w3c.dom.Comment; public class CommentImpl extends TextImplEx implements Comment { - - public CommentImpl(String data, SOAPElement parent) { - super(data, parent); + public CommentImpl(OMComment textNode) { + super(textNode); } - public CommentImpl(String data, SOAPElement parent, - org.w3c.dom.Node prevSibling, org.w3c.dom.Node nextSibling) { - super(data, parent, prevSibling, nextSibling); + public CommentImpl(String data) { + super(data); } public boolean isComment() { Modified: axis/axis2/java/core/branches/AXIS2-4091/modules/saaj/src/org/apache/axis2/saaj/DetailImpl.java URL: http://svn.apache.org/viewvc/axis/axis2/java/core/branches/AXIS2-4091/modules/saaj/src/org/apache/axis2/saaj/DetailImpl.java?rev=1818518&r1=1818517&r2=1818518&view=diff ============================================================================== --- axis/axis2/java/core/branches/AXIS2-4091/modules/saaj/src/org/apache/axis2/saaj/DetailImpl.java (original) +++ axis/axis2/java/core/branches/AXIS2-4091/modules/saaj/src/org/apache/axis2/saaj/DetailImpl.java Sun Dec 17 22:34:08 2017 @@ -70,9 +70,7 @@ public class DetailImpl extends SOAPFaul */ public DetailEntry addDetailEntry(Name name) throws SOAPException { SOAPElementImpl<?> childElement = (SOAPElementImpl<?>)addChildElement(name); - DetailEntryImpl detailEntry = new DetailEntryImpl(childElement.omTarget); - childElement.target.setUserData(SAAJ_NODE, detailEntry, null); - return detailEntry; + return new DetailEntryImpl(childElement.omTarget); } /** @@ -99,9 +97,7 @@ public class DetailImpl extends SOAPFaul */ public DetailEntry addDetailEntry(QName qname) throws SOAPException { SOAPElementImpl<?> childElement = (SOAPElementImpl<?>)addChildElement(qname); - DetailEntryImpl detailEntry = new DetailEntryImpl(childElement.omTarget); - childElement.target.setUserData(SAAJ_NODE, detailEntry, null); - return detailEntry; + return new DetailEntryImpl(childElement.omTarget); } public SOAPElement addAttribute(QName qname, String value) throws SOAPException { Modified: axis/axis2/java/core/branches/AXIS2-4091/modules/saaj/src/org/apache/axis2/saaj/SOAPBodyElementImpl.java URL: http://svn.apache.org/viewvc/axis/axis2/java/core/branches/AXIS2-4091/modules/saaj/src/org/apache/axis2/saaj/SOAPBodyElementImpl.java?rev=1818518&r1=1818517&r2=1818518&view=diff ============================================================================== --- axis/axis2/java/core/branches/AXIS2-4091/modules/saaj/src/org/apache/axis2/saaj/SOAPBodyElementImpl.java (original) +++ axis/axis2/java/core/branches/AXIS2-4091/modules/saaj/src/org/apache/axis2/saaj/SOAPBodyElementImpl.java Sun Dec 17 22:34:08 2017 @@ -39,7 +39,7 @@ public class SOAPBodyElementImpl<T exten if (!(parent instanceof SOAPBody)) { throw new IllegalArgumentException("Parent is not a SOAPBody"); } - this.parentElement = parent; + super.setParentElement(parent); } public SOAPElement addAttribute(QName qname, String value) throws SOAPException { Modified: axis/axis2/java/core/branches/AXIS2-4091/modules/saaj/src/org/apache/axis2/saaj/SOAPBodyImpl.java URL: http://svn.apache.org/viewvc/axis/axis2/java/core/branches/AXIS2-4091/modules/saaj/src/org/apache/axis2/saaj/SOAPBodyImpl.java?rev=1818518&r1=1818517&r2=1818518&view=diff ============================================================================== --- axis/axis2/java/core/branches/AXIS2-4091/modules/saaj/src/org/apache/axis2/saaj/SOAPBodyImpl.java (original) +++ axis/axis2/java/core/branches/AXIS2-4091/modules/saaj/src/org/apache/axis2/saaj/SOAPBodyImpl.java Sun Dec 17 22:34:08 2017 @@ -22,9 +22,8 @@ package org.apache.axis2.saaj; import org.apache.axiom.om.OMElement; import org.apache.axiom.om.OMNamespace; import org.apache.axiom.om.OMNode; -import org.apache.axiom.soap.SOAP11Version; -import org.apache.axiom.soap.SOAP12Version; import org.apache.axiom.soap.SOAPFactory; +import org.apache.axiom.soap.SOAPVersion; import org.w3c.dom.Document; import org.w3c.dom.Element; import org.w3c.dom.NamedNodeMap; @@ -64,10 +63,8 @@ public class SOAPBodyImpl extends SOAPEl throw new SOAPException("A SOAPFault has been already added to this SOAPBody"); } SOAPBodyElementImpl<OMElement> childEle = - new SOAPBodyElementImpl<OMElement>((OMElement)getOwnerDocument().createElement(localName)); - childEle.target.setUserData(SAAJ_NODE, childEle, null); + new SOAPBodyElementImpl<OMElement>((OMElement)target.getOwnerDocument().createElementNS(null, localName)); target.appendChild(childEle.target); - childEle.target.getParentNode().setUserData(SAAJ_NODE, this, null); isBodyElementAdded = true; return childEle; } @@ -80,12 +77,10 @@ public class SOAPBodyImpl extends SOAPEl } SOAPBodyElementImpl<OMElement> childEle = new SOAPBodyElementImpl<OMElement>( - (OMElement)getOwnerDocument().createElementNS(namespaceURI, + (OMElement)target.getOwnerDocument().createElementNS(namespaceURI, localName)); - childEle.target.setUserData(SAAJ_NODE, childEle, null); childEle.omTarget.setNamespace(childEle.omTarget.declareNamespace(namespaceURI, prefix)); target.appendChild(childEle.target); - childEle.target.getParentNode().setUserData(SAAJ_NODE, this, null); childEle.setParentElement(this); return childEle; } @@ -95,18 +90,24 @@ public class SOAPBodyImpl extends SOAPEl String namespaceURI = child.getNamespaceURI(); String prefix = child.getPrefix(); - SOAPBodyElementImpl<OMElement> childEle = new SOAPBodyElementImpl<OMElement>((OMElement)child); + SOAPBodyElementImpl<?> childEle = toSOAPBodyElement(child); - childEle.target.setUserData(SAAJ_NODE, childEle, null); if (namespaceURI != null && namespaceURI.trim().length() > 0) { childEle.omTarget.setNamespace(childEle.omTarget.declareNamespace(namespaceURI, prefix)); } target.appendChild(childEle.target); - childEle.target.getParentNode().setUserData(SAAJ_NODE, this, null); childEle.setParentElement(this); return childEle; } + private SOAPBodyElementImpl<?> toSOAPBodyElement(Element element) { + if (element instanceof SOAPBodyElementImpl) { + return (SOAPBodyElementImpl<?>)element; + } else { + return new SOAPBodyElementImpl<OMElement>(((SOAPElementImpl<?>)element).omTarget); + } + } + public SOAPElement addChildElement(SOAPElement soapElement) throws SOAPException { String namespaceURI = soapElement.getNamespaceURI(); String prefix = soapElement.getPrefix(); @@ -116,12 +117,12 @@ public class SOAPBodyImpl extends SOAPEl if (namespaceURI == null || namespaceURI.trim().length() == 0) { childEle = new SOAPBodyElementImpl<OMElement>( - (OMElement)getOwnerDocument().createElement(localName)); + (OMElement)target.getOwnerDocument().createElementNS(null, localName)); } else { omTarget.declareNamespace(namespaceURI, prefix); childEle = new SOAPBodyElementImpl<OMElement>( - (OMElement)getOwnerDocument().createElementNS(namespaceURI, + (OMElement)target.getOwnerDocument().createElementNS(namespaceURI, localName)); } @@ -139,12 +140,10 @@ public class SOAPBodyImpl extends SOAPEl } } - childEle.target.setUserData(SAAJ_NODE, childEle, null); if (namespaceURI != null && namespaceURI.trim().length() > 0) { childEle.omTarget.setNamespace(childEle.omTarget.declareNamespace(namespaceURI, prefix)); } target.appendChild(childEle.target); - childEle.target.getParentNode().setUserData(SAAJ_NODE, this, null); childEle.setParentElement(this); return childEle; } @@ -163,20 +162,18 @@ public class SOAPBodyImpl extends SOAPEl SOAPBodyElementImpl<OMElement> childEle; if (uri == null || "".equals(uri)) { childEle = new SOAPBodyElementImpl<OMElement>( - (OMElement)getOwnerDocument().createElement(localName)); + (OMElement)target.getOwnerDocument().createElementNS(null, localName)); } else if (prefix.length() == 0) { childEle = new SOAPBodyElementImpl<OMElement>( - (OMElement)getOwnerDocument().createElementNS(uri, + (OMElement)target.getOwnerDocument().createElementNS(uri, localName)); } else { childEle = new SOAPBodyElementImpl<OMElement>( - (OMElement)getOwnerDocument().createElementNS(uri, + (OMElement)target.getOwnerDocument().createElementNS(uri, prefix + ":" + localName)); } - childEle.target.setUserData(SAAJ_NODE, childEle, null); childEle.omTarget.setNamespace(omTarget.getOMFactory().createOMNamespace(uri, prefix)); target.appendChild(childEle.target); - childEle.target.getParentNode().setUserData(SAAJ_NODE, this, null); isBodyElementAdded = true; childEle.setParentElement(this); return childEle; @@ -198,7 +195,6 @@ public class SOAPBodyImpl extends SOAPEl // set default fault code and string saajSOAPFault.setDefaults(); - ((Element)omTarget.getFault()).setUserData(SAAJ_NODE, saajSOAPFault, null); return saajSOAPFault; } @@ -399,11 +395,11 @@ public class SOAPBodyImpl extends SOAPEl } if (node instanceof org.w3c.dom.Text) { org.w3c.dom.Text domText = (org.w3c.dom.Text)node; - return new TextImplEx(domText.getData(), parent); + return new TextImplEx(domText.getData()); } if (node instanceof org.w3c.dom.Comment) { org.w3c.dom.Comment domText = (org.w3c.dom.Comment)node; - return new CommentImpl(domText.getData(), parent); + return new CommentImpl(domText.getData()); } Element domEle = ((Element)node); int indexOfColon = domEle.getTagName().indexOf(":"); @@ -469,15 +465,6 @@ public class SOAPBodyImpl extends SOAPEl return saajEle; } - public void detachNode() { - this.detach(); - } - - public OMNode detach() { - this.parentElement = null; - return this.omTarget.detach(); - } - public Iterator getChildElements(Name name) { QName qName = new QName(name.getURI(), name.getLocalName()); return getChildren(omTarget.getChildrenWithName(qName)); @@ -496,31 +483,29 @@ public class SOAPBodyImpl extends SOAPEl SOAPBodyElementImpl<OMElement> childEle; if (qname.getNamespaceURI() == null || "".equals(qname.getNamespaceURI())) { childEle = new SOAPBodyElementImpl<OMElement>( - (OMElement)getOwnerDocument().createElement(qname.getLocalPart())); + (OMElement)target.getOwnerDocument().createElementNS(null, qname.getLocalPart())); }else if(null == qname.getPrefix() || "".equals(qname.getPrefix().trim())) { childEle = new SOAPBodyElementImpl<OMElement>( - (OMElement)getOwnerDocument().createElementNS(qname.getNamespaceURI(), + (OMElement)target.getOwnerDocument().createElementNS(qname.getNamespaceURI(), qname.getLocalPart())); }else { childEle = new SOAPBodyElementImpl<OMElement>( - (OMElement)getOwnerDocument().createElementNS(qname.getNamespaceURI(), + (OMElement)target.getOwnerDocument().createElementNS(qname.getNamespaceURI(), qname.getPrefix() + ":" + qname.getLocalPart())); } - childEle.target.setUserData(SAAJ_NODE, childEle, null); childEle.omTarget.setNamespace(omTarget.getOMFactory().createOMNamespace(qname.getNamespaceURI(), qname.getPrefix())); target.appendChild(childEle.target); - childEle.target.getParentNode().setUserData(SAAJ_NODE, this, null); isBodyElementAdded = true; childEle.setParentElement(this); return childEle; } public QName createQName(String localName, String prefix) throws SOAPException { - if (((SOAPFactory)this.omTarget.getOMFactory()).getSOAPVersion() == SOAP11Version.getSingleton()) { + if (((SOAPFactory)this.omTarget.getOMFactory()).getSOAPVersion() == SOAPVersion.SOAP11) { return super.createQName(localName, prefix); - } else if (((SOAPFactory)this.omTarget.getOMFactory()).getSOAPVersion() == SOAP12Version.getSingleton()) { + } else if (((SOAPFactory)this.omTarget.getOMFactory()).getSOAPVersion() == SOAPVersion.SOAP12) { if (this.omTarget.findNamespaceURI(prefix) == null) { throw new SOAPException("Only Namespace Qualified elements are allowed"); } else { @@ -564,11 +549,11 @@ public class SOAPBodyImpl extends SOAPEl return super.addTextNode(text); } - private Iterator getChildren(Iterator childIter) { + private Iterator getChildren(Iterator<? extends OMNode> childIter) { Collection childElements = new ArrayList(); while (childIter.hasNext()) { org.w3c.dom.Node domNode = (org.w3c.dom.Node)childIter.next(); - Node saajNode = toSAAJNode(domNode); + org.w3c.dom.Node saajNode = toSAAJNode(domNode); if (saajNode instanceof javax.xml.soap.Text) { childElements.add(saajNode); } else if (!(saajNode instanceof SOAPBodyElement)) { @@ -578,14 +563,9 @@ public class SOAPBodyImpl extends SOAPEl SOAPFactory omFactory = (SOAPFactory)this.omTarget.getOMFactory(); org.apache.axiom.soap.SOAPFault fault = omFactory.createSOAPFault(omTarget); - SOAPFaultImpl saajSOAPFault = new SOAPFaultImpl(fault); - ((Element)omTarget.getFault()) - .setUserData(SAAJ_NODE, saajSOAPFault, null); - childElements.add(saajSOAPFault); + childElements.add(new SOAPFaultImpl(fault)); } else { - SOAPBodyElement saajBodyEle = new SOAPBodyElementImpl<OMElement>((OMElement)domNode); - domNode.setUserData(SAAJ_NODE, saajBodyEle, null); - childElements.add(saajBodyEle); + childElements.add(new SOAPBodyElementImpl<OMElement>((OMElement)domNode)); } } } else {
