cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a.@apache.org
Subject svn commit: r1445075 - in /cxf/branches/2.5.x-fixes: ./ rt/core/src/main/java/org/apache/cxf/interceptor/ rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/interceptors/ systests/jaxws/src/test/java/org/apache/cxf/systest/provider/
Date Tue, 12 Feb 2013 09:43:19 GMT
Author: ay
Date: Tue Feb 12 09:43:19 2013
New Revision: 1445075

URL: http://svn.apache.org/r1445075
Log:
Merged revisions 1444988 via  svn merge from
https://svn.apache.org/repos/asf/cxf/branches/2.6.x-fixes

........
  r1444988 | ay | 2013-02-11 23:45:34 +0100 (Mon, 11 Feb 2013) | 17 lines
  
  Merged revisions 1444973 via  svn merge from
  https://svn.apache.org/repos/asf/cxf/branches/2.7.x-fixes
  
  ........
    r1444973 | ay | 2013-02-11 22:36:16 +0100 (Mon, 11 Feb 2013) | 9 lines
    
    Merged revisions 1444251 via  svn merge from
    https://svn.apache.org/repos/asf/cxf/trunk
    
    ........
      r1444251 | ay | 2013-02-08 22:52:55 +0100 (Fri, 08 Feb 2013) | 1 line
      
      [CXF-4812] NPE on MessageModeInInterceptor when sending empty SOAPBody
    ........
    
  ........
  
........

Added:
    cxf/branches/2.5.x-fixes/systests/jaxws/src/test/java/org/apache/cxf/systest/provider/NBProviderClientServerTest.java
      - copied unchanged from r1444988, cxf/branches/2.6.x-fixes/systests/jaxws/src/test/java/org/apache/cxf/systest/provider/NBProviderClientServerTest.java
    cxf/branches/2.5.x-fixes/systests/jaxws/src/test/java/org/apache/cxf/systest/provider/NBSoapMessageDocProvider.java
      - copied, changed from r1444988, cxf/branches/2.6.x-fixes/systests/jaxws/src/test/java/org/apache/cxf/systest/provider/NBSoapMessageDocProvider.java
Modified:
    cxf/branches/2.5.x-fixes/   (props changed)
    cxf/branches/2.5.x-fixes/rt/core/src/main/java/org/apache/cxf/interceptor/DocLiteralInInterceptor.java
    cxf/branches/2.5.x-fixes/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/interceptors/MessageModeInInterceptor.java

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

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

Modified: cxf/branches/2.5.x-fixes/rt/core/src/main/java/org/apache/cxf/interceptor/DocLiteralInInterceptor.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.5.x-fixes/rt/core/src/main/java/org/apache/cxf/interceptor/DocLiteralInInterceptor.java?rev=1445075&r1=1445074&r2=1445075&view=diff
==============================================================================
--- cxf/branches/2.5.x-fixes/rt/core/src/main/java/org/apache/cxf/interceptor/DocLiteralInInterceptor.java
(original)
+++ cxf/branches/2.5.x-fixes/rt/core/src/main/java/org/apache/cxf/interceptor/DocLiteralInInterceptor.java
Tue Feb 12 09:43:19 2013
@@ -30,6 +30,7 @@ import javax.xml.stream.XMLStreamConstan
 import javax.xml.stream.XMLStreamReader;
 
 import org.apache.cxf.common.logging.LogUtils;
+import org.apache.cxf.common.util.XMLSchemaQNames;
 import org.apache.cxf.databinding.DataReader;
 import org.apache.cxf.endpoint.Endpoint;
 import org.apache.cxf.message.Exchange;
@@ -156,17 +157,7 @@ public class DocLiteralInInterceptor ext
     
                 if (xmlReader == null || !StaxUtils.toNextElement(xmlReader)) {
                     // empty input
-    
-                    // TO DO : check duplicate operation with no input
-                    for (OperationInfo op : operations) {
-                        MessageInfo bmsg = op.getInput();
-                        if (bmsg.getMessageParts().size() == 0) {
-                            BindingOperationInfo boi = ep.getEndpointInfo().getBinding().getOperation(op);
-                            exchange.put(BindingOperationInfo.class, boi);
-                            exchange.put(OperationInfo.class, op);
-                            exchange.setOneWay(op.isOneWay());
-                        }
-                    }
+                    getBindingOperationForEmptyBody(operations, ep, exchange);
                     return;
                 }
     
