Committed in. Thanks for the patch.

Samisa...

Dimuthu Gamage wrote:

Hi,
Codegen XML in/out model samples(Stub and Skel) are attached with this(xml_inout.tar.bz2 ). And svn_diff include some fixes for templates and writer classes in generating XML in/out code.

Regards
Dimuthu

------------------------------------------------------------------------

Index: adb-codegen/src/org/apache/axis2/schema/typemap/CTypeMap.java
===================================================================
--- adb-codegen/src/org/apache/axis2/schema/typemap/CTypeMap.java       
(revision 414253)
+++ adb-codegen/src/org/apache/axis2/schema/typemap/CTypeMap.java       
(working copy)
@@ -20,4 +20,4 @@
         return CTypeInfo.getTypeMap();
    }

-}
+}
\ No newline at end of file
Index: 
adb-codegen/src/org/apache/axis2/schema/template/CADBBeanTemplateSource.xsl
===================================================================
--- adb-codegen/src/org/apache/axis2/schema/template/CADBBeanTemplateSource.xsl 
(revision 416296)
+++ adb-codegen/src/org/apache/axis2/schema/template/CADBBeanTemplateSource.xsl 
(working copy)
@@ -341,10 +341,11 @@
                axiom_node_t* <xsl:value-of select="$name"/>_om_node)
        {
            <xsl:value-of select="$axis2_name"/>_impl_t *<xsl:value-of 
select="$name"/>_impl = NULL;
-            axiom_node_t* current_node = NULL;

+
            <xsl:for-each select="property">
             <xsl:if test="position()=1">
+               axiom_node_t* current_node = NULL;
              <xsl:if test="not(@ours)">
               axiom_element_t* text_element = NULL;
               axis2_char_t* text_result = NULL;
@@ -411,7 +412,7 @@
                    text_result = AXIOM_ELEMENT_GET_TEXT(text_element, env, 
current_node );
                    <xsl:choose>
                      <xsl:when test="$singlepropertyType='axis2_char_t*'">
-                        <xsl:value-of select="$name"/>_impl-> attr_<xsl:value-of 
select="$javaName"/><xsl:if test="@isarray">[ index]</xsl:if> =strdup(text_result);
+                        <xsl:value-of select="$name"/>_impl-> attr_<xsl:value-of 
select="$javaName"/><xsl:if test="@isarray">[ index]</xsl:if> =AXIS2_STRDUP(text_result,env);
                      </xsl:when>
                      <xsl:when test="$singlepropertyType='int'">
                        <xsl:value-of select="$name"/>_impl-> attr_<xsl:value-of 
select="$javaName"/><xsl:if test="@isarray">[ index]</xsl:if> =atoi (text_result);
@@ -462,7 +463,7 @@

           return AXIS2_SUCCESS;
        }
