cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r658299 - /cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/ReflectionServiceFactoryBean.java
Date Tue, 20 May 2008 15:53:45 GMT
Author: dkulp
Date: Tue May 20 08:53:45 2008
New Revision: 658299

URL: http://svn.apache.org/viewvc?rev=658299&view=rev
Log:
[CXF-1568] Possible fix for the strikeiron implicit headers problems

Modified:
    cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/ReflectionServiceFactoryBean.java

Modified: cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/ReflectionServiceFactoryBean.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/ReflectionServiceFactoryBean.java?rev=658299&r1=658298&r2=658299&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/ReflectionServiceFactoryBean.java
(original)
+++ cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/ReflectionServiceFactoryBean.java
Tue May 20 08:53:45 2008
@@ -672,6 +672,7 @@
         if (paraAnnos != null && part != null) {
             part.setProperty(PARAM_ANNOTATION, paraAnnos);
         }
+        
         return true;
     }    
     private void setFaultClassInfo(OperationInfo o, Method selected) {
@@ -1491,6 +1492,36 @@
             part.setProperty(RAW_CLASS, rawClass);
         }
         part.setTypeClass(rawClass);
+        
+        if (part.getMessageInfo().getOperation().isUnwrapped()
+            && Boolean.TRUE.equals(part.getProperty(HEADER))) {
+            //header from the unwrapped operation, make sure the type is set for the 
+            //approriate header in the wrapped operation
+            OperationInfo o = ((UnwrappedOperationInfo)part.getMessageInfo().getOperation())
+                .getWrappedOperation();
+            
+            if (Boolean.TRUE.equals(part.getProperty(ReflectionServiceFactoryBean.MODE_OUT))
+                || Boolean.TRUE.equals(part.getProperty(ReflectionServiceFactoryBean.MODE_INOUT)))
{
+                MessagePartInfo mpi = o.getOutput().getMessagePart(part.getName());
+                if (mpi != null) {
+                    mpi.setTypeClass(rawClass);
+                    mpi.setProperty(GENERIC_TYPE, type);
+                    if (Collection.class.isAssignableFrom(rawClass)) {
+                        mpi.setProperty(RAW_CLASS, type);
+                    }
+                }
+            }
+            if (!Boolean.TRUE.equals(part.getProperty(ReflectionServiceFactoryBean.MODE_OUT)))
{
+                MessagePartInfo mpi = o.getInput().getMessagePart(part.getName());
+                if (mpi != null) {
+                    mpi.setTypeClass(rawClass);
+                    mpi.setProperty(GENERIC_TYPE, type);
+                    if (Collection.class.isAssignableFrom(rawClass)) {
+                        mpi.setProperty(RAW_CLASS, type);
+                    }
+                }
+            }
+        }      
     }
 
 



Mime
View raw message