svn commit: r1137959 - in /axis/axis2/java/core/trunk/modules: adb/ adb/src/org/apache/axis2/databinding/typemapping/ adb/src/org/apache/axis2/databinding/utils/ adb/src/org/apache/axis2/rpc/receivers

2011-06-21 Thread sagara
Author: sagara
Date: Tue Jun 21 11:20:39 2011
New Revision: 1137959

URL: http://svn.apache.org/viewvc?rev=1137959&view=rev
Log:
Fixed AXIS2-5065 - Provide support for org.w3c.dom.Document in web service.

Modified:
axis/axis2/java/core/trunk/modules/adb/pom.xml

axis/axis2/java/core/trunk/modules/adb/src/org/apache/axis2/databinding/typemapping/SimpleTypeMapper.java

axis/axis2/java/core/trunk/modules/adb/src/org/apache/axis2/databinding/utils/BeanUtil.java

axis/axis2/java/core/trunk/modules/adb/src/org/apache/axis2/rpc/receivers/RPCUtil.java

axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/TypeTable.java
axis/axis2/java/core/trunk/modules/osgi/pom.xml

Modified: axis/axis2/java/core/trunk/modules/adb/pom.xml
URL: 
http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/adb/pom.xml?rev=1137959&r1=1137958&r2=1137959&view=diff
==
--- axis/axis2/java/core/trunk/modules/adb/pom.xml (original)
+++ axis/axis2/java/core/trunk/modules/adb/pom.xml Tue Jun 21 11:20:39 2011
@@ -44,6 +44,10 @@
 ${project.version}
 
 
+org.apache.ws.commons.axiom
+axiom-dom
+
+
 org.apache.geronimo.specs
 geronimo-activation_1.1_spec
 
@@ -51,12 +55,7 @@
 xmlunit
 xmlunit
 test
-
-
-org.apache.ws.commons.axiom
-axiom-dom
-test
-
+   
 
 
 

Modified: 
axis/axis2/java/core/trunk/modules/adb/src/org/apache/axis2/databinding/typemapping/SimpleTypeMapper.java
URL: 
http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/adb/src/org/apache/axis2/databinding/typemapping/SimpleTypeMapper.java?rev=1137959&r1=1137958&r2=1137959&view=diff
==
--- 
axis/axis2/java/core/trunk/modules/adb/src/org/apache/axis2/databinding/typemapping/SimpleTypeMapper.java
 (original)
+++ 
axis/axis2/java/core/trunk/modules/adb/src/org/apache/axis2/databinding/typemapping/SimpleTypeMapper.java
 Tue Jun 21 11:20:39 2011
@@ -28,6 +28,7 @@ import org.apache.axis2.databinding.type
 import org.apache.axis2.databinding.utils.ConverterUtil;
 import org.apache.axis2.context.MessageContext;
 import org.apache.axis2.description.AxisService;
+import org.w3c.dom.Document;
 
 import javax.activation.DataHandler;
 import javax.xml.namespace.QName;
@@ -372,5 +373,16 @@ public class SimpleTypeMapper {
}
return false;
}
+   
+   /**
+* Checks that given classType is a W3C Document.
+* 
+* @param classType
+*the class type
+* @return true, if is dom document
+*/
+   public static boolean isDomDocument(Class classType) {
+   return Document.class.isAssignableFrom(classType);
+   }
 
 }

Modified: 
axis/axis2/java/core/trunk/modules/adb/src/org/apache/axis2/databinding/utils/BeanUtil.java
URL: 
http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/adb/src/org/apache/axis2/databinding/utils/BeanUtil.java?rev=1137959&r1=1137958&r2=1137959&view=diff
==
--- 
axis/axis2/java/core/trunk/modules/adb/src/org/apache/axis2/databinding/utils/BeanUtil.java
 (original)
+++ 
axis/axis2/java/core/trunk/modules/adb/src/org/apache/axis2/databinding/utils/BeanUtil.java
 Tue Jun 21 11:20:39 2011
@@ -43,6 +43,8 @@ import javax.xml.namespace.QName;
 import javax.xml.stream.XMLStreamReader;
 
 import org.apache.axiom.om.*;
+import org.apache.axiom.om.impl.builder.StAXOMBuilder;
+import org.apache.axiom.om.impl.dom.DOOMAbstractFactory;
 import org.apache.axiom.om.util.Base64;
 import org.apache.axis2.AxisFault;
 import org.apache.axis2.context.MessageContext;
@@ -54,6 +56,15 @@ import org.apache.axis2.description.java
 import org.apache.axis2.engine.ObjectSupplier;
 import org.apache.axis2.util.Loader;
 import org.apache.axis2.util.StreamWrapper;
