cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ff...@apache.org
Subject svn commit: r505220 - in /incubator/cxf/trunk: rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/ systests/src/test/java/org/apache/cxf/systest/jaxws/ systests/src/test/java/org/apache/cxf/systest/ws/addressing/ testutils/src/main/java/org/a...
Date Fri, 09 Feb 2007 09:04:56 GMT
Author: ffang
Date: Fri Feb  9 01:04:55 2007
New Revision: 505220

URL: http://svn.apache.org/viewvc?view=rev&rev=505220
Log:
[CXF-365] Marshalling generated wrong value for null input parameter - add testNillable test
[CXF-404] Logging of failure to activate a JMS destination is too low
                        

Modified:
    incubator/cxf/trunk/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSDestination.java
    incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxws/ClientServerTest.java
    incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/addressing/GreeterImpl.java
    incubator/cxf/trunk/testutils/src/main/java/org/apache/hello_world_soap_http/AnotherDerivedGreeterImpl.java
    incubator/cxf/trunk/testutils/src/main/java/org/apache/hello_world_soap_http/DerivedGreeterImpl.java
    incubator/cxf/trunk/testutils/src/main/java/org/apache/hello_world_soap_http/GreeterImpl.java
    incubator/cxf/trunk/testutils/src/main/java/org/apache/hello_world_soap_http/NotAnnotatedGreeterImpl.java
    incubator/cxf/trunk/testutils/src/main/resources/wsdl/hello_world.wsdl

Modified: incubator/cxf/trunk/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSDestination.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSDestination.java?view=diff&rev=505220&r1=505219&r2=505220
==============================================================================
--- incubator/cxf/trunk/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSDestination.java
(original)
+++ incubator/cxf/trunk/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSDestination.java
Fri Feb  9 01:04:55 2007
@@ -112,9 +112,9 @@
             listenerThread = new JMSListenerThread(listenerSession);
             listenerThread.start();
         } catch (JMSException ex) {
-            getLogger().log(Level.FINE, "JMS connect failed with JMSException : ", ex);
+            getLogger().log(Level.SEVERE, "JMS connect failed with JMSException : ", ex);
         } catch (NamingException nex) {
-            getLogger().log(Level.FINE, "JMS connect failed with NamingException : ", nex);
+            getLogger().log(Level.SEVERE, "JMS connect failed with NamingException : ", nex);
         }
     }
     

Modified: incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxws/ClientServerTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxws/ClientServerTest.java?view=diff&rev=505220&r1=505219&r2=505220
==============================================================================
--- incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxws/ClientServerTest.java
(original)
+++ incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxws/ClientServerTest.java
Fri Feb  9 01:04:55 2007
@@ -103,6 +103,7 @@
         String response = new String("Bonjour");
         try {
             greeter.greetMe("test");
+            
             String reply = greeter.sayHi();
             assertNotNull("no response received from service", reply);
             assertEquals(response, reply);
@@ -113,7 +114,24 @@
         Map<String, Object> responseContext = bp.getResponseContext();
         Integer responseCode = (Integer) responseContext.get(Message.RESPONSE_CODE);    
   
         assertEquals(200, responseCode.intValue());
-    } 
+    }
+    
+    public void testNillable() throws Exception {
+        SOAPService service = new SOAPService();
+        assertNotNull(service);
+
+        Greeter greeter = service.getPort(portName, Greeter.class);
+
+        try {
+            String reply = greeter.testNillable("test", 100);
+            assertEquals("test", reply);
+            reply = greeter.testNillable(null, 100);
+            assertNull(reply);
+        } catch (UndeclaredThrowableException ex) {
+            throw (Exception)ex.getCause();
+        }
+
+    }
     
     public void testAddPort() throws Exception {
         Service service = Service.create(serviceName);

Modified: incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/addressing/GreeterImpl.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/addressing/GreeterImpl.java?view=diff&rev=505220&r1=505219&r2=505220
==============================================================================
--- incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/addressing/GreeterImpl.java
(original)
+++ incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/addressing/GreeterImpl.java
Fri Feb  9 01:04:55 2007
@@ -39,6 +39,7 @@
 import org.apache.hello_world_soap_http.types.NoSuchCodeLit;
 import org.apache.hello_world_soap_http.types.SayHiResponse;
 import org.apache.hello_world_soap_http.types.TestDocLitFaultResponse;
+import org.apache.hello_world_soap_http.types.TestNillableResponse;
 
 import static org.apache.cxf.ws.addressing.JAXWSAConstants.SERVER_ADDRESSING_PROPERTIES_INBOUND;
 
@@ -180,6 +181,22 @@
     public Response<SayHiResponse> sayHiAsync() { 
         return null; 
         /*not called */
+    }
+
+    public String testNillable(String nillElem, int intElem) {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    public Response<TestNillableResponse> testNillableAsync(String nillElem,
+                                                            int intElem) {
+        return null;
+    }
+    
+    public Future<?> testNillableAsync(String nillElem, 
+                                       int intElem,
+                                       AsyncHandler<TestNillableResponse> asyncHandler)
{
+        return null;
     }
     
 }

Modified: incubator/cxf/trunk/testutils/src/main/java/org/apache/hello_world_soap_http/AnotherDerivedGreeterImpl.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/testutils/src/main/java/org/apache/hello_world_soap_http/AnotherDerivedGreeterImpl.java?view=diff&rev=505220&r1=505219&r2=505220
==============================================================================
--- incubator/cxf/trunk/testutils/src/main/java/org/apache/hello_world_soap_http/AnotherDerivedGreeterImpl.java
(original)
+++ incubator/cxf/trunk/testutils/src/main/java/org/apache/hello_world_soap_http/AnotherDerivedGreeterImpl.java
Fri Feb  9 01:04:55 2007
@@ -34,6 +34,7 @@
 import org.apache.hello_world_soap_http.types.GreetMeSometimeResponse;
 import org.apache.hello_world_soap_http.types.SayHiResponse;
 import org.apache.hello_world_soap_http.types.TestDocLitFaultResponse;
+import org.apache.hello_world_soap_http.types.TestNillableResponse;
 
 
 @javax.jws.WebService(endpointInterface = "org.apache.hello_world_soap_http.Greeter")
@@ -184,5 +185,20 @@
         invocationCount.put(method, n + 1);
     }
 
