ws-axis-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ami...@apache.org
Subject svn commit: r590008 - 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/emitter/ codegen/src/org/apache/axis2/wsdl/template/jav...
Date Tue, 30 Oct 2007 09:44:59 GMT
Author: amilas
Date: Tue Oct 30 02:44:59 2007
New Revision: 590008

URL: http://svn.apache.org/viewvc?rev=590008&view=rev
Log:
fixed the following issues
1. header attribute sending problem
2. unwrapping the empty sequence elements
3. compilation problem with the unwrapping of the methos have same return type.

Modified:
    webservices/axis2/trunk/java/modules/adb-codegen/src/org/apache/axis2/schema/SchemaCompiler.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/emitter/AxisServiceBasedMultiLanguageEmitter.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/InterfaceTemplate.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/SkeletonInterfaceTemplate.xsl
    webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/template/java/SkeletonTemplate.xsl
    webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/client/Stub.java

Modified: webservices/axis2/trunk/java/modules/adb-codegen/src/org/apache/axis2/schema/SchemaCompiler.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/adb-codegen/src/org/apache/axis2/schema/SchemaCompiler.java?rev=590008&r1=590007&r2=590008&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/adb-codegen/src/org/apache/axis2/schema/SchemaCompiler.java
(original)
+++ webservices/axis2/trunk/java/modules/adb-codegen/src/org/apache/axis2/schema/SchemaCompiler.java
Tue Oct 30 02:44:59 2007
@@ -856,7 +856,7 @@
                 // correct parent schema.
                 XmlSchema resolvedSchema = getParentSchema(parentSchema,complexType.getQName(),COMPONENT_TYPE);
                 if (resolvedSchema == null){
-                    throw new SchemaCompilationException("can not find the parent schema
for the" +
+                    throw new SchemaCompilationException("can not find the parent schema
for the " +
                             "complex type " + complexType.getQName() + " from the parent
schema " +
                     parentSchema.getTargetNamespace());
                 } else {

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?rev=590008&r1=590007&r2=590008&view=diff
==============================================================================
--- 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
Tue Oct 30 02:44:59 2007
@@ -1,3 +1,4 @@
+
 <!--
   ~ Licensed to the Apache Software Foundation (ASF) under one
   ~ or more contributor license agreements. See the NOTICE file
@@ -22,6 +23,8 @@
     <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="innerOutParams" match="//databinders/param[@direction='out']/param"
use="@partname"/>
+    <xsl:key name="outOperationName" match="//databinders/param[@direction='out']" use="@opname"/>
+    <xsl:key name="inOperationName" match="//databinders/param[@direction='in']" use="@opname"/>
     <!--<xsl:key name="paramsType" match="//databinders/param[@direction='in']" use="@type"/>-->
 
     <!-- #################################################################################
 -->
@@ -219,7 +222,8 @@
                              </xsl:if>
                         </xsl:for-each>
 
-                        <xsl:if test="generate-id($outputElement) = generate-id(key('paramsOut',
$outputElementType)[1])">
+                        <xsl:if test="generate-id($outputElement) = generate-id(key('paramsOut',
$outputElementType)[1]) or
+                                  generate-id($outputElement) = generate-id(key('outOperationName',
$opname)[1])">
                             <xsl:if test="string-length(normalize-space($outputElementComplexType))
> 0">
 
                                 private <xsl:value-of select="$outputElementComplexType"/>
get<xsl:value-of select="$opname"/>(
@@ -301,7 +305,8 @@
                         }
                      </xsl:if>
                 </xsl:for-each>
-                <xsl:if test="generate-id($inputElement) = generate-id(key('paramsIn',
$inputElementType)[1])">
+                <xsl:if test="generate-id($inputElement) = generate-id(key('paramsIn',
$inputElementType)[1]) or
+                    generate-id($inputElement) = generate-id(key('inOperationName', $opname)[1])">
                     <xsl:if test="string-length(normalize-space($inputElementComplexType))
> 0">
                         private <xsl:value-of select="$inputElementComplexType"/> get<xsl:value-of
