cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r1245103 - in /cxf/branches/2.4.x-fixes: ./ rt/core/src/main/java/org/apache/cxf/interceptor/ rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/context/ systests/jaxws/src/test/java/org/apache/cxf/systest/provider/
Date Thu, 16 Feb 2012 17:57:37 GMT
Author: dkulp
Date: Thu Feb 16 17:57:37 2012
New Revision: 1245103

URL: http://svn.apache.org/viewvc?rev=1245103&view=rev
Log:
Merged revisions 1245077 via  svn merge from
https://svn.apache.org/repos/asf/cxf/branches/2.5.x-fixes

........
  r1245077 | dkulp | 2012-02-16 11:54:19 -0500 (Thu, 16 Feb 2012) | 10 lines
  
  Merged revisions ミ via  git cherry-pick from
  https://svn.apache.org/repos/asf/cxf/trunk
  
  ........
    r1245072 | dkulp | 2012-02-16 11:42:05 -0500 (Thu, 16 Feb 2012) | 3 lines
  
    [CXF-4115] Make sure operation name given to provider either matches the
    payload or is null.
  
  ........
........

Modified:
    cxf/branches/2.4.x-fixes/   (props changed)
    cxf/branches/2.4.x-fixes/rt/core/src/main/java/org/apache/cxf/interceptor/AbstractInDatabindingInterceptor.java
    cxf/branches/2.4.x-fixes/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/context/WrappedMessageContext.java
    cxf/branches/2.4.x-fixes/systests/jaxws/src/test/java/org/apache/cxf/systest/provider/HWSoapMessageProvider.java
    cxf/branches/2.4.x-fixes/systests/jaxws/src/test/java/org/apache/cxf/systest/provider/ProviderRPCClientServerTest.java

Propchange: cxf/branches/2.4.x-fixes/
            ('svn:mergeinfo' removed)

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

Modified: cxf/branches/2.4.x-fixes/rt/core/src/main/java/org/apache/cxf/interceptor/AbstractInDatabindingInterceptor.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.4.x-fixes/rt/core/src/main/java/org/apache/cxf/interceptor/AbstractInDatabindingInterceptor.java?rev=1245103&r1=1245102&r2=1245103&view=diff
==============================================================================
--- cxf/branches/2.4.x-fixes/rt/core/src/main/java/org/apache/cxf/interceptor/AbstractInDatabindingInterceptor.java
(original)
+++ cxf/branches/2.4.x-fixes/rt/core/src/main/java/org/apache/cxf/interceptor/AbstractInDatabindingInterceptor.java
Thu Feb 16 17:57:37 2012
@@ -141,6 +141,8 @@ public abstract class AbstractInDatabind
                                               Message message) {
         Endpoint ep = exchange.get(Endpoint.class);
         MessagePartInfo lastChoice = null;
+        BindingOperationInfo lastBoi = null;
+        BindingMessageInfo lastMsgInfo = null;
         BindingMessageInfo msgInfo = null;
         BindingOperationInfo boi = null;
         for (Iterator<OperationInfo> itr = operations.iterator(); itr.hasNext();) {
@@ -181,12 +183,15 @@ public abstract class AbstractInDatabind
 
             if (XSD_ANY.equals(p.getTypeQName())) {
                 lastChoice = p;
+                lastBoi = boi;
+                lastMsgInfo = msgInfo;
             } else {
                 itr.remove();
             }
         }
         if (lastChoice != null) {
-            setMessage(message, boi, client, boi.getBinding().getService(), msgInfo.getMessageInfo());
+            setMessage(message, lastBoi, client, lastBoi.getBinding().getService(), 
+                       lastMsgInfo.getMessageInfo());
         }
         return lastChoice;
     }    
@@ -196,12 +201,16 @@ public abstract class AbstractInDatabind
         message.put(MessageInfo.class, msgInfo);
 
         Exchange ex = message.getExchange();
+        
         ex.put(BindingOperationInfo.class, operation);
         ex.put(OperationInfo.class, operation.getOperationInfo());
         ex.setOneWay(operation.getOperationInfo().isOneWay());
 
         //Set standard MessageContext properties required by JAX_WS, but not specific to
JAX_WS.
-        message.put(Message.WSDL_OPERATION, operation.getName());
+        boolean synthetic = operation.getProperty("operation.is.synthetic") == Boolean.TRUE;
+        if (!synthetic) {
+            message.put(Message.WSDL_OPERATION, operation.getName());
+        }
 
         QName serviceQName = si.getName();
         message.put(Message.WSDL_SERVICE, serviceQName);