- +
        axiom_node_t* AXIS2_CALL
        <xsl:value-of select="$axis2_name"/>_build_om (
                <xsl:value-of select="$axis2_name"/>_t*<xsl:text> </xsl:text><xsl:value-of 
select="$name"/>,
@@ -471,12 +472,12 @@
        {
            <xsl:value-of select="$axis2_name"/>_impl_t *<xsl:value-of 
select="$name"/>_impl = NULL;
            axiom_node_t* om_node = NULL;
-            axiom_node_t* current_node = NULL;
-            axiom_element_t* current_element = NULL;
-            axiom_attribute_t* text_attri = NULL;
-            axiom_namespace_t* ns1 = NULL;
            <xsl:for-each select="property">
             <xsl:if test="position()=1">
+              axiom_attribute_t* text_attri = NULL;
+              axiom_namespace_t* ns1 = NULL;
+              axiom_node_t* current_node = NULL;
+              axiom_element_t* current_element = NULL;
               <xsl:choose>
                <xsl:when test="@ours">

@@ -493,7 +494,8 @@
            </xsl:for-each>
            AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
            <xsl:value-of select="$name"/>_impl = AXIS2_INTF_TO_IMPL(<xsl:value-of 
select="$name"/>);
-            <xsl:for-each select="property">
+            <xsl:variable name="propCount"><xsl:value-of 
select="count(property)"/></xsl:variable>
+        <xsl:for-each select="property">
              <xsl:variable name="propertyType"><xsl:if test="@ours">axis2_</xsl:if><xsl:choose><xsl:when 
test="@type='org.apache.axiom.om.OMElement'">axiom_node_t*</xsl:when><xsl:otherwise><xsl:value-of select="@type"></xsl:value-of></xsl:otherwise></xsl:choose><xsl:if 
test="@ours">_t*</xsl:if><xsl:if test="@isarray">*</xsl:if> </xsl:variable>
              <xsl:variable name="singlepropertyType"><xsl:if test="@ours">axis2_</xsl:if><xsl:choose><xsl:when 
test="@type='org.apache.axiom.om.OMElement'">axiom_node_t*</xsl:when><xsl:otherwise><xsl:value-of 
select="@type"></xsl:value-of></xsl:otherwise></xsl:choose><xsl:if test="@ours">_t*</xsl:if> </xsl:variable>
              <xsl:variable name="capspropertyType"><xsl:if test="@ours">AXIS2_</xsl:if><xsl:value-of 
select="@caps-type"></xsl:value-of></xsl:variable>
@@ -503,64 +505,62 @@
              <xsl:variable name="arrayele"><xsl:value-of 
select="@arrayele"></xsl:value-of></xsl:variable>


-
              <xsl:if test="@isarray">
               <xsl:if test="position()=1">

-                 if ( NULL == xsi &amp;&amp; xsd != NULL)
-                 {
-                    ns1 = axiom_namespace_create (env,
+                ns1 = axiom_namespace_create (env,
                                                  "<xsl:value-of 
select="$nsuri"/>",
                                                  "<xsl:value-of 
select="$nsprefix"/>");
-                    current_element = axiom_element_create (env, parent, "<xsl:value-of 
select="$propertyName"/>", ns1 , &amp;array_node);
-                 }
-                 else
-                 {
-                    current_element = axiom_element_create (env, parent, "<xsl:value-of 
select="$propertyName"/>", NULL , &amp;array_node);
-                 }
-                 parent= array_node;
+                current_element = axiom_element_create (env, parent, "<xsl:value-of 
select="$name"/>", ns1 , &amp;array_node);
+                AXIOM_ELEMENT_SET_NAMESPACE ( current_element, env, ns1, 
array_node );
+                parent= array_node;
              </xsl:if>
-              for ( index = 0; index &lt; <xsl:value-of 
select="$name"/>_impl->attr_<xsl:value-of select="$javaName"/>_length ; index ++ )
+              for ( index = 0; index &lt; <xsl:value-of 
select="$name"/>_impl->attr_<xsl:value-of select="$propertyName"/>_length ; index ++ )
              {
              </xsl:if>

              <xsl:choose>
                <xsl:when test="@ours">
-                 current_element = axiom_element_create (env, parent, "<xsl:if test="not(@isarray)"><xsl:value-of 
select="$name"/></xsl:if><xsl:if test="@isarray"><xsl:value-of select="$arrayele"/>element</xsl:if>", NULL 
, &amp;current_node);
+                 current_element = axiom_element_create (env, parent, "<xsl:if test="not(@isarray)"><xsl:value-of 
select="$name"/></xsl:if><xsl:if test="@isarray"><xsl:value-of select="$propertyName"/></xsl:if>", ns1 , 
&amp;current_node);
+                 AXIOM_ELEMENT_SET_NAMESPACE ( current_element, env, ns1, 
current_node );
                </xsl:when>
                <xsl:otherwise>
-                 if ( NULL == xsi &amp;&amp; xsd != NULL)
-                 {
+                 <!-- if only 1 property found use the name of the file to wrap 
otherwise use spcial name for the property -->
+                 <xsl:variable name="curele_name">
+                     <xsl:if test="$propCount=1">
+                         <xsl:value-of select="$name"/>
+                     </xsl:if>
+                     <xsl:if test="not($propCount=1)">
+                         <xsl:value-of select="$propertyName"/>
+                     </xsl:if>
+                  </xsl:variable>
                    ns1 = axiom_namespace_create (env,
                                                  "<xsl:value-of 
select="$nsuri"/>",
                                                  "<xsl:value-of 
select="$nsprefix"/>");
-                    current_element = axiom_element_create (env, parent, "<xsl:value-of 
select="$propertyName"/>", ns1 , &amp;current_node);
-                 }
-                 else
-                 {
-                    current_element = axiom_element_create (env, parent, "<xsl:value-of 
select="$propertyName"/>", NULL , &amp;current_node);
-                  }
+                    current_element = axiom_element_create (env, parent, "<xsl:value-of 
select="$curele_name"/>", ns1 , &amp;current_node);
+                    AXIOM_ELEMENT_SET_NAMESPACE ( current_element, env, ns1, 
current_node );
                </xsl:otherwise>
              </xsl:choose>

+
              <xsl:choose>
                <xsl:when test="@ours">
                  <xsl:value-of select="$capspropertyType"/>_BUILD_OM ( <xsl:value-of select="$name"/>_impl-> 
attr_<xsl:value-of select="$javaName"/><xsl:if test="@isarray">[index ]</xsl:if>, env, current_node, xsi, xsd );
                  text_attri = axiom_attribute_create (env, "type", "<xsl:value-of 
select="$nsprefix"/>:<xsl:value-of select="@type"/>", xsi);
                  AXIOM_ELEMENT_ADD_ATTRIBUTE (current_element, env, 
text_attri, current_node);
-                  <xsl:if test="not(@isarray)">
+
                  ns1 = axiom_namespace_create (env,
                                                  "<xsl:value-of 
select="$nsuri"/>",
                                                  "<xsl:value-of 
select="$nsprefix"/>");
                  AXIOM_ELEMENT_DECLARE_NAMESPACE (current_element, env,
                                                      current_node, ns1);
-                  </xsl:if>
+ </xsl:when>
                <xsl:otherwise>

                    <xsl:choose>
                      <xsl:when test="$singlepropertyType='axis2_char_t*'">
-                        text_value = strdup (<xsl:value-of select="$name"/>_impl-> attr_<xsl:value-of 
select="$javaName"/><xsl:if test="@isarray">[index ]</xsl:if>) ;
+                        text_value = AXIS2_STRDUP (<xsl:value-of select="$name"/>_impl-> attr_<xsl:value-of 
select="$javaName"/><xsl:if test="@isarray">[index ]</xsl:if>, env) ;

                        if ( xsi != NULL &amp;&amp; xsd != NULL)
                        {
@@ -639,6 +639,8 @@
                        AXIOM_ELEMENT_SET_TEXT(current_element, env, 
text_value, current_node);
                      </xsl:when>
                      <xsl:otherwise>
+                         text_attri = NULL;
+                         text_value = NULL;
                        /** imposible to handle the request type - so please do 
it manually*/
                      </xsl:otherwise>
                    </xsl:choose>
Index: adb-codegen/src/org/apache/axis2/schema/writer/CStructWriter.java
===================================================================
--- adb-codegen/src/org/apache/axis2/schema/writer/CStructWriter.java   
(revision 415947)
+++ adb-codegen/src/org/apache/axis2/schema/writer/CStructWriter.java   
(working copy)
@@ -487,7 +487,6 @@
                {
                    String arrayEle = attrName.substring(0, arrayTokenStart);
                    XSLTUtils.addAttribute(model, "arrayele", arrayEle, 
property);
-                    System.out.println(arrayEle);
                }
                XSLTUtils.addAttribute(model, "isarray", "yes", property);
                XSLTUtils.addAttribute(
@@ -600,6 +599,8 @@
        XSLTTemplateProcessor.parse(outStream,
                doc,
                this.sourceTemplateCache.newTransformer());
+        outStream.write('\n');
+        outStream.write('\n');
        outStream.flush();
        outStream.close();

@@ -617,6 +618,8 @@
        XSLTTemplateProcessor.parse(outStream,
                doc,
                this.headerTemplateCache.newTransformer());
+        outStream.write('\n');
+        outStream.write('\n');
        outStream.flush();
        outStream.close();

Index: codegen/src/org/apache/axis2/wsdl/codegen/emitter/CEmitter.java
===================================================================
--- codegen/src/org/apache/axis2/wsdl/codegen/emitter/CEmitter.java     
(revision 414519)
+++ codegen/src/org/apache/axis2/wsdl/codegen/emitter/CEmitter.java     
(working copy)
@@ -338,7 +338,6 @@
        if ( isOurs && !paramType.equals("") && !paramType.equals("void") &&
                !paramType.equals("org.apache.axiom.om.OMElement") ){
            addAttribute(doc, "ours", "yes", param);
-            System.out.println(paramType);
        }
    }

Index: codegen/src/org/apache/axis2/wsdl/template/c/StubSourceTemplate.xsl
===================================================================
--- codegen/src/org/apache/axis2/wsdl/template/c/StubSourceTemplate.xsl 
(revision 414519)
+++ codegen/src/org/apache/axis2/wsdl/template/c/StubSourceTemplate.xsl 
(working copy)
@@ -63,7 +63,7 @@

          /*Modifying the Service*/
          svc_client = AXIS2_STUB_GET_SVC_CLIENT (stub, env );
-          svc = AXIS2_SVC_CLIENT_GET_AXIS_SERVICE ( svc_client, env );
+          svc = (axis2_svc_t*)AXIS2_SVC_CLIENT_GET_AXIS_SERVICE ( svc_client, 
env );
          axis2_qname_create(env,"<xsl:value-of select="@servicename"/>" ,NULL, 
NULL);
          AXIS2_SVC_SET_QNAME (svc, env, svc_qname);

@@ -111,8 +111,8 @@

    <xsl:for-each select="method">
      <xsl:variable name="outputours"><xsl:value-of 
select="output/param/@ours"></xsl:value-of></xsl:variable>
-      <xsl:variable name="outputtype"><xsl:if test="$outputours">axis2_</xsl:if><xsl:choose><xsl:when 
test="output/param/@type='org.apache.axiom.om.OMElement'">om_node</xsl:when><xsl:otherwise><xsl:value-of 
select="output/param/@type"></xsl:value-of></xsl:otherwise></xsl:choose><xsl:if test="$outputours">_t*</xsl:if></xsl:variable>
-      <xsl:variable name="capsoutputtype"><xsl:if test="$outputours">AXIS2_</xsl:if><xsl:choose><xsl:when 
test="output/param/@type='org.apache.axiom.om.OMElement'">om_node</xsl:when><xsl:otherwise><xsl:value-of 
select="output/param/@caps-type"></xsl:value-of></xsl:otherwise></xsl:choose></xsl:variable>
+      <xsl:variable name="outputtype"><xsl:choose><xsl:when 
test="output/param/@type='org.apache.axiom.om.OMElement'">axiom_node_t*</xsl:when><xsl:otherwise><xsl:if test="output/param/@ours">axis2_</xsl:if><xsl:value-of 
select="output/param/@type"></xsl:value-of><xsl:if test="output/param/@ours">_t*</xsl:if></xsl:otherwise></xsl:choose></xsl:variable>
+      <xsl:variable name="capsoutputtype"><xsl:if test="$outputours"></xsl:if><xsl:choose><xsl:when 
test="output/param/@type='org.apache.axiom.om.OMElement'">AXIOM_NODE</xsl:when><xsl:otherwise>AXIS2_<xsl:value-of 
select="output/param/@caps-type"></xsl:value-of></xsl:otherwise></xsl:choose></xsl:variable>
      <xsl:variable name="style"><xsl:value-of 
select="@style"></xsl:value-of></xsl:variable>
      <xsl:variable name="soapAction"><xsl:value-of 
select="@soapaction"></xsl:value-of></xsl:variable>
      <xsl:variable name="mep"><xsl:value-of select="@mep"/></xsl:variable>
@@ -134,7 +134,7 @@
           <xsl:value-of select="$outputtype"/>
           </xsl:otherwise>
           </xsl:choose>
-           axis2_<xsl:value-of select="@name"/>( axis2_stub_t* stub, const axis2_env_t* env <xsl:for-each select="input/[EMAIL PROTECTED]'']"> ,<xsl:variable name="paramtype"><xsl:if 
test="@ours">axis2_</xsl:if><xsl:choose><xsl:when test="@type='org.apache.axiom.om.OMElement'">om_node</xsl:when><xsl:otherwise><xsl:value-of 
select="@type"></xsl:value-of></xsl:otherwise></xsl:choose><xsl:if test="@ours">_t*</xsl:if></xsl:variable>
+           axis2_<xsl:value-of select="@name"/>( axis2_stub_t* stub, const axis2_env_t* env <xsl:for-each select="input/[EMAIL PROTECTED]'']"> ,<xsl:variable 
name="paramtype"><xsl:choose><xsl:when test="@type='org.apache.axiom.om.OMElement'">axiom_node_t*</xsl:when><xsl:otherwise><xsl:if test="@ours">axis2_</xsl:if><xsl:value-of 
select="@type"></xsl:value-of><xsl:if test="@ours">_t*</xsl:if></xsl:otherwise></xsl:choose></xsl:variable>
                                                <xsl:if test="position()>1">,</xsl:if><xsl:value-of 
select="$paramtype"/><xsl:text> </xsl:text><xsl:value-of select="@name"/>
                                                </xsl:for-each>)
           {
@@ -154,23 +154,21 @@
             <xsl:for-each select="input/[EMAIL PROTECTED]'' and @ours]">
                <xsl:if test="position()=1"> <!--declare only once-->
                  /* declarations for temp nodes to build input message */
-                  axiom_element_t* payload_ele = NULL;
-                   axiom_namespace_t* payload_ns = NULL;
+
                  <xsl:if test="$style='rpc'">
                   axiom_attribute_t* attri1 = NULL;
                   axiom_namespace_t* ns1 = NULL;
                   axiom_namespace_t* xsi = NULL;
                   axiom_namespace_t* xsd = NULL;
+                   axiom_element_t* payload_ele = NULL;
                  </xsl:if>
                </xsl:if>
-                <xsl:if test="$style='rpc'">
-                 axiom_node_t* input_param_om<xsl:value-of 
select="position()"/> = NULL;
-                </xsl:if>
              </xsl:for-each>

              <xsl:for-each select="input/[EMAIL PROTECTED]'']">
-              <xsl:variable name="paramtype"><xsl:if test="@ours">axis2_</xsl:if><xsl:choose><xsl:when 
test="@type='org.apache.axiom.om.OMElement'">om_node</xsl:when><xsl:otherwise><xsl:value-of 
select="@type"></xsl:value-of></xsl:otherwise></xsl:choose><xsl:if test="@ours">_t*</xsl:if></xsl:variable>
-              <xsl:variable name="capsparamtype"><xsl:if test="@ours">AXIS2_</xsl:if><xsl:choose><xsl:when 
test="@type='org.apache.axiom.om.OMElement'">om_node</xsl:when><xsl:otherwise><xsl:value-of 
select="@caps-type"></xsl:value-of></xsl:otherwise></xsl:choose></xsl:variable>
+              <!-- for service client currently suppported only 1 input param 
-->
+              <xsl:variable name="paramtype"><xsl:choose><xsl:when test="@type='org.apache.axiom.om.OMElement'">axiom_node_t*</xsl:when><xsl:otherwise><xsl:if 
test="@ours">axis2_</xsl:if><xsl:value-of select="@type"></xsl:value-of><xsl:if 
test="@ours">_t*</xsl:if></xsl:otherwise></xsl:choose></xsl:variable>
+              <xsl:variable name="capsparamtype"><xsl:if test="@ours"></xsl:if><xsl:choose><xsl:when 
test="@type='org.apache.axiom.om.OMElement'">AXIOM_NODE</xsl:when><xsl:otherwise>AXIS2_<xsl:value-of 
select="@caps-type"></xsl:value-of></xsl:otherwise></xsl:choose></xsl:variable>
                 <xsl:choose>
                     <xsl:when test="not(@ours)">
                        <xsl:if test="position()=1">
@@ -178,14 +176,13 @@
                        </xsl:if>
                     </xsl:when>
                     <xsl:otherwise>
-                       payload_ns = axiom_namespace_create (env,
-                                                "<xsl:value-of 
select="$method-ns"/>",
-                                                "ns0");
-                       payload_ele = axiom_element_create(env, NULL, "<xsl:value-of 
select="$method-name"/>" , payload_ns, &amp;payload);
+                       <xsl:if test="position()=1">
+                       </xsl:if>
                       <xsl:choose>
                       <xsl:when test="$style='rpc'">
                       <xsl:if test="position()=1">
-
+                           payload = <xsl:value-of 
select="$capsparamtype"/>_BUILD_OM(<xsl:value-of select="@name"/>, env, NULL, xsi, 
xsd );
+                           payload_ele =    AXIOM_NODE_GET_DATA_ELEMENT ( 
payload, env );
                           xsi =
                            axiom_namespace_create (env,
                                                       <xsl:choose><xsl:when 
test="$soapVersion='1.2'">"http://www.w3.org/2001/XMLSchema-instance";</xsl:when><xsl:when 
test="$soapVersion='1.1'">"http://www.w3.org/1999/XMLSchema-instance";</xsl:when></xsl:choose>,
@@ -211,22 +208,18 @@
                           AXIOM_ELEMENT_ADD_ATTRIBUTE (payload_ele, env,
                                                      attri1, payload );
                           </xsl:if>
-
-                           input_param_om<xsl:value-of select="position()"/> = <xsl:value-of 
select="$capsparamtype"/>_BUILD_OM(<xsl:value-of select="@name"/>, env, payload, xsi, xsd );
                       </xsl:when>
                       <xsl:otherwise>
-                           <xsl:value-of select="$capsparamtype"/>_BUILD_OM(<xsl:value-of 
select="@name"/>, env, payload, NULL, NULL );
-                           <!--payload = <xsl:value-of 
select="$capsparamtype"/>_BUILD_OM(<xsl:value-of select="@name"/>, env, NULL, NULL, 
NULL );
-                           payload_ele =  AXIOM_NODE_GET_DATA_ELEMENT ( payload, 
env ); -->
+                           payload = <xsl:value-of 
select="$capsparamtype"/>_BUILD_OM(<xsl:value-of select="@name"/>, env, NULL, 
NULL, NULL );
+
                       </xsl:otherwise>
                       </xsl:choose>
+                        <!--should this omit in doclit type?-->
+                        <!--AXIOM_ELEMENT_SET_NAMESPACE ( payload_ele, env, 
payload_ns, payload );-->
                     </xsl:otherwise>
                 </xsl:choose>
              </xsl:for-each>

-
-
-
              options = AXIS2_STUB_GET_OPTIONS( stub, env);
              if ( NULL == options )
              {
@@ -261,7 +254,7 @@
                  <xsl:when test="$outputtype='axis2__t*'">
                   return;
                  </xsl:when>
-                  <xsl:when test="$outputtype!='axis2_om_node_t*'">
+                  <xsl:when test="$outputtype!='axiom_node_t*'">
                    if ( NULL == ret_node )
                      return NULL;
                    ret_val = axis2_<xsl:value-of 
select="output/param/@type"/>_create(env);
@@ -289,7 +282,7 @@
           */
           <xsl:variable name="callbackoncomplete"><xsl:value-of 
select="$callbackname"></xsl:value-of><xsl:text>_on_complete</xsl:text></xsl:variable>
           <xsl:variable name="callbackonerror"><xsl:value-of 
select="$callbackname"></xsl:value-of><xsl:text>_on_error</xsl:text></xsl:variable>
-           void axis2_start_<xsl:value-of select="@name"/>( axis2_stub_t* stub, const axis2_env_t *env, <xsl:for-each select="input/[EMAIL PROTECTED]'']"><xsl:variable name="paramtype"><xsl:if 
test="@ours">axis2_</xsl:if><xsl:choose><xsl:when test="@type='org.apache.axiom.om.OMElement'">om_node</xsl:when><xsl:otherwise><xsl:value-of 
select="@type"></xsl:value-of></xsl:otherwise></xsl:choose><xsl:if test="@ours">_t*</xsl:if></xsl:variable>
+           void axis2_start_<xsl:value-of select="@name"/>( axis2_stub_t* stub, const axis2_env_t *env, <xsl:for-each select="input/[EMAIL PROTECTED]'']"><xsl:variable 
name="paramtype"><xsl:choose><xsl:when test="@type='org.apache.axiom.om.OMElement'">axiom_node_t*</xsl:when><xsl:otherwise><xsl:if test="@ours">axis2_</xsl:if><xsl:value-of 
select="@type"></xsl:value-of><xsl:if test="@ours">_t*</xsl:if></xsl:otherwise></xsl:choose></xsl:variable>
                                                    <xsl:if test="position()>1">,</xsl:if><xsl:value-of 
select="$paramtype"/><xsl:text> </xsl:text><xsl:value-of select="@name"/>
                                                    </xsl:for-each>,
                                                    axis2_status_t ( AXIS2_CALL 
*on_complete ) (struct axis2_callback *, const axis2_env_t* ) ,
@@ -307,23 +300,20 @@
             <xsl:for-each select="input/[EMAIL PROTECTED]'' and @ours]">
                <xsl:if test="position()=1"> <!--declare only once-->
                  /* declarations for temp nodes to build input message */
-                  axiom_element_t* payload_ele = NULL;
-                  axiom_namespace_t* payload_ns = NULL;
                  <xsl:if test="$style='rpc'">
+                  axiom_element_t* payload_ele = NULL;
                   axiom_attribute_t* attri1 = NULL;
                   axiom_namespace_t* ns1 = NULL;
                   axiom_namespace_t* xsi = NULL;
                   axiom_namespace_t* xsd = NULL;
                  </xsl:if>
                </xsl:if>
-                <xsl:if test="$style='rpc'">
-                 axiom_node_t* input_param_om<xsl:value-of 
select="position()"/> = NULL;
-                </xsl:if>
              </xsl:for-each>

              <xsl:for-each select="input/[EMAIL PROTECTED]'']">
-              <xsl:variable name="paramtype"><xsl:if test="@ours">axis2_</xsl:if><xsl:choose><xsl:when 
test="@type='org.apache.axiom.om.OMElement'">om_node</xsl:when><xsl:otherwise><xsl:value-of 
select="@type"></xsl:value-of></xsl:otherwise></xsl:choose><xsl:if test="@ours">_t*</xsl:if></xsl:variable>
-              <xsl:variable name="capsparamtype"><xsl:if test="@ours">AXIS2_</xsl:if><xsl:choose><xsl:when 
test="@type='org.apache.axiom.om.OMElement'">om_node</xsl:when><xsl:otherwise><xsl:value-of 
select="@caps-type"></xsl:value-of></xsl:otherwise></xsl:choose></xsl:variable>
+              <!-- for service client currently suppported only 1 input param 
-->
+              <xsl:variable name="paramtype"><xsl:choose><xsl:when test="@type='org.apache.axiom.om.OMElement'">axiom_node_t*</xsl:when><xsl:otherwise><xsl:if 
test="@ours">axis2_</xsl:if><xsl:value-of select="@type"></xsl:value-of><xsl:if 
test="@ours">_t*</xsl:if></xsl:otherwise></xsl:choose></xsl:variable>
+              <xsl:variable name="capsparamtype"><xsl:if test="@ours"></xsl:if><xsl:choose><xsl:when 
test="@type='org.apache.axiom.om.OMElement'">AXIOM_NODE</xsl:when><xsl:otherwise>AXIS2_<xsl:value-of 
select="@caps-type"></xsl:value-of></xsl:otherwise></xsl:choose></xsl:variable>
                 <xsl:choose>
                     <xsl:when test="not(@ours)">
                        <xsl:if test="position()=1">
@@ -331,14 +321,13 @@
                        </xsl:if>
                     </xsl:when>
                     <xsl:otherwise>
-                       payload_ns = axiom_namespace_create (env,
-                                                "<xsl:value-of 
select="$soapAction"/>",
-                                                "ns0");
-                       payload_ele = axiom_element_create(env, NULL, "<xsl:value-of 
select="$method-name"/>" , payload_ns, &amp;payload);
+                       <xsl:if test="position()=1">
+                       </xsl:if>
                       <xsl:choose>
                       <xsl:when test="$style='rpc'">
                       <xsl:if test="position()=1">
-
+                           payload = <xsl:value-of 
select="$capsparamtype"/>_BUILD_OM(<xsl:value-of select="@name"/>, env, NULL, xsi, 
xsd );
+                           payload_ele =    AXIOM_NODE_GET_DATA_ELEMENT ( 
payload, env );
                           xsi =
                            axiom_namespace_create (env,
                                                       <xsl:choose><xsl:when 
test="$soapVersion='1.2'">"http://www.w3.org/2001/XMLSchema-instance";</xsl:when><xsl:when 
test="$soapVersion='1.1'">"http://www.w3.org/1999/XMLSchema-instance";</xsl:when></xsl:choose>,
@@ -364,15 +353,14 @@
                           AXIOM_ELEMENT_ADD_ATTRIBUTE (payload_ele, env,
                                                      attri1, payload );
                           </xsl:if>
-
-                           input_param_om<xsl:value-of select="position()"/> = <xsl:value-of 
select="$capsparamtype"/>_BUILD_OM(<xsl:value-of select="@name"/>, env, payload, xsi, xsd );
                       </xsl:when>
                       <xsl:otherwise>
-                           <xsl:value-of select="$capsparamtype"/>_BUILD_OM(<xsl:value-of 
select="@name"/>, env, payload, NULL, NULL );
-                           <!--payload = <xsl:value-of 
select="$capsparamtype"/>_BUILD_OM(<xsl:value-of select="@name"/>, env, NULL, NULL, 
NULL );
-                           payload_ele =  AXIOM_NODE_GET_DATA_ELEMENT ( payload, 
env ); -->
+                           payload = <xsl:value-of 
select="$capsparamtype"/>_BUILD_OM(<xsl:value-of select="@name"/>, env, NULL, 
NULL, NULL );
+
                       </xsl:otherwise>
                       </xsl:choose>
+                        <!--should this omit in doclit type?-->
+                        <!--AXIOM_ELEMENT_SET_NAMESPACE ( payload_ele, env, 
payload_ns, payload );-->
                     </xsl:otherwise>
                 </xsl:choose>
              </xsl:for-each>
@@ -421,7 +409,7 @@
           */

           axis2_status_t
-           axis2_<xsl:value-of select="@name"/>( axis2_stub_t* stub, const axis2_env_t* env <xsl:for-each select="input/[EMAIL PROTECTED]'']"> ,<xsl:variable name="paramtype"><xsl:if 
test="@ours">axis2_</xsl:if><xsl:choose><xsl:when test="@type='org.apache.axiom.om.OMElement'">om_node</xsl:when><xsl:otherwise><xsl:value-of 
select="@type"></xsl:value-of></xsl:otherwise></xsl:choose><xsl:if test="@ours">_t*</xsl:if></xsl:variable>
+           axis2_<xsl:value-of select="@name"/>( axis2_stub_t* stub, const axis2_env_t* env <xsl:for-each select="input/[EMAIL PROTECTED]'']"> ,<xsl:variable 
name="paramtype"><xsl:choose><xsl:when test="@type='org.apache.axiom.om.OMElement'">axiom_node_t*</xsl:when><xsl:otherwise><xsl:if test="@ours">axis2_</xsl:if><xsl:value-of 
select="@type"></xsl:value-of><xsl:if test="@ours">_t*</xsl:if></xsl:otherwise></xsl:choose></xsl:variable>
                                                <xsl:if test="position()>1">,</xsl:if><xsl:value-of 
select="$paramtype"/><xsl:text> </xsl:text><xsl:value-of select="@name"/>
                                                </xsl:for-each>)
           {
@@ -437,75 +425,72 @@
             <xsl:for-each select="input/[EMAIL PROTECTED]'' and @ours]">
                <xsl:if test="position()=1"> <!--declare only once-->
                  /* declarations for temp nodes to build input message */
-                  axiom_element_t* payload_ele = NULL;
-                  axiom_namespace_t* payload_ns = NULL;
+ <xsl:if test="$style='rpc'">
+                  axiom_element_t* payload_ele = NULL;
                   axiom_attribute_t* attri1 = NULL;
                   axiom_namespace_t* ns1 = NULL;
                   axiom_namespace_t* xsi = NULL;
                   axiom_namespace_t* xsd = NULL;
                  </xsl:if>
                </xsl:if>
-                <xsl:if test="$style='rpc'">
-                 axiom_node_t* input_param_om<xsl:value-of 
select="position()"/> = NULL;
-                </xsl:if>
              </xsl:for-each>

-              <xsl:for-each select="input/[EMAIL PROTECTED]'']">
-              <xsl:variable name="paramtype"><xsl:if test="@ours">axis2_</xsl:if><xsl:choose><xsl:when 
test="@type='org.apache.axiom.om.OMElement'">om_node</xsl:when><xsl:otherwise><xsl:value-of 
select="@type"></xsl:value-of></xsl:otherwise></xsl:choose><xsl:if test="@ours">_t*</xsl:if></xsl:variable>
-              <xsl:variable name="capsparamtype"><xsl:if test="@ours">AXIS2_</xsl:if><xsl:choose><xsl:when 
test="@type='org.apache.axiom.om.OMElement'">om_node</xsl:when><xsl:otherwise><xsl:value-of 
select="@caps-type"></xsl:value-of></xsl:otherwise></xsl:choose></xsl:variable>
-                 <xsl:choose>
-                     <xsl:when test="not(@ours)">
-                        <xsl:if test="position()=1">
-                          payload = <xsl:value-of select="@name"/>;
-                        </xsl:if>
-                     </xsl:when>
-                     <xsl:otherwise>
-                       payload_ns = axiom_namespace_create (env,
-                                                "<xsl:value-of 
select="$soapAction"/>",
-                                                "ns0");
-                       payload_ele = axiom_element_create(env, NULL, "<xsl:value-of 
select="$method-name"/>" , payload_ns, &amp;payload);
-                       <xsl:choose>
-                       <xsl:when test="$style='rpc'">
+             <xsl:for-each select="input/[EMAIL PROTECTED]'']">
+             <!-- for service client currently suppported only 1 input param 
-->
+             <xsl:variable name="paramtype"><xsl:choose><xsl:when test="@type='org.apache.axiom.om.OMElement'">axiom_node_t*</xsl:when><xsl:otherwise><xsl:if 
test="@ours">axis2_</xsl:if><xsl:value-of select="@type"></xsl:value-of><xsl:if 
test="@ours">_t*</xsl:if></xsl:otherwise></xsl:choose></xsl:variable>
+             <xsl:variable name="capsparamtype"><xsl:if test="@ours"></xsl:if><xsl:choose><xsl:when 
test="@type='org.apache.axiom.om.OMElement'">AXIOM_NODE</xsl:when><xsl:otherwise>AXIS2_<xsl:value-of 
select="@caps-type"></xsl:value-of></xsl:otherwise></xsl:choose></xsl:variable>
+                <xsl:choose>
+                    <xsl:when test="not(@ours)">
                       <xsl:if test="position()=1">
+                         payload = <xsl:value-of select="@name"/>;
+                       </xsl:if>
+                    </xsl:when>
+                    <xsl:otherwise>
+                      <xsl:if test="position()=1">
+                      </xsl:if>
+                      <xsl:choose>
+                      <xsl:when test="$style='rpc'">
+                      <xsl:if test="position()=1">
+                          payload = <xsl:value-of 
select="$capsparamtype"/>_BUILD_OM(<xsl:value-of select="@name"/>, env, NULL, xsi, 
xsd );
+                          payload_ele =    AXIOM_NODE_GET_DATA_ELEMENT ( 
payload, env );
+                          xsi =
+                           axiom_namespace_create (env,
+                                                      <xsl:choose><xsl:when 
test="$soapVersion='1.2'">"http://www.w3.org/2001/XMLSchema-instance";</xsl:when><xsl:when 
test="$soapVersion='1.1'">"http://www.w3.org/1999/XMLSchema-instance";</xsl:when></xsl:choose>,
+                                                      "xsi");
+                          AXIOM_ELEMENT_DECLARE_NAMESPACE (payload_ele, env,
+                                                     payload, xsi);
+                          xsd =
+                           axiom_namespace_create (env,
+                                                      <xsl:choose><xsl:when 
test="$soapVersion='1.2'">"http://www.w3.org/2001/XMLSchema";</xsl:when><xsl:when 
test="$soapVersion='1.1'">"http://www.w3.org/1999/XMLSchema";</xsl:when></xsl:choose>,
+                                                      "xsd");
+                          AXIOM_ELEMENT_DECLARE_NAMESPACE (payload_ele, env,
+                                                     payload, xsd);
+                          ns1 =
+                           axiom_namespace_create (env,
+                                                      <xsl:choose><xsl:when 
test="$soapVersion='1.2'">AXIOM_SOAP12_SOAP_ENVELOPE_NAMESPACE_URI</xsl:when><xsl:when 
test="$soapVersion='1.1'">AXIOM_SOAP11_SOAP_ENVELOPE_NAMESPACE_URI</xsl:when></xsl:choose>,
+                                                      "soapenv");
+                          AXIOM_ELEMENT_DECLARE_NAMESPACE (payload_ele, env,
+                                                     payload, ns1);
+                          attri1 =
+                           axiom_attribute_create (env, "encodingStyle",
+                                                      
"http://schemas.xmlsoap.org/soap/encoding/";,
+                                                      ns1);
+                          AXIOM_ELEMENT_ADD_ATTRIBUTE (payload_ele, env,
+                                                     attri1, payload );
+                          </xsl:if>
+                      </xsl:when>
+                      <xsl:otherwise>
+                          payload = <xsl:value-of 
select="$capsparamtype"/>_BUILD_OM(<xsl:value-of select="@name"/>, env, NULL, 
NULL, NULL );

-                           xsi =
-                            axiom_namespace_create (env,
-                                                       <xsl:choose><xsl:when 
test="$soapVersion='1.2'">"http://www.w3.org/2001/XMLSchema-instance";</xsl:when><xsl:when 
test="$soapVersion='1.1'">"http://www.w3.org/1999/XMLSchema-instance";</xsl:when></xsl:choose>,
-                                                       "xsi");
-                           AXIOM_ELEMENT_DECLARE_NAMESPACE (payload_ele, env,
-                                                      payload, xsi);
-                           xsd =
-                            axiom_namespace_create (env,
-                                                       <xsl:choose><xsl:when 
test="$soapVersion='1.2'">"http://www.w3.org/2001/XMLSchema";</xsl:when><xsl:when 
test="$soapVersion='1.1'">"http://www.w3.org/1999/XMLSchema";</xsl:when></xsl:choose>,
-                                                       "xsd");
-                           AXIOM_ELEMENT_DECLARE_NAMESPACE (payload_ele, env,
-                                                      payload, xsd);
-                           ns1 =
-                            axiom_namespace_create (env,
-                                                       <xsl:choose><xsl:when 
test="$soapVersion='1.2'">AXIOM_SOAP12_SOAP_ENVELOPE_NAMESPACE_URI</xsl:when><xsl:when 
test="$soapVersion='1.1'">AXIOM_SOAP11_SOAP_ENVELOPE_NAMESPACE_URI</xsl:when></xsl:choose>,
-                                                       "soapenv");
-                           AXIOM_ELEMENT_DECLARE_NAMESPACE (payload_ele, env,
-                                                      payload, ns1);
-                           attri1 =
-                            axiom_attribute_create (env, "encodingStyle",
-                                                       
"http://schemas.xmlsoap.org/soap/encoding/";,
-                                                       ns1);
-                           AXIOM_ELEMENT_ADD_ATTRIBUTE (payload_ele, env,
-                                                      attri1, payload );
-                           </xsl:if>
+                      </xsl:otherwise>
+                      </xsl:choose>
+                       <!--should this omit in doclit type?-->
+                       <!--AXIOM_ELEMENT_SET_NAMESPACE ( payload_ele, env, 
payload_ns, payload );-->
+                    </xsl:otherwise>
+                </xsl:choose>
+             </xsl:for-each>

-                           input_param_om<xsl:value-of select="position()"/> = <xsl:value-of 
select="$capsparamtype"/>_BUILD_OM(<xsl:value-of select="@name"/>, env, payload, xsi, xsd );
-                       </xsl:when>
-                       <xsl:otherwise>
-                           <xsl:value-of select="$capsparamtype"/>_BUILD_OM(<xsl:value-of 
select="@name"/>, env, payload, NULL, NULL );
-                           <!--payload = <xsl:value-of 
select="$capsparamtype"/>_BUILD_OM(<xsl:value-of select="@name"/>, env, NULL, NULL, 
NULL );
-                           payload_ele =  AXIOM_NODE_GET_DATA_ELEMENT ( payload, 
env ); -->
-                       </xsl:otherwise>
-                       </xsl:choose>
-                     </xsl:otherwise>
-                 </xsl:choose>
-              </xsl:for-each>

              options = AXIS2_STUB_GET_OPTIONS( stub, env);
              if ( NULL == options )
Index: codegen/src/org/apache/axis2/wsdl/template/c/SkelSourceTemplate.xsl
===================================================================
--- codegen/src/org/apache/axis2/wsdl/template/c/SkelSourceTemplate.xsl 
(revision 414253)
+++ codegen/src/org/apache/axis2/wsdl/template/c/SkelSourceTemplate.xsl 
(working copy)
@@ -15,7 +15,7 @@
     <xsl:for-each select="method">
         <xsl:variable name="outputours"><xsl:value-of 
select="output/param/@ours"></xsl:value-of></xsl:variable>
         <xsl:variable name="count"><xsl:value-of 
select="count(output/param)"/></xsl:variable>
-         <xsl:variable name="outputtype"><xsl:if test="$outputours">axis2_</xsl:if><xsl:choose><xsl:when 
test="output/param/@type='org.apache.axiom.om.OMElement'">om_node</xsl:when><xsl:otherwise><xsl:value-of 
select="output/param/@type"></xsl:value-of></xsl:otherwise></xsl:choose><xsl:if test="$outputours">_t*</xsl:if></xsl:variable>
+         <xsl:variable name="outputtype"><xsl:choose><xsl:when 
test="output/param/@type='org.apache.axiom.om.OMElement'">axiom_node_t*</xsl:when><xsl:otherwise><xsl:if test="output/param/@ours">axis2_</xsl:if><xsl:value-of 
select="output/param/@type"></xsl:value-of><xsl:if test="output/param/@ours">_t*</xsl:if></xsl:otherwise></xsl:choose></xsl:variable>

                 <!-- regardless of the sync or async status, the generated 
method signature would be just a usual
                   c function-->
Index: codegen/src/org/apache/axis2/wsdl/template/c/StubHeaderTemplate.xsl
===================================================================
--- codegen/src/org/apache/axis2/wsdl/template/c/StubHeaderTemplate.xsl 
(revision 414253)
+++ codegen/src/org/apache/axis2/wsdl/template/c/StubHeaderTemplate.xsl 
(working copy)
@@ -70,7 +70,7 @@
        <xsl:if test="$isSync='1'">
        <xsl:for-each select="method">
        <xsl:variable name="outputours"><xsl:value-of 
select="output/param/@ours"></xsl:value-of></xsl:variable>
-        <xsl:variable name="outputtype"><xsl:if test="$outputours">axis2_</xsl:if><xsl:choose><xsl:when 
test="output/param/@type='org.apache.axiom.om.OMElement'">om_node</xsl:when><xsl:otherwise><xsl:value-of 
select="output/param/@type"></xsl:value-of></xsl:otherwise></xsl:choose><xsl:if test="$outputours">_t*</xsl:if></xsl:variable>
+        <xsl:variable name="outputtype"><xsl:choose><xsl:when 
test="output/param/@type='org.apache.axiom.om.OMElement'">axiom_node_t*</xsl:when><xsl:otherwise><xsl:if test="output/param/@ours">axis2_</xsl:if><xsl:value-of 
select="output/param/@type"></xsl:value-of><xsl:if test="output/param/@ours">_t*</xsl:if></xsl:otherwise></xsl:choose></xsl:variable>
        <xsl:choose>
        <xsl:when test="not($outputtype) or $outputtype=''">axis2_status_t 
</xsl:when>
        <xsl:when test="$outputtype='axis2__t*'">void</xsl:when>
@@ -78,7 +78,7 @@
        <xsl:value-of select="$outputtype"/>
        </xsl:otherwise>
        </xsl:choose>
-        axis2_<xsl:value-of select="@name"/>( axis2_stub_t* stub, const axis2_env_t* env <xsl:for-each select="input/[EMAIL PROTECTED]'']"> ,<xsl:variable name="paramtype"><xsl:if 
test="@ours">axis2_</xsl:if><xsl:choose><xsl:when test="@type='org.apache.axiom.om.OMElement'">om_node</xsl:when><xsl:otherwise><xsl:value-of 
select="@type"></xsl:value-of></xsl:otherwise></xsl:choose><xsl:if test="@ours">_t*</xsl:if></xsl:variable>
+        axis2_<xsl:value-of select="@name"/>( axis2_stub_t* stub, const axis2_env_t* env <xsl:for-each select="input/[EMAIL PROTECTED]'']"> ,<xsl:variable 
name="paramtype"><xsl:choose><xsl:when test="@type='org.apache.axiom.om.OMElement'">axiom_node_t*</xsl:when><xsl:otherwise><xsl:if test="@ours">axis2_</xsl:if><xsl:value-of 
select="@type"></xsl:value-of><xsl:if test="@ours">_t*</xsl:if></xsl:otherwise></xsl:choose></xsl:variable>
                                                <xsl:if test="position()>1">,</xsl:if><xsl:value-of 
select="$paramtype"/><xsl:text> </xsl:text><xsl:value-of select="@name"/>
                                                </xsl:for-each>);
        </xsl:for-each>
@@ -89,7 +89,7 @@
        <xsl:for-each select="method">
        <xsl:variable name="mep"><xsl:value-of select="@mep"/></xsl:variable>
        <xsl:if test="not($mep='10')">
-        void axis2_start_<xsl:value-of select="@name"/>( axis2_stub_t* stub, const axis2_env_t* env, <xsl:for-each select="input/[EMAIL PROTECTED]'']"><xsl:variable name="paramtype"><xsl:if 
test="@ours">axis2_</xsl:if><xsl:choose><xsl:when test="@type='org.apache.axiom.om.OMElement'">om_node</xsl:when><xsl:otherwise><xsl:value-of 
select="@type"></xsl:value-of></xsl:otherwise></xsl:choose><xsl:if test="@ours">_t*</xsl:if></xsl:variable>
+        void axis2_start_<xsl:value-of select="@name"/>( axis2_stub_t* stub, const axis2_env_t* env, <xsl:for-each select="input/[EMAIL PROTECTED]'']"><xsl:variable 
name="paramtype"><xsl:choose><xsl:when test="@type='org.apache.axiom.om.OMElement'">axiom_node_t*</xsl:when><xsl:otherwise><xsl:if test="@ours">axis2_</xsl:if><xsl:value-of 
select="@type"></xsl:value-of><xsl:if test="@ours">_t*</xsl:if></xsl:otherwise></xsl:choose></xsl:variable>
                                                    <xsl:if test="position()>1">,</xsl:if><xsl:value-of 
select="$paramtype"/><xsl:text> </xsl:text><xsl:value-of select="@name"/>
                                                    </xsl:for-each>,
                                                    axis2_status_t ( AXIS2_CALL 
*on_complete ) (struct axis2_callback *, const axis2_env_t* ) ,
Index: codegen/src/org/apache/axis2/wsdl/template/c/SkelHeaderTemplate.xsl
===================================================================
--- codegen/src/org/apache/axis2/wsdl/template/c/SkelHeaderTemplate.xsl 
(revision 414253)
+++ codegen/src/org/apache/axis2/wsdl/template/c/SkelHeaderTemplate.xsl 
(working copy)
@@ -36,7 +36,7 @@
     <xsl:for-each select="method">
        <xsl:variable name="outputours"><xsl:value-of 
select="output/param/@ours"></xsl:value-of></xsl:variable>
         <xsl:variable name="count"><xsl:value-of 
select="count(output/param)"/></xsl:variable>
-         <xsl:variable name="outputtype"><xsl:if test="$outputours">axis2_</xsl:if><xsl:choose><xsl:when 
test="output/param/@type='org.apache.axiom.om.OMElement'">om_node</xsl:when><xsl:otherwise><xsl:value-of 
select="output/param/@type"></xsl:value-of></xsl:otherwise></xsl:choose><xsl:if test="$outputours">_t*</xsl:if></xsl:variable>
+         <xsl:variable name="outputtype"><xsl:choose><xsl:when 
test="output/param/@type='org.apache.axiom.om.OMElement'">axiom_node_t*</xsl:when><xsl:otherwise><xsl:if test="output/param/@ours">axis2_</xsl:if><xsl:value-of 
select="output/param/@type"></xsl:value-of><xsl:if test="output/param/@ours">_t*</xsl:if></xsl:otherwise></xsl:choose></xsl:variable>

                 <!-- regardless of the sync or async status, the generated 
method signature would be just a usual
                   c function-->
Index: codegen/src/org/apache/axis2/wsdl/template/c/ServiceSkeleton.xsl
===================================================================
--- codegen/src/org/apache/axis2/wsdl/template/c/ServiceSkeleton.xsl    
(revision 414253)
+++ codegen/src/org/apache/axis2/wsdl/template/c/ServiceSkeleton.xsl    
(working copy)
@@ -120,13 +120,12 @@
        axiom_node_t* AXIS2_CALL
        <xsl:value-of select="$skeletonname"/>_invoke(axis2_svc_skeleton_t 
*svc_skeleton,
                                const axis2_env_t *env,
-                               axiom_node_t *node,
+                               axiom_node_t *content_node,
                                axis2_msg_ctx_t *msg_ctx)
        {
         /* Depending on the function name invoke the
          *  corresponding  method
          */
-          axiom_node_t *content_node = NULL;

          <xsl:for-each select="method">
            <xsl:for-each select="input/[EMAIL PROTECTED]'body']">
@@ -143,34 +142,35 @@
          </xsl:for-each>

          <xsl:for-each select="method">
+           <xsl:variable name="style"><xsl:value-of 
select="@style"/></xsl:variable>
           <xsl:if test="position()=1">
            <xsl:variable name="outputours"><xsl:value-of 
select="output/param/@ours"></xsl:value-of></xsl:variable>
            <xsl:for-each select="input/[EMAIL PROTECTED]'body']">
              <xsl:variable name="inputours"><xsl:if 
test="@type!='org.apache.axiom.om.OMElement'"><xsl:value-of 
select="@ours"></xsl:value-of></xsl:if></xsl:variable>
-              <xsl:if test="$inputours and $inputours!=''">
-               <xsl:if test="position()=1 and @style='rpc'">
+              <xsl:if test="@type!='org.apache.axiom.om.OMElement' and 
$inputours!=''">
+               <xsl:if test="position()=1 and $style='rpc'">
                axiom_namespace_t* ns1 = NULL;
                axiom_namespace_t* xsi = NULL;
                axiom_namespace_t* xsd = NULL;
                axiom_attribute_t* attri1 = NULL;
+                axiom_element_t* payload_ele = NULL;
+                axiom_namespace_t* payload_ns = NULL;
               </xsl:if>
              </xsl:if>
            </xsl:for-each>

            <xsl:if test="output/param/@type!='org.apache.axiom.om.OMElement'">
-             axiom_namespace_t* payload_ns = NULL;
             axiom_node_t* payload = NULL;
-             axiom_element_t* payload_ele = NULL;
            </xsl:if>
           </xsl:if>
</xsl:for-each>
-          if (node)
+          if (content_node)
              {
-            if (AXIOM_NODE_GET_NODE_TYPE(node, env) == AXIOM_ELEMENT)
+            if (AXIOM_NODE_GET_NODE_TYPE(content_node, env) == AXIOM_ELEMENT)
            {
               axiom_element_t *element = NULL;
-               element = (axiom_element_t *)AXIOM_NODE_GET_DATA_ELEMENT(node, 
env);
+               element = (axiom_element_t 
*)AXIOM_NODE_GET_DATA_ELEMENT(content_node, env);
               if (element)
               {
                  axis2_char_t *op_name = AXIOM_ELEMENT_GET_LOCALNAME(element, 
env);
@@ -193,17 +193,8 @@

                    if ( AXIS2_STRCMP(op_name, "<xsl:value-of 
select="@name"/>") == 0 )
                    {
-                    <xsl:choose>
-                       <xsl:when test="$style='rpc'">

-                         content_node = AXIOM_NODE_GET_FIRST_CHILD(node, env);
-                       </xsl:when>
-                       <xsl:when test="$style='document'">
-                         <!--content_node = node; /* spcial for doc-lit */-->
-                         content_node = AXIOM_NODE_GET_FIRST_CHILD(node, env);
-                       </xsl:when>
-                    </xsl:choose>
- +
                    <xsl:for-each select="input/[EMAIL PROTECTED]'body']">
                      <xsl:variable name="inputours"><xsl:if 
test="@type!='org.apache.axiom.om.OMElement'">yes</xsl:if></xsl:variable>
                      <xsl:if test="$inputours and $inputours!=''">
@@ -270,7 +261,7 @@
             }
          }
          printf("<xsl:value-of select="$skeletonname"/> service ERROR: invalid OM 
parameters in request\n");
-          return node;
+          return content_node;
        }

        axiom_node_t* AXIS2_CALL

------------------------------------------------------------------------

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to