axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chinth...@apache.org
Subject svn commit: r451250 - in /webservices/axis2/trunk/java/modules: adb-codegen/src/org/apache/axis2/schema/ adb-codegen/src/org/apache/axis2/schema/template/ codegen/src/org/apache/axis2/wsdl/codegen/extension/ codegen/src/org/apache/axis2/wsdl/template/j...
Date Fri, 29 Sep 2006 11:38:51 GMT
Author: chinthaka
Date: Fri Sep 29 04:38:50 2006
New Revision: 451250

URL: http://svn.apache.org/viewvc?view=rev&rev=451250
Log:
Applying Amila's patch on http://issues.apache.org/jira/browse/AXIS2-1270

Modified:
    webservices/axis2/trunk/java/modules/adb-codegen/src/org/apache/axis2/schema/ExtensionUtility.java
    webservices/axis2/trunk/java/modules/adb-codegen/src/org/apache/axis2/schema/template/ADBDatabindingTemplate.xsl
    webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/codegen/extension/SchemaUnwrapperExtension.java
    webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/template/java/InterfaceImplementationTemplate.xsl
    webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/template/java/MessageReceiverTemplate.xsl
    webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/template/java/TestClassTemplate.xsl
    webservices/axis2/trunk/java/modules/integration/maven.xml
    webservices/axis2/trunk/java/modules/xmlbeans/src/org/apache/axis2/xmlbeans/template/XmlbeansDatabindingTemplate.xsl

Modified: webservices/axis2/trunk/java/modules/adb-codegen/src/org/apache/axis2/schema/ExtensionUtility.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/adb-codegen/src/org/apache/axis2/schema/ExtensionUtility.java?view=diff&rev=451250&r1=451249&r2=451250
==============================================================================
--- webservices/axis2/trunk/java/modules/adb-codegen/src/org/apache/axis2/schema/ExtensionUtility.java
(original)
+++ webservices/axis2/trunk/java/modules/adb-codegen/src/org/apache/axis2/schema/ExtensionUtility.java
Fri Sep 29 04:38:50 2006
@@ -233,6 +233,10 @@
 
                     // if this is an instance of xs:any, then there is no part name for it.
Using ANY_ELEMENT_FIELD_NAME
                     // for it for now
+
+                    //we have to handle both maxoccurs 1 and maxoccurs > 1 situation
+                    XmlSchemaAny xmlSchemaAny = (XmlSchemaAny) item;
+
                     QName partQName = WSDLUtil.getPartQName(opName,
                             WSDLConstants.INPUT_PART_QNAME_SUFFIX,
                             Constants.ANY_ELEMENT_FIELD_NAME);
@@ -242,6 +246,7 @@
                     } else {
                         mapper.addTypeMappingName(partQName, "org.apache.axiom.om.OMElement");
                     }
+
                 }
 
             }
@@ -267,8 +272,14 @@
             String className = (String) metaInfoMap.
                     get(SchemaConstants.SchemaCompilerInfoHolder.CLASSNAME_KEY);
 
+            // this is a temporary patch
+            // the acual problem is keeping the class name details on the schemaType in
+            // XmlSchema compiler.
+            // we have to store them in XmlElement
             if (isArray && !className.endsWith("[]")) {
                 className += "[]";
+            } else if (!isArray && className.endsWith("[]")){
+                className = className.substring(0,className.length() - 2);
             }
 
             QName partQName = WSDLUtil.getPartQName(opName,

Modified: webservices/axis2/trunk/java/modules/adb-codegen/src/org/apache/axis2/schema/template/ADBDatabindingTemplate.xsl
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/adb-codegen/src/org/apache/axis2/schema/template/ADBDatabindingTemplate.xsl?view=diff&rev=451250&r1=451249&r2=451250
==============================================================================
--- webservices/axis2/trunk/java/modules/adb-codegen/src/org/apache/axis2/schema/template/ADBDatabindingTemplate.xsl
(original)
+++ webservices/axis2/trunk/java/modules/adb-codegen/src/org/apache/axis2/schema/template/ADBDatabindingTemplate.xsl
Fri Sep 29 04:38:50 2006
@@ -2,7 +2,9 @@
     <xsl:output method="text"/>
     <xsl:key name="paramsIn" match="//databinders/param[@direction='in']" use="@type"/>
     <xsl:key name="paramsOut" match="//databinders/param[@direction='out']" use="@type"/>
-    
+    <xsl:key name="innerParams" match="//databinders/param[@direction='in']/param" use="@partname"/>
+    <!--<xsl:key name="paramsType" match="//databinders/param[@direction='in']" use="@type"/>-->
+
     <!-- #################################################################################
 -->
     <!-- ############################   ADB template   ##############################
 -->
     <xsl:template match="databinders[@dbtype='adb']">
@@ -42,71 +44,74 @@
                     <xsl:variable name="inputElementShortType" select="../../param[@type!=''
and @direction='in' and @opname=$opname]/@shorttype"></xsl:variable>
                     <xsl:variable name="inputElementComplexType" select="../../param[@type!=''