+    public String testNillable(String nillElem, int intElem) {
+        // TODO Auto-generated method stub
+        return null;
+    }    
+    
+    public Response<TestNillableResponse> testNillableAsync(String nillElem,
+                                                            int intElem) {
+        return null;
+    }
+    
+    public Future<?> testNillableAsync(String nillElem, 
+                                       int intElem,
+                                       AsyncHandler<TestNillableResponse> asyncHandler)
{
+        return null;
+    }
 }
 

Modified: incubator/cxf/trunk/testutils/src/main/java/org/apache/hello_world_soap_http/DerivedGreeterImpl.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/testutils/src/main/java/org/apache/hello_world_soap_http/DerivedGreeterImpl.java?view=diff&rev=505220&r1=505219&r2=505220
==============================================================================
--- incubator/cxf/trunk/testutils/src/main/java/org/apache/hello_world_soap_http/DerivedGreeterImpl.java
(original)
+++ incubator/cxf/trunk/testutils/src/main/java/org/apache/hello_world_soap_http/DerivedGreeterImpl.java
Fri Feb  9 01:04:55 2007
@@ -34,6 +34,7 @@
 import org.apache.hello_world_soap_http.types.GreetMeSometimeResponse;
 import org.apache.hello_world_soap_http.types.SayHiResponse;
 import org.apache.hello_world_soap_http.types.TestDocLitFaultResponse;
+import org.apache.hello_world_soap_http.types.TestNillableResponse;
 
 
 @javax.jws.WebService(name = "Greeter", serviceName = "SOAPService",
@@ -185,4 +186,20 @@
         invocationCount.put(method, n + 1);
     }
 
+    public String testNillable(String nillElem, int intElem) {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    public Response<TestNillableResponse> testNillableAsync(String nillElem,
+                                                            int intElem) {
+        return null;
+    }
+    
+    public Future<?> testNillableAsync(String nillElem, 
+                                       int intElem,
+                                       AsyncHandler<TestNillableResponse> asyncHandler)
{
+        return null;
+    }
+    
 }

Modified: incubator/cxf/trunk/testutils/src/main/java/org/apache/hello_world_soap_http/GreeterImpl.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/testutils/src/main/java/org/apache/hello_world_soap_http/GreeterImpl.java?view=diff&rev=505220&r1=505219&r2=505220
==============================================================================
--- incubator/cxf/trunk/testutils/src/main/java/org/apache/hello_world_soap_http/GreeterImpl.java
(original)
+++ incubator/cxf/trunk/testutils/src/main/java/org/apache/hello_world_soap_http/GreeterImpl.java
Fri Feb  9 01:04:55 2007
@@ -41,6 +41,7 @@
 import org.apache.hello_world_soap_http.types.NoSuchCodeLit;
 import org.apache.hello_world_soap_http.types.SayHiResponse;
 import org.apache.hello_world_soap_http.types.TestDocLitFaultResponse;
+import org.apache.hello_world_soap_http.types.TestNillableResponse;
 
 @WebService(serviceName = "SOAPService",
             portName = "SoapPort",
@@ -203,5 +204,22 @@
     public int getInvocationCount() {
         return invocationCount;
     }
+
+    public String testNillable(String nillElem, int intElem) {
+        System.out.println("the testNillable is invoked");
+        return nillElem;
+    }
+
+    public Response<TestNillableResponse> testNillableAsync(String nillElem,
+                                                            int intElem) {
+        return null;
+    }
+    
+    public Future<?> testNillableAsync(String nillElem, 
+                                       int intElem,
+                                       AsyncHandler<TestNillableResponse> asyncHandler)
{
+        return null;
+    }
+    
 
 }

