cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r924895 - /cxf/trunk/rt/javascript/src/main/java/org/apache/cxf/javascript/service/ServiceJavascriptBuilder.java
Date Thu, 18 Mar 2010 17:04:13 GMT
Author: dkulp
Date: Thu Mar 18 17:04:12 2010
New Revision: 924895

URL: http://svn.apache.org/viewvc?rev=924895&view=rev
Log:
[CXF=2713]  Add support for element refs in wsdl2js

Modified:
    cxf/trunk/rt/javascript/src/main/java/org/apache/cxf/javascript/service/ServiceJavascriptBuilder.java

Modified: cxf/trunk/rt/javascript/src/main/java/org/apache/cxf/javascript/service/ServiceJavascriptBuilder.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/javascript/src/main/java/org/apache/cxf/javascript/service/ServiceJavascriptBuilder.java?rev=924895&r1=924894&r2=924895&view=diff
==============================================================================
--- cxf/trunk/rt/javascript/src/main/java/org/apache/cxf/javascript/service/ServiceJavascriptBuilder.java
(original)
+++ cxf/trunk/rt/javascript/src/main/java/org/apache/cxf/javascript/service/ServiceJavascriptBuilder.java
Thu Mar 18 17:04:12 2010
@@ -743,8 +743,14 @@ public class ServiceJavascriptBuilder ex
                 if (betterElement instanceof XmlSchemaElement) {
                     element = (XmlSchemaElement)betterElement;
                     if (element.getSchemaType() == null) {
-                        element.setSchemaType(xmlSchemaCollection
+                        if (element.getSchemaTypeName() != null) {
+                            element.setSchemaType(xmlSchemaCollection
                                                   .getTypeByQName(element.getSchemaTypeName()));
+                        } else if (element.getRefName() != null) {
+                            element = xmlSchemaCollection.getElementByQName(element.getRefName());
+                            element.setSchemaType(xmlSchemaCollection
+                                                  .getTypeByQName(element.getSchemaTypeName()));
+                        }
                     }
                     type = element.getSchemaType();
                 }



Mime
View raw message