Author: veithen
Date: Sun Dec 17 21:35:47 2017
New Revision: 1818515

URL: http://svn.apache.org/viewvc?rev=1818515&view=rev
Log:
Merge changes from trunk up to r1536049.

Added:
    
axis/axis2/java/core/branches/AXIS2-4091/modules/json/src/org/apache/axis2/json/gson/rpc/JsonUtils.java
      - copied unchanged from r1536049, 
axis/axis2/java/core/trunk/modules/json/src/org/apache/axis2/json/gson/rpc/JsonUtils.java
    axis/axis2/java/core/branches/AXIS2-4091/modules/json/test-repository/gson/
      - copied from r1536049, 
axis/axis2/java/core/trunk/modules/json/test-repository/gson/
    axis/axis2/java/core/branches/AXIS2-4091/modules/json/test-repository/json/
      - copied from r1536049, 
axis/axis2/java/core/trunk/modules/json/test-repository/json/
    
axis/axis2/java/core/branches/AXIS2-4091/modules/json/test/org/apache/axis2/json/gson/UtilTest.java
      - copied unchanged from r1536049, 
axis/axis2/java/core/trunk/modules/json/test/org/apache/axis2/json/gson/UtilTest.java
    
axis/axis2/java/core/branches/AXIS2-4091/modules/json/test/org/apache/axis2/json/gson/rpc/
      - copied from r1536049, 
axis/axis2/java/core/trunk/modules/json/test/org/apache/axis2/json/gson/rpc/
    
axis/axis2/java/core/branches/AXIS2-4091/modules/tool/axis2-wsdl2code-maven-plugin/src/test/test2/
      - copied from r1536049, 
axis/axis2/java/core/trunk/modules/tool/axis2-wsdl2code-maven-plugin/src/test/test2/
    axis/axis2/java/core/branches/AXIS2-4091/src/site/apt/
      - copied from r1536049, axis/axis2/java/core/trunk/src/site/apt/
    
axis/axis2/java/core/branches/AXIS2-4091/src/site/xdoc/docs/mail-transport.xml
      - copied unchanged from r1536049, 
axis/axis2/java/core/trunk/src/site/xdoc/docs/mail-transport.xml
    
axis/axis2/java/core/branches/AXIS2-4091/src/site/xdoc/docs/xmpp-transport.xml
      - copied unchanged from r1536049, 
axis/axis2/java/core/trunk/src/site/xdoc/docs/xmpp-transport.xml
Removed:
    axis/axis2/java/core/branches/AXIS2-4091/build.xml
    
axis/axis2/java/core/branches/AXIS2-4091/modules/json/src/org/apache/axis2/json/gson/factory/JsonUtils.java
    axis/axis2/java/core/branches/AXIS2-4091/modules/json/test-conf/
    
axis/axis2/java/core/branches/AXIS2-4091/modules/json/test-repository/services/
    
axis/axis2/java/core/branches/AXIS2-4091/modules/json/test-resources/axis2.xml
Modified:
    axis/axis2/java/core/branches/AXIS2-4091/   (props changed)
    axis/axis2/java/core/branches/AXIS2-4091/README.txt
    axis/axis2/java/core/branches/AXIS2-4091/modules/adb-codegen/pom.xml
    
axis/axis2/java/core/branches/AXIS2-4091/modules/adb-codegen/src/org/apache/axis2/schema/template/ADBBeanTemplate-bean.xsl
    axis/axis2/java/core/branches/AXIS2-4091/modules/adb/pom.xml
    
axis/axis2/java/core/branches/AXIS2-4091/modules/adb/src/org/apache/axis2/databinding/utils/ConverterUtil.java
    
axis/axis2/java/core/branches/AXIS2-4091/modules/adb/src/org/apache/axis2/rpc/receivers/RPCInOnlyMessageReceiver.java
    
axis/axis2/java/core/branches/AXIS2-4091/modules/adb/src/org/apache/axis2/rpc/receivers/RPCInOutAsyncMessageReceiver.java
    
axis/axis2/java/core/branches/AXIS2-4091/modules/adb/src/org/apache/axis2/rpc/receivers/RPCMessageReceiver.java
    axis/axis2/java/core/branches/AXIS2-4091/modules/all/pom.xml
    axis/axis2/java/core/branches/AXIS2-4091/modules/distribution/pom.xml
    
axis/axis2/java/core/branches/AXIS2-4091/modules/integration/test/org/apache/axis2/mtom/EchoService2.java
    
axis/axis2/java/core/branches/AXIS2-4091/modules/integration/test/org/apache/axis2/rpc/complex/ComplexDataTypesComplexDataTypesSOAP11Test.java
    
axis/axis2/java/core/branches/AXIS2-4091/modules/integration/test/org/apache/axis2/rpc/complex/ComplexDataTypesDocLitBareTest.java
    
axis/axis2/java/core/branches/AXIS2-4091/modules/jaxws-integration/test/org/apache/axis2/jaxws/proxy/ProxyTests.java
    
axis/axis2/java/core/branches/AXIS2-4091/modules/jaxws-integration/test/org/apache/axis2/jaxws/xmlhttp/clientTests/dispatch/datasource/DispatchXMessageDataSourceTests.java
    axis/axis2/java/core/branches/AXIS2-4091/modules/jaxws/pom.xml
    
axis/axis2/java/core/branches/AXIS2-4091/modules/jaxws/src/org/apache/axis2/jaxws/message/util/Reader2Writer.java
    
axis/axis2/java/core/branches/AXIS2-4091/modules/json/src/org/apache/axis2/json/gson/GsonXMLStreamReader.java
    
axis/axis2/java/core/branches/AXIS2-4091/modules/json/src/org/apache/axis2/json/gson/GsonXMLStreamWriter.java
    
axis/axis2/java/core/branches/AXIS2-4091/modules/json/src/org/apache/axis2/json/gson/JSONMessageHandler.java
    
axis/axis2/java/core/branches/AXIS2-4091/modules/json/src/org/apache/axis2/json/gson/JsonBuilder.java
    
axis/axis2/java/core/branches/AXIS2-4091/modules/json/src/org/apache/axis2/json/gson/JsonFormatter.java
    
axis/axis2/java/core/branches/AXIS2-4091/modules/json/src/org/apache/axis2/json/gson/factory/XmlNode.java
    
axis/axis2/java/core/branches/AXIS2-4091/modules/json/src/org/apache/axis2/json/gson/factory/XmlNodeGenerator.java
    
axis/axis2/java/core/branches/AXIS2-4091/modules/json/src/org/apache/axis2/json/gson/rpc/JsonInOnlyRPCMessageReceiver.java
    
axis/axis2/java/core/branches/AXIS2-4091/modules/json/src/org/apache/axis2/json/gson/rpc/JsonRpcMessageReceiver.java
    
axis/axis2/java/core/branches/AXIS2-4091/modules/json/test/org/apache/axis2/json/JSONIntegrationTest.java
    
axis/axis2/java/core/branches/AXIS2-4091/modules/json/test/org/apache/axis2/json/JSONTestConstants.java
    
axis/axis2/java/core/branches/AXIS2-4091/modules/json/test/org/apache/axis2/json/gson/JSONXMLStreamAPITest.java
    axis/axis2/java/core/branches/AXIS2-4091/modules/kernel/pom.xml
    
axis/axis2/java/core/branches/AXIS2-4091/modules/kernel/src/org/apache/axis2/builder/BuilderUtil.java
    
axis/axis2/java/core/branches/AXIS2-4091/modules/kernel/src/org/apache/axis2/builder/DataSourceBuilder.java
    
axis/axis2/java/core/branches/AXIS2-4091/modules/kernel/src/org/apache/axis2/builder/MIMEBuilder.java
    
axis/axis2/java/core/branches/AXIS2-4091/modules/kernel/src/org/apache/axis2/deployment/DeploymentClassLoader.java
    
axis/axis2/java/core/branches/AXIS2-4091/modules/kernel/src/org/apache/axis2/description/WSDL2Constants.java
    
axis/axis2/java/core/branches/AXIS2-4091/modules/kernel/src/org/apache/axis2/engine/DefaultObjectSupplier.java
    
axis/axis2/java/core/branches/AXIS2-4091/modules/kernel/src/org/apache/axis2/i18n/resource.properties
    
axis/axis2/java/core/branches/AXIS2-4091/modules/kernel/src/org/apache/axis2/util/Utils.java
    
axis/axis2/java/core/branches/AXIS2-4091/modules/kernel/src/org/apache/axis2/util/XMLPrettyPrinter.java
    axis/axis2/java/core/branches/AXIS2-4091/modules/parent/pom.xml
    
axis/axis2/java/core/branches/AXIS2-4091/modules/saaj/src/org/apache/axis2/saaj/SOAPMessageImpl.java
    
axis/axis2/java/core/branches/AXIS2-4091/modules/saaj/src/org/apache/axis2/saaj/SOAPPartImpl.java
    
axis/axis2/java/core/branches/AXIS2-4091/modules/saaj/test/org/apache/axis2/saaj/AttachmentTest.java
    
axis/axis2/java/core/branches/AXIS2-4091/modules/saaj/test/org/apache/axis2/saaj/SOAPMessageTest.java
    
axis/axis2/java/core/branches/AXIS2-4091/modules/tool/axis2-wsdl2code-maven-plugin/pom.xml
    
axis/axis2/java/core/branches/AXIS2-4091/modules/tool/axis2-wsdl2code-maven-plugin/src/test/java/org/apache/axis2/maven2/wsdl2code/WSDL2CodeMojoTest.java
    
axis/axis2/java/core/branches/AXIS2-4091/modules/transport/base/src/main/java/org/apache/axis2/format/TextMessageBuilderAdapter.java
    axis/axis2/java/core/branches/AXIS2-4091/modules/transport/http/pom.xml
    
axis/axis2/java/core/branches/AXIS2-4091/modules/transport/http/src/org/apache/axis2/transport/http/HTTPTransportReceiver.java
    
axis/axis2/java/core/branches/AXIS2-4091/modules/transport/http/src/org/apache/axis2/transport/http/impl/httpclient3/HTTPSenderImpl.java
    
axis/axis2/java/core/branches/AXIS2-4091/modules/transport/http/src/org/apache/axis2/transport/http/impl/httpclient4/HTTPSenderImpl.java
    
axis/axis2/java/core/branches/AXIS2-4091/modules/transport/jms/src/main/java/org/apache/axis2/transport/jms/JMSUtils.java
    axis/axis2/java/core/branches/AXIS2-4091/modules/transport/testkit/pom.xml
    
axis/axis2/java/core/branches/AXIS2-4091/modules/webapp/src/main/webapp/axis2-web/listServices.jsp
    axis/axis2/java/core/branches/AXIS2-4091/pom.xml
    axis/axis2/java/core/branches/AXIS2-4091/src/site/xdoc/docs/toc.xml
    axis/axis2/java/core/branches/AXIS2-4091/src/site/xdoc/download.xml
    
axis/axis2/java/core/branches/AXIS2-4091/src/site/xdoc/tools/maven-plugins/maven-wsdl2code-plugin.xml

Propchange: axis/axis2/java/core/branches/AXIS2-4091/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Sun Dec 17 21:35:47 2017
@@ -1,3 +1,4 @@
 /axis/axis2/java/core/branches/1_6:1295540
 /axis/axis2/java/core/branches/AXIOM-420:1334386-1336397
 