and @direction='in' and @opname=$opname]/@complextype"></xsl:variable>
                     <xsl:variable name="wrappedParameterCount" select="count(../../param[@type!=''
and @direction='in' and @opname=$opname]/param)"></xsl:variable>
-                     <xsl:choose>
-                        <xsl:when test="$wrappedParameterCount &gt; 0">
-                            <!-- geneate the toEnvelope method-->
-                        private  org.apache.axiom.soap.SOAPEnvelope toEnvelope(org.apache.axiom.soap.SOAPFactory
factory,
-                            <xsl:for-each select="../../param[@type!='' and @direction='in'
and @opname=$opname]/param">
-                             <xsl:value-of select="@type"/> param<xsl:value-of select="position()"/>,
-                            </xsl:for-each>
-                         boolean optimizeContent){
-
-                        <xsl:value-of select="$inputElementType"/> wrappedType = new
<xsl:value-of select="$inputElementType"/>();
-
+                    <xsl:if test="generate-id($inputElement) = generate-id(key('paramsIn',
$inputElementType)[1])">
                          <xsl:choose>
-                             <!--<xsl:when test="$inputElementComplexType != ''">-->
-                             <xsl:when test="string-length(normalize-space($inputElementComplexType))
> 0">
-                                  <xsl:value-of select="$inputElementComplexType"/>
wrappedComplexType = new <xsl:value-of select="$inputElementComplexType"/>();
-                                  <xsl:for-each select="../../param[@type!='' and @direction='in'
and @opname=$opname]/param">
-                                      wrappedComplexType.set<xsl:value-of select="@partname"/>(param<xsl:value-of
select="position()"/>);
-                                 </xsl:for-each>
-                                 wrappedType.set<xsl:value-of select="$inputElementShortType"/>(wrappedComplexType);
-                             </xsl:when>
-                             <xsl:otherwise>
-                                 <xsl:for-each select="../../param[@type!='' and @direction='in'
and @opname=$opname]/param">
-                                      wrappedType.set<xsl:value-of select="@partname"/>(param<xsl:value-of
select="position()"/>);
-                                 </xsl:for-each>
-                             </xsl:otherwise>
-                         </xsl:choose>
+                            <xsl:when test="$wrappedParameterCount &gt; 0">
+                                <!-- geneate the toEnvelope method-->
+                            private  org.apache.axiom.soap.SOAPEnvelope toEnvelope(org.apache.axiom.soap.SOAPFactory
factory,
+                                <xsl:for-each select="../../param[@type!='' and @direction='in'
and @opname=$opname]/param">
+                                 <xsl:value-of select="@type"/> param<xsl:value-of
select="position()"/>,
+                                </xsl:for-each>
+                                <xsl:value-of select="$inputElementType"/> dummyWrappedType,
+                             boolean optimizeContent){
+
+                            <xsl:value-of select="$inputElementType"/> wrappedType
= new <xsl:value-of select="$inputElementType"/>();
+
+                             <xsl:choose>
+                                 <!--<xsl:when test="$inputElementComplexType != ''">-->
+                                 <xsl:when test="string-length(normalize-space($inputElementComplexType))
> 0">
+                                      <xsl:value-of select="$inputElementComplexType"/>
wrappedComplexType = new <xsl:value-of select="$inputElementComplexType"/>();
+                                      <xsl:for-each select="../../param[@type!='' and
@direction='in' and @opname=$opname]/param">
+                                          wrappedComplexType.set<xsl:value-of select="@partname"/>(param<xsl:value-of
select="position()"/>);
+                                     </xsl:for-each>
+                                     wrappedType.set<xsl:value-of select="$inputElementShortType"/>(wrappedComplexType);
+                                 </xsl:when>
+                                 <xsl:otherwise>
+                                     <xsl:for-each select="../../param[@type!='' and @direction='in'
and @opname=$opname]/param">
+                                          wrappedType.set<xsl:value-of select="@partname"/>(param<xsl:value-of
select="position()"/>);
+                                     </xsl:for-each>
+                                 </xsl:otherwise>
+                             </xsl:choose>
+
+                           org.apache.axiom.soap.SOAPEnvelope emptyEnvelope = factory.getDefaultEnvelope();
+                              <xsl:choose>
+                                <xsl:when test="$helpermode">
+                                    emptyEnvelope.getBody().addChild(<xsl:value-of select="$inputElementType"/>Helper.getOMElement(
+                                    wrappedType,
+                                    <xsl:value-of select="$inputElementType"/>.MY_QNAME,factory));
+                                </xsl:when>
+                                <xsl:otherwise>
+                                    emptyEnvelope.getBody().addChild(wrappedType.getOMElement(<xsl:value-of
select="$inputElementType"/>.MY_QNAME,factory));
+                                </xsl:otherwise>
+                            </xsl:choose>
 
