You are viewing a plain text version of this content. The canonical link for it is here.
Posted to scm@geronimo.apache.org by xu...@apache.org on 2011/09/16 09:12:44 UTC

svn commit: r1171405 - in /geronimo/server/branches/2.1/repository/org/apache/ws: ./ commons/axiom/axiom-impl/ commons/axiom/axiom-impl/1.2.5-20110916/

Author: xuhaihong
Date: Fri Sep 16 07:12:43 2011
New Revision: 1171405

URL: http://svn.apache.org/viewvc?rev=1171405&view=rev
Log:
The JAXB RI will detect whether the XMLStreamReader supports intern functions, while axiom creates a wrapper for it, and sometimes, the localname and namespace are read from other components (not from the woodstox reader), so JAXB RI will throw exceptions due to the string is not the intern one.

Added:
    geronimo/server/branches/2.1/repository/org/apache/ws/axiom-impl-force-intern-string.patch
    geronimo/server/branches/2.1/repository/org/apache/ws/commons/axiom/axiom-impl/   (with props)
    geronimo/server/branches/2.1/repository/org/apache/ws/commons/axiom/axiom-impl/1.2.5-20110916/   (with props)
    geronimo/server/branches/2.1/repository/org/apache/ws/commons/axiom/axiom-impl/1.2.5-20110916/axiom-impl-1.2.5-20110916.jar   (with props)
Modified:
    geronimo/server/branches/2.1/repository/org/apache/ws/readme.txt

Added: geronimo/server/branches/2.1/repository/org/apache/ws/axiom-impl-force-intern-string.patch
URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.1/repository/org/apache/ws/axiom-impl-force-intern-string.patch?rev=1171405&view=auto
==============================================================================
--- geronimo/server/branches/2.1/repository/org/apache/ws/axiom-impl-force-intern-string.patch (added)
+++ geronimo/server/branches/2.1/repository/org/apache/ws/axiom-impl-force-intern-string.patch Fri Sep 16 07:12:43 2011
@@ -0,0 +1,27 @@
+Index: modules/axiom-impl/src/main/java/org/apache/axiom/om/impl/llom/OMStAXWrapper.java
+===================================================================
+--- modules/axiom-impl/src/main/java/org/apache/axiom/om/impl/llom/OMStAXWrapper.java	(revision 1171090)
++++ modules/axiom-impl/src/main/java/org/apache/axiom/om/impl/llom/OMStAXWrapper.java	(working copy)
+@@ -52,6 +52,10 @@
+  * constants
+  */
+ public class OMStAXWrapper implements XMLStreamReader, XMLStreamConstants {
++    
++    private static final String INTERN_NAMES = "org.codehaus.stax2.internNames";
++    private static final String INTERN_NS = "org.codehaus.stax2.internNsUris";
++
+     /** Field navigator */
+     private OMNavigator navigator;
+ 
+@@ -942,6 +946,11 @@
+      * @throws IllegalArgumentException
+      */
+     public Object getProperty(String s) throws IllegalArgumentException {
++        //RI JAXB implementation will use those two properties to determine whether an extra internString wrapper is required
++        //Always return false will make the wrapper always used, as sometimes, localName is passed from method parameters, e.g OMElementImpl
++        if (INTERN_NAMES.equals(s) || INTERN_NS.equals(s)) {
++            return Boolean.FALSE;
++        }
+         if (OMConstants.IS_DATA_HANDLERS_AWARE.equals(s)) {
+             return Boolean.TRUE;
+         }

Propchange: geronimo/server/branches/2.1/repository/org/apache/ws/commons/axiom/axiom-impl/
------------------------------------------------------------------------------
    bugtraq:number = true

Propchange: geronimo/server/branches/2.1/repository/org/apache/ws/commons/axiom/axiom-impl/1.2.5-20110916/
------------------------------------------------------------------------------
    bugtraq:number = true

Added: geronimo/server/branches/2.1/repository/org/apache/ws/commons/axiom/axiom-impl/1.2.5-20110916/axiom-impl-1.2.5-20110916.jar
URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.1/repository/org/apache/ws/commons/axiom/axiom-impl/1.2.5-20110916/axiom-impl-1.2.5-20110916.jar?rev=1171405&view=auto
==============================================================================
Binary file - no diff available.

Propchange: geronimo/server/branches/2.1/repository/org/apache/ws/commons/axiom/axiom-impl/1.2.5-20110916/axiom-impl-1.2.5-20110916.jar
------------------------------------------------------------------------------
    svn:mime-type = application/java-archive

Modified: geronimo/server/branches/2.1/repository/org/apache/ws/readme.txt
URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.1/repository/org/apache/ws/readme.txt?rev=1171405&r1=1171404&r2=1171405&view=diff
==============================================================================
--- geronimo/server/branches/2.1/repository/org/apache/ws/readme.txt (original)
+++ geronimo/server/branches/2.1/repository/org/apache/ws/readme.txt Fri Sep 16 07:12:43 2011
@@ -10,6 +10,7 @@ Apply the patch
 -----------------
  cd 1_2_5
  patch -p0 -i axiom_api.patch
+ patch -p0 -i axiom-impl-force-intern-string.patch
 
 Build Axiom 1.2.5
 ---------------
@@ -23,8 +24,10 @@ Notes:
 Patch Information
 -----------------
   axiom_api.patch  - contains fixes for AXIS2-4450
+  axiom-impl-force-intern-string.patch - Always return false for two woodstox properties, with the changes, JAXB RI will always use a wrapper to make sure the values are intern string.
 
 Copy patched jar files to appropriate locations
 -----------------------------------------------
   cd 1_2_5
-  cp modules/axiom-api/target/axiom-api-1.2.5.jar <geronimo-root>/repository/org/apache/ws/commons/axiom/axiom-api/1.2.5-20100610/axiom-api-1.2.5-20100610.jar
\ No newline at end of file
+  cp modules/axiom-api/target/axiom-api-1.2.5.jar <geronimo-root>/repository/org/apache/ws/commons/axiom/axiom-api/1.2.5-20100610/axiom-api-1.2.5-20100610.jar
+  cp modules/axiom-impl/target/axiom-api-1.2.5.jar <geronimo-root>/repository/org/apache/ws/commons/axiom/axiom-impl/1.2.5-20110916/axiom-impl-1.2.5-20110916.jar
\ No newline at end of file