/axis/axis2/java/core/branches/AXIS2-4318:1230452,1295542,1324772,1327468,1329571,1332141,1335355,1335357,1340985
+/axis/axis2/java/core/trunk:1441270-1536049

Modified: axis/axis2/java/core/branches/AXIS2-4091/README.txt
URL: 
http://svn.apache.org/viewvc/axis/axis2/java/core/branches/AXIS2-4091/README.txt?rev=1818515&r1=1818514&r2=1818515&view=diff
==============================================================================
--- axis/axis2/java/core/branches/AXIS2-4091/README.txt (original)
+++ axis/axis2/java/core/branches/AXIS2-4091/README.txt Sun Dec 17 21:35:47 2017
@@ -12,28 +12,28 @@ We use Maven 2 (http://maven.apache.org)
 pom.xml in each module, as well as at the top level.  Use "mvn install"
 (or "mvn clean install" to clean up first) to build.
 
-IMPORTANT: the *first* time you build a given version of Axis2, you will not
+IMPORTANT: the *first* time you build a given version of Axis2, you may not
 be able to do a regular "mvn install" from the top level - this is because
 we have a couple of custom Maven plugins that (due to some dependency-
 resolution issues in Maven) must be built and installed in your local
-repository before a build will succeed.  This means you need to do one
-of the following:
+repository before a build will succeed. This being said, it is worth 
+trying "mvn install" none-the-less. In the case where this fails, it 
+means you need to do the following:
 
-  1) Use ant (http://ant.apache.org) to build the first time.  There is
-     a build.xml at the top level which automatically builds the plugins
-     first and then runs a regular "mvn install".
-     
-  2) Manually "mvn install" both of the plugins in the following places:
+  1) Manually "mvn install" both of the plugins in the following places:
      
      modules/tool/axis2-mar-maven-plugin
      modules/tool/axis2-aar-maven-plugin
-
+     
 ___________________
 Documentation
 ===================
  
 Documentation can be found in the 'docs' distribution of this release 
-and in the main site.
+and in the main site. To build the documentation locally, simply do
+"mvn site". Additionally, the Axis2 Javadoc documentation can be 
+produced by executing "mvn javadoc:javadoc".
+Users should then look in $AXIS2_HOME/target for the documentation.
 
 ___________________
 Deploying

Modified: axis/axis2/java/core/branches/AXIS2-4091/modules/adb-codegen/pom.xml
URL: 
http://svn.apache.org/viewvc/axis/axis2/java/core/branches/AXIS2-4091/modules/adb-codegen/pom.xml?rev=1818515&r1=1818514&r2=1818515&view=diff
==============================================================================
--- axis/axis2/java/core/branches/AXIS2-4091/modules/adb-codegen/pom.xml 
(original)
+++ axis/axis2/java/core/branches/AXIS2-4091/modules/adb-codegen/pom.xml Sun 
Dec 17 21:35:47 2017
@@ -64,6 +64,11 @@
             <artifactId>xmlunit</artifactId>
             <scope>test</scope>
         </dependency>
+        <dependency>
+            <groupId>org.apache.geronimo.specs</groupId>
+            <artifactId>geronimo-javamail_1.4_spec</artifactId>
+            <scope>test</scope>
+        </dependency>
     </dependencies>
     <url>http://axis.apache.org/axis2/java/core/</url>
     <scm>

Modified: 
axis/axis2/java/core/branches/AXIS2-4091/modules/adb-codegen/src/org/apache/axis2/schema/template/ADBBeanTemplate-bean.xsl
URL: 
http://svn.apache.org/viewvc/axis/axis2/java/core/branches/AXIS2-4091/modules/adb-codegen/src/org/apache/axis2/schema/template/ADBBeanTemplate-bean.xsl?rev=1818515&r1=1818514&r2=1818515&view=diff
==============================================================================
--- 
axis/axis2/java/core/branches/AXIS2-4091/modules/adb-codegen/src/org/apache/axis2/schema/template/ADBBeanTemplate-bean.xsl
 (original)
+++ 
axis/axis2/java/core/branches/AXIS2-4091/modules/adb-codegen/src/org/apache/axis2/schema/template/ADBBeanTemplate-bean.xsl
 Sun Dec 17 21:35:47 2017
@@ -40,6 +40,7 @@
         <xsl:variable name="hasParticleType" select="@hasParticleType"/>
         <xsl:variable name="usewrapperclasses" select="@usewrapperclasses"/>
         <xsl:variable name="ignoreunexpected" select="@ignoreunexpected"/>
+        <xsl:variable name="abstractType" select="@isAbstract"/>
 
         <!-- write the class header. this should be done only when unwrapped 
-->
 
@@ -1766,7 +1767,7 @@
             <xsl:variable name="shortTypeName"
                select="concat(translate( substring($shortTypeNameUncapped, 1, 
1 ),'abcdefghijklmnopqrstuvwxyz', 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' ), 
substring($shortTypeNameUncapped, 2, string-length($shortTypeNameUncapped)))" />
 
-            <xsl:if test="$simple and not(@attribute) and not(enumFacet)">
+            <xsl:if test="$simple and not($abstractType) and not(@attribute) 
and not(enumFacet)">
                 public static <xsl:value-of select="$name"/> 
fromString(java.lang.String value,
                                                     java.lang.String 
namespaceURI){
                     <xsl:value-of select="$name"/> returnValue = new  
<xsl:value-of select="$name"/>();

Modified: axis/axis2/java/core/branches/AXIS2-4091/modules/adb/pom.xml
URL: 
http://svn.apache.org/viewvc/axis/axis2/java/core/branches/AXIS2-4091/modules/adb/pom.xml?rev=1818515&r1=1818514&r2=1818515&view=diff
==============================================================================
--- axis/axis2/java/core/branches/AXIS2-4091/modules/adb/pom.xml (original)
+++ axis/axis2/java/core/branches/AXIS2-4091/modules/adb/pom.xml Sun Dec 17 
21:35:47 2017
@@ -62,6 +62,11 @@
             <artifactId>xmlunit</artifactId>
             <scope>test</scope>
         </dependency>       
+        <dependency>
+            <groupId>org.apache.geronimo.specs</groupId>
+            <artifactId>geronimo-javamail_1.4_spec</artifactId>
+            <scope>test</scope>
+        </dependency>
     </dependencies>
 
     <build>

Modified: 
axis/axis2/java/core/branches/AXIS2-4091/modules/adb/src/org/apache/axis2/databinding/utils/ConverterUtil.java
URL: 
http://svn.apache.org/viewvc/axis/axis2/java/core/branches/AXIS2-4091/modules/adb/src/org/apache/axis2/databinding/utils/ConverterUtil.java?rev=1818515&r1=1818514&r2=1818515&view=diff
==============================================================================
--- 
axis/axis2/java/core/branches/AXIS2-4091/modules/adb/src/org/apache/axis2/databinding/utils/ConverterUtil.java
 (original)
+++ 
axis/axis2/java/core/branches/AXIS2-4091/modules/adb/src/org/apache/axis2/databinding/utils/ConverterUtil.java
 Sun Dec 17 21:35:47 2017
@@ -20,7 +20,6 @@
 package org.apache.axis2.databinding.utils;
 
 import org.apache.axiom.attachments.ByteArrayDataSource;
-import org.apache.axiom.attachments.utils.IOUtils;
 import org.apache.axiom.om.OMElement;
 import org.apache.axiom.om.util.AXIOMUtil;
 import org.apache.axiom.util.base64.Base64Utils;
@@ -59,6 +58,7 @@ import org.apache.axis2.databinding.type
 import org.apache.axis2.databinding.types.UnsignedShort;
 import org.apache.axis2.databinding.types.Year;
 import org.apache.axis2.databinding.types.YearMonth;
+import org.apache.commons.io.IOUtils;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 
@@ -1390,7 +1390,7 @@ public class ConverterUtil {
                                return "";
                        }
                        inStream = dataHandler.getDataSource().getInputStream();
-                       byte[] data = IOUtils.getStreamAsByteArray(inStream);
+                       byte[] data = IOUtils.toByteArray(inStream);
                        return Base64Utils.encode(data);
                } catch (Exception e) {
                        throw new RuntimeException(e);

Modified: 
axis/axis2/java/core/branches/AXIS2-4091/modules/adb/src/org/apache/axis2/rpc/receivers/RPCInOnlyMessageReceiver.java
URL: 
http://svn.apache.org/viewvc/axis/axis2/java/core/branches/AXIS2-4091/modules/adb/src/org/apache/axis2/rpc/receivers/RPCInOnlyMessageReceiver.java?rev=1818515&r1=1818514&r2=1818515&view=diff
==============================================================================
--- 
axis/axis2/java/core/branches/AXIS2-4091/modules/adb/src/org/apache/axis2/rpc/receivers/RPCInOnlyMessageReceiver.java
 (original)
+++ 
axis/axis2/java/core/branches/AXIS2-4091/modules/adb/src/org/apache/axis2/rpc/receivers/RPCInOnlyMessageReceiver.java
 Sun Dec 17 21:35:47 2017
@@ -20,6 +20,7 @@
 package org.apache.axis2.rpc.receivers;
 
 import org.apache.axiom.om.OMElement;
+import org.apache.axiom.soap.SOAPBody;
 import org.apache.axis2.AxisFault;
 import org.apache.axis2.context.MessageContext;
 import org.apache.axis2.description.AxisMessage;
@@ -46,8 +47,11 @@ public class RPCInOnlyMessageReceiver ex
 
             AxisOperation op = 
inMessage.getOperationContext().getAxisOperation();
 
-            OMElement methodElement = inMessage.getEnvelope().getBody()
-                    .getFirstElement();
+            SOAPBody body = inMessage.getEnvelope().getBody();
+            if(body==null){
+                throw new AxisFault("SOAP body is missing in the request" );
+            }
+            OMElement methodElement = body.getFirstElement();
 
             AxisMessage inAxisMessage = 
op.getMessage(WSDLConstants.MESSAGE_LABEL_IN_VALUE);
             String messageNameSpace = null;

Modified: 
axis/axis2/java/core/branches/AXIS2-4091/modules/adb/src/org/apache/axis2/rpc/receivers/RPCInOutAsyncMessageReceiver.java
URL: 
http://svn.apache.org/viewvc/axis/axis2/java/core/branches/AXIS2-4091/modules/adb/src/org/apache/axis2/rpc/receivers/RPCInOutAsyncMessageReceiver.java?rev=1818515&r1=1818514&r2=1818515&view=diff
==============================================================================
--- 
axis/axis2/java/core/branches/AXIS2-4091/modules/adb/src/org/apache/axis2/rpc/receivers/RPCInOutAsyncMessageReceiver.java
 (original)
+++ 
axis/axis2/java/core/branches/AXIS2-4091/modules/adb/src/org/apache/axis2/rpc/receivers/RPCInOutAsyncMessageReceiver.java
 Sun Dec 17 21:35:47 2017
@@ -21,6 +21,7 @@ package org.apache.axis2.rpc.receivers;
 
 import org.apache.axiom.om.OMElement;
 import org.apache.axiom.om.OMNamespace;
+import org.apache.axiom.soap.SOAPBody;
 import org.apache.axiom.soap.SOAPEnvelope;
 import org.apache.axiom.soap.SOAPFactory;
 import org.apache.axis2.AxisFault;
@@ -71,8 +72,11 @@ public class RPCInOutAsyncMessageReceive
 
             AxisOperation op = 
inMessage.getOperationContext().getAxisOperation();
             AxisService service = inMessage.getAxisService();
-            OMElement methodElement = inMessage.getEnvelope().getBody()
-                    .getFirstElement();
+            SOAPBody body = inMessage.getEnvelope().getBody();
+            if(body==null){
+                throw new AxisFault("SOAP body is missing in the request" );
+            }
+            OMElement methodElement = body.getFirstElement();
 
             AxisMessage inaxisMessage = 
op.getMessage(WSDLConstants.MESSAGE_LABEL_IN_VALUE);
             String messageNameSpace = null;

Modified: 
axis/axis2/java/core/branches/AXIS2-4091/modules/adb/src/org/apache/axis2/rpc/receivers/RPCMessageReceiver.java
URL: 
http://svn.apache.org/viewvc/axis/axis2/java/core/branches/AXIS2-4091/modules/adb/src/org/apache/axis2/rpc/receivers/RPCMessageReceiver.java?rev=1818515&r1=1818514&r2=1818515&view=diff
==============================================================================
--- 
axis/axis2/java/core/branches/AXIS2-4091/modules/adb/src/org/apache/axis2/rpc/receivers/RPCMessageReceiver.java
 (original)
+++ 
axis/axis2/java/core/branches/AXIS2-4091/modules/adb/src/org/apache/axis2/rpc/receivers/RPCMessageReceiver.java
 Sun Dec 17 21:35:47 2017
@@ -27,6 +27,7 @@ import org.apache.axiom.om.OMElement;
 import org.apache.axiom.om.OMNamespace;
 import org.apache.axiom.om.OMAbstractFactory;
 import org.apache.axiom.om.impl.builder.StAXOMBuilder;
+import org.apache.axiom.soap.SOAPBody;
 import org.apache.axiom.soap.SOAPEnvelope;
 import org.apache.axiom.soap.SOAPFactory;
 import org.apache.axis2.AxisFault;
@@ -87,8 +88,11 @@ public class RPCMessageReceiver extends
                 method = null;
             }
             AxisService service = inMessage.getAxisService();
