cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r619037 - in /incubator/cxf/branches/2.0.x-fixes: rt/core/src/main/java/org/apache/cxf/service/factory/ rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/ rt/transports/http-jetty/src/test/java/org/apache/cxf/transport/http_je...
Date Wed, 06 Feb 2008 15:53:52 GMT
Author: dkulp
Date: Wed Feb  6 07:53:41 2008
New Revision: 619037

URL: http://svn.apache.org/viewvc?rev=619037&view=rev
Log:
Fixes to get tests passing with latest merged fixs

Modified:
    incubator/cxf/branches/2.0.x-fixes/rt/core/src/main/java/org/apache/cxf/service/factory/AbstractServiceFactoryBean.java
    incubator/cxf/branches/2.0.x-fixes/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/ReflectionServiceFactoryBean.java
    incubator/cxf/branches/2.0.x-fixes/rt/transports/http-jetty/src/test/java/org/apache/cxf/transport/http_jetty/JettyHTTPDestinationTest.java
    incubator/cxf/branches/2.0.x-fixes/systests/src/test/java/org/apache/cxf/systest/rest/RestClientServerBookTest.java
    incubator/cxf/branches/2.0.x-fixes/systests/src/test/java/org/apache/cxf/systest/rest/resources/expected_get_book123_xmlwrapped.txt

