cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r944315 - in /cxf/branches/2.2.x-fixes: ./ common/common/src/main/java/org/apache/cxf/helpers/ rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/support/ tools/wsdlto/databinding/jaxb/src/main/java/org/apache/cxf/tools/wsdlto/databinding...
Date Fri, 14 May 2010 15:36:24 GMT
Author: dkulp
Date: Fri May 14 15:36:23 2010
New Revision: 944315

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

........
  r944308 | dkulp | 2010-05-14 11:06:20 -0400 (Fri, 14 May 2010) | 1 line
  
  Fix a bunch of issue that the JAX-WS 2.2 TCK is exposing
........

Modified:
    cxf/branches/2.2.x-fixes/   (props changed)
    cxf/branches/2.2.x-fixes/common/common/src/main/java/org/apache/cxf/helpers/DOMUtils.java
    cxf/branches/2.2.x-fixes/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/support/JaxWsServiceConfiguration.java
    cxf/branches/2.2.x-fixes/tools/wsdlto/databinding/jaxb/src/main/java/org/apache/cxf/tools/wsdlto/databinding/jaxb/JAXBDataBinding.java
    cxf/branches/2.2.x-fixes/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/processor/internal/FaultProcessor.java
    cxf/branches/2.2.x-fixes/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/processor/internal/OperationProcessor.java
    cxf/branches/2.2.x-fixes/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/processor/internal/ParameterProcessor.java
    cxf/branches/2.2.x-fixes/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/processor/internal/PortTypeProcessor.java
    cxf/branches/2.2.x-fixes/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/processor/internal/ProcessorUtil.java
    cxf/branches/2.2.x-fixes/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/processor/internal/ServiceProcessor.java

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

Modified: cxf/branches/2.2.x-fixes/common/common/src/main/java/org/apache/cxf/helpers/DOMUtils.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.2.x-fixes/common/common/src/main/java/org/apache/cxf/helpers/DOMUtils.java?rev=944315&r1=944314&r2=944315&view=diff
==============================================================================
--- cxf/branches/2.2.x-fixes/common/common/src/main/java/org/apache/cxf/helpers/DOMUtils.java
(original)
+++ cxf/branches/2.2.x-fixes/common/common/src/main/java/org/apache/cxf/helpers/DOMUtils.java
Fri May 14 15:36:23 2010
@@ -523,7 +523,7 @@ public final class DOMUtils {
             String name = node.getNodeName();
             if (ns.equals(node.getNodeValue())
                 && (name != null && (XMLNAMESPACE.equals(name) || name.startsWith(XMLNAMESPACE
+ ":")))) {
-                return node.getPrefix();
+                return node.getLocalName();
             }
         }
         return null;
@@ -648,7 +648,20 @@ public final class DOMUtils {
             elem = getNextElement(elem);
         }
     }