-            OMElement methodElement = inMessage.getEnvelope().getBody()
-                    .getFirstElement();
+            SOAPBody body = inMessage.getEnvelope().getBody();
+            if(body==null){
+                 throw new AxisFault("SOAP body is missing in the request" );
+            }
+            OMElement methodElement = body.getFirstElement();
             AxisMessage inAxisMessage = 
op.getMessage(WSDLConstants.MESSAGE_LABEL_IN_VALUE);
             String messageNameSpace = null;
 

Modified: axis/axis2/java/core/branches/AXIS2-4091/modules/all/pom.xml
URL: 
http://svn.apache.org/viewvc/axis/axis2/java/core/branches/AXIS2-4091/modules/all/pom.xml?rev=1818515&r1=1818514&r2=1818515&view=diff
==============================================================================
--- axis/axis2/java/core/branches/AXIS2-4091/modules/all/pom.xml (original)
+++ axis/axis2/java/core/branches/AXIS2-4091/modules/all/pom.xml Sun Dec 17 
21:35:47 2017
@@ -1,3 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one
+  ~ or more contributor license agreements. See the NOTICE file
+  ~ distributed with this work for additional information
+  ~ regarding copyright ownership. The ASF licenses this file
+  ~ to you under the Apache License, Version 2.0 (the
+  ~ "License"); you may not use this file except in compliance
+  ~ with the License. You may obtain a copy of the License at
+  ~
+  ~ http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing,
+  ~ software distributed under the License is distributed on an
+  ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  ~ KIND, either express or implied. See the License for the
+  ~ specific language governing permissions and limitations
+  ~ under the License.
+  -->
+
 <project xmlns="http://maven.apache.org/POM/4.0.0";
          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
          xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/maven-v4_0_0.xsd";>

Modified: axis/axis2/java/core/branches/AXIS2-4091/modules/distribution/pom.xml
URL: 
http://svn.apache.org/viewvc/axis/axis2/java/core/branches/AXIS2-4091/modules/distribution/pom.xml?rev=1818515&r1=1818514&r2=1818515&view=diff
==============================================================================
--- axis/axis2/java/core/branches/AXIS2-4091/modules/distribution/pom.xml 
(original)
+++ axis/axis2/java/core/branches/AXIS2-4091/modules/distribution/pom.xml Sun 
Dec 17 21:35:47 2017
@@ -194,6 +194,57 @@
             <type>aar</type>
         </dependency>
         
+        <!-- Additional transports (with 3rd party dependencies excludes as in 
Axis2 1.4.1) -->
+        <dependency>
+            <groupId>${project.groupId}</groupId>
+            <artifactId>axis2-transport-jms</artifactId>
+            <version>${project.version}</version>
+            <exclusions>
+                <exclusion>
+                    <groupId>org.apache.geronimo.specs</groupId>
+                    <artifactId>geronimo-jms_1.1_spec</artifactId>
+                </exclusion>
+                <exclusion>
+                    <groupId>org.apache.geronimo.specs</groupId>
+                    <artifactId>geronimo-jta_1.0.1B_spec</artifactId>
+                </exclusion>
+            </exclusions>
+        </dependency>
+        <dependency>
+            <groupId>${project.groupId}</groupId>
+            <artifactId>axis2-transport-mail</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>${project.groupId}</groupId>
+            <artifactId>axis2-transport-tcp</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>${project.groupId}</groupId>
+            <artifactId>axis2-transport-udp</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>${project.groupId}</groupId>
+            <artifactId>axis2-transport-xmpp</artifactId>
+            <version>${project.version}</version>
+            <exclusions>
+                <exclusion>
+                    <groupId>jivesoftware</groupId>
+                    <artifactId>smack</artifactId>
+                </exclusion>
+                <exclusion>
+                    <groupId>jivesoftware</groupId>
+                    <artifactId>smackx</artifactId>
+                </exclusion>
+                <exclusion>
+                    <groupId>commons-lang</groupId>
+                    <artifactId>commons-lang</artifactId>
+                </exclusion>
+            </exclusions>
+        </dependency>
+        
         <!-- Axis2 has always been shipped with Sun's implementations of
              JavaMail and JAF, although Axiom depends on (and has been tested
              with) Geronimo's implementations. This should probably 
reevaluated. -->
@@ -229,8 +280,8 @@
             <type>war</type>
         </dependency>
         
-         <!-- These are needed to run JAX-WS tools -->
-          <dependency>
+        <!-- These are needed to run JAX-WS tools -->
+        <dependency>
             <groupId>com.sun.xml.ws</groupId>
             <artifactId>jaxws-rt</artifactId>
             <exclusions>
@@ -244,12 +295,12 @@
                 </exclusion>
             </exclusions>           
         </dependency>
-         <dependency>
+        <dependency>
             <groupId>org.jvnet.staxex</groupId>
             <artifactId>stax-ex</artifactId>
             <version>1.4</version>           
         </dependency>
-         <dependency>
+        <dependency>
             <groupId>com.sun.xml.stream.buffer</groupId>
             <artifactId>streambuffer</artifactId>
             <version>1.2</version>           

Modified: 
axis/axis2/java/core/branches/AXIS2-4091/modules/integration/test/org/apache/axis2/mtom/EchoService2.java
URL: 
http://svn.apache.org/viewvc/axis/axis2/java/core/branches/AXIS2-4091/modules/integration/test/org/apache/axis2/mtom/EchoService2.java?rev=1818515&r1=1818514&r2=1818515&view=diff
==============================================================================
--- 
axis/axis2/java/core/branches/AXIS2-4091/modules/integration/test/org/apache/axis2/mtom/EchoService2.java
 (original)
+++ 
axis/axis2/java/core/branches/AXIS2-4091/modules/integration/test/org/apache/axis2/mtom/EchoService2.java
 Sun Dec 17 21:35:47 2017
@@ -22,13 +22,13 @@ package org.apache.axis2.mtom;
 import org.apache.axiom.attachments.Attachments;
 import org.apache.axiom.attachments.IncomingAttachmentInputStream;
 import org.apache.axiom.attachments.IncomingAttachmentStreams;
-import org.apache.axiom.attachments.utils.IOUtils;
 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.util.base64.Base64Utils;
 import org.apache.axis2.context.MessageContext;
+import org.apache.commons.io.IOUtils;
 
 public class EchoService2 {
 
@@ -41,7 +41,7 @@ public class EchoService2 {
         IncomingAttachmentStreams streams = 
attachments.getIncomingAttachmentStreams();
         IncomingAttachmentInputStream stream = streams.getNextStream();
 
-        byte[] data = IOUtils.getStreamAsByteArray(stream);
+        byte[] data = IOUtils.toByteArray(stream);
 
         //setting response
         OMFactory fac = OMAbstractFactory.getOMFactory();

Modified: 
axis/axis2/java/core/branches/AXIS2-4091/modules/integration/test/org/apache/axis2/rpc/complex/ComplexDataTypesComplexDataTypesSOAP11Test.java
URL: 
http://svn.apache.org/viewvc/axis/axis2/java/core/branches/AXIS2-4091/modules/integration/test/org/apache/axis2/rpc/complex/ComplexDataTypesComplexDataTypesSOAP11Test.java?rev=1818515&r1=1818514&r2=1818515&view=diff
==============================================================================
--- 
axis/axis2/java/core/branches/AXIS2-4091/modules/integration/test/org/apache/axis2/rpc/complex/ComplexDataTypesComplexDataTypesSOAP11Test.java
 (original)
+++ 
axis/axis2/java/core/branches/AXIS2-4091/modules/integration/test/org/apache/axis2/rpc/complex/ComplexDataTypesComplexDataTypesSOAP11Test.java
 Sun Dec 17 21:35:47 2017
@@ -28,7 +28,6 @@ package org.apache.axis2.rpc.complex;
 import junit.framework.Test;
 import junit.framework.TestSuite;
 import org.apache.axiom.attachments.ByteArrayDataSource;
-import org.apache.axiom.attachments.utils.IOUtils;
 import org.apache.axiom.om.OMAbstractFactory;
 import org.apache.axiom.om.OMElement;
 import org.apache.axiom.om.OMFactory;
@@ -38,6 +37,7 @@ import org.apache.axis2.description.Axis
 import org.apache.axis2.engine.AxisConfiguration;
 import org.apache.axis2.integration.UtilServer;
 import org.apache.axis2.integration.UtilServerBasedTestCase;
+import org.apache.commons.io.IOUtils;
 import org.tempuri.complex.data.arrays.xsd.ArrayOfArrayOfstring;
 import org.tempuri.complex.data.arrays.xsd.ArrayOfNullableOfdateTime;
 import org.tempuri.complex.data.arrays.xsd.ArrayOfNullableOfdecimal;
@@ -377,7 +377,7 @@ public class ComplexDataTypesComplexData
 
         byte[] input = new byte[]{(byte) 0xDE, (byte) 0xAD, (byte) 0xBE, 
(byte) 0xEF};
         DataHandler ret = stub.retByteArray(new DataHandler(new 
ByteArrayDataSource(input)));
-        byte[] bytes = IOUtils.getStreamAsByteArray(ret.getInputStream());
+        byte[] bytes = IOUtils.toByteArray(ret.getInputStream());
         assertTrue(Arrays.equals(bytes, input));
     }
 

Modified: 
axis/axis2/java/core/branches/AXIS2-4091/modules/integration/test/org/apache/axis2/rpc/complex/ComplexDataTypesDocLitBareTest.java
URL: 
http://svn.apache.org/viewvc/axis/axis2/java/core/branches/AXIS2-4091/modules/integration/test/org/apache/axis2/rpc/complex/ComplexDataTypesDocLitBareTest.java?rev=1818515&r1=1818514&r2=1818515&view=diff
==============================================================================
--- 
axis/axis2/java/core/branches/AXIS2-4091/modules/integration/test/org/apache/axis2/rpc/complex/ComplexDataTypesDocLitBareTest.java
 (original)
+++ 
axis/axis2/java/core/branches/AXIS2-4091/modules/integration/test/org/apache/axis2/rpc/complex/ComplexDataTypesDocLitBareTest.java
 Sun Dec 17 21:35:47 2017
@@ -22,7 +22,6 @@ package org.apache.axis2.rpc.complex;
 import junit.framework.Test;
 import junit.framework.TestSuite;
 import org.apache.axiom.attachments.ByteArrayDataSource;
-import org.apache.axiom.attachments.utils.IOUtils;
 import org.apache.axiom.om.OMAbstractFactory;
 import org.apache.axiom.om.OMElement;
 import org.apache.axiom.om.OMFactory;
@@ -34,6 +33,7 @@ import org.apache.axis2.description.java
 import org.apache.axis2.engine.AxisConfiguration;
 import org.apache.axis2.integration.UtilServer;
 import org.apache.axis2.integration.UtilServerBasedTestCase;
+import org.apache.commons.io.IOUtils;
 import org.tempuri.complex.ComplexDataTypesDocLitBareStub;
 import 
org.tempuri.complex.ComplexDataTypesDocLitBareStub.RetArrayString2DResult;
 
@@ -388,7 +388,7 @@ public class ComplexDataTypesDocLitBareT
         ComplexDataTypesDocLitBareStub.RetByteArray req = new 
ComplexDataTypesDocLitBareStub.RetByteArray();
         req.setInByteArray(new DataHandler(new ByteArrayDataSource(input)));
         DataHandler ret = stub.retByteArray(req).get_return();
-        byte[] bytes = IOUtils.getStreamAsByteArray(ret.getInputStream());
+        byte[] bytes = IOUtils.toByteArray(ret.getInputStream());
         assertTrue(Arrays.equals(bytes, input));
     }
 