select="$opname"/>(
                         <xsl:value-of select="$inputElementType"/> wrappedType){
@@ -354,7 +359,8 @@
                      </xsl:if>
                 </xsl:for-each>
 
-            <xsl:if test="generate-id($outputElement) = generate-id(key('paramsOut', $outputElementType)[1])">
+            <xsl:if test="generate-id($outputElement) = generate-id(key('paramsOut', $outputElementType)[1])
or
+                    generate-id($outputElement) = generate-id(key('outOperationName', $opname)[1])">
                 <xsl:if test="string-length(normalize-space($outputElementComplexType))
> 0">
                     <!-- in server side we do not want to unwrap the output type -->
                     <!--

Modified: webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/codegen/emitter/AxisServiceBasedMultiLanguageEmitter.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/codegen/emitter/AxisServiceBasedMultiLanguageEmitter.java?rev=590008&r1=590007&r2=590008&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/codegen/emitter/AxisServiceBasedMultiLanguageEmitter.java
(original)
+++ webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/codegen/emitter/AxisServiceBasedMultiLanguageEmitter.java
Tue Oct 30 02:44:59 2007
@@ -2890,6 +2890,12 @@
                 }
             }
 
+            //added the unwapparameters attribute this is use full to unwrap if paramerters
are
+            //zero
+            if (!this.codeGenConfiguration.isParametersWrapped()){
+                addAttribute(doc, "unwrappParameters", "true", mainParameter);
+            }
+
             // this message has been unwrapped - find the correct references of the
             // the message by looking at the unwrapped details object and attach the
             // needed parameters inside main parameter element

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?rev=590008&r1=590007&r2=590008&view=diff
==============================================================================
--- 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
Tue Oct 30 02:44:59 2007
@@ -280,13 +280,15 @@
                             <xsl:text> </xsl:text><xsl:value-of select="@name"/>(
 
                             <xsl:variable name="inputcount" select="count(input/param[@location='body'
and @type!=''])"/>
+                            <xsl:variable name="isUnwrapParameters" select="input/param[@location='body'
and @type!='']/@unwrappParameters"/>
+                            <xsl:variable name="inputParamCount" select="count(input/param[@location='body'
and @type!='']/param)"/>
+
                             <xsl:choose>
                                 <xsl:when test="$inputcount=1">
                                     <!-- 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:choose>
-                                        <xsl:when test="$inputWrappedCount &gt; 0">
+                                                                        <xsl:choose>
+                                        <xsl:when test="$isUnwrapParameters">
                                            <xsl:for-each select="input/param[@location='body'
and @type!='']/param">
                                                 <xsl:if test="position()>1">,</xsl:if><xsl:value-of
select="@type"/><xsl:text> </xsl:text><xsl:value-of select="@name"/>
                                             </xsl:for-each>
@@ -299,7 +301,8 @@
                                 <xsl:otherwise><!-- Just leave it - nothing we can
do here --></xsl:otherwise>
                             </xsl:choose>
 
-                            <xsl:if test="$inputcount=1 and input/param[not(@location='body')
and @type!='']">,</xsl:if>
+                            <xsl:if test="($inputcount=1 and input/param[not(@location='body')
and @type!='']) and
+                                not($isUnwrapParameters and $inputParamCount=0)">,</xsl:if>
                             <xsl:for-each select="input/param[not(@location='body') and
@type!='']">
                                 <xsl:if test="position()>1">,</xsl:if><xsl:value-of
select="@type"/><xsl:text> </xsl:text><xsl:value-of select="@name"/>
                             </xsl:for-each>)
@@ -344,7 +347,7 @@
                                                 wrapped parameters -->
                                             <!-- unwrapping takes place only if the back
word compatiblity is off. if -b on
                                              then we do not unwrapp and only remove the top
element -->
-                                           <xsl:variable name="inputWrappedCount" select="count(input/param[@location='body'
and @type!='']/param)"/>
+                                           <xsl:variable name="isUnwrapParameters" select="input/param[@location='body'
and @type!='']/@unwrappParameters"/>
                                            <xsl:variable name="inputElementType" select="input/param[@location='body'
and @type!='']/@type"></xsl:variable>
                                            <xsl:variable name="inputElementComplexType"
select="input/param[@location='body' and @type!='']/@complextype"></xsl:variable>
                                            <xsl:variable name="opName" select="input/param[@location='body'