-                       org.apache.axiom.soap.SOAPEnvelope emptyEnvelope = factory.getDefaultEnvelope();
-                          <xsl:choose>
-                            <xsl:when test="$helpermode">
-                                emptyEnvelope.getBody().addChild(<xsl:value-of select="$inputElementType"/>Helper.getOMElement(
-                                wrappedType,
-                                <xsl:value-of select="$inputElementType"/>.MY_QNAME,factory));
-                            </xsl:when>
-                            <xsl:otherwise>
-                                emptyEnvelope.getBody().addChild(wrappedType.getOMElement(<xsl:value-of
select="$inputElementType"/>.MY_QNAME,factory));
-                            </xsl:otherwise>
-                        </xsl:choose>
+                           return emptyEnvelope;
+                           }
 
-                       return emptyEnvelope;
-                       }
 
 
-
-                        </xsl:when>
-                        <xsl:otherwise>
-                            <xsl:if test="generate-id($inputElement) = generate-id(key('paramsIn',
$inputElementType)[1])">
-                        <!-- Assumption - the parameter is always an ADB element-->
-                    private  org.apache.axiom.soap.SOAPEnvelope toEnvelope(org.apache.axiom.soap.SOAPFactory
factory, <xsl:value-of select="$inputElementType"/> param, boolean optimizeContent){
-                    org.apache.axiom.soap.SOAPEnvelope emptyEnvelope = factory.getDefaultEnvelope();
-                         <xsl:choose>
-                            <xsl:when test="$helpermode">
-                                emptyEnvelope.getBody().addChild(<xsl:value-of select="$inputElementType"/>Helper.getOMElement(
-                                param,
-                                <xsl:value-of select="$inputElementType"/>.MY_QNAME,factory));
                             </xsl:when>
                             <xsl:otherwise>
-                                emptyEnvelope.getBody().addChild(param.getOMElement(<xsl:value-of
select="$inputElementType"/>.MY_QNAME,factory));
-                            </xsl:otherwise>
-                    </xsl:choose>
-                     return emptyEnvelope;
-                    }
-                             </xsl:if>
+
+                            <!-- Assumption - the parameter is always an ADB element-->
+                        private  org.apache.axiom.soap.SOAPEnvelope toEnvelope(org.apache.axiom.soap.SOAPFactory
factory, <xsl:value-of select="$inputElementType"/> param, boolean optimizeContent){
+                        org.apache.axiom.soap.SOAPEnvelope emptyEnvelope = factory.getDefaultEnvelope();
+                             <xsl:choose>
+                                <xsl:when test="$helpermode">
+                                    emptyEnvelope.getBody().addChild(<xsl:value-of select="$inputElementType"/>Helper.getOMElement(
+                                    param,
+                                    <xsl:value-of select="$inputElementType"/>.MY_QNAME,factory));
+                                </xsl:when>
+                                <xsl:otherwise>
+                                    emptyEnvelope.getBody().addChild(param.getOMElement(<xsl:value-of
select="$inputElementType"/>.MY_QNAME,factory));
+                                </xsl:otherwise>
+                        </xsl:choose>
+                         return emptyEnvelope;
+                        }
+
                         </xsl:otherwise>
                      </xsl:choose>
