cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ff...@apache.org
Subject svn commit: r1408627 - /cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/SoapOutInterceptor.java
Date Tue, 13 Nov 2012 07:50:15 GMT
Author: ffang
Date: Tue Nov 13 07:50:14 2012
New Revision: 1408627

URL: http://svn.apache.org/viewvc?rev=1408627&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

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=1408627&r1=1408626&r2=1408627&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
Tue Nov 13 07:50:14 2012
@@ -27,6 +27,7 @@ import java.util.ResourceBundle;
 
 import javax.xml.stream.XMLStreamException;
 import javax.xml.stream.XMLStreamWriter;
+import javax.xml.ws.AsyncHandler;
 
 import org.w3c.dom.Element;
 
@@ -212,13 +213,20 @@ public class SoapOutInterceptor extends 
             if (headers == null) {
                 return endedHeader;
             }            
+            
 
             for (SoapHeaderInfo header : headers) {
                 MessagePartInfo part = header.getPart();
                 if (wrappedBmi != bmi) {
                     part = wrappedBmi.getMessageInfo().addMessagePart(part.getName());
                 }
-                if (part.getIndex() >= objs.size()) {
+                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) {
                     // The optional out of band header is not a part of parameters of the
method
                     continue;
                 }



Mime
View raw message