+import org.w3c.dom.Attr;
+import org.w3c.dom.Comment;
+import org.w3c.dom.Document;
+import org.w3c.dom.NamedNodeMap;
+import org.w3c.dom.Node;
+import org.w3c.dom.ProcessingInstruction;
+import org.w3c.dom.traversal.DocumentTraversal;
+import org.w3c.dom.traversal.NodeFilter;
+import org.w3c.dom.traversal.TreeWalker;
 
 
 public class BeanUtil {
@@ -196,6 +207,12 @@ public class BeanUtil {
  beanName, processingDocLitBare);
 propertyQnameValueList.add(
 value == null ? null : 
SimpleTypeMapper.getStringValue(value));
+} else if(SimpleTypeMapper.isDomDocument(ptype)){
+   addTypeQname(elemntNameSpace, propertyQnameValueList, 
property,
+beanName, processingDocLitBare);
+   

svn commit: r1138144 - /axis/axis2/java/core/trunk/src/site/xdoc/docs/app_server.xml

2011-06-21 Thread veithen
Author: veithen
Date: Tue Jun 21 19:27:05 2011
New Revision: 1138144

URL: http://svn.apache.org/viewvc?rev=1138144&view=rev
Log:
Converted app_server.xml to XDoc.

Modified:
axis/axis2/java/core/trunk/src/site/xdoc/docs/app_server.xml

Modified: axis/axis2/java/core/trunk/src/site/xdoc/docs/app_server.xml
URL: 
http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/src/site/xdoc/docs/app_server.xml?rev=1138144&r1=1138143&r2=1138144&view=diff
==
--- axis/axis2/java/core/trunk/src/site/xdoc/docs/app_server.xml (original)
+++ axis/axis2/java/core/trunk/src/site/xdoc/docs/app_server.xml Tue Jun 21 
19:27:05 2011
@@ -1,5 +1,4 @@
 
-
 
-
-http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd";>
-http://www.w3.org/1999/xhtml";>
-
-
-
-Application Server Specific Configuration Guide
-http://www.w3.org/Amaya/"; />
-
-
-Application Server Specific Configuration Guide
-This document provides configuration information required for
-your Application Server to run Apache Axis2 to its fullest
-potential.
-WebLogic/ WebSphere
-1. Use exploded configuration to deploy Axis2
-WAR
-We recommend using the exploded configuration to deploy Axis2
-WAR in WebLogic and WebSphere application servers to support the
-hotupdate/ hotdeployment features in Axis2. However, if you want to
-deploy custom WARs, say in a clustering environment, you need to
-add two additional files into the WEB-INF named "services.list" and
-"modules.list" under the modules and services directory
-respectively.
-
-WEB-INF/services/services.list : should list all the
-services (aar files) that you want to expose.
-WEB-INF/modules/modules.list : should list all the
-modules (mar files) that you want to use.
-
-NOTE: In both cases, please list one entry per line.
-WebLogic ships with JARs that conflict with JARs present in
-Axis2. Therefore use  to ensure that
-JARs packaged in Axis2 WAR are picked up from WEB-INF/lib. You can
-do this by setting the  element in
-WEB-INF/weblogic.xml to true. An example of weblogic.xml is shown
-below:
+http://maven.apache.org/XDOC/2.0";
+  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
+  xsi:schemaLocation="http://maven.apache.org/XDOC/2.0 
http://maven.apache.org/xsd/xdoc-2.0.xsd";>
+
+Application Server Specific Configuration Guide
+
+
+Application Server Specific Configuration Guide
+This document provides configuration information required for
+your Application Server to run Apache Axis2 to its fullest
+potential.
+
+
+We recommend using the exploded configuration to deploy 
Axis2
+WAR in WebLogic and WebSphere application servers to support 
the
+hotupdate/ hotdeployment features in Axis2. However, if you 
want to
+deploy custom WARs, say in a clustering environment, you need 
to
+add two additional files into the WEB-INF named 
"services.list" and
+"modules.list" under the modules and services directory
+respectively.
+
+WEB-INF/services/services.list : should list all the
+services (aar files) that you want to expose.
+WEB-INF/modules/modules.list : should list all the
+modules (mar files) that you want to use.
+
+NOTE: In both cases, please list one entry per line.
+WebLogic ships with JARs that conflict with JARs present in
+Axis2. Therefore use  to ensure 
that
+JARs packaged in Axis2 WAR are picked up from WEB-INF/lib. You 
can
+do this by setting the  element 
in
+WEB-INF/weblogic.xml to true. An example of weblogic.xml is 
shown
+below:
 
 
  
@@ -65,32 +57,33 @@ below:
   
 
 
-If set to true, the  element will
-force WebLogic's classloader to load classes located in the WEB-INF
-directory of a Web application in preference to application or
-system classes. This is a recommended approach since it only
-impacts a single Web module.
-Please refer to the following documents in WebLogic/ WebSphere
-for more information:
-
-http://e-docs.bea.com/wls/docs81/programming/classloading.html";>WebLogic
-ServerApplication Classloading- For more information on how
-WebLogic's class loader works
-http://e-docs.bea.com/wls/docs81/webapp/deployment.html";>Redeploying
-a Web Application in Exploded Directory Format
-http://publib.boulder.ibm.com/infocenter/wsiihelp/v8r3/index.jsp?topic=/com.ibm.websphere.ii.product.ce.doc/configuring/iiyviigdepwebexpl.htm";>
-Deploying the Web application in exploded form
-
-2. Lack of namespacing on serialised items

svn commit: r1138203 - /axis/axis2/java/core/trunk/src/site/xdoc/docs/app_server.xml

2011-06-21 Thread veithen
Author: veithen
Date: Tue Jun 21 21:42:32 2011
New Revision: 1138203

URL: http://svn.apache.org/viewvc?rev=1138203&view=rev
Log:
AXIS2-4917: Added documentation explaining how to deploy Axis2 on WebSphere, 
especially WAS 7.0.

Modified:
axis/axis2/java/core/trunk/src/site/xdoc/docs/app_server.xml

Modified: axis/axis2/java/core/trunk/src/site/xdoc/docs/app_server.xml
URL: 
http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/src/site/xdoc/docs/app_server.xml?rev=1138203&r1=1138202&r2=1138203&view=diff
==
--- axis/axis2/java/core/trunk/src/site/xdoc/docs/app_server.xml (original)
+++ axis/axis2/java/core/trunk/src/site/xdoc/docs/app_server.xml Tue Jun 21 
21:42:32 2011
@@ -28,10 +28,10 @@
 This document provides configuration information required for
 your Application Server to run Apache Axis2 to its fullest
 potential.
-
+
 
 We recommend using the exploded configuration to deploy 
Axis2
-WAR in WebLogic and WebSphere application servers to support 
the
+WAR in WebLogic application server to support the
 hotupdate/ hotdeployment features in Axis2. However, if you 
want to
 deploy custom WARs, say in a clustering environment, you need 
to
 add two additional files into the WEB-INF named 
"services.list" and
@@ -62,7 +62,7 @@
 directory of a Web application in preference to application or
 system classes. This is a recommended approach since it only
 impacts a single Web module.
-Please refer to the following documents in WebLogic/ 
WebSphere
+Please refer to the following documents in WebLogic
 for more information:
 
 http://e-docs.bea.com/wls/docs81/webapp/deployment.html";>Redeploying
 a Web Application in Exploded Directory Format
-http://publib.boulder.ibm.com/infocenter/wsiihelp/v8r3/index.jsp?topic=/com.ibm.websphere.ii.product.ce.doc/configuring/iiyviigdepwebexpl.htm";>
-Deploying the Web application in exploded form
 
 
 
@@ -95,5 +92,52 @@
 to be on the application classpath.
 
 
+
+
+
+The JAX-WS runtime in WebSphere Application Server is 
based on a modified version of Axis2 and these
+classes are visible to application class loaders. This 
means that when deploying
+a standard version of Axis2 on WAS 7.0 (and WAS 6.1 with 
the Web Services feature pack installed),
+special configuration is required to avoid conflicts with 
the Axis2 classes used internally by WebSphere.
+In particular it is necessary to change the class loader 
policy of the Web module to parent last. However,
+this is not sufficient because Axis2 creates additional 
class loaders for modules and services, and
+these use parent first class loading by default. 
Therefore, two things must be done to make a standard
+Axis2 distribution work with WebSphere:
+
+
+
+Before deploying the Axis2 WAR, edit the 
axis2.xml file and set the
+EnableChildFirstClassLoading parameter to 
true.
+Please note that this parameter is only supported in 
Axis2 1.5.5 or higher.
+
+
+After deployment, modify the application configuration 
to enable parent last class loading
+for the Web module: in the WebSphere admin console, go 
the the configuration page for
+the enterprise application, click on Manage 
Modules and locate the WAR containing
+Axis2 (in the default WAR distribution, the module is 
called Apache-Axis2), then
+change the Class loader order option to 
Classes loaded with local class
+loader first (parent last). Note that the class 
loader policy for the enterprise
+application itself (which can be specified under 
Class loading and update detection)
+is irrelevant, unless a custom EAR distribution is 
used that includes the Axis2 libraries
+in the EAR instead of the WAR.
+
+
+
+
+
+By default (i.e. if the Distribute application 
option has not been disabled explicitly)
+WebSphere will deploy the application in exploded form. 
The standard location for these files is
+