cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r587171 - in /incubator/cxf/trunk: api/src/main/java/org/apache/cxf/message/ distribution/ distribution/manifest/ rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/ rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/i...
Date Mon, 22 Oct 2007 17:51:58 GMT
Author: dkulp
Date: Mon Oct 22 10:51:55 2007
New Revision: 587171

URL: http://svn.apache.org/viewvc?rev=587171&view=rev
Log:
[CXF-1129] Fix issues with out of band headers causing marshalling issues
Re-add asm jars to distribution

Modified:
    incubator/cxf/trunk/api/src/main/java/org/apache/cxf/message/MessageContentsList.java
    incubator/cxf/trunk/distribution/manifest/pom.xml
    incubator/cxf/trunk/distribution/pom.xml
    incubator/cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/SoapHeaderInterceptor.java
    incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/interceptors/WrapperClassInInterceptor.java
    incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/interceptors/WrapperClassOutInterceptor.java
    incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/interceptors/WrapperHelper.java

Modified: incubator/cxf/trunk/api/src/main/java/org/apache/cxf/message/MessageContentsList.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/api/src/main/java/org/apache/cxf/message/MessageContentsList.java?rev=587171&r1=587170&r2=587171&view=diff
==============================================================================
--- incubator/cxf/trunk/api/src/main/java/org/apache/cxf/message/MessageContentsList.java
(original)
+++ incubator/cxf/trunk/api/src/main/java/org/apache/cxf/message/MessageContentsList.java
Mon Oct 22 10:51:55 2007
@@ -59,7 +59,7 @@
     
     private void ensureSize(int idx) {
         while (idx >= size()) {
-            add(null);
+            add(REMOVED_MARKER);
         }
     }
     
@@ -69,6 +69,9 @@
     }
     
     public boolean hasValue(MessagePartInfo key) {
+        if (key.getIndex() >= size()) {
+            return false;
+        }
         return super.get(key.getIndex()) != REMOVED_MARKER;
     }
     

Modified: incubator/cxf/trunk/distribution/manifest/pom.xml
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/distribution/manifest/pom.xml?rev=587171&r1=587170&r2=587171&view=diff
==============================================================================
--- incubator/cxf/trunk/distribution/manifest/pom.xml (original)
+++ incubator/cxf/trunk/distribution/manifest/pom.xml Mon Oct 22 10:51:55 2007
@@ -220,6 +220,10 @@
             <artifactId>jettison</artifactId>
             <version>1.0-RC2</version>
         </dependency>
+        <dependency>
+            <groupId>asm</groupId>
+            <artifactId>asm</artifactId>
+        </dependency>
     </dependencies>
 
     <build>

Modified: incubator/cxf/trunk/distribution/pom.xml
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/distribution/pom.xml?rev=587171&r1=587170&r2=587171&view=diff
==============================================================================
--- incubator/cxf/trunk/distribution/pom.xml (original)
+++ incubator/cxf/trunk/distribution/pom.xml Mon Oct 22 10:51:55 2007
@@ -226,6 +226,10 @@
             <version>1.0-RC2</version>
         </dependency>
         <dependency>
+            <groupId>asm</groupId>
+            <artifactId>asm</artifactId>
+        </dependency>
+        <dependency>
             <groupId>${pom.groupId}</groupId>
             <artifactId>cxf-bundle</artifactId>
             <version>${pom.version}</version>

Modified: incubator/cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/SoapHeaderInterceptor.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/SoapHeaderInterceptor.java?rev=587171&r1=587170&r2=587171&view=diff
==============================================================================
--- incubator/cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/SoapHeaderInterceptor.java
(original)
+++ incubator/cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/SoapHeaderInterceptor.java
Mon Oct 22 10:51:55 2007
@@ -97,8 +97,9 @@
                 }
                 
             }
-            
-            parameters.put(mpi, object);
+            if (object != null && mpi.getTypeClass() != null) {
+                parameters.put(mpi, object);
+            }
         }
         if (parameters.size() > 0) {
             message.setContent(List.class, parameters);

Modified: incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/interceptors/WrapperClassInInterceptor.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/interceptors/WrapperClassInInterceptor.java?rev=587171&r1=587170&r2=587171&view=diff
==============================================================================
--- incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/interceptors/WrapperClassInInterceptor.java
(original)
+++ incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/interceptors/WrapperClassInInterceptor.java
Mon Oct 22 10:51:55 2007
@@ -21,6 +21,7 @@
 
 import java.lang.reflect.Method;
 import java.util.ArrayList;
+import java.util.Collections;
 import java.util.List;
 import java.util.logging.Logger;
 
@@ -120,10 +121,25 @@
             try {
                 newParams = new MessageContentsList(helper.getWrapperParts(wrappedObject));
                 
+                List<Integer> removes = null;
                 for (MessagePartInfo part : messageInfo.getMessageParts()) {
                     if (Boolean.TRUE.equals(part.getProperty(ReflectionServiceFactoryBean.HEADER)))
{
                         MessagePartInfo mpi = wrappedMessageInfo.getMessagePart(part.getName());
-                        newParams.put(part, lst.get(mpi));
+                        if (lst.hasValue(mpi)) {
+                            newParams.put(part, lst.get(mpi));
+                        } else if (mpi.getTypeClass() == null) {
+                            //header, but not mapped to a param on the method
+                            if (removes == null) {
+                                removes = new ArrayList<Integer>();
+                            }
+                            removes.add(mpi.getIndex());
+                        }
+                    }
+                }
+                if (removes != null) {
+                    Collections.sort(removes, Collections.reverseOrder());
+                    for (Integer i : removes) {
+                        newParams.remove(i.intValue());
                     }
                 }
             } catch (Exception e) {

Modified: incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/interceptors/WrapperClassOutInterceptor.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/interceptors/WrapperClassOutInterceptor.java?rev=587171&r1=587170&r2=587171&view=diff
==============================================================================
--- incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/interceptors/WrapperClassOutInterceptor.java
(original)
+++ incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/interceptors/WrapperClassOutInterceptor.java
Mon Oct 22 10:51:55 2007
@@ -109,7 +109,9 @@
                 for (MessagePartInfo p : messageInfo.getMessageParts()) {
                     if (Boolean.TRUE.equals(p.getProperty(ReflectionServiceFactoryBean.HEADER)))
{
                         MessagePartInfo mpi = wrappedMsgInfo.getMessagePart(p.getName());
-                        newObjs.put(mpi, objs.get(p));
+                        if (objs.hasValue(p)) {
+                            newObjs.put(mpi, objs.get(p));
+                        }
                     }
                 }
 

Modified: incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/interceptors/WrapperHelper.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/interceptors/WrapperHelper.java?rev=587171&r1=587170&r2=587171&view=diff
==============================================================================
--- incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/interceptors/WrapperHelper.java
(original)
+++ incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/interceptors/WrapperHelper.java
Mon Oct 22 10:51:55 2007
@@ -268,6 +268,9 @@
                 Object ret = wrapperType.newInstance();
 
                 for (int x = 0; x < setMethods.length; x++) {
+                    if (setMethods[x] == null && fields[x] == null) {
+                        continue;
+                    }
                     Object o = lst.get(x);
                     if (jaxbObjectMethods[x] != null) {
                         o = jaxbObjectMethods[x].invoke(objectFactory, o);



Mime
View raw message