Return-Path: X-Original-To: apmail-cxf-dev-archive@www.apache.org Delivered-To: apmail-cxf-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 0F31ED919 for ; Tue, 13 Nov 2012 12:13:00 +0000 (UTC) Received: (qmail 90357 invoked by uid 500); 13 Nov 2012 12:12:59 -0000 Delivered-To: apmail-cxf-dev-archive@cxf.apache.org Received: (qmail 89903 invoked by uid 500); 13 Nov 2012 12:12:52 -0000 Mailing-List: contact dev-help@cxf.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cxf.apache.org Delivered-To: mailing list dev@cxf.apache.org Received: (qmail 89871 invoked by uid 99); 13 Nov 2012 12:12:52 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 13 Nov 2012 12:12:52 +0000 X-ASF-Spam-Status: No, hits=0.7 required=5.0 tests=SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: local policy) Received: from [64.85.173.253] (HELO server.dankulp.com) (64.85.173.253) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 13 Nov 2012 12:12:45 +0000 Received: by server.dankulp.com (Postfix, from userid 5000) id 940CB1809E1; Tue, 13 Nov 2012 07:12:23 -0500 (EST) X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on server.dankulp.com X-Spam-Level: X-Msg-File: /tmp/mailfilter-dev@cxf.apache.org.7MeUzCPzCl Received: from macbook.house.dankulp.com (c-24-91-72-253.hsd1.ma.comcast.net [24.91.72.253]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by server.dankulp.com (Postfix) with ESMTPSA id 6414118097A; Tue, 13 Nov 2012 07:12:22 -0500 (EST) Content-Type: text/plain; charset=windows-1252 Mime-Version: 1.0 (Mac OS X Mail 6.2 \(1499\)) Subject: Re: svn commit: r1408627 - /cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/SoapOutInterceptor.java From: Daniel Kulp In-Reply-To: <20121113075015.471752388993@eris.apache.org> Date: Tue, 13 Nov 2012 07:12:21 -0500 Content-Transfer-Encoding: quoted-printable Message-Id: <45F6891C-BEF8-4147-B27D-848266ED92A4@apache.org> References: <20121113075015.471752388993@eris.apache.org> To: dev@cxf.apache.org, ffang@apache.org X-Mailer: Apple Mail (2.1499) X-Virus-Checked: Checked by ClamAV on apache.org X-Old-Spam-Status: No, score=-102.9 required=3.0 tests=ALL_TRUSTED,BAYES_00, SHORTCIRCUIT shortcircuit=ham autolearn=disabled version=3.3.2 Umm=85 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. =20 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 >=20 > URL: http://svn.apache.org/viewvc?rev=3D1408627&view=3Drev > Log: > [CXF-4623]Marshalling Error during asynchronous service invocation = when adding a soap header using a SOAPHandler >=20 > Modified: > = cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/inter= ceptor/SoapOutInterceptor.java >=20 > Modified: = cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/inter= ceptor/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=3D1408627&= r1=3D1408626&r2=3D1408627&view=3Ddiff > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > --- = cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/inter= ceptor/SoapOutInterceptor.java (original) > +++ = cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/inter= ceptor/SoapOutInterceptor.java Tue Nov 13 07:50:14 2012 > @@ -27,6 +27,7 @@ import java.util.ResourceBundle; >=20 > import javax.xml.stream.XMLStreamException; > import javax.xml.stream.XMLStreamWriter; > +import javax.xml.ws.AsyncHandler; >=20 > import org.w3c.dom.Element; >=20 > @@ -212,13 +213,20 @@ public class SoapOutInterceptor extends=20 > if (headers =3D=3D null) { > return endedHeader; > } =20 > + =20 >=20 > for (SoapHeaderInfo header : headers) { > MessagePartInfo part =3D header.getPart(); > if (wrappedBmi !=3D bmi) { > part =3D = wrappedBmi.getMessageInfo().addMessagePart(part.getName()); > } > - if (part.getIndex() >=3D objs.size()) { > + int paraLength =3D 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 =3D paraLength - 1; > + } > + if (part.getIndex() >=3D paraLength) { > // The optional out of band header is not a part = of parameters of the method > continue; > } >=20 >=20 --=20 Daniel Kulp dkulp@apache.org - http://dankulp.com/blog Talend Community Coder - http://coders.talend.com