cxf-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel Kulp <dk...@apache.org>
Subject Re: svn commit: r1408627 - /cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/SoapOutInterceptor.java
Date Tue, 13 Nov 2012 12:12:21 GMT

Umm…   this puts a dependency on the jaxws API from the soap binding which would be a new
dep.   That's "OK" for trunk since the JAX-WS API's are built in the JDK, but that wouldn't
be ok to be merged back.   

Ideally, this should be done somehow in the JAXWS layer.  Most likely, after the invoke completes,
the JAXWS invoker should remove the callback off of the param list.

Dan


On Nov 13, 2012, at 2:50 AM, ffang@apache.org wrote:

> 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;
>                 }
> 
> 

-- 
Daniel Kulp
dkulp@apache.org - http://dankulp.com/blog
Talend Community Coder - http://coders.talend.com


Mime
View raw message