Return-Path: Delivered-To: apmail-incubator-cxf-commits-archive@locus.apache.org Received: (qmail 91008 invoked from network); 27 Dec 2007 09:10:59 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 27 Dec 2007 09:10:59 -0000 Received: (qmail 68422 invoked by uid 500); 27 Dec 2007 09:10:47 -0000 Delivered-To: apmail-incubator-cxf-commits-archive@incubator.apache.org Received: (qmail 68374 invoked by uid 500); 27 Dec 2007 09:10:47 -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 68365 invoked by uid 99); 27 Dec 2007 09:10:47 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 27 Dec 2007 01:10:47 -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; Thu, 27 Dec 2007 09:10:44 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id A86E61A9832; Thu, 27 Dec 2007 01:10:35 -0800 (PST) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r607023 - /incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/EndpointReferenceBuilder.java Date: Thu, 27 Dec 2007 09:10:35 -0000 To: cxf-commits@incubator.apache.org From: mmao@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20071227091035.A86E61A9832@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: mmao Date: Thu Dec 27 01:10:34 2007 New Revision: 607023 URL: http://svn.apache.org/viewvc?rev=607023&view=rev Log: CXF-1342 * WebServiceException MUST thrown if the EndpointReference is not supported Modified: incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/EndpointReferenceBuilder.java Modified: incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/EndpointReferenceBuilder.java URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/EndpointReferenceBuilder.java?rev=607023&r1=607022&r2=607023&view=diff ============================================================================== --- incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/EndpointReferenceBuilder.java (original) +++ incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/EndpointReferenceBuilder.java Thu Dec 27 01:10:34 2007 @@ -21,6 +21,8 @@ import java.util.logging.Logger; import javax.xml.ws.EndpointReference; +import javax.xml.ws.WebServiceException; +import javax.xml.ws.wsaddressing.W3CEndpointReference; import javax.xml.ws.wsaddressing.W3CEndpointReferenceBuilder; import org.apache.cxf.common.i18n.Message; @@ -56,6 +58,9 @@ } public T getEndpointReference(Class clazz) { + if (clazz != W3CEndpointReference.class) { + throw new WebServiceException("Unsupported EPR type: " + clazz); + } return clazz.cast(getEndpointReference()); } }