Author: jim.ma
Date: 2014-03-28 06:34:26 -0400 (Fri, 28 Mar 2014)
New Revision: 18547
Modified:
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/mixtype/MixedTypeTestCase.java
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/cxf/mixtype/WEB-INF/web.xml
Log:
Add test for deploy the same endpoint implementation with different url patterns
Modified:
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/mixtype/MixedTypeTestCase.java
===================================================================
---
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/mixtype/MixedTypeTestCase.java 2014-03-27
12:11:50 UTC (rev 18546)
+++
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/mixtype/MixedTypeTestCase.java 2014-03-28
10:34:26 UTC (rev 18547)
@@ -35,6 +35,7 @@
{
private final String endpointURL = "http://" + getServerHost() +
":8080/mixtype/ServiceOne/EndpointOne";
private final String endpoint2URL = "http://" + getServerHost() +
":8080/mixtype/ServiceOne/EndpointTwo";
+ private final String anotherEndpoint2URL = "http://" + getServerHost() +
":8080/mixtype/ServiceOne/AnotherEndpointTwo";
private final String ejbEndpointURL = "http://" + getServerHost() +
":8080/mixtype/EJBServiceOne/EndpointOneEJB3Impl";
private String targetNS = "http://org.jboss.ws.jaxws.cxf/mixtype";
@@ -77,5 +78,17 @@
assertEquals("mixedType", endpoint.echo("mixedType"));
assertEquals(1, endpoint.getCount() - initialCount);
}
+
+ public void testEndpoint2WithAnotherURLPattern() throws Exception
+ {
+ //verify everything works with an endpoint extending another one impl
+ URL wsdlOneURL = new URL(anotherEndpoint2URL + "?wsdl");
+ QName serviceOneName = new QName(targetNS, "ServiceOne");
+ Service service = Service.create(wsdlOneURL, serviceOneName);
+ EndpointOne endpoint = (EndpointOne)service.getPort(new QName(targetNS,
"EndpointTwoPort"), EndpointOne.class);
+ int initialCount = endpoint.getCount();
+ assertEquals("mixedType", endpoint.echo("mixedType"));
+ assertEquals(1, endpoint.getCount() - initialCount);
+ }
}
\ No newline at end of file
Modified:
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/cxf/mixtype/WEB-INF/web.xml
===================================================================
---
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/cxf/mixtype/WEB-INF/web.xml 2014-03-27
12:11:50 UTC (rev 18546)
+++
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/cxf/mixtype/WEB-INF/web.xml 2014-03-28
10:34:26 UTC (rev 18547)
@@ -10,6 +10,10 @@
<servlet>
<servlet-name>Ep2Servlet</servlet-name>
<servlet-class>org.jboss.test.ws.jaxws.cxf.mixtype.EndpointTwoImpl</servlet-class>
+ </servlet>
+ <servlet>
+ <servlet-name>Ep2Servlet2</servlet-name>
+
<servlet-class>org.jboss.test.ws.jaxws.cxf.mixtype.EndpointTwoImpl</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>Ep1Servlet</servlet-name>
@@ -19,4 +23,8 @@
<servlet-name>Ep2Servlet</servlet-name>
<url-pattern>/ServiceOne/EndpointTwo</url-pattern>
</servlet-mapping>
+ <servlet-mapping>
+ <servlet-name>Ep2Servlet2</servlet-name>
+ <url-pattern>/ServiceOne/AnotherEndpointTwo</url-pattern>
+ </servlet-mapping>
</web-app>
Show replies by date