You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by dk...@apache.org on 2008/05/16 16:00:29 UTC

svn commit: r657067 - in /cxf/branches/2.0.x-fixes: ./ rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/ systests/src/test/java/org/apache/cxf/systest/http_jetty/ systests/src/test/java/org/apache/cxf/systest/soap/ systests/src/te...

Author: dkulp
Date: Fri May 16 07:00:29 2008
New Revision: 657067

URL: http://svn.apache.org/viewvc?rev=657067&view=rev
Log:
Merged revisions 656372 via svnmerge from 
https://svn.apache.org/repos/asf/cxf/trunk

........
  r656372 | dkulp | 2008-05-14 15:16:18 -0400 (Wed, 14 May 2008) | 3 lines
  
  Remove the cxf.xml in systests at that's causing all the systests to use it which isn't exactly expected.  (moved it into the test package that requires it)
  Make sure the proper content-type for soap is set.  In some cases, it was being clobbered at conduit setup. 
........

Added:
    cxf/branches/2.0.x-fixes/systests/src/test/java/org/apache/cxf/systest/http_jetty/cxf.xml
      - copied unchanged from r656372, cxf/trunk/systests/src/test/java/org/apache/cxf/systest/http_jetty/cxf.xml
Removed:
    cxf/branches/2.0.x-fixes/systests/src/test/resources/cxf.xml
Modified:
    cxf/branches/2.0.x-fixes/   (props changed)
    cxf/branches/2.0.x-fixes/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/SoapPreProtocolOutInterceptor.java
    cxf/branches/2.0.x-fixes/systests/src/test/java/org/apache/cxf/systest/http_jetty/EngineLifecycleTest.java
    cxf/branches/2.0.x-fixes/systests/src/test/java/org/apache/cxf/systest/soap/SoapActionTest.java

Propchange: cxf/branches/2.0.x-fixes/
------------------------------------------------------------------------------
Binary property 'svnmerge-integrated' - no diff available.

Modified: cxf/branches/2.0.x-fixes/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/SoapPreProtocolOutInterceptor.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.0.x-fixes/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/SoapPreProtocolOutInterceptor.java?rev=657067&r1=657066&r2=657067&view=diff
==============================================================================
--- cxf/branches/2.0.x-fixes/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/SoapPreProtocolOutInterceptor.java (original)
+++ cxf/branches/2.0.x-fixes/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/SoapPreProtocolOutInterceptor.java Fri May 16 07:00:29 2008
@@ -27,6 +27,7 @@
 import org.apache.cxf.binding.soap.SoapVersion;
 import org.apache.cxf.interceptor.AttachmentOutInterceptor;
 import org.apache.cxf.interceptor.Fault;
+import org.apache.cxf.message.Message;
 import org.apache.cxf.phase.Phase;
 
 import static org.apache.cxf.message.Message.MIME_HEADERS;
@@ -71,6 +72,8 @@
             soapVersion = Soap11.getInstance();
             message.setVersion(soapVersion);
         }
