Author: alessio.soldano(a)jboss.com
Date: 2008-05-30 05:32:58 -0400 (Fri, 30 May 2008)
New Revision: 7227
Modified:
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/wsrm/BasicDocTestCase.java
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/wsrm/BasicRPCTestCase.java
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsse/sign-encrypt/WEB-INF/jbossws-cxf.xml
Log:
Shutting down custom test bus once the test is over
Modified:
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/wsrm/BasicDocTestCase.java
===================================================================
---
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/wsrm/BasicDocTestCase.java 2008-05-30
09:31:42 UTC (rev 7226)
+++
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/wsrm/BasicDocTestCase.java 2008-05-30
09:32:58 UTC (rev 7227)
@@ -81,19 +81,26 @@
SpringBusFactory bf = new SpringBusFactory();
URL cxfConfig = getResourceURL("jaxws/cxf/wsrm/wsrm-client-config.xml");
Bus bus = bf.createBus(cxfConfig);
- BusFactory.setDefaultBus(bus);
-
- URL wsdlURL =
getResourceURL("jaxws/cxf/wsrm/basic-doc/wsrm-basic-doc.wsdl");
- QName serviceName = new QName(targetNS, "RMService");
-
- Service service = Service.create(wsdlURL, serviceName);
- BasicDocEndpoint port = (BasicDocEndpoint)service.getPort(BasicDocEndpoint.class);
-
- // Enable addressing
- BindingProvider bp = (BindingProvider)port;
- bp.getRequestContext().put("org.apache.cxf.ws.addressing.using",
Boolean.TRUE);
-
- Object retObj = port.echo("Hello");
- assertEquals("Hello", retObj);
+ try
+ {
+ BusFactory.setDefaultBus(bus);
+
+ URL wsdlURL =
getResourceURL("jaxws/cxf/wsrm/basic-doc/wsrm-basic-doc.wsdl");
+ QName serviceName = new QName(targetNS, "RMService");
+
+ Service service = Service.create(wsdlURL, serviceName);
+ BasicDocEndpoint port =
(BasicDocEndpoint)service.getPort(BasicDocEndpoint.class);
+
+ // Enable addressing
+ BindingProvider bp = (BindingProvider)port;
+ bp.getRequestContext().put("org.apache.cxf.ws.addressing.using",
Boolean.TRUE);
+
+ Object retObj = port.echo("Hello");
+ assertEquals("Hello", retObj);
+ }
+ finally
+ {
+ bus.shutdown(true);
+ }
}
}
\ No newline at end of file
Modified:
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/wsrm/BasicRPCTestCase.java
===================================================================
---
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/wsrm/BasicRPCTestCase.java 2008-05-30
09:31:42 UTC (rev 7226)
+++
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/wsrm/BasicRPCTestCase.java 2008-05-30
09:32:58 UTC (rev 7227)
@@ -81,19 +81,26 @@
SpringBusFactory bf = new SpringBusFactory();
URL cxfConfig = getResourceURL("jaxws/cxf/wsrm/wsrm-client-config.xml");
Bus bus = bf.createBus(cxfConfig);
- BusFactory.setDefaultBus(bus);
-
- URL wsdlURL =
getResourceURL("jaxws/cxf/wsrm/basic-rpc/wsrm-basic-rpc.wsdl");
- QName serviceName = new QName(targetNS, "RMService");
-
- Service service = Service.create(wsdlURL, serviceName);
- BasicRPCEndpoint port = (BasicRPCEndpoint)service.getPort(BasicRPCEndpoint.class);
-
- // Enable addressing
- BindingProvider bp = (BindingProvider)port;
- bp.getRequestContext().put("org.apache.cxf.ws.addressing.using",
Boolean.TRUE);
-
- Object retObj = port.echo("Hello");
- assertEquals("Hello", retObj);
+ try
+ {
+ BusFactory.setDefaultBus(bus);
+
+ URL wsdlURL =
getResourceURL("jaxws/cxf/wsrm/basic-rpc/wsrm-basic-rpc.wsdl");
+ QName serviceName = new QName(targetNS, "RMService");
+
+ Service service = Service.create(wsdlURL, serviceName);
+ BasicRPCEndpoint port =
(BasicRPCEndpoint)service.getPort(BasicRPCEndpoint.class);
+
+ // Enable addressing
+ BindingProvider bp = (BindingProvider)port;
+ bp.getRequestContext().put("org.apache.cxf.ws.addressing.using",
Boolean.TRUE);
+
+ Object retObj = port.echo("Hello");
+ assertEquals("Hello", retObj);
+ }
+ finally
+ {
+ bus.shutdown(true);
+ }
}
}
\ No newline at end of file
Modified:
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsse/sign-encrypt/WEB-INF/jbossws-cxf.xml
===================================================================
---
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsse/sign-encrypt/WEB-INF/jbossws-cxf.xml 2008-05-30
09:31:42 UTC (rev 7226)
+++
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsse/sign-encrypt/WEB-INF/jbossws-cxf.xml 2008-05-30
09:32:58 UTC (rev 7227)
@@ -43,6 +43,9 @@
id='ServiceImpl'
address='http://@jboss.bind.address@:8080/jaxws-samples-wsse-sign-encrypt'
implementor='org.jboss.test.ws.jaxws.samples.wsse.ServiceImpl'>
+ <jaxws:invoker>
+ <bean class='org.jboss.wsf.stack.cxf.InvokerJSE'/>
+ </jaxws:invoker>
<jaxws:outInterceptors>
<bean
class="org.apache.cxf.binding.soap.saaj.SAAJOutInterceptor"/>
<ref bean="Sign_Response"/>
Show replies by date