Modified: 
axis/axis2/java/core/branches/AXIS2-4091/modules/jaxws-integration/test/org/apache/axis2/jaxws/proxy/ProxyTests.java
URL: 
http://svn.apache.org/viewvc/axis/axis2/java/core/branches/AXIS2-4091/modules/jaxws-integration/test/org/apache/axis2/jaxws/proxy/ProxyTests.java?rev=1818515&r1=1818514&r2=1818515&view=diff
==============================================================================
--- 
axis/axis2/java/core/branches/AXIS2-4091/modules/jaxws-integration/test/org/apache/axis2/jaxws/proxy/ProxyTests.java
 (original)
+++ 
axis/axis2/java/core/branches/AXIS2-4091/modules/jaxws-integration/test/org/apache/axis2/jaxws/proxy/ProxyTests.java
 Sun Dec 17 21:35:47 2017
@@ -50,232 +50,191 @@ public class ProxyTests extends Abstract
     }
 
     public void testMultipleServiceCalls(){
-        try{
-            if(!runningOnAxis){
-                return;
-            }
-            TestLogger.logger.debug("---------------------------------------");
-            TestLogger.logger.debug("test:" + getName());
-            String request = new String("some string request");
-            TestLogger.logger.debug("Service Call #1");
-            ProxyDocLitWrappedService service1 = new 
ProxyDocLitWrappedService();
-            DocLitWrappedProxy proxy1 = 
service1.getDocLitWrappedProxyImplPort();
-            BindingProvider p1 =    (BindingProvider)proxy1;
-            
p1.getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY,axisEndpoint);
-            String response1 = proxy1.invoke(request);
-            TestLogger.logger.debug("Proxy Response =" + response1);
-            TestLogger.logger.debug("---------------------------------------");
-
-            TestLogger.logger.debug("Service Call #2");
-            ProxyDocLitWrappedService service2 = new 
ProxyDocLitWrappedService();
-            DocLitWrappedProxy proxy2 = 
service2.getDocLitWrappedProxyImplPort();
-            BindingProvider p2 =    (BindingProvider)proxy2;
-            
p2.getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY,axisEndpoint);
-            String response2 = proxy2.invoke(request);
-            TestLogger.logger.debug("Proxy Response =" + response2);
-            TestLogger.logger.debug("---------------------------------------");
-            
-        }catch(Exception e){
-            e.printStackTrace();
-            fail(getName() + " failed");
+        if(!runningOnAxis){
+            return;
         }
-    }
-    
-    public void testInvokeWithNullParam(){
-        try{ 
-            if(!runningOnAxis){
-                return;
-            }
-            TestLogger.logger.debug("---------------------------------------");
-            TestLogger.logger.debug("Test Name: " + getName());
-            File wsdl= new File(wsdlLocation); 
-            URL wsdlUrl = wsdl.toURL(); 
-            Service service = Service.create(null, serviceName); 
-            Object proxy =service.getPort(portName, DocLitWrappedProxy.class);
-            TestLogger.logger.debug(">>Invoking Binding Provider property");
-            BindingProvider p = (BindingProvider)proxy;
+        TestLogger.logger.debug("---------------------------------------");
+        TestLogger.logger.debug("test:" + getName());
+        String request = new String("some string request");
+        TestLogger.logger.debug("Service Call #1");
+        ProxyDocLitWrappedService service1 = new ProxyDocLitWrappedService();
+        DocLitWrappedProxy proxy1 = service1.getDocLitWrappedProxyImplPort();
+        BindingProvider p1 =    (BindingProvider)proxy1;
+        
p1.getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY,axisEndpoint);
+        String response1 = proxy1.invoke(request);
+        TestLogger.logger.debug("Proxy Response =" + response1);
+        TestLogger.logger.debug("---------------------------------------");
+
+        TestLogger.logger.debug("Service Call #2");
+        ProxyDocLitWrappedService service2 = new ProxyDocLitWrappedService();
+        DocLitWrappedProxy proxy2 = service2.getDocLitWrappedProxyImplPort();
+        BindingProvider p2 =    (BindingProvider)proxy2;
+        
p2.getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY,axisEndpoint);
+        String response2 = proxy2.invoke(request);
+        TestLogger.logger.debug("Proxy Response =" + response2);
+        TestLogger.logger.debug("---------------------------------------");
+    }
+    
+    public void testInvokeWithNullParam() throws Exception {
+        if(!runningOnAxis){
+            return;
+        }
+        TestLogger.logger.debug("---------------------------------------");
+        TestLogger.logger.debug("Test Name: " + getName());
+        File wsdl= new File(wsdlLocation); 
+        URL wsdlUrl = wsdl.toURL(); 
+        Service service = Service.create(null, serviceName); 
+        Object proxy =service.getPort(portName, DocLitWrappedProxy.class);
+        TestLogger.logger.debug(">>Invoking Binding Provider property");
+        BindingProvider p = (BindingProvider)proxy;
+        
p.getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY,axisEndpoint);
+
+        DocLitWrappedProxy dwp = (DocLitWrappedProxy)proxy;
+        TestLogger.logger.debug(">> Invoking Proxy Synchronously");
+        String request = null;
+        String response = dwp.invoke(request);
+        TestLogger.logger.debug("Proxy Response =" + response);
+
+        // Try again
+        response = dwp.invoke(request);
+        TestLogger.logger.debug("Proxy Response =" + response);
+        TestLogger.logger.debug("---------------------------------------");
+    }
+    
+    public void testInvoke() throws Exception {
+        if(!runningOnAxis){
+            return;
+        }
+        TestLogger.logger.debug("---------------------------------------");
+        
+        File wsdl= new File(wsdlLocation); 
+        URL wsdlUrl = wsdl.toURL(); 
+        Service service = Service.create(null, serviceName);
+        String request = new String("some string request"); 
+        Object proxy =service.getPort(portName, DocLitWrappedProxy.class);
+        TestLogger.logger.debug(">>Invoking Binding Provider property");
+        BindingProvider p = (BindingProvider)proxy;
             
p.getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY,axisEndpoint);
-
-            DocLitWrappedProxy dwp = (DocLitWrappedProxy)proxy;
-            TestLogger.logger.debug(">> Invoking Proxy Synchronously");
-            String request = null;
-            String response = dwp.invoke(request);
-            TestLogger.logger.debug("Proxy Response =" + response);
-
             
-            // Try again
-            response = dwp.invoke(request);
-            TestLogger.logger.debug("Proxy Response =" + response);
-            TestLogger.logger.debug("---------------------------------------");
-        }catch(Exception e){ 
-            e.printStackTrace(); 
-            fail("Exception received" + e);
-        }
-    }
-    public void testInvoke(){
-        try{ 
-            if(!runningOnAxis){
-                return;
-            }
-            TestLogger.logger.debug("---------------------------------------");
-            
-            File wsdl= new File(wsdlLocation); 
-            URL wsdlUrl = wsdl.toURL(); 
-            Service service = Service.create(null, serviceName);
-            String request = new String("some string request"); 
-            Object proxy =service.getPort(portName, DocLitWrappedProxy.class);
-            TestLogger.logger.debug(">>Invoking Binding Provider property");
-            BindingProvider p = (BindingProvider)proxy;
-                
p.getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY,axisEndpoint);
-                
-            DocLitWrappedProxy dwp = (DocLitWrappedProxy)proxy;
-            TestLogger.logger.debug(">> Invoking Proxy Synchronously");
-            String response = dwp.invoke(request);
-            TestLogger.logger.debug("Proxy Response =" + response);
-            
-            // Try again
-            response = dwp.invoke(request);
-            TestLogger.logger.debug("Proxy Response =" + response);
-            TestLogger.logger.debug("---------------------------------------");
-        }catch(Exception e){ 
-            e.printStackTrace(); 
-            fail("Exception received" + e);
-        }
-    }
-
-    public void testInvokeWithWSDL(){
-
-       try{ 
-            if(!runningOnAxis){
-                return;
-            }
-            TestLogger.logger.debug("---------------------------------------");
-            File wsdl= new File(wsdlLocation); 
-            URL wsdlUrl = wsdl.toURL(); 
-            Service service = Service.create(wsdlUrl, serviceName);
-            String request = new String("some string request"); 
-            Object proxy =service.getPort(portName, DocLitWrappedProxy.class);
-            TestLogger.logger.debug(">>Invoking Binding Provider property");
-            BindingProvider p = (BindingProvider)proxy;
+        DocLitWrappedProxy dwp = (DocLitWrappedProxy)proxy;
+        TestLogger.logger.debug(">> Invoking Proxy Synchronously");
+        String response = dwp.invoke(request);
+        TestLogger.logger.debug("Proxy Response =" + response);
+        
+        // Try again
+        response = dwp.invoke(request);
+        TestLogger.logger.debug("Proxy Response =" + response);
+        TestLogger.logger.debug("---------------------------------------");
+    }
+
+    public void testInvokeWithWSDL() throws Exception {
+        if(!runningOnAxis){
+            return;
+        }
+        TestLogger.logger.debug("---------------------------------------");
+        File wsdl= new File(wsdlLocation); 
+        URL wsdlUrl = wsdl.toURL(); 
+        Service service = Service.create(wsdlUrl, serviceName);
+        String request = new String("some string request"); 
+        Object proxy =service.getPort(portName, DocLitWrappedProxy.class);
+        TestLogger.logger.debug(">>Invoking Binding Provider property");
+        BindingProvider p = (BindingProvider)proxy;
+        
p.getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY,axisEndpoint);
+            
+        DocLitWrappedProxy dwp = (DocLitWrappedProxy)proxy;
+        TestLogger.logger.debug(">> Invoking Proxy Synchronously");
+        String response = dwp.invoke(request);
+        TestLogger.logger.debug("Proxy Response =" + response);
+        
+        // Try again
+        response = dwp.invoke(request);
+        TestLogger.logger.debug("Proxy Response =" + response);
+        TestLogger.logger.debug("---------------------------------------");
+    }
+    
+    public void testInvokeAsyncCallback() throws Exception {
+        if(!runningOnAxis){
+            return;
+        }
+        TestLogger.logger.debug("---------------------------------------");
+        
+        File wsdl= new File(wsdlLocation); 
+        URL wsdlUrl = wsdl.toURL(); 
+        Service service = Service.create(null, serviceName);
+        String request = new String("some string request"); 
+        Object proxy =service.getPort(portName, DocLitWrappedProxy.class);
+        TestLogger.logger.debug(">>Invoking Binding Provider property");
+        BindingProvider p = (BindingProvider)proxy;
             
p.getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY,axisEndpoint);
-                
-            DocLitWrappedProxy dwp = (DocLitWrappedProxy)proxy;
-            TestLogger.logger.debug(">> Invoking Proxy Synchronously");
-            String response = dwp.invoke(request);
-            TestLogger.logger.debug("Proxy Response =" + response);
             