Modified: cxf/branches/2.4.x-fixes/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/context/WrappedMessageContext.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.4.x-fixes/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/context/WrappedMessageContext.java?rev=1245103&r1=1245102&r2=1245103&view=diff
==============================================================================
--- cxf/branches/2.4.x-fixes/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/context/WrappedMessageContext.java
(original)
+++ cxf/branches/2.4.x-fixes/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/context/WrappedMessageContext.java
Thu Feb 16 17:57:37 2012
@@ -258,7 +258,7 @@ public class WrappedMessageContext imple
                 }
             } else if (Message.WSDL_OPERATION.equals(key)) {
                 BindingOperationInfo boi = getBindingOperationInfo(exchange);
-                if (boi != null) {
+                if (boi != null && boi.getProperty("operation.is.synthetic") != Boolean.TRUE)
{
                     ret = boi.getName();
                 }
             } else if (Message.WSDL_SERVICE.equals(key)) {

Modified: cxf/branches/2.4.x-fixes/systests/jaxws/src/test/java/org/apache/cxf/systest/provider/HWSoapMessageProvider.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.4.x-fixes/systests/jaxws/src/test/java/org/apache/cxf/systest/provider/HWSoapMessageProvider.java?rev=1245103&r1=1245102&r2=1245103&view=diff
==============================================================================
--- cxf/branches/2.4.x-fixes/systests/jaxws/src/test/java/org/apache/cxf/systest/provider/HWSoapMessageProvider.java
(original)
+++ cxf/branches/2.4.x-fixes/systests/jaxws/src/test/java/org/apache/cxf/systest/provider/HWSoapMessageProvider.java
Thu Feb 16 17:57:37 2012
@@ -21,7 +21,6 @@ package org.apache.cxf.systest.provider;
 import java.io.InputStream;
 import java.util.Iterator;
 
-import javax.annotation.Resource;
 import javax.jws.HandlerChain;
 import javax.xml.namespace.QName;
 import javax.xml.soap.AttachmentPart;
@@ -31,9 +30,7 @@ import javax.xml.soap.SOAPMessage;
 import javax.xml.ws.Provider;
 import javax.xml.ws.Service;
 import javax.xml.ws.ServiceMode;
-import javax.xml.ws.WebServiceContext;
 import javax.xml.ws.WebServiceProvider;
-import javax.xml.ws.handler.MessageContext;
 
 import org.w3c.dom.Node;
 
@@ -52,9 +49,6 @@ public class HWSoapMessageProvider imple
     private static QName sayHi = new QName("http://apache.org/hello_world_rpclit", "sayHi");
     private static QName greetMe = new QName("http://apache.org/hello_world_rpclit", "greetMe");
     
-    @Resource 
-    WebServiceContext ctx;
-
     
     private SOAPMessage sayHiResponse;
     private SOAPMessage greetMeResponse;
@@ -75,11 +69,6 @@ public class HWSoapMessageProvider imple
     }
     
     public SOAPMessage invoke(SOAPMessage request) {
-        QName qn = (QName)ctx.getMessageContext().get(MessageContext.WSDL_OPERATION);
-        if (qn == null) {
-            throw new RuntimeException("No Operation Name");
-        }
-        
         SOAPMessage response = null;        
         try {
             SOAPBody body = request.getSOAPBody();

Modified: cxf/branches/2.4.x-fixes/systests/jaxws/src/test/java/org/apache/cxf/systest/provider/ProviderRPCClientServerTest.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.4.x-fixes/systests/jaxws/src/test/java/org/apache/cxf/systest/provider/ProviderRPCClientServerTest.java?rev=1245103&r1=1245102&r2=1245103&view=diff
==============================================================================
--- cxf/branches/2.4.x-fixes/systests/jaxws/src/test/java/org/apache/cxf/systest/provider/ProviderRPCClientServerTest.java
(original)
+++ cxf/branches/2.4.x-fixes/systests/jaxws/src/test/java/org/apache/cxf/systest/provider/ProviderRPCClientServerTest.java
Thu Feb 16 17:57:37 2012
@@ -43,7 +43,7 @@ public class ProviderRPCClientServerTest
     
     @BeforeClass
     public static void startServers() throws Exception {
-        assertTrue("server did not launch correctly", launchServer(Server.class));
+        assertTrue("server did not launch correctly", launchServer(Server.class, true));
     }
     
     @Test



Mime
View raw message