and @type!='']/@opname"></xsl:variable>
@@ -357,7 +360,7 @@
                                                     optimizeContent(new javax.xml.namespace.QName("<xsl:value-of
select="$method-ns"/>",
                                                     "<xsl:value-of select="$method-name"/>")));
                                                 </xsl:when>
-                                                <xsl:when test="($inputWrappedCount &gt;
0) and not($isbackcompatible='true')">
+                                                <xsl:when test="($isUnwrapParameters)
and not($isbackcompatible='true')">
                                                     <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">
@@ -581,13 +584,15 @@
                 public  void start<xsl:value-of select="@name"/>(
 
                  <xsl:variable name="inputcount" select="count(input/param[@location='body'
and @type!=''])"/>
+                 <xsl:variable name="isUnwrapParameters" select="input/param[@location='body'
and @type!='']/@unwrappParameters"/>
+                 <xsl:variable name="inputWrappedCount" select="count(input/param[@location='body'
and @type!='']/param)"/>
+
                     <xsl:choose>
                         <xsl:when test="$inputcount=1">
                             <!-- 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:choose>
-                                <xsl:when test="$inputWrappedCount &gt; 0">
+                                                       <xsl:choose>
+                                <xsl:when test="$isUnwrapParameters">
                                    <xsl:for-each select="input/param[@location='body'
and @type!='']/param">
                                         <xsl:if test="position()>1">,</xsl:if><xsl:value-of
select="@type"/><xsl:text> </xsl:text><xsl:value-of select="@name"/>
                                     </xsl:for-each>
@@ -599,7 +604,7 @@
                         </xsl:when>
                         <xsl:otherwise><!-- Just leave it - nothing we can do here
--></xsl:otherwise>
                     </xsl:choose>                                                
-                    <xsl:if test="$inputcount=1">,</xsl:if>
+                    <xsl:if test="($inputcount=1) and not($isUnwrapParameters and $inputWrappedCount=0)">,</xsl:if>
                     <xsl:for-each select="input/param[not(@location='body') and @type!='']">
                        <xsl:value-of select="@type"/><xsl:text> </xsl:text><xsl:value-of
select="@name"/>,
                     </xsl:for-each>
@@ -635,11 +640,11 @@
                                         <xsl:when test="$inputcount=1">
                                             <!-- 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="isUnwrapParameters" select="input/param[@location='body'
and @type!='']/@unwrappParameters"/>
                                             <xsl:variable name="inputElementType" select="input/param[@location='body'
and @type!='']/@type"></xsl:variable>
 
                                             <xsl:choose>
-                                                <xsl:when test="$inputWrappedCount &gt;
0">
+                                                <xsl:when test="$isUnwrapParameters">
                                                     <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">
@@ -893,9 +898,9 @@
                         <xsl:when test="$inputcount=1">
                             <!-- 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="isUnwrapParameters" select="input/param[@location='body'
and @type!='']/@unwrappParameters"/>
                             <xsl:choose>
-                                <xsl:when test="$inputWrappedCount &gt; 0">
+                                <xsl:when test="$isUnwrapParameters">
                                    <xsl:for-each select="input/param[@location='body'
and @type!='']/param">
                                         <xsl:if test="position()>1">,</xsl:if><xsl:value-of
select="@type"/><xsl:text> </xsl:text><xsl:value-of select="@name"/>
                                     </xsl:for-each>
@@ -950,11 +955,11 @@
                                                         <xsl:when test="$inputcount=1">
                                                             <!-- 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="isUnwrapParameters"
select="input/param[@location='body' and @type!='']/@unwrappParameters"/>
                                                             <xsl:variable name="inputElementType"
select="input/param[@location='body' and @type!='']/@type"></xsl:variable>
 
                                                             <xsl:choose>
-                                                                <xsl:when test="$inputWrappedCount
&gt; 0">
+                                                                <xsl:when test="$isUnwrapParameters">
                                                                     <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">

Modified: webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/template/java/InterfaceTemplate.xsl
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/template/java/InterfaceTemplate.xsl?rev=590008&r1=590007&r2=590008&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/template/java/InterfaceTemplate.xsl
(original)
+++ webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/template/java/InterfaceTemplate.xsl
Tue Oct 30 02:44:59 2007
@@ -114,9 +114,9 @@
                             <xsl:when test="$inputcount=1">
                                 <!-- 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="isUnwrapParameters" select="input/param[@location='body'