@@ -225,7 +216,23 @@ public class DocLiteralInInterceptor ext
             throw f;
         }
     }
-    
+
+    private void getBindingOperationForEmptyBody(Collection<OperationInfo> operations,
Endpoint ep, Exchange exchange) {
+        // TO DO : check duplicate operation with no input and also check if the action matches

+        for (OperationInfo op : operations) {
+            MessageInfo bmsg = op.getInput();
+            List<MessagePartInfo> bparts = bmsg.getMessageParts();
+            if (bparts.size() == 0
+                || (bparts.size() == 1 
+                    && XMLSchemaQNames.XSD_ANY.equals(bparts.get(0).getTypeQName())))
{
+                BindingOperationInfo boi = ep.getEndpointInfo().getBinding().getOperation(op);
+                exchange.put(BindingOperationInfo.class, boi);
+                exchange.put(OperationInfo.class, op);
+                exchange.setOneWay(op.isOneWay());
+            }
+        }
+    }
+
     private void validatePart(MessagePartInfo p, QName elName, Message m) {
         if (p == null) {
             throw new Fault(new org.apache.cxf.common.i18n.Message("NO_PART_FOUND", LOG,
elName),

Modified: cxf/branches/2.5.x-fixes/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/interceptors/MessageModeInInterceptor.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.5.x-fixes/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/interceptors/MessageModeInInterceptor.java?rev=1445075&r1=1445074&r2=1445075&view=diff
==============================================================================
--- cxf/branches/2.5.x-fixes/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/interceptors/MessageModeInInterceptor.java
(original)
+++ cxf/branches/2.5.x-fixes/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/interceptors/MessageModeInInterceptor.java
Tue Feb 12 09:43:19 2013
@@ -68,8 +68,8 @@ public class MessageModeInInterceptor ex
     }
 
     public void handleMessage(Message message) throws Fault {
-        if (!bindingName.equals(message.getExchange().get(BindingOperationInfo.class)
-                               .getBinding().getName())) {
+        BindingOperationInfo bop = message.getExchange().get(BindingOperationInfo.class);

+        if (bop == null || !bindingName.equals(bop.getBinding().getName())) {
             return;
         }
         Object o = message.getContent(soapMsgClass);

Copied: cxf/branches/2.5.x-fixes/systests/jaxws/src/test/java/org/apache/cxf/systest/provider/NBSoapMessageDocProvider.java
(from r1444988, cxf/branches/2.6.x-fixes/systests/jaxws/src/test/java/org/apache/cxf/systest/provider/NBSoapMessageDocProvider.java)
URL: http://svn.apache.org/viewvc/cxf/branches/2.5.x-fixes/systests/jaxws/src/test/java/org/apache/cxf/systest/provider/NBSoapMessageDocProvider.java?p2=cxf/branches/2.5.x-fixes/systests/jaxws/src/test/java/org/apache/cxf/systest/provider/NBSoapMessageDocProvider.java&p1=cxf/branches/2.6.x-fixes/systests/jaxws/src/test/java/org/apache/cxf/systest/provider/NBSoapMessageDocProvider.java&r1=1444988&r2=1445075&rev=1445075&view=diff
==============================================================================
--- cxf/branches/2.6.x-fixes/systests/jaxws/src/test/java/org/apache/cxf/systest/provider/NBSoapMessageDocProvider.java
(original)
+++ cxf/branches/2.5.x-fixes/systests/jaxws/src/test/java/org/apache/cxf/systest/provider/NBSoapMessageDocProvider.java
Tue Feb 12 09:43:19 2013
@@ -30,8 +30,6 @@ import javax.xml.ws.Service;
 import javax.xml.ws.ServiceMode;
 import javax.xml.ws.WebServiceProvider;
 
-import org.apache.cxf.binding.soap.saaj.SAAJUtils;
-
 @WebServiceProvider(portName = "SoapProviderPort", serviceName = "SOAPProviderService",
                     targetNamespace = "http://apache.org/hello_world_soap_http")
 @ServiceMode(value = Service.Mode.MESSAGE)            
@@ -53,7 +51,7 @@ public class NBSoapMessageDocProvider im
     public SOAPMessage invoke(SOAPMessage request) {
         SOAPBody body = null;
         try {
-            body = SAAJUtils.getBody(request);
+            body = request.getSOAPBody();
         } catch (SOAPException e) {
             throw new RuntimeException("soap body expected");
         }



Mime
View raw message