+                    </xsl:if>
                </xsl:when>
                <xsl:otherwise>
                   <!-- Do nothing here -->
@@ -142,22 +147,32 @@
        </xsl:choose>
             <xsl:if test="count(../../param[@type!='' and @direction='in' and @opname=$opname])=1">
                 <!-- generate the get methods -->
+                <xsl:variable name="inputElement" select="../../param[@type!='' and @direction='in'
and @opname=$opname]"></xsl:variable>
+                <xsl:variable name="inputElementType" select="../../param[@type!='' and
@direction='in' and @opname=$opname]/@type"></xsl:variable>
                 <xsl:variable name="inputElementShortType" select="../../param[@type!=''
and @direction='in' and @opname=$opname]/@shorttype"></xsl:variable>
                 <xsl:variable name="inputElementComplexType" select="../../param[@type!=''
and @direction='in' and @opname=$opname]/@complextype"></xsl:variable>
 
                 <xsl:for-each select="../../param[@type!='' and @direction='in' and @opname=$opname]/param">
-                    private <xsl:value-of select="@type"/> get<xsl:value-of select="@partname"/>(
-                    <xsl:value-of select="../@type"/> wrappedType){
-                    <xsl:choose>
-                        <!--<xsl:when test="$inputElementComplexType != ''">-->
-                        <xsl:when test="string-length(normalize-space($inputElementComplexType))
> 0">
-                            return wrappedType.get<xsl:value-of select="$inputElementShortType"/>().get<xsl:value-of
select="@partname"/>();
-                        </xsl:when>
-                        <xsl:otherwise>
-                            return wrappedType.get<xsl:value-of select="@partname"/>();
-                        </xsl:otherwise>
-                    </xsl:choose>
-                    }
+
+                    <xsl:variable name="paramElement" select="."></xsl:variable>
+                    <xsl:variable name="partName" select="@partname"></xsl:variable>
+
+                    <xsl:if test="(generate-id($paramElement) = generate-id(key('innerParams',
$partName)[1])) or
+                        (generate-id($inputElement) = generate-id(key('paramsIn', $inputElementType)[1]))">
+
+                        private <xsl:value-of select="@type"/> get<xsl:value-of
select="@partname"/>(
+                        <xsl:value-of select="../@type"/> wrappedType){
+                        <xsl:choose>
+                            <!--<xsl:when test="$inputElementComplexType != ''">-->
+                            <xsl:when test="string-length(normalize-space($inputElementComplexType))
> 0">
+                                return wrappedType.get<xsl:value-of select="$inputElementShortType"/>().get<xsl:value-of
select="@partname"/>();
+                            </xsl:when>
+                            <xsl:otherwise>
+                                return wrappedType.get<xsl:value-of select="@partname"/>();
+                            </xsl:otherwise>
+                        </xsl:choose>
+                        }
+                     </xsl:if>
                 </xsl:for-each>
             </xsl:if>
       </xsl:if>

Modified: webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/codegen/extension/SchemaUnwrapperExtension.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/codegen/extension/SchemaUnwrapperExtension.java?view=diff&rev=451250&r1=451249&r2=451250
==============================================================================
--- webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/codegen/extension/SchemaUnwrapperExtension.java
(original)
+++ webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/codegen/extension/SchemaUnwrapperExtension.java
Fri Sep 29 04:38:50 2006
@@ -1,6 +1,7 @@
 package org.apache.axis2.wsdl.codegen.extension;
 
 import org.apache.axis2.AxisFault;
+import org.apache.axis2.util.URLProcessor;
 import org.apache.axis2.description.AxisMessage;
 import org.apache.axis2.description.AxisOperation;
 import org.apache.axis2.description.AxisService;
@@ -184,7 +185,9 @@
                 XmlSchemaComplexContentExtension schemaExtension = (XmlSchemaComplexContentExtension)
content;
 
                 // process particles inside this extension, if any
-                processXMLSchemaSequence(schemaExtension.getParticle(), message, partNameList);
+                if (schemaExtension.getParticle() != null){
+                    processXMLSchemaSequence(schemaExtension.getParticle(), message, partNameList);
+                }
 
                 // now we need to get the schema of the extension type from the parent schema.