and @type!='']/@unwrappParameters"/>
                                 <xsl:choose>
-                                    <xsl:when test="$inputWrappedCount &gt; 0">
+                                    <xsl:when test="$isUnwrapParameters">
                                        <xsl:for-each select="input/param[@location='body'
and @type!='']/param">
                                             <xsl:if test="position()>1">,</xsl:if><xsl:value-of
select="@type"/><xsl:text> </xsl:text><xsl:value-of select="@name"/>
                                        </xsl:for-each>
@@ -160,9 +160,9 @@
                     <xsl:when test="$inputcount=1">
                         <!-- 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="isUnwrapParameters" select="input/param[@location='body'
and @type!='']/@unwrappParameters"/>
                         <xsl:choose>
-                            <xsl:when test="$inputWrappedCount &gt; 0">
+                            <xsl:when test="$isUnwrapParameters">
                                <xsl:for-each select="input/param[@location='body' and
@type!='']/param">
                                     <xsl:if test="position()>1">,</xsl:if><xsl:value-of
select="@type"/><xsl:text> </xsl:text><xsl:value-of select="@name"/>
                                 </xsl:for-each>
@@ -203,9 +203,9 @@
                 <xsl:when test="$inputcount=1">
                     <!-- 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="isUnwrapParameters" select="input/param[@location='body'
and @type!='']/@unwrappParameters"/>
                     <xsl:choose>
-                        <xsl:when test="$inputWrappedCount &gt; 0">
+                        <xsl:when test="$isUnwrapParameters">
                            <xsl:for-each select="input/param[@location='body' and @type!='']/param">
                                 <xsl:if test="position()>1">,</xsl:if><xsl:value-of
select="@type"/><xsl:text> </xsl:text><xsl:value-of select="@name"/>
                </xsl:for-each>

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?rev=590008&r1=590007&r2=590008&view=diff
==============================================================================
--- 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
Tue Oct 30 02:44:59 2007
@@ -190,9 +190,9 @@
                                                        </xsl:when>
                                                    </xsl:choose>
                                                </xsl:if>
-                                               <xsl:variable name="inputWrappedCount"
select="count(input/param[@location='body' and @type!='']/param)"/>
+                                               <xsl:variable name="isUnwrapParameters"
select="input/param[@location='body' and @type!='']/@unwrappParameters"/>
                                                 <xsl:choose>
-                                                    <xsl:when test="($inputWrappedCount
&gt; 0)">
+                                                    <xsl:when test="($isUnwrapParameters)">
                                                         <!-- generate the references.
the getters need to be
                                                             generated by the databinding-->
 
@@ -371,7 +371,7 @@
                         <xsl:when test="$style='rpc' or $style='document'">
 
                             <xsl:variable name="paramCount" select="count(input/param[@location='body'
and @type!=''])"/>
-                            <xsl:variable name="inputWrappedCount" select="count(input/param[@location='body'
and @type!='']/param)"/>
+                            <xsl:variable name="isUnwrapParameters" select="input/param[@location='body'
and @type!='']/@unwrappParameters"/>
                             <xsl:choose>
                                 <xsl:when test="$paramCount =1">
                                     <xsl:value-of select="input/param[@location='body'
and @type!='']/@type"/> wrappedParam = (<xsl:value-of select="input/param[@location='body'
and @type!='']/@type"/>)fromOM(
@@ -379,7 +379,7 @@
                                                         <xsl:value-of select="input/param[@location='body'
and @type!='']/@type"/>.class,
                                                         getEnvelopeNamespaces(inMessage.getEnvelope()));
                                             <xsl:choose>
-                                                <xsl:when test="($inputWrappedCount &gt;
0)">
+                                                <xsl:when test="($isUnwrapParameters)">
                                                     <!-- generate the references. the
getters need to be
                                                         generated by the databinding-->
 
@@ -550,9 +550,9 @@
                                                         getEnvelopeNamespaces(msgContext.getEnvelope()));
                                             <!-- 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="isUnwrapParameters" select="input/param[@location='body'
and @type!='']/@unwrappParameters"/>
                                             <xsl:choose>
