Author: alessio.soldano(a)jboss.com
Date: 2010-01-19 05:03:43 -0500 (Tue, 19 Jan 2010)
New Revision: 11457
Modified:
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/endpointReference/BindingProviderTestCase.java
Log:
[JBWS-2889] Providing testcase for getEndpointReference(..) exception handling
Modified:
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/endpointReference/BindingProviderTestCase.java
===================================================================
---
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/endpointReference/BindingProviderTestCase.java 2010-01-19
10:02:45 UTC (rev 11456)
+++
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/endpointReference/BindingProviderTestCase.java 2010-01-19
10:03:43 UTC (rev 11457)
@@ -30,6 +30,7 @@
import javax.xml.ws.Dispatch;
import javax.xml.ws.EndpointReference;
import javax.xml.ws.Service;
+import javax.xml.ws.WebServiceException;
import javax.xml.ws.WebServiceFeature;
import javax.xml.ws.Service.Mode;
import javax.xml.ws.soap.AddressingFeature;
@@ -73,10 +74,14 @@
bp.getEndpointReference(MyEndpointReference.class);
fail("Exception expected");
}
- catch (Exception e)
+ catch (WebServiceException e)
{
//NOP: the provided EndpointReference is not supported by the implementation
}
+ catch (Throwable t)
+ {
+ fail("WebServiceException expected, got " + t);
+ }
String retObj = port.echo("Hello");
assertEquals("Hello", retObj);
@@ -108,12 +113,16 @@
try
{
bp.getEndpointReference(MyEndpointReference.class);
- fail("Exception expected");
+ fail("WebServiceException expected");
}
- catch (Exception e)
+ catch (WebServiceException e)
{
//NOP: the provided EndpointReference is not supported by the implementation
}
+ catch (Throwable t)
+ {
+ fail("WebServiceException expected, got " + t);
+ }
}
public void testDispatchWithFeatures() throws Exception
Show replies by date