Modified: incubator/cxf/branches/2.0.x-fixes/rt/core/src/main/java/org/apache/cxf/service/factory/AbstractServiceFactoryBean.java
URL: http://svn.apache.org/viewvc/incubator/cxf/branches/2.0.x-fixes/rt/core/src/main/java/org/apache/cxf/service/factory/AbstractServiceFactoryBean.java?rev=619037&r1=619036&r2=619037&view=diff
==============================================================================
--- incubator/cxf/branches/2.0.x-fixes/rt/core/src/main/java/org/apache/cxf/service/factory/AbstractServiceFactoryBean.java
(original)
+++ incubator/cxf/branches/2.0.x-fixes/rt/core/src/main/java/org/apache/cxf/service/factory/AbstractServiceFactoryBean.java
Wed Feb  6 07:53:41 2008
@@ -52,7 +52,13 @@
     }
 
     public DataBinding getDataBinding() {
+        if (dataBinding == null) {
+            dataBinding = createDefaultDataBinding();
+        }
         return dataBinding;
+    }
+    protected DataBinding createDefaultDataBinding() {
+        return null;
     }
 
     public void setDataBinding(DataBinding dataBinding) {

Modified: incubator/cxf/branches/2.0.x-fixes/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/ReflectionServiceFactoryBean.java
URL: http://svn.apache.org/viewvc/incubator/cxf/branches/2.0.x-fixes/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/ReflectionServiceFactoryBean.java?rev=619037&r1=619036&r2=619037&view=diff
==============================================================================
--- incubator/cxf/branches/2.0.x-fixes/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/ReflectionServiceFactoryBean.java
(original)
+++ incubator/cxf/branches/2.0.x-fixes/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/ReflectionServiceFactoryBean.java
Wed Feb  6 07:53:41 2008
@@ -48,6 +48,7 @@
 import org.apache.cxf.common.logging.LogUtils;
 import org.apache.cxf.common.xmlschema.SchemaCollection;
 import org.apache.cxf.common.xmlschema.XmlSchemaTools;
+import org.apache.cxf.databinding.DataBinding;
 import org.apache.cxf.endpoint.Endpoint;
 import org.apache.cxf.endpoint.EndpointException;
 import org.apache.cxf.endpoint.EndpointImpl;
@@ -139,8 +140,6 @@
     public ReflectionServiceFactoryBean() {
         getServiceConfigurations().add(0, new DefaultServiceConfiguration());
 
-        setDataBinding(new JAXBDataBinding(getQualifyWrapperSchema()));
-
         ignoredClasses.add("java.lang.Object");
         ignoredClasses.add("java.lang.Throwable");
         ignoredClasses.add("org.omg.CORBA_2_3.portable.ObjectImpl");
@@ -148,7 +147,12 @@
         ignoredClasses.add("javax.ejb.EJBObject");
         ignoredClasses.add("javax.rmi.CORBA.Stub");
     }
-
+    
+     
+    protected DataBinding createDefaultDataBinding() {
+        return new JAXBDataBinding(getQualifyWrapperSchema());
+    }
+    
     @Override
     public Service create() {
         initializeServiceConfigurations();

Modified: incubator/cxf/branches/2.0.x-fixes/rt/transports/http-jetty/src/test/java/org/apache/cxf/transport/http_jetty/JettyHTTPDestinationTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/branches/2.0.x-fixes/rt/transports/http-jetty/src/test/java/org/apache/cxf/transport/http_jetty/JettyHTTPDestinationTest.java?rev=619037&r1=619036&r2=619037&view=diff
==============================================================================
--- incubator/cxf/branches/2.0.x-fixes/rt/transports/http-jetty/src/test/java/org/apache/cxf/transport/http_jetty/JettyHTTPDestinationTest.java
(original)
+++ incubator/cxf/branches/2.0.x-fixes/rt/transports/http-jetty/src/test/java/org/apache/cxf/transport/http_jetty/JettyHTTPDestinationTest.java
Wed Feb  6 07:53:41 2008
@@ -609,6 +609,7 @@
                 EasyMock.expect(request.getPathInfo()).andReturn("/foo");
                 EasyMock.expect(request.getCharacterEncoding()).andReturn("UTF-8");
                 EasyMock.expect(request.getQueryString()).andReturn(query);            
+                EasyMock.expect(request.getHeader("Accept")).andReturn("*/*");  
                 EasyMock.expect(request.getContentType()).andReturn("text/xml charset=utf8");
                 
                 HttpFields httpFields = new HttpFields();

Modified: incubator/cxf/branches/2.0.x-fixes/systests/src/test/java/org/apache/cxf/systest/rest/RestClientServerBookTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/branches/2.0.x-fixes/systests/src/test/java/org/apache/cxf/systest/rest/RestClientServerBookTest.java?rev=619037&r1=619036&r2=619037&view=diff
==============================================================================
--- incubator/cxf/branches/2.0.x-fixes/systests/src/test/java/org/apache/cxf/systest/rest/RestClientServerBookTest.java
(original)
+++ incubator/cxf/branches/2.0.x-fixes/systests/src/test/java/org/apache/cxf/systest/rest/RestClientServerBookTest.java
Wed Feb  6 07:53:41 2008
@@ -47,7 +47,7 @@
 
     @BeforeClass
     public static void startServers() throws Exception {
-        assertTrue("server did not launch correctly", launchServer(BookServer.class, true));
+        assertTrue("server did not launch correctly", launchServer(BookServer.class));
     }
 
     @Test
@@ -114,9 +114,10 @@
         InputStream expected = getClass()
             .getResourceAsStream("resources/expected_get_book123_xmlwrapped.txt");
 
-        String expectedString = getStringFromInputStream(expected);
+        String expectedString = getStringFromInputStream(expected).trim();
+        String newString = getStringFromInputStream(in).trim();
         //System.out.println("---" + getStringFromInputStream(in));
-        assertEquals(expectedString, expectedString, getStringFromInputStream(in)); 
+        assertEquals(expectedString, expectedString, newString); 
     }
     
     @Test

Modified: incubator/cxf/branches/2.0.x-fixes/systests/src/test/java/org/apache/cxf/systest/rest/resources/expected_get_book123_xmlwrapped.txt
URL: http://svn.apache.org/viewvc/incubator/cxf/branches/2.0.x-fixes/systests/src/test/java/org/apache/cxf/systest/rest/resources/expected_get_book123_xmlwrapped.txt?rev=619037&r1=619036&r2=619037&view=diff
==============================================================================
--- incubator/cxf/branches/2.0.x-fixes/systests/src/test/java/org/apache/cxf/systest/rest/resources/expected_get_book123_xmlwrapped.txt
(original)
+++ incubator/cxf/branches/2.0.x-fixes/systests/src/test/java/org/apache/cxf/systest/rest/resources/expected_get_book123_xmlwrapped.txt
Wed Feb  6 07:53:41 2008
@@ -1 +1 @@
-<ns1:getBookResponse xmlns:ns1="http://book.customer.cxf.apache.org/"><ns2:Book
xmlns:ns2="http://book.customer.cxf.apache.org/" xmlns="http://book.acme.com"><id>123</id><name>CXF
in Action</name></ns2:Book></ns1:getBookResponse>
\ No newline at end of file
+<ns1:getBookResponse xmlns:ns1="http://book.customer.cxf.apache.org/"><Book xmlns:ns2="http://book.acme.com"><ns2:id>123</ns2:id><ns2:name>CXF
in Action</ns2:name></Book></ns1:getBookResponse>



Mime
View raw message