cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r710150 - in /cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws: template/service.vm validator/WrapperStyleNameCollisionValidator.java
Date Mon, 03 Nov 2008 20:25:35 GMT
Author: dkulp
Date: Mon Nov  3 12:25:34 2008
New Revision: 710150

URL: http://svn.apache.org/viewvc?rev=710150&view=rev
Log:
Add some checks to handle anonymous types when dealing with wrappers.  Also make sure the
code is compilable

Modified:
    cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/template/service.vm
    cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/validator/WrapperStyleNameCollisionValidator.java

Modified: cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/template/service.vm
URL: http://svn.apache.org/viewvc/cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/template/service.vm?rev=710150&r1=710149&r2=710150&view=diff
==============================================================================
--- cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/template/service.vm
(original)
+++ cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/template/service.vm
Mon Nov  3 12:25:34 2008
@@ -24,7 +24,9 @@
 import java.net.MalformedURLException;
 import java.net.URL;
 import javax.xml.namespace.QName;
+#if (${service.Name} != "Service")
 import javax.xml.ws.Service;
+#end
 import javax.xml.ws.WebEndpoint;
 import javax.xml.ws.WebServiceClient;
 import javax.xml.ws.WebServiceFeature;
@@ -53,7 +55,7 @@
 #foreach ($annotation in $service.Annotations)
 $annotation
 #end
-public class ${service.Name} extends Service {
+public class ${service.Name} extends #if (${service.Name} == "Service")javax.xml.ws.Service#else
Service#end {
 
     public final static URL WSDL_LOCATION;
     public final static QName SERVICE = new QName("$service.Namespace", "$service.ServiceName");

Modified: cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/validator/WrapperStyleNameCollisionValidator.java
URL: http://svn.apache.org/viewvc/cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/validator/WrapperStyleNameCollisionValidator.java?rev=710150&r1=710149&r2=710150&view=diff
==============================================================================
--- cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/validator/WrapperStyleNameCollisionValidator.java
(original)
+++ cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/validator/WrapperStyleNameCollisionValidator.java
Mon Nov  3 12:25:34 2008
@@ -105,7 +105,8 @@
         if (input != null) {
             for (WrapperElement element : ProcessorUtil.getWrappedElement(context, input.getElementQName()))
{
                 if (names.containsKey(element.getElementName())
-                    &&  names.get(element.getElementName()).equals(element.getSchemaTypeName()))
{
+                    &&  (names.get(element.getElementName()) == element.getSchemaTypeName()
+                        || names.get(element.getElementName()).equals(element.getSchemaTypeName())))
{
                     handleErrors(names.get(element.getElementName()), element);
                     return false;
                 } else {
@@ -118,7 +119,8 @@
             for (WrapperElement element : ProcessorUtil.getWrappedElement(context, 
                                                                           output.getElementQName()))
{
                 if (names.containsKey(element.getElementName())
-                    &&  !names.get(element.getElementName()).equals(element.getSchemaTypeName()))
{
+                    &&  !(names.get(element.getElementName()) == element.getSchemaTypeName()
+                        || names.get(element.getElementName()).equals(element.getSchemaTypeName())))
{
                     handleErrors(names.get(element.getElementName()), element);
                     return false;
                 } else {



Mime
View raw message