For that let's first retrieve
                 // the parent schema

Modified: webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/template/java/InterfaceImplementationTemplate.xsl
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/template/java/InterfaceImplementationTemplate.xsl?view=diff&rev=451250&r1=451249&r2=451250
==============================================================================
--- webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/template/java/InterfaceImplementationTemplate.xsl
(original)
+++ webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/template/java/InterfaceImplementationTemplate.xsl
Fri Sep 29 04:38:50 2006
@@ -240,12 +240,15 @@
                                             <!-- Even when the parameters are 1 we have
to see whether we have the
                                                 wrapped parameters -->
                                            <xsl:variable name="inputWrappedCount" select="count(input/param[@location='body'
and @type!='']/param)"/>
+                                           <xsl:variable name="inputElementType" select="input/param[@location='body'
and @type!='']/@type"></xsl:variable>
+
                                             <xsl:choose>
                                                 <xsl:when test="$inputWrappedCount &gt;
0">
+                                                    <xsl:value-of select="$inputElementType"/><xsl:text>
</xsl:text>dummyWrappedType = null;
                                                     env = toEnvelope(getFactory(_operationClient.getOptions().getSoapVersionURI()),
                                                     <xsl:for-each select="input/param[@location='body'
and @type!='']/param">
                                                         <xsl:value-of select="@name"/>,
-                                                    </xsl:for-each>
+                                                    </xsl:for-each>dummyWrappedType,
                                                     optimizeContent(new javax.xml.namespace.QName("<xsl:value-of
select="$method-ns"/>",
                                                     "<xsl:value-of select="$method-name"/>")));
                                                 </xsl:when>
@@ -442,12 +445,15 @@
                                             <!-- Even when the parameters are 1 we have
to see whether we have the
                                                 wrapped parameters -->
                                            <xsl:variable name="inputWrappedCount" select="count(input/param[@location='body'
and @type!='']/param)"/>
+                                            <xsl:variable name="inputElementType" select="input/param[@location='body'
and @type!='']/@type"></xsl:variable>
+
                                             <xsl:choose>
                                                 <xsl:when test="$inputWrappedCount &gt;
0">
+                                                    <xsl:value-of select="$inputElementType"/><xsl:text>
</xsl:text>dummyWrappedType = null;
                                                     env = toEnvelope(getFactory(_operationClient.getOptions().getSoapVersionURI()),
                                                     <xsl:for-each select="input/param[@location='body'
and @type!='']/param">
                                                         <xsl:value-of select="@name"/>,
-                                                    </xsl:for-each>
+                                                    </xsl:for-each> dummyWrappedType,
                                                     optimizeContent(new javax.xml.namespace.QName("<xsl:value-of
select="$method-ns"/>",
                                                     "<xsl:value-of select="$method-name"/>")));
                                                 </xsl:when>
@@ -595,12 +601,15 @@
                                                             <!-- Even when the parameters
are 1 we have to see whether we have the
                                                                 wrapped parameters -->
                                                            <xsl:variable name="inputWrappedCount"
select="count(input/param[@location='body' and @type!='']/param)"/>
+                                                            <xsl:variable name="inputElementType"
select="input/param[@location='body' and @type!='']/@type"></xsl:variable>
+
                                                             <xsl:choose>
                                                                 <xsl:when test="$inputWrappedCount
&gt; 0">
+                                                                    <xsl:value-of select="$inputElementType"/><xsl:text>
</xsl:text>dummyWrappedType = null;
                                                                     env = toEnvelope(getFactory(_operationClient.getOptions().getSoapVersionURI()),
                                                                     <xsl:for-each select="input/param[@location='body'
and @type!='']/param">
                                                                         <xsl:value-of
select="@name"/>,
-                                                                    </xsl:for-each>
+                                                                    </xsl:for-each>dummyWrappedType,
                                                                     optimizeContent(new javax.xml.namespace.QName("<xsl:value-of
select="$method-ns"/>",
                                                                     "<xsl:value-of select="$method-name"/>")));
                                                                 </xsl:when>

