Author: richard.opalka(a)jboss.com
Date: 2010-09-03 09:05:26 -0400 (Fri, 03 Sep 2010)
New Revision: 12901
Modified:
stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsseEJB/WsseEjbTestCase.java
stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/resources/jaxws/samples/wsseEJB/META-INF/jbossws-cxf.xml
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3060/JBWS3060TestCase.java
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3098/ClientServerLifeCycleTestCase.java
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/logging/MessageLoggingTestCase.java
Log:
[JBWS-2957] fixing tests to be aligned with new URL pattern scheme
Modified:
stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsseEJB/WsseEjbTestCase.java
===================================================================
---
stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsseEJB/WsseEjbTestCase.java 2010-09-03
12:07:43 UTC (rev 12900)
+++
stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsseEJB/WsseEjbTestCase.java 2010-09-03
13:05:26 UTC (rev 12901)
@@ -43,13 +43,12 @@
/**
* Secure EJB endpoint test
- *
- *
+ *
* @author sberyozk(a)jredhat.com
*/
public class WsseEjbTestCase extends JBossWSTest
{
- public final String TARGET_ENDPOINT_ADDRESS = "http://" + getServerHost() +
":8080/jaxws-samples-wsseEJB/EjbEndpoint";
+ public final String TARGET_ENDPOINT_ADDRESS = "http://" + getServerHost() +
":8080/jaxws-samples-wsseEJB/EjbEndpointService/EjbEndpoint";
public static Test suite()
{
@@ -64,7 +63,6 @@
return port;
}
-
public void testHello() throws Exception
{
EjbEndpoint proxy = getPort();
@@ -77,7 +75,7 @@
{
EjbEndpoint proxy = getPort();
setupWsse(proxy, "kermit");
- try
+ try
{
proxy.greetMe();
fail("Unauthorized exception is expected");
@@ -86,9 +84,6 @@
{
assertEquals("Caller unauthorized", ex.getMessage());
}
-
-
-
}
private void setupWsse(EjbEndpoint proxy, String username)
Modified:
stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/resources/jaxws/samples/wsseEJB/META-INF/jbossws-cxf.xml
===================================================================
---
stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/resources/jaxws/samples/wsseEJB/META-INF/jbossws-cxf.xml 2010-09-03
12:07:43 UTC (rev 12900)
+++
stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/resources/jaxws/samples/wsseEJB/META-INF/jbossws-cxf.xml 2010-09-03
13:05:26 UTC (rev 12901)
@@ -12,35 +12,26 @@
http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
http://cxf.apache.org/jaxws
http://cxf.apache.org/schemas/jaxws.xsd'>
-
+
<bean id="SecurityContextIn"
class="org.jboss.wsf.stack.cxf.security.authentication.SubjectCreatingInterceptor">
<constructor-arg>
<map>
<entry key="action" value="UsernameToken"/>
</map>
</constructor-arg>
-
<property name="propagateContext" value="true"/>
-
</bean>
-
+
<jaxws:endpoint
id='EjbEndpointImpl'
- address='http://@jboss.bind.address@:8080/jaxws-samples-wsseEJB/EjbEndpoint'
+
address='http://@jboss.bind.address@:8080/jaxws-samples-wsseEJB/EjbEndpointService/EjbEndpoint'
implementor='org.jboss.test.ws.jaxws.samples.wsseEJB.EjbEndpointImpl'>
<jaxws:invoker>
<bean class='org.jboss.wsf.stack.cxf.InvokerEJB3'/>
</jaxws:invoker>
-
<jaxws:inInterceptors>
-
<ref bean="SecurityContextIn"/>
<bean
class="org.apache.cxf.binding.soap.saaj.SAAJInInterceptor"/>
-
</jaxws:inInterceptors>
-
</jaxws:endpoint>
-
-
-
</beans>
Modified:
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3060/JBWS3060TestCase.java
===================================================================
---
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3060/JBWS3060TestCase.java 2010-09-03
12:07:43 UTC (rev 12900)
+++
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3060/JBWS3060TestCase.java 2010-09-03
13:05:26 UTC (rev 12901)
@@ -45,8 +45,8 @@
*/
public class JBWS3060TestCase extends JBossWSTest
{
- private String endpointOneURL = "http://" + getServerHost() +
":8080/jaxws-cxf-jbws3060/EndpointOne";
- private String endpointTwoURL = "http://" + getServerHost() +
":8080/jaxws-cxf-jbws3060/EndpointTwo";
+ private String endpointOneURL = "http://" + getServerHost() +
":8080/jaxws-cxf-jbws3060/ServiceOne/EndpointOne";
+ private String endpointTwoURL = "http://" + getServerHost() +
":8080/jaxws-cxf-jbws3060/ServiceTwo/EndpointTwo";
private String targetNS = "http://org.jboss.ws.jaxws.cxf/jbws3060";
private EndpointOne portOne;
Modified:
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3098/ClientServerLifeCycleTestCase.java
===================================================================
---
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3098/ClientServerLifeCycleTestCase.java 2010-09-03
12:07:43 UTC (rev 12900)
+++
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3098/ClientServerLifeCycleTestCase.java 2010-09-03
13:05:26 UTC (rev 12901)
@@ -39,35 +39,34 @@
/**
* Verifies the Bus is properly configured with Client/Server LifeCycleManager instances
- *
+ *
* @author alessio.soldano(a)jboss.com
* @since 08-Aug-2010
- *
*/
public class ClientServerLifeCycleTestCase extends JBossWSTest
{
- private String endpointOneURL = "http://" + getServerHost() +
":8080/jaxws-cxf-jbws3098/EndpointOne";
+ private String endpointOneURL = "http://" + getServerHost() +
":8080/jaxws-cxf-jbws3098/ServiceOne/EndpointOne";
private String targetNS = "http://org.jboss.ws.jaxws.cxf/jbws3098";
-
+
public static Test suite()
{
return new JBossWSTestSetup(ClientServerLifeCycleTestCase.class,
"jaxws-cxf-jbws3098.jar");
}
-
+
public void testClientLifeCycleManager()
{
Bus bus = BusFactory.newInstance().createBus();
assertNotNull("Cannot find ClientLifeCycleManager impl in current bus",
bus.getExtension(ClientLifeCycleManager.class));
bus.shutdown(true);
}
-
+
public void testServerLifeCycleManager()
{
Bus bus = BusFactory.newInstance().createBus();
assertNotNull("Cannot find ServerLifeCycleManager impl in current bus",
bus.getExtension(ServerLifeCycleManager.class));
bus.shutdown(true);
}
-
+
public void testCustomClientLifeCycleListener() throws Exception
{
URL wsdlOneURL = new URL(endpointOneURL + "?wsdl");
@@ -81,7 +80,7 @@
assertEquals(1, listener.getCount());
assertEquals("Foo", portOne.echo("Foo"));
}
-
+
private class CustomClientLifeCycleListener implements ClientLifeCycleListener
{
private volatile int count = 0;
@@ -90,7 +89,7 @@
{
return count;
}
-
+
@Override
public void clientCreated(Client client)
{
@@ -102,6 +101,5 @@
{
//NOOP
}
-
}
}
Modified:
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/logging/MessageLoggingTestCase.java
===================================================================
---
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/logging/MessageLoggingTestCase.java 2010-09-03
12:07:43 UTC (rev 12900)
+++
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/logging/MessageLoggingTestCase.java 2010-09-03
13:05:26 UTC (rev 12901)
@@ -39,22 +39,22 @@
/**
* Tests configuration of message exchange logging using API
- *
+ *
* @author alessio.soldano(a)jboss.com
* @since 08-Jul-2010
*/
public class MessageLoggingTestCase extends JBossWSTest
{
- private String loggingFeatureEndpointURL = "http://" + getServerHost() +
":8080/jaxws-cxf-logging/LoggingFeatureEndpoint";
- private String loggingInterceptorsEndpointURL = "http://" + getServerHost()
+ ":8080/jaxws-cxf-logging/LoggingInterceptorsEndpoint";
-
+ private String loggingFeatureEndpointURL = "http://" + getServerHost() +
":8080/jaxws-cxf-logging/LoggingFeatureService/LoggingFeatureEndpoint";
+ private String loggingInterceptorsEndpointURL = "http://" + getServerHost()
+
":8080/jaxws-cxf-logging/LoggingInterceptorsService/LoggingInterceptorsEndpoint";
+
private LoggingEndpoint port;
public static Test suite()
{
return new JBossWSTestSetup(MessageLoggingTestCase.class,
"jaxws-cxf-logging.jar");
}
-
+
public void testLoggingFeature() throws Exception
{
URL wsdlURL = new URL(loggingFeatureEndpointURL + "?wsdl");
@@ -62,7 +62,7 @@
Service service = Service.create(wsdlURL, serviceName);
QName portQName = new
QName("http://logging.cxf.jaxws.ws.test.jboss.org/",
"LoggingFeatureEndpointPort");
port = (LoggingEndpoint)service.getPort(portQName, LoggingEndpoint.class);
-
+
//This is actually just a sample, the test does not actually assert the logs are
written on server side for the exchanges message
//The CXF @Feature on the endpoint ensures exchanged messages are written to the
server log
assertEquals("foo", port.echo("foo"));
@@ -82,7 +82,7 @@
{
URL wsdlURL = new URL(loggingFeatureEndpointURL + "?wsdl");
QName serviceName = new
QName("http://logging.cxf.jaxws.ws.test.jboss.org/",
"LoggingFeatureService");
-
+
Bus bus = BusFactory.newInstance().createBus();
try
{
@@ -92,7 +92,7 @@
myLoggingInterceptor.setPrintWriter(new PrintWriter(out, true));
bus.getInInterceptors().add(myLoggingInterceptor);
BusFactory.setDefaultBus(bus);
-
+
Service service = Service.create(wsdlURL, serviceName);
QName portQName = new
QName("http://logging.cxf.jaxws.ws.test.jboss.org/",
"LoggingFeatureEndpointPort");
port = (LoggingEndpoint)service.getPort(portQName, LoggingEndpoint.class);
@@ -106,5 +106,4 @@
bus.shutdown(true);
}
}
-
}