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/08/09 02:35:33 UTC

svn commit: r684164 - in /cxf/branches/2.0.x-fixes: ./ rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/ rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/ rt/frontend/simple/src/test/java/org/apache/cxf/service/fact...

Author: dkulp
Date: Fri Aug  8 17:35:32 2008
New Revision: 684164

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

........
  r684099 | dkulp | 2008-08-08 17:20:43 -0400 (Fri, 08 Aug 2008) | 3 lines
  
  [CXF-1657, CXF-1737] Fix bug with on-ways in wsdl causing simple frontend to NPE and possible problem in checking for faults with an empty message
  Also make sure OperationResourceInfo thing is set in JAXRS
........

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/CheckFaultInterceptor.java
    cxf/branches/2.0.x-fixes/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/ReflectionServiceFactoryBean.java
    cxf/branches/2.0.x-fixes/rt/frontend/simple/src/test/java/org/apache/cxf/service/factory/RountripTest.java

Propchange: cxf/branches/2.0.x-fixes/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Aug  8 17:35:32 2008
@@ -1 +1 @@
-/cxf/trunk:673548,674485,674547,674551,674562,674601,674649,674764,674887,675644,675653,677048,677385,678004,678009,678559,678629,678808,678852,678891,678893,679248,679597,680435,681060,681165,681813,681816,682902,682951,683089,683290,683318
+/cxf/trunk:673548,674485,674547,674551,674562,674601,674649,674764,674887,675644,675653,677048,677385,678004,678009,678559,678629,678808,678852,678891,678893,679248,679597,680435,681060,681165,681813,681816,682902,682951,683089,683290,683318,684099

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/CheckFaultInterceptor.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/CheckFaultInterceptor.java?rev=684164&r1=684163&r2=684164&view=diff
==============================================================================
--- cxf/branches/2.0.x-fixes/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/CheckFaultInterceptor.java (original)
+++ cxf/branches/2.0.x-fixes/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/CheckFaultInterceptor.java Fri Aug  8 17:35:32 2008
@@ -54,6 +54,10 @@
                 && xmlReader.hasNext()) {
                 x = xmlReader.next();
             }
+            if (!xmlReader.hasNext()) {
+                //end of document, just return
+                return;
+            }
         } catch (XMLStreamException e) {
             throw new SoapFault(new Message("XML_STREAM_EXC", LOG), e, 
                                 message.getVersion().getSender());

Modified: 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/cxf/branches/2.0.x-fixes/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/ReflectionServiceFactoryBean.java?rev=684164&r1=684163&r2=684164&view=diff
==============================================================================
--- cxf/branches/2.0.x-fixes/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/ReflectionServiceFactoryBean.java (original)
+++ cxf/branches/2.0.x-fixes/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/ReflectionServiceFactoryBean.java Fri Aug  8 17:35:32 2008
@@ -585,7 +585,8 @@
         Class paramType = method.getReturnType();
         Type genericType = method.getGenericReturnType();
 
-        if (!initializeParameter(o, method, -1, paramType, genericType)) {
+        if (o.hasOutput()
+            && !initializeParameter(o, method, -1, paramType, genericType)) {
             return false;
         }
 

Modified: cxf/branches/2.0.x-fixes/rt/frontend/simple/src/test/java/org/apache/cxf/service/factory/RountripTest.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.0.x-fixes/rt/frontend/simple/src/test/java/org/apache/cxf/service/factory/RountripTest.java?rev=684164&r1=684163&r2=684164&view=diff
==============================================================================
--- cxf/branches/2.0.x-fixes/rt/frontend/simple/src/test/java/org/apache/cxf/service/factory/RountripTest.java (original)
+++ cxf/branches/2.0.x-fixes/rt/frontend/simple/src/test/java/org/apache/cxf/service/factory/RountripTest.java Fri Aug  8 17:35:32 2008
@@ -18,12 +18,16 @@
  */
 package org.apache.cxf.service.factory;
 
+import javax.xml.namespace.QName;
+
 import org.apache.cxf.endpoint.ClientImpl;
 import org.apache.cxf.frontend.ClientFactoryBean;
 import org.apache.cxf.frontend.ClientProxyFactoryBean;
 import org.apache.cxf.frontend.ServerFactoryBean;
 import org.apache.cxf.interceptor.LoggingInInterceptor;
 import org.apache.cxf.interceptor.LoggingOutInterceptor;
+import org.apache.hello_world_doc_lit.Greeter;
+import org.apache.hello_world_doc_lit.GreeterImplDoc;
 import org.junit.Test;
 
 public class RountripTest extends AbstractSimpleFrontendTest {
@@ -34,6 +38,7 @@
         svrBean.setAddress("http://localhost/Hello");
         svrBean.setTransportId("http://schemas.xmlsoap.org/soap/http");
         svrBean.setServiceBean(new HelloServiceImpl());
+        svrBean.setServiceClass(HelloService.class);        
         svrBean.setBus(getBus());
         
         svrBean.create();
@@ -53,5 +58,23 @@
         c.getInInterceptors().add(new LoggingInInterceptor());
         
         assertEquals("hello", client.sayHello());
+        assertEquals("hello", client.echo("hello"));
+    }
+
+    @Test
+    public void testOneWay() throws Exception {
+        ServerFactoryBean svrBean = new ServerFactoryBean();
+        svrBean.setAddress("http://localhost/Hello2");
+        svrBean.setTransportId("http://schemas.xmlsoap.org/soap/http");
+        svrBean.setServiceBean(new GreeterImplDoc());
+        svrBean.setServiceClass(Greeter.class);
+        svrBean.setEndpointName(new QName("http://apache.org/hello_world_doc_lit",
+                                        "SoapPort"));
+        svrBean.setServiceName(new QName("http://apache.org/hello_world_doc_lit",
+                                         "SOAPService"));
+        svrBean.setWsdlLocation("testutils/hello_world_doc_lit.wsdl");
+        svrBean.setBus(getBus());
+        
+        svrBean.create();
     }
 }