Modified: webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/template/java/MessageReceiverTemplate.xsl
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/template/java/MessageReceiverTemplate.xsl?view=diff&rev=451250&r1=451249&r2=451250
==============================================================================
--- webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/template/java/MessageReceiverTemplate.xsl
(original)
+++ webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/template/java/MessageReceiverTemplate.xsl
Fri Sep 29 04:38:50 2006
@@ -101,16 +101,16 @@
                                         <xsl:when test="$inputWrappedCount &gt; 0">
                                             <!-- generate the references. the getters
need to be
                                                 generated by the databinding-->
-                                            <xsl:for-each select="input/param[@location='body'
and @type!='']/param">
-                                                <xsl:value-of select="@type"/> param<xsl:value-of
select="position()"/>
-                                                        = get<xsl:value-of select="@partname"/>(wrappedParam);
-                                            </xsl:for-each>
+                                            <!--<xsl:for-each select="input/param[@location='body'
and @type!='']/param">-->
+                                                <!--<xsl:value-of select="@type"/>
param<xsl:value-of select="position()"/>-->
+                                                        <!--= get<xsl:value-of select="@partname"/>(wrappedParam);-->
+                                            <!--</xsl:for-each>-->
 
                                             <xsl:if test="$returntype!=''"><xsl:value-of
select="$returnvariable"/> =</xsl:if>
                                        skel.<xsl:value-of select="@name"/>(
                                             <xsl:for-each select="input/param[@location='body'
and @type!='']/param">
                                                 <xsl:if test="position() &gt; 1">,</xsl:if>
-                                                param<xsl:value-of select="position()"/>
+                                                get<xsl:value-of select="@partname"/>(wrappedParam)
                                             </xsl:for-each>
 
                                         );

Modified: webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/template/java/TestClassTemplate.xsl
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/template/java/TestClassTemplate.xsl?view=diff&rev=451250&r1=451249&r2=451250
==============================================================================
--- webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/template/java/TestClassTemplate.xsl
(original)
+++ webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/template/java/TestClassTemplate.xsl
Fri Sep 29 04:38:50 2006
@@ -1,6 +1,5 @@
 <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
     <xsl:output method="text"/>
-
     <!-- Incldue the test object creation template  -->
     <xsl:include href="testObject"/>
 
@@ -45,22 +44,68 @@
                                                         </xsl:text>(<xsl:value-of
select="@type"/>)getTestObject(<xsl:value-of select="@type"/>.class);
                     // todo Fill in the <xsl:value-of select="@name"/> here
                 </xsl:for-each>
