cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From asold...@apache.org
Subject svn commit: r1499998 - /cxf/trunk/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/JAXBDataBase.java
Date Fri, 05 Jul 2013 13:26:29 GMT
Author: asoldano
Date: Fri Jul  5 13:26:28 2013
New Revision: 1499998

URL: http://svn.apache.org/r1499998
Log:
[CXF-5110] Wrong processing of @XmlJavaTypeAdapter with RPC style endpoints

Modified:
    cxf/trunk/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/JAXBDataBase.java

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=1499998&r1=1499997&r2=1499998&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 Fri
Jul  5 13:26:28 2013
@@ -34,6 +34,8 @@ import javax.xml.validation.Schema;
 import org.apache.cxf.jaxb.attachment.JAXBAttachmentMarshaller;
 import org.apache.cxf.jaxb.attachment.JAXBAttachmentUnmarshaller;
 import org.apache.cxf.message.Attachment;
+import org.apache.cxf.service.model.AbstractMessageContainer;
+import org.apache.cxf.service.model.MessageInfo;
 import org.apache.cxf.service.model.MessagePartInfo;
 import org.apache.cxf.service.model.OperationInfo;
 
@@ -99,6 +101,7 @@ public abstract class JAXBDataBase {
         }
         if (annoList.size() == 0 && mpi != null 
             && mpi.getMessageInfo() != null
+            && isOutputMessage(mpi.getMessageInfo())
             && mpi.getMessageInfo().getOperation() != null
             && mpi.getMessageInfo().getOperation().getProperty("method.return.annotations")
!= null) {
             OperationInfo op = mpi.getMessageInfo().getOperation();
@@ -113,6 +116,13 @@ public abstract class JAXBDataBase {
         }
         return annoList.toArray(new Annotation[annoList.size()]);       
     }
+    
+    protected boolean isOutputMessage(AbstractMessageContainer messageContainer) {
+        if (messageContainer instanceof MessageInfo) {
+            return MessageInfo.Type.OUTPUT.equals(((MessageInfo)messageContainer).getType());
+        }
+        return false;
+    }
 
     public Integer getMtomThreshold() {
         return mtomThreshold;



Mime
View raw message