cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From m...@apache.org
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 GMT
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());
     }
 }



Mime
View raw message