You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by dk...@apache.org on 2008/05/20 23:14:18 UTC

svn commit: r658438 - in /cxf/branches/2.0.x-fixes: ./ rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/ReflectionServiceFactoryBean.java

Author: dkulp
Date: Tue May 20 14:14:18 2008
New Revision: 658438

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

........
  r658299 | dkulp | 2008-05-20 11:53:45 -0400 (Tue, 20 May 2008) | 2 lines
  
  [CXF-1568] Possible fix for the strikeiron implicit headers problems
........

Modified:
    cxf/branches/2.0.x-fixes/   (props changed)
    cxf/branches/2.0.x-fixes/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/ReflectionServiceFactoryBean.java

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

Modified: cxf/branches/2.0.x-fixes/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/ReflectionServiceFactoryBean.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.0.x-fixes/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/ReflectionServiceFactoryBean.java?rev=658438&r1=658437&r2=658438&view=diff
==============================================================================
--- cxf/branches/2.0.x-fixes/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/ReflectionServiceFactoryBean.java (original)
+++ cxf/branches/2.0.x-fixes/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/ReflectionServiceFactoryBean.java Tue May 20 14:14:18 2008
@@ -634,6 +634,7 @@
             initializeParameter(part, paramType, genericType);
             part.setIndex(i + 1);
         }
+        
         return true;
     }    
     private void setFaultClassInfo(OperationInfo o, Method selected) {
@@ -1373,6 +1374,36 @@
 
         part.setProperty(GENERIC_TYPE, type);
         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);
+                    }
+                }
+            }
+        }      
     }