cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r656372 - in /cxf/trunk: 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/test/resources/
Date Wed, 14 May 2008 19:16:18 GMT
Author: dkulp
Date: Wed May 14 12:16:18 2008
New Revision: 656372

URL: http://svn.apache.org/viewvc?rev=656372&view=rev
Log:
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/trunk/systests/src/test/java/org/apache/cxf/systest/http_jetty/cxf.xml   (with props)
Removed:
    cxf/trunk/systests/src/test/resources/cxf.xml
Modified:
    cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/SoapPreProtocolOutInterceptor.java
    cxf/trunk/systests/src/test/java/org/apache/cxf/systest/http_jetty/EngineLifecycleTest.java
    cxf/trunk/systests/src/test/java/org/apache/cxf/systest/soap/SoapActionTest.java

Modified: cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/SoapPreProtocolOutInterceptor.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/SoapPreProtocolOutInterceptor.java?rev=656372&r1=656371&r2=656372&view=diff
==============================================================================
--- cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/SoapPreProtocolOutInterceptor.java
(original)
+++ cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/SoapPreProtocolOutInterceptor.java
Wed May 14 12:16:18 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/trunk/systests/src/test/java/org/apache/cxf/systest/http_jetty/EngineLifecycleTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/http_jetty/EngineLifecycleTest.java?rev=656372&r1=656371&r2=656372&view=diff
==============================================================================
--- cxf/trunk/systests/src/test/java/org/apache/cxf/systest/http_jetty/EngineLifecycleTest.java
(original)
+++ cxf/trunk/systests/src/test/java/org/apache/cxf/systest/http_jetty/EngineLifecycleTest.java
Wed May 14 12:16:18 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"));

Added: cxf/trunk/systests/src/test/java/org/apache/cxf/systest/http_jetty/cxf.xml
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/http_jetty/cxf.xml?rev=656372&view=auto
==============================================================================
--- cxf/trunk/systests/src/test/java/org/apache/cxf/systest/http_jetty/cxf.xml (added)
+++ cxf/trunk/systests/src/test/java/org/apache/cxf/systest/http_jetty/cxf.xml Wed May 14
12:16:18 2008
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied. See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+<beans xmlns="http://www.springframework.org/schema/beans"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xmlns:http="http://cxf.apache.org/transports/http/configuration"
+       xsi:schemaLocation="
+http://cxf.apache.org/transports/http/configuration http://cxf.apache.org/schemas/configuration/http-conf.xsd
+http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
+  
+    <http:conduit name="*.http-conduit">
+      <http:client AllowChunking="false"/>
+    </http:conduit>
+</beans>
\ No newline at end of file

Propchange: cxf/trunk/systests/src/test/java/org/apache/cxf/systest/http_jetty/cxf.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cxf/trunk/systests/src/test/java/org/apache/cxf/systest/http_jetty/cxf.xml
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: cxf/trunk/systests/src/test/java/org/apache/cxf/systest/http_jetty/cxf.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Modified: cxf/trunk/systests/src/test/java/org/apache/cxf/systest/soap/SoapActionTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/soap/SoapActionTest.java?rev=656372&r1=656371&r2=656372&view=diff
==============================================================================
--- cxf/trunk/systests/src/test/java/org/apache/cxf/systest/soap/SoapActionTest.java (original)
+++ cxf/trunk/systests/src/test/java/org/apache/cxf/systest/soap/SoapActionTest.java Wed May
14 12:16:18 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();
         



Mime
View raw message