cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r1372455 - in /cxf/trunk: api/src/main/java/org/apache/cxf/interceptor/ rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/ rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/support/
Date Mon, 13 Aug 2012 15:02:14 GMT
Author: dkulp
Date: Mon Aug 13 15:02:14 2012
New Revision: 1372455

URL: http://svn.apache.org/viewvc?rev=1372455&view=rev
Log:
Split handling of validation of parts from doc-lit-bare forcing as they are two separate things.

Modified:
    cxf/trunk/api/src/main/java/org/apache/cxf/interceptor/DocLiteralInInterceptor.java
    cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/JaxWsServerFactoryBean.java
    cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/ServiceImpl.java
    cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/support/JaxWsServiceFactoryBean.java

Modified: cxf/trunk/api/src/main/java/org/apache/cxf/interceptor/DocLiteralInInterceptor.java
URL: http://svn.apache.org/viewvc/cxf/trunk/api/src/main/java/org/apache/cxf/interceptor/DocLiteralInInterceptor.java?rev=1372455&r1=1372454&r2=1372455&view=diff
==============================================================================
--- cxf/trunk/api/src/main/java/org/apache/cxf/interceptor/DocLiteralInInterceptor.java (original)
+++ cxf/trunk/api/src/main/java/org/apache/cxf/interceptor/DocLiteralInInterceptor.java Mon
Aug 13 15:02:14 2012
@@ -193,13 +193,15 @@ public class DocLiteralInInterceptor ext
                         p = findMessagePart(exchange, operations, elName, client, paramNum,
message);
                     }
                     
-                    //Make sure the elName found on the wire is actually OK for 
-                    //the purpose we need it
-                    validatePart(p, elName, message);
+                    boolean dlb = Boolean.TRUE.equals(si.getProperty("soap.force.doclit.bare"));
+                    if (!dlb) {
+                        //Make sure the elName found on the wire is actually OK for 
+                        //the purpose we need it
+                        validatePart(p, elName, message);
+                    }
              
                     o = dr.read(p, xmlReader);
-                    if (MessageUtils.getContextualBoolean(message, "soap.force.doclit.bare",
false) 
-                        && parameters.isEmpty()) {
+                    if (dlb && parameters.isEmpty()) {
                         // webservice provider does not need to ensure size
                         parameters.add(o);
                     } else {
@@ -239,13 +241,16 @@ public class DocLiteralInInterceptor ext
             }
         }
         
-        if (MessageUtils.getContextualBoolean(m, "soap.force.doclit.bare", false)) {
+        if (MessageUtils.getContextualBoolean(m, "soap.no.validate.parts", false)) {
             // something like a Provider service or similar that is forcing a
             // doc/lit/bare on an endpoint that may not really be doc/lit/bare.  
             // we need to just let these through per spec so the endpoint
             // can process it
             synth = true;
         }
+        if (synth) {
+            return;
+        }
         if (p.isElement()) {
             if (p.getConcreteName() != null
                 && !elName.equals(p.getConcreteName())

Modified: cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/JaxWsServerFactoryBean.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/JaxWsServerFactoryBean.java?rev=1372455&r1=1372454&r2=1372455&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/JaxWsServerFactoryBean.java
(original)
+++ cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/JaxWsServerFactoryBean.java
Mon Aug 13 15:02:14 2012
@@ -49,6 +49,7 @@ import org.apache.cxf.service.invoker.In
 import org.apache.cxf.service.invoker.SingletonFactory;
 import org.apache.cxf.service.model.BindingInfo;
 import org.apache.cxf.service.model.BindingOperationInfo;
+import org.apache.cxf.service.model.EndpointInfo;
 
 /**
  * Bean to help easily create Server endpoints for JAX-WS.
@@ -183,6 +184,9 @@ public class JaxWsServerFactoryBean exte
         if (implInfo.isWebServiceProvider()) {
             bindingInfo.getService().setProperty("soap.force.doclit.bare", Boolean.TRUE);
             if (this.getServiceFactory().isPopulateFromClass()) {
+                for (EndpointInfo ei : bindingInfo.getService().getEndpoints()) {
+                    ei.setProperty("soap.no.validate.parts", Boolean.TRUE);
+                }
                 //Provider, but no wsdl.  Synthetic ops
                 for (BindingOperationInfo op : bindingInfo.getOperations()) {
                     op.setProperty("operation.is.synthetic", Boolean.TRUE);

Modified: cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/ServiceImpl.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/ServiceImpl.java?rev=1372455&r1=1372454&r2=1372455&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/ServiceImpl.java (original)
+++ cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/ServiceImpl.java Mon Aug
13 15:02:14 2012
@@ -290,6 +290,11 @@ public class ServiceImpl extends Service
         configureObject(dispatchService);
         for (ServiceInfo si : dispatchService.getServiceInfos()) {
             si.setProperty("soap.force.doclit.bare", Boolean.TRUE);
+            if (null == wsdlURL) {
+                for (EndpointInfo ei : si.getEndpoints()) {
+                    ei.setProperty("soap.no.validate.parts", Boolean.TRUE);
+                }
+            }
         }
         return serviceFactory;
     }    

Modified: cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/support/JaxWsServiceFactoryBean.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/support/JaxWsServiceFactoryBean.java?rev=1372455&r1=1372454&r2=1372455&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/support/JaxWsServiceFactoryBean.java
(original)
+++ cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/support/JaxWsServiceFactoryBean.java
Mon Aug 13 15:02:14 2012
@@ -324,6 +324,11 @@ public class JaxWsServiceFactoryBean ext
             // Bind every operation to the invoke method.
             for (ServiceInfo si : getService().getServiceInfos()) {
                 si.setProperty("soap.force.doclit.bare", Boolean.TRUE);
+                if (!isFromWsdl()) {
+                    for (EndpointInfo ei : si.getEndpoints()) {
+                        ei.setProperty("soap.no.validate.parts", Boolean.TRUE);
+                    }
+                }
                 for (BindingInfo bind : si.getBindings()) {
                     for (BindingOperationInfo bop : bind.getOperations()) {
                         OperationInfo o = bop.getOperationInfo();



Mime
View raw message