Return-Path: Delivered-To: apmail-incubator-cxf-commits-archive@locus.apache.org Received: (qmail 23264 invoked from network); 2 Jan 2008 22:24:25 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 2 Jan 2008 22:24:25 -0000 Received: (qmail 30457 invoked by uid 500); 2 Jan 2008 22:24:14 -0000 Delivered-To: apmail-incubator-cxf-commits-archive@incubator.apache.org Received: (qmail 30407 invoked by uid 500); 2 Jan 2008 22:24:13 -0000 Mailing-List: contact cxf-commits-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: cxf-dev@incubator.apache.org Delivered-To: mailing list cxf-commits@incubator.apache.org Received: (qmail 30398 invoked by uid 99); 2 Jan 2008 22:24:13 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 02 Jan 2008 14:24:13 -0800 X-ASF-Spam-Status: No, hits=-100.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.3] (HELO eris.apache.org) (140.211.11.3) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 02 Jan 2008 22:23:59 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 023281A983A; Wed, 2 Jan 2008 14:24:04 -0800 (PST) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r608261 - in /incubator/cxf/branches/2.0.x-fixes: ./ rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/binding/http/HTTPBindingImpl.java Date: Wed, 02 Jan 2008 22:24:03 -0000 To: cxf-commits@incubator.apache.org From: dkulp@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20080102222404.023281A983A@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: dkulp Date: Wed Jan 2 14:24:02 2008 New Revision: 608261 URL: http://svn.apache.org/viewvc?rev=608261&view=rev Log: Merged revisions 606832 via svnmerge from https://svn.apache.org/repos/asf/incubator/cxf/trunk ........ r606832 | mmao | 2007-12-25 21:54:15 -0500 (Tue, 25 Dec 2007) | 4 lines CXF-1336 throw a WebServiceException when adding an incompatible handler in HttpBinding ........ Modified: incubator/cxf/branches/2.0.x-fixes/ (props changed) incubator/cxf/branches/2.0.x-fixes/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/binding/http/HTTPBindingImpl.java Propchange: incubator/cxf/branches/2.0.x-fixes/ ------------------------------------------------------------------------------ Binary property 'svnmerge-integrated' - no diff available. Modified: incubator/cxf/branches/2.0.x-fixes/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/binding/http/HTTPBindingImpl.java URL: http://svn.apache.org/viewvc/incubator/cxf/branches/2.0.x-fixes/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/binding/http/HTTPBindingImpl.java?rev=608261&r1=608260&r2=608261&view=diff ============================================================================== --- incubator/cxf/branches/2.0.x-fixes/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/binding/http/HTTPBindingImpl.java (original) +++ incubator/cxf/branches/2.0.x-fixes/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/binding/http/HTTPBindingImpl.java Wed Jan 2 14:24:02 2008 @@ -19,6 +19,11 @@ package org.apache.cxf.jaxws.binding.http; +import java.util.List; + +import javax.xml.ws.WebServiceException; +import javax.xml.ws.handler.Handler; +import javax.xml.ws.handler.LogicalHandler; import javax.xml.ws.http.HTTPBinding; import org.apache.cxf.jaxws.binding.AbstractBindingImpl; @@ -33,5 +38,19 @@ //REVISIT: JIRA CXF-613 return "http://cxf.apache.org/bindings/xformat"; } + + @Override + public void setHandlerChain(List hc) { + super.setHandlerChain(hc); + validate(); + } + private void validate() { + for (Handler handler : this.getHandlerChain()) { + if (!(handler instanceof LogicalHandler)) { + throw new WebServiceException("Adding an incompatible handler in javax.xml.ws.http.HTTPBinding: " + + handler.getClass()); + } + } + } }