-                                                <xsl:when test="$inputWrappedCount &gt;
0">
+                                                <xsl:when test="$isUnwrapParameters">
                                                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>

Modified: webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/template/java/SkeletonInterfaceTemplate.xsl
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/template/java/SkeletonInterfaceTemplate.xsl?rev=590008&r1=590007&r2=590008&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/template/java/SkeletonInterfaceTemplate.xsl
(original)
+++ webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/template/java/SkeletonInterfaceTemplate.xsl
Tue Oct 30 02:44:59 2007
@@ -66,9 +66,9 @@
                         <xsl:when test="$inputcount=1">
                             <!-- 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="isUnwrapParameters" select="input/param[@location='body'
and @type!='']/@unwrappParameters"/>
                             <xsl:choose>
-                                <xsl:when test="$inputWrappedCount &gt; 0">
+                                <xsl:when test="$isUnwrapParameters">
                                    <xsl:for-each select="input/param[@location='body'
and @type!='']/param">
                                         * @param<xsl:text> </xsl:text><xsl:value-of
select="@name"/>
                                     </xsl:for-each>
@@ -124,9 +124,9 @@
                         <xsl:when test="$inputcount=1">
                             <!-- 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="isUnwrapParameters" select="input/param[@location='body'
and @type!='']/@unwrappParameters"/>
                             <xsl:choose>
-                                <xsl:when test="$inputWrappedCount &gt; 0">
+                                <xsl:when test="$isUnwrapParameters">
                                    <xsl:for-each select="input/param[@location='body'
and @type!='']/param">
                                         <xsl:if test="position()>1">,</xsl:if><xsl:value-of
select="@type"/><xsl:text> </xsl:text><xsl:value-of select="@name"/>
                                     </xsl:for-each>

Modified: webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/template/java/SkeletonTemplate.xsl
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/template/java/SkeletonTemplate.xsl?rev=590008&r1=590007&r2=590008&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/template/java/SkeletonTemplate.xsl
(original)
+++ webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/template/java/SkeletonTemplate.xsl
Tue Oct 30 02:44:59 2007
@@ -68,9 +68,9 @@
                         <xsl:when test="$inputcount=1">
                             <!-- 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="isUnwrapParameters" select="input/param[@location='body'
and @type!='']/@unwrappParameters"/>
                             <xsl:choose>
-                                <xsl:when test="$inputWrappedCount &gt; 0">
+                                <xsl:when test="$isUnwrapParameters">
                                    <xsl:for-each select="input/param[@location='body'
and @type!='']/param">
                                      * @param<xsl:text> </xsl:text><xsl:value-of
select="@name"/>
                                     </xsl:for-each>
@@ -127,9 +127,9 @@
                             <xsl:when test="$inputcount=1">
                                 <!-- 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="isUnwrapParameters" select="input/param[@location='body'
and @type!='']/@unwrappParameters"/>
                                 <xsl:choose>
-                                    <xsl:when test="$inputWrappedCount &gt; 0">
+                                    <xsl:when test="$isUnwrapParameters">
                                        <xsl:for-each select="input/param[@location='body'
and @type!='']/param">
                                             <xsl:if test="position()>1">,</xsl:if><xsl:value-of
select="@type"/><xsl:text> </xsl:text><xsl:value-of select="@name"/>
                                         </xsl:for-each>

Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/client/Stub.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/client/Stub.java?rev=590008&r1=590007&r2=590008&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/client/Stub.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/client/Stub.java Tue
Oct 30 02:44:59 2007
@@ -197,9 +197,18 @@
                 envelop.getHeader().addHeaderBlock(omElementToadd.getLocalName(),omElementToadd.getNamespace());
         soapHeaderBlock.setMustUnderstand(mustUnderstand);
         OMNode omNode = null;
+
+        // add child elements
         for (Iterator iter = omElementToadd.getChildren(); iter.hasNext();){
              omNode = (OMNode) iter.next();
              soapHeaderBlock.addChild(omNode);
+        }
+
+        OMAttribute omatribute = null;
+        // add attributes
+        for (Iterator iter = omElementToadd.getAllAttributes(); iter.hasNext();){
+             omatribute = (OMAttribute) iter.next();
+             soapHeaderBlock.addAttribute(omatribute);
         }
 
     }



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