cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r993460 - in /cxf/branches/2.2.x-fixes: ./ rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/ rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/ rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/io/
Date Tue, 07 Sep 2010 18:39:09 GMT
Author: dkulp
Date: Tue Sep  7 18:39:09 2010
New Revision: 993460

URL: http://svn.apache.org/viewvc?rev=993460&view=rev
Log:
Merged revisions 991964 via svnmerge from 
https://svn.apache.org/repos/asf/cxf/trunk

........
  r991964 | dkulp | 2010-09-02 11:02:14 -0400 (Thu, 02 Sep 2010) | 1 line
  
  Remove some jaxb specific stuff from RPC intereceptors.
........

Modified:
    cxf/branches/2.2.x-fixes/   (props changed)
    cxf/branches/2.2.x-fixes/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/RPCInInterceptor.java
    cxf/branches/2.2.x-fixes/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/RPCOutInterceptor.java
    cxf/branches/2.2.x-fixes/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/JAXBDataBase.java
    cxf/branches/2.2.x-fixes/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/io/DataReaderImpl.java
    cxf/branches/2.2.x-fixes/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/io/DataWriterImpl.java

Propchange: cxf/branches/2.2.x-fixes/
------------------------------------------------------------------------------
Binary property 'svnmerge-integrated' - no diff available.

Modified: cxf/branches/2.2.x-fixes/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/RPCInInterceptor.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.2.x-fixes/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/RPCInInterceptor.java?rev=993460&r1=993459&r2=993460&view=diff
==============================================================================
--- cxf/branches/2.2.x-fixes/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/RPCInInterceptor.java
(original)
+++ cxf/branches/2.2.x-fixes/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/RPCInInterceptor.java
Tue Sep  7 18:39:09 2010
@@ -174,8 +174,6 @@ public class RPCInInterceptor extends Ab
                                                                            LOG,
                                                                            qn));
                 }
-                //honor JAXBAnnotation
-                part.setProperty("honor.jaxb.annotations", true);
                 try {
                     parameters.put(part, dr.read(part, xmlReader));
                 } catch (Fault f) {

Modified: cxf/branches/2.2.x-fixes/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/RPCOutInterceptor.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.2.x-fixes/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/RPCOutInterceptor.java?rev=993460&r1=993459&r2=993460&view=diff
==============================================================================
--- cxf/branches/2.2.x-fixes/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/RPCOutInterceptor.java
(original)
+++ cxf/branches/2.2.x-fixes/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/RPCOutInterceptor.java
Tue Sep  7 18:39:09 2010
@@ -85,8 +85,6 @@ public class RPCOutInterceptor extends A
                     }
                    //WSI-BP R2737  -RPC/LIG part name space is empty
                    // part.setConcreteName(new QName("", part.getConcreteName().getLocalPart()));
-                    part.setProperty("honor.jaxb.annotations", true);
-                    
                 }
             }
             writeParts(message, message.getExchange(), operation, objs, parts);

Modified: cxf/branches/2.2.x-fixes/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/JAXBDataBase.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.2.x-fixes/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/JAXBDataBase.java?rev=993460&r1=993459&r2=993460&view=diff
==============================================================================
--- cxf/branches/2.2.x-fixes/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/JAXBDataBase.java
(original)
+++ cxf/branches/2.2.x-fixes/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/JAXBDataBase.java
Tue Sep  7 18:39:09 2010
@@ -122,6 +122,19 @@ public abstract class JAXBDataBase {
         this.mtomThreshold = threshold;
     }
     
+    protected final boolean honorJAXBAnnotations(MessagePartInfo part) {
+        if (part == null) {
+            return false;
+        }
+        if (!part.isElement()) {
+            //RPC-Lit always needs to look for these
+            return true;
+        }
+        //certain cases that use XmlJavaTypeAdapters will require this and the
+        //JAXBSchemaInitializer will set this.
+        Boolean b = (Boolean)part.getProperty("honor.jaxb.annotations");
+        return b == null ? false : b;
+    }
     
     
 }

Modified: cxf/branches/2.2.x-fixes/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/io/DataReaderImpl.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.2.x-fixes/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/io/DataReaderImpl.java?rev=993460&r1=993459&r2=993460&view=diff
==============================================================================
--- cxf/branches/2.2.x-fixes/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/io/DataReaderImpl.java
(original)
+++ cxf/branches/2.2.x-fixes/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/io/DataReaderImpl.java
Tue Sep  7 18:39:09 2010
@@ -113,13 +113,8 @@ public class DataReaderImpl<T> extends J
     }
 
     public Object read(MessagePartInfo part, T reader) {
-        boolean honorJaxbAnnotation = false;
-        if (part != null && part.getProperty("honor.jaxb.annotations") != null) {

-            honorJaxbAnnotation = (Boolean)part.getProperty("honor.jaxb.annotations");
-        }
-        
+        boolean honorJaxbAnnotation = honorJAXBAnnotations(part);
         Annotation[] anns = null;
-       
         if (honorJaxbAnnotation) {
             anns = getJAXBAnnotation(part);
             if (anns.length > 0) {

Modified: cxf/branches/2.2.x-fixes/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/io/DataWriterImpl.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.2.x-fixes/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/io/DataWriterImpl.java?rev=993460&r1=993459&r2=993460&view=diff
==============================================================================
--- cxf/branches/2.2.x-fixes/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/io/DataWriterImpl.java
(original)
+++ cxf/branches/2.2.x-fixes/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/io/DataWriterImpl.java
Tue Sep  7 18:39:09 2010
@@ -147,9 +147,9 @@ public class DataWriterImpl<T> extends J
     }
     
     public void write(Object obj, MessagePartInfo part, T output) {
-        boolean honorJaxbAnnotation = false;
-        if (part != null && part.getProperty("honor.jaxb.annotations") != null) {
-            honorJaxbAnnotation = (Boolean)part.getProperty("honor.jaxb.annotations");
+        boolean honorJaxbAnnotation = honorJAXBAnnotations(part);
+        if (part != null && !part.isElement() && part.getTypeClass() != null)
{
+            honorJaxbAnnotation = true;
         }
         
         if (obj != null



Mime
View raw message