-            // Try again
-            response = dwp.invoke(request);
-            TestLogger.logger.debug("Proxy Response =" + response);
-            TestLogger.logger.debug("---------------------------------------");
-        }catch(Exception e){ 
-            e.printStackTrace(); 
-            fail("Exception received" + e);
-        }
-
-    }
-    
-    public void testInvokeAsyncCallback(){
-        try{ 
-            if(!runningOnAxis){
-                return;
-            }
-            TestLogger.logger.debug("---------------------------------------");
-            
-            File wsdl= new File(wsdlLocation); 
-            URL wsdlUrl = wsdl.toURL(); 
-            Service service = Service.create(null, serviceName);
-            String request = new String("some string request"); 
-            Object proxy =service.getPort(portName, DocLitWrappedProxy.class);
-            TestLogger.logger.debug(">>Invoking Binding Provider property");
-            BindingProvider p = (BindingProvider)proxy;
-                
p.getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY,axisEndpoint);
-                
-            DocLitWrappedProxy dwp = (DocLitWrappedProxy)proxy;
-            TestLogger.logger.debug(">> Invoking Proxy Asynchronous Callback");
-            AsyncHandler handler = new AsyncCallback();
-            Future<?> response = dwp.invokeAsync(request, handler);
-            
-            // Try again
-            handler = new AsyncCallback();
-            response = dwp.invokeAsync(request, handler);
-            TestLogger.logger.debug("---------------------------------------");
-        }catch(Exception e){ 
-            e.printStackTrace(); 
-            fail("Exception received" + e);
-        }
+        DocLitWrappedProxy dwp = (DocLitWrappedProxy)proxy;
+        TestLogger.logger.debug(">> Invoking Proxy Asynchronous Callback");
+        AsyncHandler handler = new AsyncCallback();
+        Future<?> response = dwp.invokeAsync(request, handler);
+        
+        // Try again
+        handler = new AsyncCallback();
+        response = dwp.invokeAsync(request, handler);
+        TestLogger.logger.debug("---------------------------------------");
     }
     
