You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by mm...@apache.org on 2007/12/27 10:10:35 UTC

svn commit: r607023 - /incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/EndpointReferenceBuilder.java

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 extends EndpointReference> T getEndpointReference(Class<T> clazz) {
+        if (clazz != W3CEndpointReference.class) {
+            throw new WebServiceException("Unsupported EPR type: " + clazz);
+        }
         return clazz.cast(getEndpointReference());
     }
 }