Modified: incubator/cxf/trunk/testutils/src/main/java/org/apache/hello_world_soap_http/NotAnnotatedGreeterImpl.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/testutils/src/main/java/org/apache/hello_world_soap_http/NotAnnotatedGreeterImpl.java?view=diff&rev=505220&r1=505219&r2=505220
==============================================================================
--- incubator/cxf/trunk/testutils/src/main/java/org/apache/hello_world_soap_http/NotAnnotatedGreeterImpl.java
(original)
+++ incubator/cxf/trunk/testutils/src/main/java/org/apache/hello_world_soap_http/NotAnnotatedGreeterImpl.java
Fri Feb  9 01:04:55 2007
@@ -33,6 +33,7 @@
 import org.apache.hello_world_soap_http.types.NoSuchCodeLit;
 import org.apache.hello_world_soap_http.types.SayHiResponse;
 import org.apache.hello_world_soap_http.types.TestDocLitFaultResponse;
+import org.apache.hello_world_soap_http.types.TestNillableResponse;
 
 
 
@@ -152,5 +153,22 @@
         res.setCompany("CXF");
         res.setId(1);
         return res;
+    }
+
+    public String testNillable(String nillElem, int intElem) {
+        // TODO Auto-generated method stub
+        return null;
     }    
+    
+    public Response<TestNillableResponse> testNillableAsync(String nillElem,
+                                                            int intElem) {
+        return null;
+    }
+    
+    public Future<?> testNillableAsync(String nillElem, 
+                                       int intElem,
+                                       AsyncHandler<TestNillableResponse> asyncHandler)
{
+        return null;
+    }
+    
 }

Modified: incubator/cxf/trunk/testutils/src/main/resources/wsdl/hello_world.wsdl
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/testutils/src/main/resources/wsdl/hello_world.wsdl?view=diff&rev=505220&r1=505219&r2=505220
==============================================================================
--- incubator/cxf/trunk/testutils/src/main/resources/wsdl/hello_world.wsdl (original)
+++ incubator/cxf/trunk/testutils/src/main/resources/wsdl/hello_world.wsdl Fri Feb  9 01:04:55
2007
@@ -50,6 +50,23 @@
                     </sequence>
                 </complexType>
             </element>
+
+            <element name="testNillable">
+                <complexType>
+                    <sequence>
+                        <element name="NillElem" nillable="true" type="string"/>
+                        <element name="intElem" type="int"/>
+                    </sequence>
+                </complexType>
+            </element>
+            <element name="testNillableResponse">
+                <complexType>
+                    <sequence>
+                        <element name="responseType" nillable="true" type="string"/>
+                    </sequence>
+                </complexType>
+            </element>
+
             <element name="greetMeLater">
                 <complexType>
                     <sequence>
@@ -159,6 +176,12 @@
     <wsdl:message name="greetMeResponse">
         <wsdl:part name="out" element="x1:greetMeResponse"/>
     </wsdl:message>
+    <wsdl:message name="testNillableRequest">
+        <wsdl:part name="in" element="x1:testNillable"/>
+    </wsdl:message>
+    <wsdl:message name="testNillableResponse">
+        <wsdl:part name="out" element="x1:testNillableResponse"/>
+    </wsdl:message>
     <wsdl:message name="greetMeLaterRequest">
         <wsdl:part name="in" element="x1:greetMeLater"/>
     </wsdl:message>
@@ -201,6 +224,10 @@
             <wsdl:input name="greetMeRequest" message="tns:greetMeRequest"/>
             <wsdl:output name="greetMeResponse" message="tns:greetMeResponse"/>
         </wsdl:operation>
+        <wsdl:operation name="testNillable">
+            <wsdl:input name="testNillableRequest" message="tns:testNillableRequest"/>
+            <wsdl:output name="testNillableResponse" message="tns:testNillableResponse"/>
+        </wsdl:operation>
         <wsdl:operation name="greetMeLater">
             <wsdl:input name="greetMeLaterRequest" message="tns:greetMeLaterRequest"/>
             <wsdl:output name="greetMeLaterResponse" message="tns:greetMeLaterResponse"/>
@@ -239,6 +266,15 @@
             </wsdl:output>
         </wsdl:operation>
         <wsdl:operation name="greetMe">
+            <soap:operation style="document"/>
+            <wsdl:input>
+                <soap:body use="literal"/>
+            </wsdl:input>
+            <wsdl:output>
+                <soap:body use="literal"/>
+            </wsdl:output>
+        </wsdl:operation>
+        <wsdl:operation name="testNillable">
             <soap:operation style="document"/>
             <wsdl:input>
                 <soap:body use="literal"/>



Mime
View raw message