+    public static boolean hasElementInNS(Element el, String namespace) {
 
+        if (namespace.equals(el.getNamespaceURI())) {
+            return true;
+        }
+        Element elem = getFirstElement(el);
+        while (elem != null) {
+            if (hasElementInNS(elem, namespace)) {
+                return true;
+            }
+            elem = getNextElement(elem);
+        }
+        return false;
+    }
     /**
      * Set a namespace/prefix on an element if it is not set already. First off, it searches
for the element
      * for the prefix associated with the specified namespace. If the prefix isn't null,
then this is

Modified: cxf/branches/2.2.x-fixes/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/support/JaxWsServiceConfiguration.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.2.x-fixes/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/support/JaxWsServiceConfiguration.java?rev=944315&r1=944314&r2=944315&view=diff
==============================================================================
--- cxf/branches/2.2.x-fixes/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/support/JaxWsServiceConfiguration.java
(original)
+++ cxf/branches/2.2.x-fixes/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/support/JaxWsServiceConfiguration.java
Fri May 14 15:36:23 2010
@@ -280,11 +280,7 @@ public class JaxWsServiceConfiguration e
         String tns = null;
         String local = null;
         if (param != null) {
-            //if it's a "wrapped" thing, the WebParam namespace is irrelevant
-            //as the generated element has to be in the namespace of the wrapper type
-            if (param.header() || !op.isUnwrapped()) {
-                tns = param.targetNamespace();
-            }
+            tns = param.targetNamespace();
             local = param.name();
         }
         

Modified: cxf/branches/2.2.x-fixes/tools/wsdlto/databinding/jaxb/src/main/java/org/apache/cxf/tools/wsdlto/databinding/jaxb/JAXBDataBinding.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.2.x-fixes/tools/wsdlto/databinding/jaxb/src/main/java/org/apache/cxf/tools/wsdlto/databinding/jaxb/JAXBDataBinding.java?rev=944315&r1=944314&r2=944315&view=diff
==============================================================================
--- cxf/branches/2.2.x-fixes/tools/wsdlto/databinding/jaxb/src/main/java/org/apache/cxf/tools/wsdlto/databinding/jaxb/JAXBDataBinding.java
(original)
+++ cxf/branches/2.2.x-fixes/tools/wsdlto/databinding/jaxb/src/main/java/org/apache/cxf/tools/wsdlto/databinding/jaxb/JAXBDataBinding.java
Fri May 14 15:36:23 2010
@@ -756,7 +756,8 @@ public class JAXBDataBinding implements 
         List<Element> incElemList = DOMUtils.findAllElementsByTagNameNS(element, 
                                                                      ToolConstants.SCHEMA_URI,

                                                                      "include");
-        if (impElemList.size() == 0 && incElemList.size() == 0) {
+        boolean hasJAXB = DOMUtils.hasElementInNS(element, ToolConstants.NS_JAXB_BINDINGS);
+        if (impElemList.size() == 0 && incElemList.size() == 0 && !hasJAXB)
{
             return element;
         }
         element = (Element)cloneNode(element.getOwnerDocument(), element, true);
@@ -781,6 +782,16 @@ public class JAXBDataBinding implements 
             Attr val = elem.getAttributeNode("schemaLocation");
             val.setNodeValue(mapSchemaLocation(val.getNodeValue(), sysId, catalog));
         }
+        
+        if (hasJAXB) {
+            //need to add ns and version
+            String pfx = DOMUtils.getPrefix(element, ToolConstants.NS_JAXB_BINDINGS);
+            if (StringUtils.isEmpty(pfx)) {
+                pfx = DOMUtils.createNamespace(element, ToolConstants.NS_JAXB_BINDINGS);
+            }
+            element.setAttributeNS(ToolConstants.NS_JAXB_BINDINGS,
+                                   pfx + ":version", "2.0");
+        }
         return element;
     }
 

Modified: cxf/branches/2.2.x-fixes/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/processor/internal/FaultProcessor.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.2.x-fixes/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/processor/internal/FaultProcessor.java?rev=944315&r1=944314&r2=944315&view=diff
==============================================================================
--- cxf/branches/2.2.x-fixes/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/processor/internal/FaultProcessor.java
(original)
+++ cxf/branches/2.2.x-fixes/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/processor/internal/FaultProcessor.java
Fri May 14 15:36:23 2010
@@ -83,6 +83,10 @@ public class FaultProcessor extends Abst
             if (jaxwsBinding.getJaxwsClass() != null
                 && jaxwsBinding.getJaxwsClass().getClassName() != null) {
                 name = jaxwsBinding.getJaxwsClass().getClassName();
+                if (name.contains(".")) {
+                    packageName = name.substring(0, name.lastIndexOf('.'));
+                    name = name.substring(name.lastIndexOf('.') + 1);
+                }
             }
         }
 

Modified: cxf/branches/2.2.x-fixes/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/processor/internal/OperationProcessor.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.2.x-fixes/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/processor/internal/OperationProcessor.java?rev=944315&r1=944314&r2=944315&view=diff
==============================================================================
--- cxf/branches/2.2.x-fixes/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/processor/internal/OperationProcessor.java
(original)
+++ cxf/branches/2.2.x-fixes/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/processor/internal/OperationProcessor.java
Fri May 14 15:36:23 2010
@@ -130,7 +130,7 @@ public class OperationProcessor  extends
                 enableWrapper = opBinding.isEnableWrapperStyle();
             }
         }
-        method.setWrapperStyle(enableWrapper);
+        method.setWrapperStyle(enableWrapper && method.isWrapperStyle());
         
         
         paramProcessor.process(method,

Modified: cxf/branches/2.2.x-fixes/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/processor/internal/ParameterProcessor.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.2.x-fixes/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/processor/internal/ParameterProcessor.java?rev=944315&r1=944314&r2=944315&view=diff
==============================================================================
--- cxf/branches/2.2.x-fixes/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/processor/internal/ParameterProcessor.java
(original)
+++ cxf/branches/2.2.x-fixes/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/processor/internal/ParameterProcessor.java
Fri May 14 15:36:23 2010
@@ -603,7 +603,7 @@ public class ParameterProcessor extends 
                 List<MessagePartInfo> inputParts = inputMessage.getMessageParts();
                 MessagePartInfo inputPart = inputParts.size() > 0 ? inputParts.iterator().next()
: null;
                 List<QName> inputWrapElement = null;
-                if (inputPart != null) {
+                if (inputPart != null && inputPart.isElement()) {
                     inputWrapElement = ProcessorUtil.getWrappedElementQNames(context, 
                                                                              inputPart.getElementQName());
                 }
@@ -622,7 +622,7 @@ public class ParameterProcessor extends 
                 List<MessagePartInfo> outputParts = outputMessage.getMessageParts();
                 MessagePartInfo outputPart = outputParts.size() > 0 ? outputParts.iterator().next()
: null;
                 List<QName> outputWrapElement = null;
-                if (outputPart != null) {
+                if (outputPart != null && outputPart.isElement()) {
                     outputWrapElement = ProcessorUtil.getWrappedElementQNames(context, 
                                                                               outputPart.getElementQName());
                 }

Modified: cxf/branches/2.2.x-fixes/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/processor/internal/PortTypeProcessor.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.2.x-fixes/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/processor/internal/PortTypeProcessor.java?rev=944315&r1=944314&r2=944315&view=diff
==============================================================================
--- cxf/branches/2.2.x-fixes/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/processor/internal/PortTypeProcessor.java
(original)
+++ cxf/branches/2.2.x-fixes/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/processor/internal/PortTypeProcessor.java
Fri May 14 15:36:23 2010
@@ -77,6 +77,12 @@ public class PortTypeProcessor extends A
                 && infBinding.getJaxwsClass() != null
                 && infBinding.getJaxwsClass().getClassName() != null) {
                 name = infBinding.getJaxwsClass().getClassName();
+                
+                if (name.contains(".")) {
+                    intf.setPackageName(name.substring(0, name.lastIndexOf('.')));
+                    name = name.substring(name.lastIndexOf('.') + 1);
+                }
+
                 intf.setClassJavaDoc(infBinding.getJaxwsClass().getComments());
             }
 

Modified: cxf/branches/2.2.x-fixes/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/processor/internal/ProcessorUtil.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.2.x-fixes/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/processor/internal/ProcessorUtil.java?rev=944315&r1=944314&r2=944315&view=diff
==============================================================================
--- cxf/branches/2.2.x-fixes/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/processor/internal/ProcessorUtil.java
(original)
+++ cxf/branches/2.2.x-fixes/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/processor/internal/ProcessorUtil.java
Fri May 14 15:36:23 2010
@@ -362,6 +362,9 @@ public final class ProcessorUtil {
 
     public static List<QName> getWrappedElementQNames(ToolContext context, QName partElement)
{
         List<QName> qnames = new ArrayList<QName>();
+        if (partElement == null) {
+            return qnames;
+        }
         for (WrapperElement element : getWrappedElement(context, partElement)) {
             qnames.add(element.getElementName());
         }

Modified: cxf/branches/2.2.x-fixes/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/processor/internal/ServiceProcessor.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.2.x-fixes/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/processor/internal/ServiceProcessor.java?rev=944315&r1=944314&r2=944315&view=diff
==============================================================================
--- cxf/branches/2.2.x-fixes/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/processor/internal/ServiceProcessor.java
(original)
+++ cxf/branches/2.2.x-fixes/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/processor/internal/ServiceProcessor.java
Fri May 14 15:36:23 2010
@@ -170,6 +170,11 @@ public class ServiceProcessor extends Ab
                 if (serviceBinding.getJaxwsClass() != null
                     && serviceBinding.getJaxwsClass().getClassName() != null) {
                     name = serviceBinding.getJaxwsClass().getClassName();  
+                    if (name.contains(".")) {
+                        jaxwsBinding.setPackage(name.substring(0, name.lastIndexOf('.')));
+                        name = name.substring(name.lastIndexOf('.') + 1);
+                    }
+                    
                     sclz.setClassJavaDoc(serviceBinding.getJaxwsClass().getComments()); 
        
                 }
                 sclz.setPackageJavaDoc(serviceBinding.getPackageJavaDoc());
@@ -193,6 +198,10 @@ public class ServiceProcessor extends Ab
                 if (serviceBinding2.getJaxwsClass() != null
                     && serviceBinding2.getJaxwsClass().getClassName() != null) {
                     name = serviceBinding2.getJaxwsClass().getClassName();              
 
+                    if (name.contains(".")) {
+                        jaxwsBinding.setPackage(name.substring(0, name.lastIndexOf('.')));
+                        name = name.substring(name.lastIndexOf('.') + 1);
+                    }
                 }
                 if (serviceBinding2.getJaxwsClass().getComments() != null) {
                     jaxwsBinding.setClassJavaDoc(serviceBinding2.getJaxwsClass().getComments());



Mime
View raw message