cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r890612 - in /cxf/branches/2.2.x-fixes: ./ rt/core/src/main/java/org/apache/cxf/interceptor/ systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/addr_fromjava/ systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/addr_fromjava/se...
Date Tue, 15 Dec 2009 02:52:11 GMT
Author: dkulp
Date: Tue Dec 15 02:52:10 2009
New Revision: 890612

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

........
  r890465 | dkulp | 2009-12-14 15:05:02 -0500 (Mon, 14 Dec 2009) | 2 lines
  
  [CXF-2035] Make sure the element name matches the operation defined by
  the Actions
........

Modified:
    cxf/branches/2.2.x-fixes/   (props changed)
    cxf/branches/2.2.x-fixes/rt/core/src/main/java/org/apache/cxf/interceptor/DocLiteralInInterceptor.java
    cxf/branches/2.2.x-fixes/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/addr_fromjava/WSAFromJavaTest.java
    cxf/branches/2.2.x-fixes/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/addr_fromjava/server/AddNumberImpl.java

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

Modified: cxf/branches/2.2.x-fixes/rt/core/src/main/java/org/apache/cxf/interceptor/DocLiteralInInterceptor.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.2.x-fixes/rt/core/src/main/java/org/apache/cxf/interceptor/DocLiteralInInterceptor.java?rev=890612&r1=890611&r2=890612&view=diff
==============================================================================
--- cxf/branches/2.2.x-fixes/rt/core/src/main/java/org/apache/cxf/interceptor/DocLiteralInInterceptor.java
(original)
+++ cxf/branches/2.2.x-fixes/rt/core/src/main/java/org/apache/cxf/interceptor/DocLiteralInInterceptor.java
Tue Dec 15 02:52:10 2009
@@ -99,7 +99,7 @@
                 // Determine if there is a wrapper class
                 if (msgInfo.getMessageParts().get(0).getTypeClass() != null) {
                     QName startQName = xmlReader.getName();
-                    if (client && !msgInfo.getMessageParts().get(0).getConcreteName().equals(startQName))
{
+                    if (!msgInfo.getMessageParts().get(0).getConcreteName().equals(startQName))
{
                         throw new Fault("UNEXPECTED_WRAPPER_ELEMENT", LOG, null, startQName,
                                         msgInfo.getMessageParts().get(0).getConcreteName());
                     }

Modified: cxf/branches/2.2.x-fixes/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/addr_fromjava/WSAFromJavaTest.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.2.x-fixes/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/addr_fromjava/WSAFromJavaTest.java?rev=890612&r1=890611&r2=890612&view=diff
==============================================================================
--- cxf/branches/2.2.x-fixes/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/addr_fromjava/WSAFromJavaTest.java
(original)
+++ cxf/branches/2.2.x-fixes/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/addr_fromjava/WSAFromJavaTest.java
Tue Dec 15 02:52:10 2009
@@ -150,4 +150,20 @@
 
         return service.getAddNumberImplPort();
     }
+    
+    @Test 
+    public void testUnmatchedActions() throws Exception {
+        AddNumberImpl port = getPort();
+
+        BindingProvider bp = (BindingProvider)port;
+        java.util.Map<String, Object> requestContext = bp.getRequestContext();
+        requestContext.put(BindingProvider.SOAPACTION_URI_PROPERTY,
+                           "http://cxf.apache.org/input4");
+        try {
+            //CXF-2035 
+            port.addNumbers3(-1, -1); 
+        } catch (Exception e) {
+            assertTrue(e.getMessage().contains("Unexpected wrapper"));
+        }
+    }
 }
\ No newline at end of file

Modified: cxf/branches/2.2.x-fixes/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/addr_fromjava/server/AddNumberImpl.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.2.x-fixes/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/addr_fromjava/server/AddNumberImpl.java?rev=890612&r1=890611&r2=890612&view=diff
==============================================================================
--- cxf/branches/2.2.x-fixes/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/addr_fromjava/server/AddNumberImpl.java
(original)
+++ cxf/branches/2.2.x-fixes/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/addr_fromjava/server/AddNumberImpl.java
Tue Dec 15 02:52:10 2009
@@ -19,6 +19,7 @@
 
 package org.apache.cxf.systest.ws.addr_fromjava.server;
 
+import javax.jws.WebMethod;
 import javax.jws.WebService;
 import javax.xml.ws.Action;
 import javax.xml.ws.FaultAction;
@@ -43,10 +44,19 @@
     @Action(input = "http://cxf.apache.org/input3", output = "http://cxf.apache.org/output3",
             fault = {@FaultAction(className = AddNumbersException.class, 
                                   value = "http://cxf.apache.org/fault3") })
+    @WebMethod(action = "http://cxf.apache.org/input3")                                 

     public int addNumbers3(int number1, int number2) throws AddNumbersException {
         return execute(number1, number2);
     }
 
+    @Action(input = "http://cxf.apache.org/input4", output = "http://cxf.apache.org/output4",
+            fault = {@FaultAction(className = AddNumbersException.class, 
+                                  value = "http://cxf.apache.org/fault4") })
+    @WebMethod(action = "http://cxf.apache.org/input4")                                 

+    public int addNumbers4(int number1, int number2) throws AddNumbersException {
+        return number1 + number2;
+    }
+    
     int execute(int number1, int number2) throws AddNumbersException {
         if (number1 < 0 || number2 < 0) {
             throw new AddNumbersException("Negative numbers can't be added!",



Mime
View raw message