-
                 <xsl:choose>
                     <xsl:when test="$outputtype=''">
                     <!-- for now think there is only one input element -->
                     //There is no output to be tested!
                     stub.<xsl:value-of select="@name"/>(
                         <xsl:for-each select="input/param">
-                             <xsl:if test="@type!=''"><xsl:if test="position()>1">,</xsl:if><xsl:value-of
select="@name"/>
-                        </xsl:if>
+                             <xsl:variable name="opname" select="@opname"/>
+                             <xsl:variable name="paramname" select="@name"/>
+                             <xsl:variable name="paramcount" select="count(param[@type!=''
and @opname=$opname])"/>
+                             <xsl:variable name="shorttype" select="@shorttype"/>
+                             <xsl:variable name="complextype" select="@complextype"/>
+
+                             <xsl:choose>
+                                 <xsl:when test="$paramcount > 0">
+                                      <xsl:for-each select="param[@type!='' and @opname=$opname]">
+                                           <xsl:choose>
+                                               <xsl:when test="string-length(normalize-space($complextype))
> 0">
+                                                    <xsl:if test="position()>1">,</xsl:if><xsl:value-of
select="$paramname"/>.get<xsl:value-of select="$shorttype"/>().get<xsl:value-of
+                                                   select="@partname"/>()
+                                               </xsl:when>
+                                               <xsl:otherwise>
+                                                    <xsl:if test="position()>1">,</xsl:if><xsl:value-of
select="$paramname"/>.get<xsl:value-of select="@partname"/>()
+                                               </xsl:otherwise>
+                                           </xsl:choose>
+                                      </xsl:for-each>
+                                 </xsl:when>
+                                 <xsl:otherwise>
+                                     <xsl:if test="@type!=''"><xsl:if test="position()>1">,</xsl:if><xsl:value-of
select="@name"/></xsl:if>
+                                 </xsl:otherwise>
+                             </xsl:choose>
                         </xsl:for-each>);
                     </xsl:when>
                     <xsl:otherwise>
                         assertNotNull(stub.<xsl:value-of select="@name"/>(
                         <xsl:for-each select="input/param">
-                             <xsl:if test="@type!=''"><xsl:if test="position()>1">,</xsl:if><xsl:value-of
select="@name"/>
-                        </xsl:if>
+
+                             <xsl:variable name="opname" select="@opname"/>
+                             <xsl:variable name="paramname" select="@name"/>
+                             <xsl:variable name="paramcount" select="count(param[@type!=''
and @opname=$opname])"/>
+                             <xsl:variable name="shorttype" select="@shorttype"/>
+                             <xsl:variable name="complextype" select="@complextype"/>
+
+                             <xsl:choose>
+                                 <xsl:when test="$paramcount > 0">
+                                      <xsl:for-each select="param[@type!='' and @opname=$opname]">
+                                           <xsl:choose>
+                                               <xsl:when test="string-length(normalize-space($complextype))
> 0">
+                                                    <xsl:if test="position()>1">,</xsl:if><xsl:value-of
select="$paramname"/>.get<xsl:value-of select="$shorttype"/>().get<xsl:value-of
+                                                   select="@partname"/>()
+                                               </xsl:when>
+                                               <xsl:otherwise>
+                                                    <xsl:if test="position()>1">,</xsl:if><xsl:value-of
select="$paramname"/>.get<xsl:value-of select="@partname"/>()
+                                               </xsl:otherwise>
+                                           </xsl:choose>
+                                      </xsl:for-each>
+                                 </xsl:when>
+                                 <xsl:otherwise>
+                                     <xsl:if test="@type!=''"><xsl:if test="position()>1">,</xsl:if><xsl:value-of
select="@name"/></xsl:if>
+                                 </xsl:otherwise>
+                             </xsl:choose>
+                             <!-- if the input/param element contain any attributes then
we have to unwrap them-->
+
                         </xsl:for-each>));
                   </xsl:otherwise>
                 </xsl:choose>
@@ -99,7 +144,30 @@
 
                 stub.start<xsl:value-of select="@name"/>(
                          <xsl:for-each select="input/param">
-                             <xsl:if test="position()>1">,</xsl:if><xsl:value-of
select="@name"/>
+                             <xsl:variable name="opname" select="@opname"/>
+                             <xsl:variable name="paramname" select="@name"/>
+                             <xsl:variable name="paramcount" select="count(param[@type!=''
and @opname=$opname])"/>
+                             <xsl:variable name="shorttype" select="@shorttype"/>
+                             <xsl:variable name="complextype" select="@complextype"/>
+
+                             <xsl:choose>
+                                 <xsl:when test="$paramcount > 0">
+                                      <xsl:for-each select="param[@type!='' and @opname=$opname]">
+                                           <xsl:choose>
+                                               <xsl:when test="string-length(normalize-space($complextype))
> 0">
+                                                    <xsl:if test="position()>1">,</xsl:if><xsl:value-of
select="$paramname"/>.get<xsl:value-of select="$shorttype"/>().get<xsl:value-of
+                                                   select="@partname"/>()
+                                               </xsl:when>
+                                               <xsl:otherwise>
+                                                    <xsl:if test="position()>1">,</xsl:if><xsl:value-of
select="$paramname"/>.get<xsl:value-of select="@partname"/>()
+                                               </xsl:otherwise>
+                                           </xsl:choose>
+                                      </xsl:for-each>
+                                 </xsl:when>
+                                 <xsl:otherwise>
+                                     <xsl:if test="@type!=''"><xsl:if test="position()>1">,</xsl:if><xsl:value-of
select="@name"/></xsl:if>
+                                 </xsl:otherwise>
+                             </xsl:choose>
                         </xsl:for-each>,
                     new <xsl:value-of select="$tempCallbackName"/>()
                 );
