cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r1372430 - /cxf/branches/2.6.x-fixes/api/src/main/java/org/apache/cxf/interceptor/DocLiteralInInterceptor.java
Date Mon, 13 Aug 2012 14:08:15 GMT
Author: dkulp
Date: Mon Aug 13 14:08:15 2012
New Revision: 1372430

URL: http://svn.apache.org/viewvc?rev=1372430&view=rev
Log:
Merged revisions 1372428 via  git cherry-pick from
https://svn.apache.org/repos/asf/cxf/trunk

........
  r1372428 | dkulp | 2012-08-13 10:06:17 -0400 (Mon, 13 Aug 2012) | 2 lines

  Use a contextual property check.  Slightly faster and provides broader ability to set it.

........

Modified:
    cxf/branches/2.6.x-fixes/api/src/main/java/org/apache/cxf/interceptor/DocLiteralInInterceptor.java

Modified: cxf/branches/2.6.x-fixes/api/src/main/java/org/apache/cxf/interceptor/DocLiteralInInterceptor.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.6.x-fixes/api/src/main/java/org/apache/cxf/interceptor/DocLiteralInInterceptor.java?rev=1372430&r1=1372429&r2=1372430&view=diff
==============================================================================
--- cxf/branches/2.6.x-fixes/api/src/main/java/org/apache/cxf/interceptor/DocLiteralInInterceptor.java
(original)
+++ cxf/branches/2.6.x-fixes/api/src/main/java/org/apache/cxf/interceptor/DocLiteralInInterceptor.java
Mon Aug 13 14:08:15 2012
@@ -35,8 +35,8 @@ import org.apache.cxf.endpoint.Endpoint;
 import org.apache.cxf.message.Exchange;
 import org.apache.cxf.message.Message;
 import org.apache.cxf.message.MessageContentsList;
+import org.apache.cxf.message.MessageUtils;
 import org.apache.cxf.phase.Phase;
-import org.apache.cxf.service.Service;
 import org.apache.cxf.service.model.BindingMessageInfo;
 import org.apache.cxf.service.model.BindingOperationInfo;
 import org.apache.cxf.service.model.MessageInfo;
@@ -195,10 +195,10 @@ public class DocLiteralInInterceptor ext
                     
                     //Make sure the elName found on the wire is actually OK for 
                     //the purpose we need it
-                    validatePart(p, elName, si, ep.getService());
+                    validatePart(p, elName, message);
              
                     o = dr.read(p, xmlReader);
-                    if (Boolean.TRUE.equals(si.getProperty("soap.force.doclit.bare")) 
+                    if (MessageUtils.getContextualBoolean(message, "soap.force.doclit.bare",
false) 
                         && parameters.isEmpty()) {
                         // webservice provider does not need to ensure size
                         parameters.add(o);
@@ -223,7 +223,7 @@ public class DocLiteralInInterceptor ext
         }
     }
     
-    private void validatePart(MessagePartInfo p, QName elName, ServiceInfo si, Service service)
{
+    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),
                             Fault.FAULT_CODE_CLIENT);
@@ -238,8 +238,8 @@ public class DocLiteralInInterceptor ext
                 synth = b;
             }
         }
-        if ((si != null && Boolean.TRUE.equals(si.getProperty("soap.force.doclit.bare")))
-             || (service != null && Boolean.TRUE.equals(service.get("soap.force.doclit.bare"))))
{
+        
+        if (MessageUtils.getContextualBoolean(m, "soap.force.doclit.bare", 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



Mime
View raw message