axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chinth...@apache.org
Subject svn commit: r451907 - in /webservices/axis2/trunk/java/modules: adb-codegen/src/org/apache/axis2/schema/template/ADBBeanTemplate.xsl java2wsdl/src/org/apache/ws/java2wsdl/Java2WSDLBuilder.java
Date Mon, 02 Oct 2006 08:12:17 GMT
Author: chinthaka
Date: Mon Oct  2 01:12:16 2006
New Revision: 451907

URL: http://svn.apache.org/viewvc?view=rev&rev=451907
Log:
- Fixing https://issues.apache.org/jira/browse/AXIS2-1264. Better handling of xs:any 
- Fixing java coding convention issues

Modified:
    webservices/axis2/trunk/java/modules/adb-codegen/src/org/apache/axis2/schema/template/ADBBeanTemplate.xsl
    webservices/axis2/trunk/java/modules/java2wsdl/src/org/apache/ws/java2wsdl/Java2WSDLBuilder.java

Modified: webservices/axis2/trunk/java/modules/adb-codegen/src/org/apache/axis2/schema/template/ADBBeanTemplate.xsl
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/adb-codegen/src/org/apache/axis2/schema/template/ADBBeanTemplate.xsl?view=diff&rev=451907&r1=451906&r2=451907
==============================================================================
--- webservices/axis2/trunk/java/modules/adb-codegen/src/org/apache/axis2/schema/template/ADBBeanTemplate.xsl
(original)
+++ webservices/axis2/trunk/java/modules/adb-codegen/src/org/apache/axis2/schema/template/ADBBeanTemplate.xsl
Mon Oct  2 01:12:16 2006
@@ -559,7 +559,7 @@
                              try {
                                 writeAttribute("<xsl:value-of select="$namespace"/>",
                                                "<xsl:value-of select="$propertyName"/>",
-                                               org.apache.axis2.databinding.utils.ConverterUtil.convertToString(<xsl:value-of
select="$varName"/>), xmlWriter);                            
+                                               org.apache.axis2.databinding.utils.ConverterUtil.convertToString(<xsl:value-of
select="$varName"/>), xmlWriter);
                             } catch (NullPointerException e) {
                                 // If <xsl:value-of select="$varName"/> was null
                                 // it can not be serialized.
@@ -1406,8 +1406,17 @@
                                     while (!reader.isStartElement() &amp;&amp; !reader.isEndElement())
reader.next();
                                 </xsl:otherwise>
                             </xsl:choose>
+
                             <xsl:if test="not(enumFacet)">
-                            if (reader.isStartElement() <xsl:if test="$simple"> ||
reader.hasText()</xsl:if> <xsl:if test="not($simple)">&amp;&amp; <xsl:value-of
select="$propQName"/>.equals(reader.getName())</xsl:if>){
+                            <xsl:choose>
+                                <xsl:when test="$shortTypeName='OMElement'">
+                                   if (reader.isStartElement()){
+                                </xsl:when>
+                                <xsl:otherwise>
+                                    if (reader.isStartElement() <xsl:if test="$simple">
|| reader.hasText()</xsl:if> <xsl:if test="not($simple)">&amp;&amp; <xsl:value-of
select="$propQName"/>.equals(reader.getName())</xsl:if>){
+                                </xsl:otherwise>
+                            </xsl:choose>
+
                             </xsl:if>
                             <xsl:choose>
                                 <xsl:when test="@array">
@@ -1579,7 +1588,7 @@
                                 <!-- end of OMelement handling -->
                                 <!-- start of the simple types handling for binary content-->
                                 <xsl:when test="@binary">
-                                	
+
                                     if (isReaderMTOMAware
                                             &amp;&amp;
                                             java.lang.Boolean.TRUE.equals(reader.getProperty(org.apache.axiom.om.OMConstants.IS_BINARY)))
@@ -1598,7 +1607,7 @@
                                             java.lang.String content = reader.getText();
                                             object.set<xsl:value-of select="$javaName"/>(
                                                     org.apache.axis2.databinding.utils.ConverterUtil.convertToBase64Binary(content));
-                                        } 
+                                        }
                                     }
 
                                     <xsl:if test="$isType or $anon">  <!-- This
is a subelement property to be consumed -->
@@ -2596,7 +2605,7 @@
                                 <!-- end of OMelement handling -->
                                 <!-- start of the simple types handling for binary content-->
                                 <xsl:when test="@binary">
-                                	
+
                                     if (isReaderMTOMAware
                                             &amp;&amp;
                                             java.lang.Boolean.TRUE.equals(reader.getProperty(org.apache.axiom.om.OMConstants.IS_BINARY)))

Modified: webservices/axis2/trunk/java/modules/java2wsdl/src/org/apache/ws/java2wsdl/Java2WSDLBuilder.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/java2wsdl/src/org/apache/ws/java2wsdl/Java2WSDLBuilder.java?view=diff&rev=451907&r1=451906&r2=451907
==============================================================================
--- webservices/axis2/trunk/java/modules/java2wsdl/src/org/apache/ws/java2wsdl/Java2WSDLBuilder.java
(original)
+++ webservices/axis2/trunk/java/modules/java2wsdl/src/org/apache/ws/java2wsdl/Java2WSDLBuilder.java
Mon Oct  2 01:12:16 2006
@@ -5,7 +5,6 @@
 import java.io.OutputStream;
 import java.util.ArrayList;
 import java.util.Collection;
-import java.util.List;
 /*
 * Copyright 2004,2005 The Apache Software Foundation.
 *
@@ -137,22 +136,22 @@
      * @throws Exception
      */
     public void generateWSDL() throws Exception {
-        SchemaGenerator sg = new SchemaGenerator(classLoader, 
+        SchemaGenerator schemaGenerator = new SchemaGenerator(classLoader, 
                                                     className,
                                                     schemaTargetNamespace, 
                                                     schemaTargetNamespacePrefix);
-        ArrayList excludeOpeartion = new ArrayList();
-        excludeOpeartion.add("init");
-        excludeOpeartion.add("setOperationContext");
-        excludeOpeartion.add("destroy");
-        sg.setExcludeMethods(excludeOpeartion);
-        sg.setAttrFormDefault(getAttrFormDefault());
-        sg.setElementFormDefault(getElementFormDefault());
-        sg.setExtraClasses(getExtraClasses());
-        Collection schemaCollection = sg.generateSchema();
-        Java2OMBuilder java2OMBuilder = new Java2OMBuilder(sg.getMethods(),
+        ArrayList excludedOperation = new ArrayList();
+        excludedOperation.add("init");
+        excludedOperation.add("setOperationContext");
+        excludedOperation.add("destroy");
+        schemaGenerator.setExcludeMethods(excludedOperation);
+        schemaGenerator.setAttrFormDefault(getAttrFormDefault());
+        schemaGenerator.setElementFormDefault(getElementFormDefault());
+        schemaGenerator.setExtraClasses(getExtraClasses());
+        Collection schemaCollection = schemaGenerator.generateSchema();
+        Java2OMBuilder java2OMBuilder = new Java2OMBuilder(schemaGenerator.getMethods(),
                 schemaCollection,
-                sg.getTypeTable(),
+                schemaGenerator.getTypeTable(),
                 serviceName == null ? Java2WSDLUtils.getSimpleClassName(className) : serviceName,
                 targetNamespace == null ? Java2WSDLUtils.namespaceFromClassName(className,classLoader).toString()
: targetNamespace,
                 targetNamespacePrefix,



---------------------------------------------------------------------
To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-cvs-help@ws.apache.org


Mime
View raw message