cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r1510765 - /cxf/branches/2.6.x-fixes/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/header/HeaderClientServerTest.java
Date Mon, 05 Aug 2013 21:47:57 GMT
Author: dkulp
Date: Mon Aug  5 21:47:57 2013
New Revision: 1510765

URL: http://svn.apache.org/r1510765
Log:
Merged revisions 1510700 via  git cherry-pick from
https://svn.apache.org/repos/asf/cxf/branches/2.7.x-fixes

........
  r1510700 | dkulp | 2013-08-05 16:13:31 -0400 (Mon, 05 Aug 2013) | 10 lines

  Merged revisions 1510651 via  git cherry-pick from
  https://svn.apache.org/repos/asf/cxf/trunk

  ........
    r1510651 | dkulp | 2013-08-05 14:36:25 -0400 (Mon, 05 Aug 2013) | 2 lines

    Add some cleanup to the test

  ........

........

Modified:
    cxf/branches/2.6.x-fixes/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/header/HeaderClientServerTest.java

Modified: cxf/branches/2.6.x-fixes/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/header/HeaderClientServerTest.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.6.x-fixes/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/header/HeaderClientServerTest.java?rev=1510765&r1=1510764&r2=1510765&view=diff
==============================================================================
--- cxf/branches/2.6.x-fixes/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/header/HeaderClientServerTest.java
(original)
+++ cxf/branches/2.6.x-fixes/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/header/HeaderClientServerTest.java
Mon Aug  5 21:47:57 2013
@@ -23,6 +23,7 @@ package org.apache.cxf.jaxws.header;
 
 import java.lang.reflect.UndeclaredThrowableException;
 import java.net.URL;
+
 import javax.xml.namespace.QName;
 import javax.xml.ws.Endpoint;
 import javax.xml.ws.Holder;
@@ -52,6 +53,8 @@ import org.apache.header_test.types.Test
 import org.apache.tests.type_test.all.SimpleAll;
 import org.apache.tests.type_test.choice.SimpleChoice;
 import org.apache.tests.type_test.sequence.SimpleStruct;
+
+import org.junit.After;
 import org.junit.Before;
 import org.junit.Test;
 
@@ -62,23 +65,37 @@ public class HeaderClientServerTest exte
     private final QName portName = new QName("http://apache.org/header_test",
                                              "SoapHeaderPort");
 
+    private EndpointImpl endpoint;   
+    private EndpointImpl rpcEndpoint;
+    
     @Before
     public void setUp() throws Exception {
         BusFactory.setDefaultBus(getBus());
         
         Object implementor = new TestHeaderImpl();
         String address = "http://localhost:9104/SoapHeaderContext/SoapHeaderPort";
-        EndpointImpl e = (EndpointImpl) Endpoint.publish(address, implementor);        
-        e.getServer().getEndpoint().getInInterceptors().add(new LoggingInInterceptor());
-        e.getServer().getEndpoint().getOutInterceptors().add(new LoggingOutInterceptor());
+        endpoint = (EndpointImpl) Endpoint.publish(address, implementor);        
+        endpoint.getServer().getEndpoint().getInInterceptors().add(new LoggingInInterceptor());
+        endpoint.getServer().getEndpoint().getOutInterceptors().add(new LoggingOutInterceptor());
         
         implementor = new TestRPCHeaderImpl();
         address = "http://localhost:9104/SoapHeaderRPCContext/SoapHeaderRPCPort";
-        e = (EndpointImpl)Endpoint.publish(address, implementor);        
-        e.getServer().getEndpoint().getInInterceptors().add(new LoggingInInterceptor());
-        e.getServer().getEndpoint().getOutInterceptors().add(new LoggingOutInterceptor());
+        rpcEndpoint = (EndpointImpl)Endpoint.publish(address, implementor);        
+        rpcEndpoint.getServer().getEndpoint().getInInterceptors().add(new LoggingInInterceptor());
+        rpcEndpoint.getServer().getEndpoint().getOutInterceptors().add(new LoggingOutInterceptor());
+    }
+    
+    @After
+    public void stopendpoints() {
+        if (endpoint != null) {
+            endpoint.stop();
+        }
+        if (rpcEndpoint != null) {
+            rpcEndpoint.stop();
+        }
+        endpoint = null;
+        rpcEndpoint = null;
     }
-
     @Test
     public void testInHeader() throws Exception {
         URL wsdl = getClass().getResource("/wsdl/soapheader.wsdl");



Mime
View raw message