@@ -149,7 +217,30 @@
                   //There is no output to be tested!
                   stub.<xsl:value-of select="@name"/>(
                   <xsl:for-each select="input/param">
-                      <xsl:if test="@type!=''"><xsl:if test="position()>1">,</xsl:if><xsl:value-of
select="@name"/></xsl:if>
+                      <xsl:variable name="opname" select="@opname"/>
+                             <xsl:variable name="paramname" select="@name"/>
+                             <xsl:variable name="paramcount" select="count(param[@type!=''
and @opname=$opname])"/>
+                             <xsl:variable name="shorttype" select="@shorttype"/>
+                             <xsl:variable name="complextype" select="@complextype"/>
+
+                             <xsl:choose>
+                                 <xsl:when test="$paramcount > 0">
+                                      <xsl:for-each select="param[@type!='' and @opname=$opname]">
+                                           <xsl:choose>
+                                               <xsl:when test="string-length(normalize-space($complextype))
> 0">
+                                                    <xsl:if test="position()>1">,</xsl:if><xsl:value-of
select="$paramname"/>.get<xsl:value-of select="$shorttype"/>().get<xsl:value-of
+                                                   select="@partname"/>()
+                                               </xsl:when>
+                                               <xsl:otherwise>
+                                                    <xsl:if test="position()>1">,</xsl:if><xsl:value-of
select="$paramname"/>.get<xsl:value-of select="@partname"/>()
+                                               </xsl:otherwise>
+                                           </xsl:choose>
+                                      </xsl:for-each>
+                                 </xsl:when>
+                                 <xsl:otherwise>
+                                     <xsl:if test="@type!=''"><xsl:if test="position()>1">,</xsl:if><xsl:value-of
select="@name"/></xsl:if>
+                                 </xsl:otherwise>
+                             </xsl:choose>
                   </xsl:for-each>);
 
               </xsl:when>
@@ -172,4 +263,5 @@
 
     }
     </xsl:template>
+
  </xsl:stylesheet>

Modified: webservices/axis2/trunk/java/modules/integration/maven.xml
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/integration/maven.xml?view=diff&rev=451250&r1=451249&r2=451250
==============================================================================
--- webservices/axis2/trunk/java/modules/integration/maven.xml (original)
+++ webservices/axis2/trunk/java/modules/integration/maven.xml Fri Sep 29 04:38:50 2006
@@ -168,7 +168,14 @@
 					</java>
 				 <ant:ant antfile="build.xml" inheritall="true" inheritrefs="true" dir="target/eBaySvc"
 							 target="jar.server"/>
-			</j:if>
+                <ant:echo>Running codegen for eBaySvc WSDL with un wrapping </ant:echo>
+					<java classname="org.apache.axis2.wsdl.WSDL2Java" fork="true">
+						<classpath refid="maven.dependency.classpath"/>
+						<arg line="-ss -sd -g -b -o target/eBaySvcUW -s -t -uw -uri test-resources/eBaySvc.wsdl"/>
+					</java>
+				 <ant:ant antfile="build.xml" inheritall="true" inheritrefs="true" dir="target/eBaySvcUW"
+							 target="jar.server"/>
+            </j:if>
         </j:if>
     </preGoal>
 

Modified: webservices/axis2/trunk/java/modules/xmlbeans/src/org/apache/axis2/xmlbeans/template/XmlbeansDatabindingTemplate.xsl
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/xmlbeans/src/org/apache/axis2/xmlbeans/template/XmlbeansDatabindingTemplate.xsl?view=diff&rev=451250&r1=451249&r2=451250
==============================================================================
--- webservices/axis2/trunk/java/modules/xmlbeans/src/org/apache/axis2/xmlbeans/template/XmlbeansDatabindingTemplate.xsl
(original)
+++ webservices/axis2/trunk/java/modules/xmlbeans/src/org/apache/axis2/xmlbeans/template/XmlbeansDatabindingTemplate.xsl
Fri Sep 29 04:38:50 2006
@@ -52,7 +52,7 @@
                                 private  org.apache.axiom.soap.SOAPEnvelope toEnvelope(org.apache.axiom.soap.SOAPFactory
factory,
                                 <xsl:for-each select="../../param[@type!='' and @direction='in'
and @opname=$opname]/param">
                                     <xsl:value-of select="@type"/> param<xsl:value-of
select="position()"/>,
-                                </xsl:for-each>
+                                </xsl:for-each><xsl:value-of select="$inputElementType"/>
dummyWrappedType,
                                 boolean optimizeContent){
 
                                 <xsl:value-of select="$inputElementType"/> wrappedType
= <xsl:value-of select="$inputElementType"/>.Factory.newInstance();



---------------------------------------------------------------------
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