+        
+        message.put(Message.CONTENT_TYPE, soapVersion.getContentType());
     }
     
     /**

Modified: cxf/branches/2.0.x-fixes/systests/src/test/java/org/apache/cxf/systest/http_jetty/EngineLifecycleTest.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.0.x-fixes/systests/src/test/java/org/apache/cxf/systest/http_jetty/EngineLifecycleTest.java?rev=657067&r1=657066&r2=657067&view=diff
==============================================================================
--- cxf/branches/2.0.x-fixes/systests/src/test/java/org/apache/cxf/systest/http_jetty/EngineLifecycleTest.java (original)
+++ cxf/branches/2.0.x-fixes/systests/src/test/java/org/apache/cxf/systest/http_jetty/EngineLifecycleTest.java Fri May 16 07:00:29 2008
@@ -86,7 +86,7 @@
     
     public void setUpBus(boolean includeService) throws Exception {
         applicationContext = new GenericApplicationContext();
-        readBeans(new ClassPathResource("cxf.xml"));
+        readBeans(new ClassPathResource("/org/apache/cxf/systest/http_jetty/cxf.xml"));
         readBeans(new ClassPathResource("META-INF/cxf/cxf.xml"));
         readBeans(new ClassPathResource("META-INF/cxf/cxf-extension-soap.xml"));
         readBeans(new ClassPathResource("META-INF/cxf/cxf-extension-http.xml"));

Modified: cxf/branches/2.0.x-fixes/systests/src/test/java/org/apache/cxf/systest/soap/SoapActionTest.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.0.x-fixes/systests/src/test/java/org/apache/cxf/systest/soap/SoapActionTest.java?rev=657067&r1=657066&r2=657067&view=diff
==============================================================================
--- cxf/branches/2.0.x-fixes/systests/src/test/java/org/apache/cxf/systest/soap/SoapActionTest.java (original)
+++ cxf/branches/2.0.x-fixes/systests/src/test/java/org/apache/cxf/systest/soap/SoapActionTest.java Fri May 16 07:00:29 2008
@@ -19,54 +19,70 @@
 
 package org.apache.cxf.systest.soap;
 
+import org.apache.cxf.Bus;
+import org.apache.cxf.BusFactory;
 import org.apache.cxf.binding.soap.Soap12;
 import org.apache.cxf.binding.soap.SoapBindingConfiguration;
 import org.apache.cxf.jaxws.JaxWsProxyFactoryBean;
 import org.apache.cxf.jaxws.JaxWsServerFactoryBean;
-import org.apache.cxf.test.AbstractCXFTest;
 import org.apache.hello_world_soap_action.Greeter;
+import org.junit.AfterClass;
+import org.junit.Assert;
+import org.junit.BeforeClass;
 import org.junit.Test;
 
-public class SoapActionTest extends AbstractCXFTest {
+public class SoapActionTest extends Assert {
+    static Bus bus;
+    static String add11 = "http://localhost:9036/test11";
+    static String add12 = "http://localhost:9036/test12";
 
 
-    @Test
-    public void testEndpoint() throws Exception {
-        String add = "http://localhost:9036/test";
+    @BeforeClass
+    public static void createServers() throws Exception {
+        bus = BusFactory.getDefaultBus();
         JaxWsServerFactoryBean sf = new JaxWsServerFactoryBean();
         sf.setServiceBean(new SoapActionGreeterImpl());
-        sf.setAddress(add);
-        sf.setBus(getBus());
+        sf.setAddress(add11);
+        sf.setBus(bus);
+        sf.create();
+        
+        sf = new JaxWsServerFactoryBean();
+        sf.setServiceBean(new SoapActionGreeterImpl());
+        sf.setAddress(add12);
+        sf.setBus(bus);
+        SoapBindingConfiguration config = new SoapBindingConfiguration();
+        config.setVersion(Soap12.getInstance());
+        sf.setBindingConfig(config);
         sf.create();
+    }
+    @AfterClass
+    public static void shutdown() throws Exception {
+        bus.shutdown(true);
+    }
+    
 
+    @Test
+    public void testEndpoint() throws Exception {
         JaxWsProxyFactoryBean pf = new JaxWsProxyFactoryBean();
         pf.setServiceClass(Greeter.class);
-        pf.setAddress(add);
-        pf.setBus(getBus());
+        pf.setAddress(add11);
+        pf.setBus(bus);
         Greeter greeter = (Greeter) pf.create();
         
         assertEquals("sayHi", greeter.sayHi("test"));
-        assertEquals("sayHi2", greeter.sayHi2("test"));
-        
+        assertEquals("sayHi2", greeter.sayHi2("test"));        
     }
     
     @Test
     public void testSoap12Endpoint() throws Exception {
-        String add = "http://localhost:9036/test";
-        JaxWsServerFactoryBean sf = new JaxWsServerFactoryBean();
-        sf.setServiceBean(new SoapActionGreeterImpl());
-        sf.setAddress(add);
-        sf.setBus(getBus());
-        SoapBindingConfiguration config = new SoapBindingConfiguration();
-        config.setVersion(Soap12.getInstance());
-        sf.setBindingConfig(config);
-        sf.create();
 
         JaxWsProxyFactoryBean pf = new JaxWsProxyFactoryBean();
         pf.setServiceClass(Greeter.class);
-        pf.setAddress(add);
+        pf.setAddress(add12);
+        SoapBindingConfiguration config = new SoapBindingConfiguration();
+        config.setVersion(Soap12.getInstance());
         pf.setBindingConfig(config);
-        pf.setBus(getBus());
+        pf.setBus(bus);
         
         Greeter greeter = (Greeter) pf.create();