cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r991964 - in /cxf/trunk/rt: bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/ databinding/jaxb/src/main/java/org/apache/cxf/jaxb/ databinding/jaxb/src/main/java/org/apache/cxf/jaxb/io/
Date Thu, 02 Sep 2010 15:02:15 GMT
Author: dkulp
Date: Thu Sep  2 15:02:14 2010
New Revision: 991964

URL: http://svn.apache.org/viewvc?rev=991964&view=rev
Log:
Remove some jaxb specific stuff from RPC intereceptors.

Modified:
    cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/RPCInInterceptor.java
    cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/RPCOutInterceptor.java
    cxf/trunk/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/JAXBDataBase.java
    cxf/trunk/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/io/DataReaderImpl.java
    cxf/trunk/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/io/DataWriterImpl.java

Modified: cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/RPCInInterceptor.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/RPCInInterceptor.java?rev=991964&r1=991963&r2=991964&view=diff
==============================================================================
--- cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/RPCInInterceptor.java
(original)
+++ cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/RPCInInterceptor.java
Thu Sep  2 15:02:14 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/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/RPCOutInterceptor.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/RPCOutInterceptor.java?rev=991964&r1=991963&r2=991964&view=diff
==============================================================================
--- cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/RPCOutInterceptor.java
(original)
+++ cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/RPCOutInterceptor.java
Thu Sep  2 15:02:14 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/trunk/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/JAXBDataBase.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/JAXBDataBase.java?rev=991964&r1=991963&r2=991964&view=diff
==============================================================================
--- cxf/trunk/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/JAXBDataBase.java (original)
+++ cxf/trunk/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/JAXBDataBase.java Thu
Sep  2 15:02:14 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/trunk/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/io/DataReaderImpl.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/io/DataReaderImpl.java?rev=991964&r1=991963&r2=991964&view=diff
==============================================================================
--- cxf/trunk/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/io/DataReaderImpl.java
(original)
+++ cxf/trunk/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/io/DataReaderImpl.java
Thu Sep  2 15:02:14 2010
@@ -110,13 +110,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/trunk/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/io/DataWriterImpl.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/io/DataWriterImpl.java?rev=991964&r1=991963&r2=991964&view=diff
==============================================================================
--- cxf/trunk/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/io/DataWriterImpl.java
(original)
+++ cxf/trunk/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/io/DataWriterImpl.java
Thu Sep  2 15:02:14 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