-    public void testInvokeAsyncPolling() {
-        try {
-            TestLogger.logger.debug("---------------------------------------");
-            
-            File wsdl= new File(wsdlLocation); 
-            URL wsdlUrl = wsdl.toURL(); 
-            Service service = Service.create(null, serviceName);
-            DocLitWrappedProxy proxy =service.getPort(portName, 
DocLitWrappedProxy.class);
-            
-            String request = new String("some string request");
-
-            TestLogger.logger.debug(">> Invoking Binding Provider property");
-            BindingProvider p = (BindingProvider) proxy;
-            
p.getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, 
axisEndpoint);
+    public void testInvokeAsyncPolling() throws Exception {
+        TestLogger.logger.debug("---------------------------------------");
+        
+        File wsdl= new File(wsdlLocation); 
+        URL wsdlUrl = wsdl.toURL(); 
+        Service service = Service.create(null, serviceName);
+        DocLitWrappedProxy proxy =service.getPort(portName, 
DocLitWrappedProxy.class);
+        
+        String request = new String("some string request");
 
-            TestLogger.logger.debug(">> Invoking Proxy with async polling 
request");
-            Response<ReturnType> asyncResponse = proxy.invokeAsync(request);
+        TestLogger.logger.debug(">> Invoking Binding Provider property");
+        BindingProvider p = (BindingProvider) proxy;
+        p.getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, 
axisEndpoint);
 
-            while (!asyncResponse.isDone()) {
-                TestLogger.logger.debug(">> Async invocation still not 
complete");
-                Thread.sleep(1000);
-            }
-            
-            ReturnType response = asyncResponse.get();
-            assertNotNull(response);
-            
-            // Try again
-            asyncResponse = proxy.invokeAsync(request);
+        TestLogger.logger.debug(">> Invoking Proxy with async polling 
request");
+        Response<ReturnType> asyncResponse = proxy.invokeAsync(request);
 
-            while (!asyncResponse.isDone()) {
-                TestLogger.logger.debug(">> Async invocation still not 
complete");
-                Thread.sleep(1000);
-            }
-            
-            response = asyncResponse.get();
-            assertNotNull(response);
+        while (!asyncResponse.isDone()) {
+            TestLogger.logger.debug(">> Async invocation still not complete");
+            Thread.sleep(1000);
         }
-        catch(Exception e) { 
-            e.printStackTrace(); 
-            fail("Exception received" + e);
+        
+        ReturnType response = asyncResponse.get();
+        assertNotNull(response);
+        
+        // Try again
+        asyncResponse = proxy.invokeAsync(request);
+
+        while (!asyncResponse.isDone()) {
+            TestLogger.logger.debug(">> Async invocation still not complete");
+            Thread.sleep(1000);
         }
+        
+        response = asyncResponse.get();
+        assertNotNull(response);
     }
     
-    public void testTwoWay(){
+    public void testTwoWay() throws Exception {
+        if(runningOnAxis){
+            return;
+        }
+        File wsdl= new File(wsdlLocation); 
+        URL wsdlUrl = wsdl.toURL(); 
+        Service service = Service.create(null, serviceName);
+        String request = new String("some string request"); 
         
-        try{ 
-            if(runningOnAxis){
-                return;
-            }
-            File wsdl= new File(wsdlLocation); 
-            URL wsdlUrl = wsdl.toURL(); 
-            Service service = Service.create(null, serviceName);
-            String request = new String("some string request"); 
-            
-            Object proxy =service.getPort(portName, DocLitWrappedProxy.class); 
-            BindingProvider p = (BindingProvider)proxy;
-            
p.getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, 
axisEndpoint);
-                
-            DocLitWrappedProxy dwp = (DocLitWrappedProxy)proxy;  
-            String response = dwp.twoWay(request);
-            System.out.println("Response =" + response);
+        Object proxy =service.getPort(portName, DocLitWrappedProxy.class); 
+        BindingProvider p = (BindingProvider)proxy;
+        p.getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, 
axisEndpoint);
             
-            // Try again
-            response = dwp.twoWay(request);
-            System.out.println("Response =" + response);
-        } catch(Exception e){ 
-            e.printStackTrace(); 
-            fail("Exception received" + e);
-        }
+        DocLitWrappedProxy dwp = (DocLitWrappedProxy)proxy;  
+        String response = dwp.twoWay(request);
+        System.out.println("Response =" + response);
         
+        // Try again
+        response = dwp.twoWay(request);
+        System.out.println("Response =" + response);
     }
     
     public void testOneWay(){
@@ -286,35 +245,27 @@ public class ProxyTests extends Abstract
         
     }
     
-    public void testTwoWayAsyncCallback(){
+    public void testTwoWayAsyncCallback() throws Exception {
+        if(runningOnAxis){
+            return;
+        }
+        File wsdl= new File(wsdlLocation); 
+        URL wsdlUrl = wsdl.toURL(); 
+        Service service = Service.create(null, serviceName);
         
-        try{ 
-            if(runningOnAxis){
-                return;
-            }
-            File wsdl= new File(wsdlLocation); 
-            URL wsdlUrl = wsdl.toURL(); 
-            Service service = Service.create(null, serviceName);
-            
-            String request = new String("some string request"); 
-            
-            Object proxy =service.getPort(portName, DocLitWrappedProxy.class); 
-            BindingProvider p = (BindingProvider)proxy;
-                
p.getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, 
axisEndpoint);
-                
-            DocLitWrappedProxy dwp = (DocLitWrappedProxy)proxy;
-            AsyncHandler handler = new AsyncCallback();
-            Future<?> response = dwp.twoWayAsync(request, handler);
-            
-            // Try again
-            handler = new AsyncCallback();
-            response = dwp.twoWayAsync(request, handler);
-            
-        }catch(Exception e){ 
-            e.printStackTrace(); 
-            fail("Exception received" + e);
-        }
+        String request = new String("some string request"); 
         
+        Object proxy =service.getPort(portName, DocLitWrappedProxy.class); 
+        BindingProvider p = (BindingProvider)proxy;
+            
p.getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, 
axisEndpoint);
+            
+        DocLitWrappedProxy dwp = (DocLitWrappedProxy)proxy;
+        AsyncHandler handler = new AsyncCallback();
+        Future<?> response = dwp.twoWayAsync(request, handler);
+        
+        // Try again
+        handler = new AsyncCallback();
+        response = dwp.twoWayAsync(request, handler);
     }
     
     public void testAsyncPooling(){

Modified: 
axis/axis2/java/core/branches/AXIS2-4091/modules/jaxws-integration/test/org/apache/axis2/jaxws/xmlhttp/clientTests/dispatch/datasource/DispatchXMessageDataSourceTests.java
URL: 
http://svn.apache.org/viewvc/axis/axis2/java/core/branches/AXIS2-4091/modules/jaxws-integration/test/org/apache/axis2/jaxws/xmlhttp/clientTests/dispatch/datasource/DispatchXMessageDataSourceTests.java?rev=1818515&r1=1818514&r2=1818515&view=diff
==============================================================================
--- 
axis/axis2/java/core/branches/AXIS2-4091/modules/jaxws-integration/test/org/apache/axis2/jaxws/xmlhttp/clientTests/dispatch/datasource/DispatchXMessageDataSourceTests.java
 (original)
+++ 
axis/axis2/java/core/branches/AXIS2-4091/modules/jaxws-integration/test/org/apache/axis2/jaxws/xmlhttp/clientTests/dispatch/datasource/DispatchXMessageDataSourceTests.java
 Sun Dec 17 21:35:47 2017
@@ -23,7 +23,6 @@ import junit.framework.Test;
 import junit.framework.TestSuite;
 import org.apache.axis2.jaxws.framework.AbstractTestCase;
 import org.apache.axis2.jaxws.provider.DataSourceImpl;
-import org.apache.axiom.attachments.utils.IOUtils;
 import org.apache.axiom.attachments.impl.BufferUtils;
 import org.apache.axiom.util.UIDGenerator;
 

Modified: axis/axis2/java/core/branches/AXIS2-4091/modules/jaxws/pom.xml
URL: 
http://svn.apache.org/viewvc/axis/axis2/java/core/branches/AXIS2-4091/modules/jaxws/pom.xml?rev=1818515&r1=1818514&r2=1818515&view=diff
==============================================================================
--- axis/axis2/java/core/branches/AXIS2-4091/modules/jaxws/pom.xml (original)
+++ axis/axis2/java/core/branches/AXIS2-4091/modules/jaxws/pom.xml Sun Dec 17 
21:35:47 2017
@@ -54,6 +54,10 @@
             <version>${project.version}</version>
         </dependency>
         <dependency>
+            <groupId>org.apache.geronimo.specs</groupId>
+            <artifactId>geronimo-javamail_1.4_spec</artifactId>
+        </dependency>
+        <dependency>
             <groupId>xml-resolver</groupId>
             <artifactId>xml-resolver</artifactId>
         </dependency>

Modified: 
axis/axis2/java/core/branches/AXIS2-4091/modules/jaxws/src/org/apache/axis2/jaxws/message/util/Reader2Writer.java
URL: 
http://svn.apache.org/viewvc/axis/axis2/java/core/branches/AXIS2-4091/modules/jaxws/src/org/apache/axis2/jaxws/message/util/Reader2Writer.java?rev=1818515&r1=1818514&r2=1818515&view=diff
==============================================================================
--- 
axis/axis2/java/core/branches/AXIS2-4091/modules/jaxws/src/org/apache/axis2/jaxws/message/util/Reader2Writer.java
 (original)
+++ 
axis/axis2/java/core/branches/AXIS2-4091/modules/jaxws/src/org/apache/axis2/jaxws/message/util/Reader2Writer.java
 Sun Dec 17 21:35:47 2017
@@ -76,11 +76,7 @@ public class Reader2Writer {
         Iterator it = omDocument.getChildren();
         while (it.hasNext()) {
             OMNode omNode = (OMNode)it.next();
-            // TODO Using serialize and consume
-            // caused an axiom bug...falling back to serialize
-            // (which is less performant due to om caching)
-            //omNode.serializeAndConsume(writer);
-            omNode.serialize(writer);
+            omNode.serializeAndConsume(writer);
         }
         // Close the reader if marked to do so
         if (closeReader) {

Modified: 
axis/axis2/java/core/branches/AXIS2-4091/modules/json/src/org/apache/axis2/json/gson/GsonXMLStreamReader.java
URL: 
http://svn.apache.org/viewvc/axis/axis2/java/core/branches/AXIS2-4091/modules/json/src/org/apache/axis2/json/gson/GsonXMLStreamReader.java?rev=1818515&r1=1818514&r2=1818515&view=diff
==============================================================================
--- 
axis/axis2/java/core/branches/AXIS2-4091/modules/json/src/org/apache/axis2/json/gson/GsonXMLStreamReader.java
 (original)
+++ 
axis/axis2/java/core/branches/AXIS2-4091/modules/json/src/org/apache/axis2/json/gson/GsonXMLStreamReader.java
 Sun Dec 17 21:35:47 2017
@@ -169,11 +169,7 @@ public class GsonXMLStreamReader impleme
     public boolean hasNext() throws XMLStreamException {
         try {
             tokenType = jsonReader.peek();
-            if (tokenType == JsonToken.END_DOCUMENT) {
-                return false;
-            } else {
-                return true;
-            }
+            return !(tokenType == JsonToken.END_DOCUMENT);
         } catch (IOException e) {
             throw new XMLStreamException("Unexpected end of json stream");
         }
@@ -195,42 +191,30 @@ public class GsonXMLStreamReader impleme
 
 
     public boolean isStartElement() {
-        if (state == JsonState.NameName
+        return (state == JsonState.NameName
                 || state == JsonState.NameValue
                 || state == JsonState.ValueValue_CHAR
-                || state == JsonState.EndObjectBeginObject_START) {
-            return true;
-        } else {
-            return false;
-        }
+                || state == JsonState.EndObjectBeginObject_START);
     }
 
 
     public boolean isEndElement() {
-        if (state == JsonState.ValueValue_START
+        return (state == JsonState.ValueValue_START
                 || state == JsonState.EndArrayName
                 || state == JsonState.ValueEndObject_END_2
                 || state == JsonState.ValueName_START
                 || state == JsonState.EndObjectName
                 || state == JsonState.EndObjectBeginObject_END
                 || state == JsonState.EndArrayEndObject
-                || state == JsonState.EndObjectEndObject) {
-            return true;
-        } else {
-            return false;
-        }
+                || state == JsonState.EndObjectEndObject);
     }
 
 
     public boolean isCharacters() {
-        if (state == JsonState.ValueValue_END
+        return (state == JsonState.ValueValue_END
                 || state == JsonState.ValueEndArray
                 || state == JsonState.ValueEndObject_END_1
-                || state == JsonState.ValueName_END) {
-            return true;
-        } else {
-            return false;
-        }
+                || state == JsonState.ValueName_END);
 
     }
 
@@ -382,11 +366,7 @@ public class GsonXMLStreamReader impleme
 
 
     public boolean hasText() {
-        if (isCharacters()) {
-            return true;
-        } else {
-            return false;
-        }
+        return isCharacters();
     }
 
 
@@ -404,17 +384,17 @@ public class GsonXMLStreamReader impleme
 
 
             public int getCharacterOffset() {
-                return 0;  //To change body of implemented methods use File | 
Settings | File Templates.
+                return 0;
             }
 
 
             public String getPublicId() {
-                return null;  //To change body of implemented methods use File 
| Settings | File Templates.
+                return null;
             }
 
 
             public String getSystemId() {
-                return null;  //To change body of implemented methods use File 
| Settings | File Templates.
+                return null;
             }
         };
     }

Modified: 
axis/axis2/java/core/branches/AXIS2-4091/modules/json/src/org/apache/axis2/json/gson/GsonXMLStreamWriter.java
URL: 
http://svn.apache.org/viewvc/axis/axis2/java/core/branches/AXIS2-4091/modules/json/src/org/apache/axis2/json/gson/GsonXMLStreamWriter.java?rev=1818515&r1=1818514&r2=1818515&view=diff
==============================================================================
--- 
axis/axis2/java/core/branches/AXIS2-4091/modules/json/src/org/apache/axis2/json/gson/GsonXMLStreamWriter.java
 (original)
+++ 
axis/axis2/java/core/branches/AXIS2-4091/modules/json/src/org/apache/axis2/json/gson/GsonXMLStreamWriter.java
 Sun Dec 17 21:35:47 2017
@@ -374,7 +374,7 @@ public class GsonXMLStreamWriter impleme
                 throw new XMLStreamException("Error occours while write first 
begin object ");
             }
         }
-        JsonObject stackObj = null;
+        JsonObject stackObj;
         try {
             if (flushObject != null) {
                 if (topNestedArrayObj != null && flushObject.getType() == 
JSONType.NESTED_ARRAY &&

Modified: 
axis/axis2/java/core/branches/AXIS2-4091/modules/json/src/org/apache/axis2/json/gson/JSONMessageHandler.java
URL: 
http://svn.apache.org/viewvc/axis/axis2/java/core/branches/AXIS2-4091/modules/json/src/org/apache/axis2/json/gson/JSONMessageHandler.java?rev=1818515&r1=1818514&r2=1818515&view=diff
==============================================================================
--- 
axis/axis2/java/core/branches/AXIS2-4091/modules/json/src/org/apache/axis2/json/gson/JSONMessageHandler.java
 (original)
+++ 
axis/axis2/java/core/branches/AXIS2-4091/modules/json/src/org/apache/axis2/json/gson/JSONMessageHandler.java
 Sun Dec 17 21:35:47 2017
@@ -25,6 +25,7 @@ import org.apache.axis2.AxisFault;
 import org.apache.axis2.context.MessageContext;
 import org.apache.axis2.engine.MessageReceiver;
 import org.apache.axis2.handlers.AbstractHandler;
+import org.apache.axis2.json.gson.rpc.JsonInOnlyRPCMessageReceiver;
 import org.apache.axis2.json.gson.rpc.JsonRpcMessageReceiver;
 import org.apache.axis2.json.gson.factory.JsonConstant;
 import org.apache.axis2.wsdl.WSDLConstants;
@@ -58,7 +59,7 @@ public class JSONMessageHandler extends
 
     public InvocationResponse invoke(MessageContext msgContext) throws 
AxisFault {
         MessageReceiver messageReceiver = 
msgContext.getAxisOperation().getMessageReceiver();
-        if (messageReceiver instanceof JsonRpcMessageReceiver) {
+        if (messageReceiver instanceof JsonRpcMessageReceiver || 
messageReceiver instanceof JsonInOnlyRPCMessageReceiver) {
             // do not need to parse XMLSchema list, as  this message receiver 
will not use GsonXMLStreamReader  to read the inputStream.
         } else {
             Object tempObj = 
msgContext.getProperty(JsonConstant.IS_JSON_STREAM);

Modified: 
axis/axis2/java/core/branches/AXIS2-4091/modules/json/src/org/apache/axis2/json/gson/JsonBuilder.java
URL: 
http://svn.apache.org/viewvc/axis/axis2/java/core/branches/AXIS2-4091/modules/json/src/org/apache/axis2/json/gson/JsonBuilder.java?rev=1818515&r1=1818514&r2=1818515&view=diff
==============================================================================
--- 
axis/axis2/java/core/branches/AXIS2-4091/modules/json/src/org/apache/axis2/json/gson/JsonBuilder.java
 (original)
+++ 
axis/axis2/java/core/branches/AXIS2-4091/modules/json/src/org/apache/axis2/json/gson/JsonBuilder.java
 Sun Dec 17 21:35:47 2017
@@ -30,7 +30,6 @@ import org.apache.axis2.builder.Builder;
 import org.apache.axis2.context.MessageContext;
 import org.apache.axis2.json.gson.factory.JsonConstant;
 
-import java.io.IOException;
 import java.io.InputStream;
 import java.io.InputStreamReader;
 import java.io.UnsupportedEncodingException;
@@ -38,7 +37,7 @@ import java.io.UnsupportedEncodingExcept
 public class JsonBuilder implements Builder {
     public OMElement processDocument(InputStream inputStream, String s, 
MessageContext messageContext) throws AxisFault {
         messageContext.setProperty(JsonConstant.IS_JSON_STREAM , true);
-        JsonReader jsonReader = null;
+        JsonReader jsonReader;
         String charSetEncoding=null;
            try {
                charSetEncoding = (String) 
messageContext.getProperty(Constants.Configuration.CHARACTER_SET_ENCODING);
@@ -51,8 +50,6 @@ public class JsonBuilder implements Buil
                return soapEnvelope;
            } catch (UnsupportedEncodingException e) {
                throw new AxisFault(charSetEncoding + " encoding is may not 
supported by json inputStream ", e);
-           } catch (IOException e) {
-               throw new AxisFault("IOException while processing JsonReader ", 
e);
            }
     }
 

Modified: 
axis/axis2/java/core/branches/AXIS2-4091/modules/json/src/org/apache/axis2/json/gson/JsonFormatter.java
URL: 
http://svn.apache.org/viewvc/axis/axis2/java/core/branches/AXIS2-4091/modules/json/src/org/apache/axis2/json/gson/JsonFormatter.java?rev=1818515&r1=1818514&r2=1818515&view=diff
==============================================================================
--- 
axis/axis2/java/core/branches/AXIS2-4091/modules/json/src/org/apache/axis2/json/gson/JsonFormatter.java
 (original)
+++ 
axis/axis2/java/core/branches/AXIS2-4091/modules/json/src/org/apache/axis2/json/gson/JsonFormatter.java
 Sun Dec 17 21:35:47 2017
@@ -54,7 +54,7 @@ public class JsonFormatter implements Me
 
     public void writeTo(MessageContext outMsgCtxt, OMOutputFormat 
omOutputFormat, OutputStream outputStream, boolean b) throws AxisFault {
         String charSetEncoding = (String) 
outMsgCtxt.getProperty(Constants.Configuration.CHARACTER_SET_ENCODING);
-        JsonWriter jsonWriter = null;
+        JsonWriter jsonWriter;
         String msg;
 
         try {
@@ -129,8 +129,7 @@ public class JsonFormatter implements Me
     }
 
     public String getContentType(MessageContext outMsgCtxt, OMOutputFormat 
omOutputFormat, String s) {
-        String contentType = 
(String)outMsgCtxt.getProperty(Constants.Configuration.CONTENT_TYPE);
-        return contentType;
+        return 
(String)outMsgCtxt.getProperty(Constants.Configuration.CONTENT_TYPE);
     }
 
     public URL getTargetAddress(MessageContext messageContext, OMOutputFormat 
omOutputFormat, URL url) throws AxisFault {

Modified: 
axis/axis2/java/core/branches/AXIS2-4091/modules/json/src/org/apache/axis2/json/gson/factory/XmlNode.java
URL: 
http://svn.apache.org/viewvc/axis/axis2/java/core/branches/AXIS2-4091/modules/json/src/org/apache/axis2/json/gson/factory/XmlNode.java?rev=1818515&r1=1818514&r2=1818515&view=diff
==============================================================================
--- 
axis/axis2/java/core/branches/AXIS2-4091/modules/json/src/org/apache/axis2/json/gson/factory/XmlNode.java
 (original)
+++ 
axis/axis2/java/core/branches/AXIS2-4091/modules/json/src/org/apache/axis2/json/gson/factory/XmlNode.java
 Sun Dec 17 21:35:47 2017
@@ -40,7 +40,7 @@ public class XmlNode {
     }
 
 
-    public void addChildtoList(XmlNode child) {
+    public void addChildToList(XmlNode child) {
         childrenList.add(child);
     }
 

Modified: 
axis/axis2/java/core/branches/AXIS2-4091/modules/json/src/org/apache/axis2/json/gson/factory/XmlNodeGenerator.java
URL: 
http://svn.apache.org/viewvc/axis/axis2/java/core/branches/AXIS2-4091/modules/json/src/org/apache/axis2/json/gson/factory/XmlNodeGenerator.java?rev=1818515&r1=1818514&r2=1818515&view=diff
==============================================================================
--- 
axis/axis2/java/core/branches/AXIS2-4091/modules/json/src/org/apache/axis2/json/gson/factory/XmlNodeGenerator.java
 (original)
+++ 
axis/axis2/java/core/branches/AXIS2-4091/modules/json/src/org/apache/axis2/json/gson/factory/XmlNodeGenerator.java
 Sun Dec 17 21:35:47 2017
@@ -89,7 +89,7 @@ public class XmlNodeGenerator {
         XmlSchemaType schemaType = element.getSchemaType();
         if (schemaTypeName != null) {
             xmlNode = new XmlNode(element.getName(), targetNamespace, false, 
(element.getMaxOccurs() == 1 ? false : true), schemaTypeName.getLocalPart());
-            parentNode.addChildtoList(xmlNode);
+            parentNode.addChildToList(xmlNode);
             if 
(("http://www.w3.org/2001/XMLSchema";).equals(schemaTypeName.getNamespaceURI())) 
{
             } else {
                 XmlSchema schemaOfType;
@@ -105,7 +105,7 @@ public class XmlNodeGenerator {
             }
         }else if (schemaType != null) {
             xmlNode = new XmlNode(element.getName(), targetNamespace, false, 
(element.getMaxOccurs() == 1 ? false : true), 
schemaType.getQName().getLocalPart());
-            parentNode.addChildtoList(xmlNode);
+            parentNode.addChildToList(xmlNode);
             processSchemaType(schemaType, xmlNode, schema);
         }
     }

Modified: 
axis/axis2/java/core/branches/AXIS2-4091/modules/json/src/org/apache/axis2/json/gson/rpc/JsonInOnlyRPCMessageReceiver.java
URL: 
http://svn.apache.org/viewvc/axis/axis2/java/core/branches/AXIS2-4091/modules/json/src/org/apache/axis2/json/gson/rpc/JsonInOnlyRPCMessageReceiver.java?rev=1818515&r1=1818514&r2=1818515&view=diff
==============================================================================
--- 
axis/axis2/java/core/branches/AXIS2-4091/modules/json/src/org/apache/axis2/json/gson/rpc/JsonInOnlyRPCMessageReceiver.java
 (original)
+++ 
axis/axis2/java/core/branches/AXIS2-4091/modules/json/src/org/apache/axis2/json/gson/rpc/JsonInOnlyRPCMessageReceiver.java
 Sun Dec 17 21:35:47 2017
@@ -25,7 +25,6 @@ import org.apache.axis2.context.MessageC
 import org.apache.axis2.description.AxisOperation;
 import org.apache.axis2.json.gson.GsonXMLStreamReader;
 import org.apache.axis2.json.gson.factory.JsonConstant;
-import org.apache.axis2.json.gson.factory.JsonUtils;
 import org.apache.axis2.rpc.receivers.RPCInOnlyMessageReceiver;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
@@ -35,21 +34,18 @@ import java.lang.reflect.InvocationTarge
 import java.lang.reflect.Method;
 
 public class JsonInOnlyRPCMessageReceiver extends RPCInOnlyMessageReceiver {
-
-    private static Log log = 
LogFactory.getLog(JsonInOnlyRPCMessageReceiver.class);
+    private static final Log log = 
LogFactory.getLog(JsonInOnlyRPCMessageReceiver.class);
+    
     @Override
     public void invokeBusinessLogic(MessageContext inMessage) throws AxisFault 
{
-
         Object tempObj = inMessage.getProperty(JsonConstant.IS_JSON_STREAM);
         boolean isJsonStream;
-
         if (tempObj != null) {
             isJsonStream = Boolean.valueOf(tempObj.toString());
         } else {
             // if IS_JSON_STREAM property  is not set then it is not a JSON 
request
             isJsonStream = false;
         }
-
         if (isJsonStream) {
             Object o = 
inMessage.getProperty(JsonConstant.GSON_XML_STREAM_READER);
             if (o != null) {
@@ -58,77 +54,44 @@ public class JsonInOnlyRPCMessageReceive
                 if (jsonReader == null) {
                     throw new AxisFault("JsonReader should not be null");
                 }
-                Method method = null;
-                String msg;
                 Object serviceObj = getTheImplementationObject(inMessage);
-                Class implClass = serviceObj.getClass();
-                Method[] allMethods = implClass.getDeclaredMethods();
                 AxisOperation op = 
inMessage.getOperationContext().getAxisOperation();
                 String operation = op.getName().getLocalPart();
-                method = JsonUtils.getOpMethod(operation, allMethods);
-                Class[] paramClasses = method.getParameterTypes();
-                try {
-                    int paramCount = paramClasses.length;
-                    JsonUtils.invokeServiceClass(jsonReader, serviceObj, 
method, paramClasses, paramCount);
-                } catch (IllegalAccessException e) {
-                    msg = "Does not have access to " +
-                            "the definition of the specified class, field, 
method or constructor";
-                    log.error(msg, e);
-                    throw AxisFault.makeFault(e);
-
-                } catch (InvocationTargetException e) {
-                    msg = "Exception occurred while trying to invoke service 
method " +
-                            (method != null ? method.getName() : "null");
-                    log.error(msg, e);
-                    throw AxisFault.makeFault(e);
-                } catch (IOException e) {
-                    msg = "Exception occur while encording or " +
-                            "access to the input string at the 
JsonRpcMessageReceiver";
-                    log.error(msg, e);
-                    throw AxisFault.makeFault(e);
-                }
+                invokeService(jsonReader, serviceObj, operation);
             } else {
                 throw new AxisFault("GsonXMLStreamReader should have put as a 
property of messageContext " +
                         "to evaluate JSON message");
             }
-/*        InputStream inputStream = 
(InputStream)inMessage.getProperty(JsonConstant.INPUT_STREAM);
-        if (inputStream != null) {
-            Method method = null;
-            String msg;
-
-            Object serviceObj = getTheImplementationObject(inMessage);
-            Class implClass = serviceObj.getClass();
-            Method[] allmethods =  implClass.getDeclaredMethods();
-            AxisOperation op = 
inMessage.getOperationContext().getAxisOperation();
-            String operation = op.getName().getLocalPart();
-            method = JsonUtils.getOpMethod(operation, allmethods);
-            Class [] paramClasses = method.getParameterTypes();
-            String charSetEncoding = (String) 
inMessage.getProperty(Constants.Configuration.CHARACTER_SET_ENCODING);
-            try {
-                int paramCount=paramClasses.length;
-
-                 JsonUtils.invokeServiceClass(inputStream,
-                        serviceObj, method, paramClasses, paramCount, 
charSetEncoding);
-
-            } catch (IllegalAccessException e) {
-                msg = "Does not have access to " +
-                        "the definition of the specified class, field, method 
or constructor";
-                log.error(msg, e);
-                throw AxisFault.makeFault(e);
-
-            } catch (InvocationTargetException e) {
-                msg = "Exception occurred while trying to invoke service 
method " +
-                        (method != null ? method.getName() : "null");
-                log.error(msg, e);
-                throw AxisFault.makeFault(e);
-            } catch (IOException e) {
-                msg = "Exception occur while encording or " +
-                        "access to the input string at the 
JsonRpcMessageReceiver";
-                log.error(msg, e);
-                throw AxisFault.makeFault(e);
-            }*/
-    } else{
+        } else {
             super.invokeBusinessLogic(inMessage);   // call RPCMessageReceiver 
if inputstream is null
         }
     }
+
+    public void invokeService(JsonReader jsonReader, Object serviceObj, String 
operation_name) throws AxisFault {
+        String msg;
+        Class implClass = serviceObj.getClass();
+        Method[] allMethods = implClass.getDeclaredMethods();
+        Method method = JsonUtils.getOpMethod(operation_name, allMethods);
+        Class[] paramClasses = method.getParameterTypes();
+        try {
+            int paramCount = paramClasses.length;
+            JsonUtils.invokeServiceClass(jsonReader, serviceObj, method, 
paramClasses, paramCount);
+        } catch (IllegalAccessException e) {
+            msg = "Does not have access to " +
+                    "the definition of the specified class, field, method or 
constructor";
+            log.error(msg, e);
+            throw AxisFault.makeFault(e);
+
+        } catch (InvocationTargetException e) {
+            msg = "Exception occurred while trying to invoke service method " +
+                    (method != null ? method.getName() : "null");
+            log.error(msg, e);
+            throw AxisFault.makeFault(e);
+        } catch (IOException e) {
+            msg = "Exception occur while encording or " +
+                    "access to the input string at the JsonRpcMessageReceiver";
+            log.error(msg, e);
+            throw AxisFault.makeFault(e);
+        }
+    }
 }

Modified: 
axis/axis2/java/core/branches/AXIS2-4091/modules/json/src/org/apache/axis2/json/gson/rpc/JsonRpcMessageReceiver.java
URL: 
http://svn.apache.org/viewvc/axis/axis2/java/core/branches/AXIS2-4091/modules/json/src/org/apache/axis2/json/gson/rpc/JsonRpcMessageReceiver.java?rev=1818515&r1=1818514&r2=1818515&view=diff
==============================================================================
--- 
axis/axis2/java/core/branches/AXIS2-4091/modules/json/src/org/apache/axis2/json/gson/rpc/JsonRpcMessageReceiver.java
 (original)
+++ 
axis/axis2/java/core/branches/AXIS2-4091/modules/json/src/org/apache/axis2/json/gson/rpc/JsonRpcMessageReceiver.java
 Sun Dec 17 21:35:47 2017
@@ -24,7 +24,6 @@ import org.apache.axis2.context.MessageC
 import org.apache.axis2.description.AxisOperation;
 import org.apache.axis2.json.gson.GsonXMLStreamReader;
 import org.apache.axis2.json.gson.factory.JsonConstant;
-import org.apache.axis2.json.gson.factory.JsonUtils;
 import org.apache.axis2.rpc.receivers.RPCMessageReceiver;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
@@ -35,20 +34,18 @@ import java.lang.reflect.Method;
 
 
 public class JsonRpcMessageReceiver extends RPCMessageReceiver {
-
-    private static Log log = LogFactory.getLog(RPCMessageReceiver.class);
+    private static final Log log = LogFactory.getLog(RPCMessageReceiver.class);
+    
     @Override
     public void invokeBusinessLogic(MessageContext inMessage, MessageContext 
outMessage) throws AxisFault {
         Object tempObj = inMessage.getProperty(JsonConstant.IS_JSON_STREAM);
         boolean isJsonStream;
-
         if (tempObj != null) {
             isJsonStream = Boolean.valueOf(tempObj.toString());
         } else {
             // if IS_JSON_STREAM property  is not set then it is not a JSON 
request
             isJsonStream = false;
         }
-
         if (isJsonStream) {
             Object o = 
inMessage.getProperty(JsonConstant.GSON_XML_STREAM_READER);
             if (o != null) {
@@ -57,40 +54,10 @@ public class JsonRpcMessageReceiver exte
                 if (jsonReader == null) {
                     throw new AxisFault("JsonReader should not be null");
                 }
-                Method method = null;
-                String msg;
                 Object serviceObj = getTheImplementationObject(inMessage);
-                Class implClass = serviceObj.getClass();
-                Method[] allMethods = implClass.getDeclaredMethods();
                 AxisOperation op = 
inMessage.getOperationContext().getAxisOperation();
                 String operation = op.getName().getLocalPart();
-                method = JsonUtils.getOpMethod(operation, allMethods);
-                Class[] paramClasses = method.getParameterTypes();
-                try {
-                    int paramCount = paramClasses.length;
-                    Object retObj = JsonUtils.invokeServiceClass(jsonReader, 
serviceObj, method, paramClasses, paramCount);
-
-                    // handle response
-                    outMessage.setProperty(JsonConstant.RETURN_OBJECT, retObj);
-                    outMessage.setProperty(JsonConstant.RETURN_TYPE, 
method.getReturnType());
-
-                } catch (IllegalAccessException e) {
-                    msg = "Does not have access to " +
-                            "the definition of the specified class, field, 
method or constructor";
-                    log.error(msg, e);
-                    throw AxisFault.makeFault(e);
-
-                } catch (InvocationTargetException e) {
-                    msg = "Exception occurred while trying to invoke service 
method " +
-                            (method != null ? method.getName() : "null");
-                    log.error(msg, e);
-                    throw AxisFault.makeFault(e);
-                } catch (IOException e) {
-                    msg = "Exception occur while encording or " +
-                            "access to the input string at the 
JsonRpcMessageReceiver";
-                    log.error(msg, e);
-                    throw AxisFault.makeFault(e);
-                }
+                invokeService(jsonReader, serviceObj, operation , outMessage);
             } else {
                 throw new AxisFault("GsonXMLStreamReader should be put as a 
property of messageContext " +
                         "to evaluate JSON message");
@@ -99,4 +66,38 @@ public class JsonRpcMessageReceiver exte
             super.invokeBusinessLogic(inMessage, outMessage);   // call 
RPCMessageReceiver if inputstream is null
         }
     }
+
+    public void invokeService(JsonReader jsonReader, Object serviceObj, String 
operation_name,
+                                   MessageContext outMes) throws AxisFault {
+        String msg;
+        Class implClass = serviceObj.getClass();
+        Method[] allMethods = implClass.getDeclaredMethods();
+        Method method = JsonUtils.getOpMethod(operation_name, allMethods);
+        Class[] paramClasses = method.getParameterTypes();
+        try {
+            int paramCount = paramClasses.length;
+            Object retObj = JsonUtils.invokeServiceClass(jsonReader, 
serviceObj, method, paramClasses, paramCount);
+
+            // handle response
+            outMes.setProperty(JsonConstant.RETURN_OBJECT, retObj);
+            outMes.setProperty(JsonConstant.RETURN_TYPE, 
method.getReturnType());
+
+        } catch (IllegalAccessException e) {
+            msg = "Does not have access to " +
+                    "the definition of the specified class, field, method or 
constructor";
+            log.error(msg, e);
+            throw AxisFault.makeFault(e);
+
+        } catch (InvocationTargetException e) {
+            msg = "Exception occurred while trying to invoke service method " +
+                    (method != null ? method.getName() : "null");
+            log.error(msg, e);
+            throw AxisFault.makeFault(e);
+        } catch (IOException e) {
+            msg = "Exception occur while encording or " +
+                    "access to the input string at the JsonRpcMessageReceiver";
+            log.error(msg, e);
+            throw AxisFault.makeFault(e);
+        }
+    }
 }

Modified: 
axis/axis2/java/core/branches/AXIS2-4091/modules/json/test/org/apache/axis2/json/JSONIntegrationTest.java
URL: 
http://svn.apache.org/viewvc/axis/axis2/java/core/branches/AXIS2-4091/modules/json/test/org/apache/axis2/json/JSONIntegrationTest.java?rev=1818515&r1=1818514&r2=1818515&view=diff
==============================================================================
--- 
axis/axis2/java/core/branches/AXIS2-4091/modules/json/test/org/apache/axis2/json/JSONIntegrationTest.java
 (original)
+++ 
axis/axis2/java/core/branches/AXIS2-4091/modules/json/test/org/apache/axis2/json/JSONIntegrationTest.java
 Sun Dec 17 21:35:47 2017
@@ -30,18 +30,12 @@ import org.apache.axis2.Constants;
 import org.apache.axis2.addressing.EndpointReference;
 import org.apache.axis2.client.Options;
 import org.apache.axis2.client.ServiceClient;
-import org.apache.axis2.context.ConfigurationContext;
-import org.apache.axis2.context.ConfigurationContextFactory;
-import org.apache.axis2.description.AxisService;
-import org.apache.axis2.testutils.PortAllocator;
-import org.apache.axis2.transport.http.SimpleHTTPServer;
-import org.apache.axis2.util.Utils;
+import org.apache.axis2.testutils.UtilServer;
 import org.junit.AfterClass;
 import org.junit.BeforeClass;
 import org.junit.Test;
 
 import java.io.BufferedReader;
-import java.io.File;
 import java.io.InputStreamReader;
 import java.io.OutputStreamWriter;
 import java.io.Writer;
@@ -50,46 +44,23 @@ import java.net.URL;
 
 public class JSONIntegrationTest implements JSONTestConstants {
 
-    private static AxisService service;
-
     private String expectedString;
 
-    private static SimpleHTTPServer server;
-
-    private static ConfigurationContext configurationContext;
-
     private static EndpointReference echoTargetEPR;
     private static String pojoUri;
 
     @BeforeClass
     public static void startServer() throws Exception {
-        int testingPort = PortAllocator.allocatePort();
+        UtilServer.start("test-repository/json", 
"test-repository/json/axis2.xml");
         echoTargetEPR = new EndpointReference(
-                "http://127.0.0.1:"; + (testingPort)
+                "http://127.0.0.1:"; + UtilServer.TESTING_PORT
                         + "/axis2/services/EchoXMLService/echoOM");
-        pojoUri = "http://127.0.0.1:"; + testingPort + 
"/axis2/services/POJOService";
-
-        File configFile =
-                new File(System.getProperty("basedir", ".") + 
"/test-resources/axis2.xml");
-        configurationContext = 
ConfigurationContextFactory.createConfigurationContextFromFileSystem(
-                System.getProperty("basedir", ".") + "/test-repository",
-                configFile.getAbsolutePath());
-        server = new SimpleHTTPServer(configurationContext, testingPort);
-        try {
-            server.start();
-        } finally {
-
-        }
-        service = Utils.createSimpleService(serviceName,
-                                            
org.apache.axis2.json.Echo.class.getName(),
-                                            operationName);
-        server.getConfigurationContext().getAxisConfiguration().addService(
-                service);
+        pojoUri = "http://127.0.0.1:"; + UtilServer.TESTING_PORT + 
"/axis2/services/POJOService";
     }
 
     @AfterClass
     public static void stopServer() throws Exception {
-               server.stop();
+               UtilServer.stop();
     }
 
     protected OMElement createEnvelope() throws Exception {
@@ -115,7 +86,7 @@ public class JSONIntegrationTest impleme
         options.setTransportInProtocol(Constants.TRANSPORT_HTTP);
         options.setProperty(Constants.Configuration.HTTP_METHOD, httpMethod);
 //        ConfigurationContext clientConfigurationContext = 
ConfigurationContextFactory.createDefaultConfigurationContext();
-        ServiceClient sender = new ServiceClient(configurationContext, null);
+        ServiceClient sender = new 
ServiceClient(UtilServer.getConfigurationContext(), null);
         options.setAction(null);
         sender.setOptions(options);
         options.setTo(echoTargetEPR);

Modified: 
axis/axis2/java/core/branches/AXIS2-4091/modules/json/test/org/apache/axis2/json/JSONTestConstants.java
URL: 
http://svn.apache.org/viewvc/axis/axis2/java/core/branches/AXIS2-4091/modules/json/test/org/apache/axis2/json/JSONTestConstants.java?rev=1818515&r1=1818514&r2=1818515&view=diff
==============================================================================
--- 
axis/axis2/java/core/branches/AXIS2-4091/modules/json/test/org/apache/axis2/json/JSONTestConstants.java
 (original)
+++ 
axis/axis2/java/core/branches/AXIS2-4091/modules/json/test/org/apache/axis2/json/JSONTestConstants.java
 Sun Dec 17 21:35:47 2017
@@ -19,16 +19,8 @@
 
 package org.apache.axis2.json;
 
-import javax.xml.namespace.QName;
-
 public interface JSONTestConstants {
 
-    public static final QName serviceName = new QName("EchoXMLService");
-
-    public static final QName operationName = new QName("echoOM");
-
-    public static final QName swaServiceName = new QName("EchoSwAService");
-    
     public static final String CONTENT_TYPE_BADGERFISH = 
"application/json/badgerfish";
     
     public static final String CONTENT_TYPE_MAPPED = "application/json";


Reply via email to