cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ff...@apache.org
Subject svn commit: r1409043 - in /cxf/trunk/rt: bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/SoapOutInterceptor.java frontend/jaxws/src/main/java/org/apache/cxf/jaxws/JaxWsClientProxy.java
Date Wed, 14 Nov 2012 00:19:03 GMT
Author: ffang
Date: Wed Nov 14 00:19:02 2012
New Revision: 1409043

URL: http://svn.apache.org/viewvc?rev=1409043&view=rev
Log:
[CXF-4623]Marshalling Error during asynchronous service invocation when adding a soap header
using a SOAPHandler

Modified:
    cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/SoapOutInterceptor.java
    cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/JaxWsClientProxy.java

Modified: cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/SoapOutInterceptor.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/SoapOutInterceptor.java?rev=1409043&r1=1409042&r2=1409043&view=diff
==============================================================================
--- cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/SoapOutInterceptor.java
(original)
+++ cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/SoapOutInterceptor.java
Wed Nov 14 00:19:02 2012
@@ -27,7 +27,6 @@ import java.util.ResourceBundle;
 
 import javax.xml.stream.XMLStreamException;
 import javax.xml.stream.XMLStreamWriter;
-import javax.xml.ws.AsyncHandler;
 
 import org.w3c.dom.Element;
 
@@ -220,13 +219,7 @@ public class SoapOutInterceptor extends 
                 if (wrappedBmi != bmi) {
                     part = wrappedBmi.getMessageInfo().addMessagePart(part.getName());
                 }
-                int paraLength = objs.size();
-                if (objs.get(paraLength - 1) instanceof AsyncHandler) {
-                    //when use asyn handler in bare mode the last parameter is AsyncHandler
-                    //which shouldn't count in as parameter length
-                    paraLength = paraLength - 1;
-                }
-                if (part.getIndex() >= paraLength) {
+                if (part.getIndex() >= objs.size()) {
                     // The optional out of band header is not a part of parameters of the
method
                     continue;
                 }

Modified: cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/JaxWsClientProxy.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/JaxWsClientProxy.java?rev=1409043&r1=1409042&r2=1409043&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/JaxWsClientProxy.java (original)
+++ cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/JaxWsClientProxy.java Wed
Nov 14 00:19:02 2012
@@ -257,6 +257,11 @@ public class JaxWsClientProxy extends or
         AsyncHandler<Object> handler;
         if (params.length > 0 && params[params.length - 1] instanceof AsyncHandler)
{
             handler = (AsyncHandler<Object>)params[params.length - 1];
+            Object[] newParams = new Object[params.length - 1];
+            for (int i = 0; i < newParams.length; i++) {
+                newParams[i] = params[i];
+            }
+            params = newParams;
         } else {
             handler = null;
         }



Mime
View raw message