axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aj...@apache.org
Subject svn commit: r414253 [2/2] - in /webservices/axis2/trunk/java/modules: adb-codegen/src/org/apache/axis2/schema/ adb-codegen/src/org/apache/axis2/schema/template/ adb-codegen/src/org/apache/axis2/schema/typemap/ codegen/src/org/apache/axis2/wsdl/codegen/...
Date Wed, 14 Jun 2006 13:56:20 GMT
Added: webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/codegen/writer/CSkelHeaderWriter.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/codegen/writer/CSkelHeaderWriter.java?rev=414253&view=auto
==============================================================================
--- webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/codegen/writer/CSkelHeaderWriter.java (added)
+++ webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/codegen/writer/CSkelHeaderWriter.java Wed Jun 14 06:56:18 2006
@@ -0,0 +1,32 @@
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.axis2.wsdl.codegen.writer;
+
+import java.io.File;
+
+
+public class CSkelHeaderWriter extends CStubHeaderWriter {
+
+    public CSkelHeaderWriter(String outputFileLocation) {
+        super ( outputFileLocation);
+    }
+
+    public CSkelHeaderWriter(File outputFileLocation, String language) {
+        super ( outputFileLocation, language );
+    }
+
+}

Added: webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/codegen/writer/CSkelSourceWriter.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/codegen/writer/CSkelSourceWriter.java?rev=414253&view=auto
==============================================================================
--- webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/codegen/writer/CSkelSourceWriter.java (added)
+++ webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/codegen/writer/CSkelSourceWriter.java Wed Jun 14 06:56:18 2006
@@ -0,0 +1,31 @@
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.axis2.wsdl.codegen.writer;
+
+import java.io.File;
+
+public class CSkelSourceWriter extends CStubSourceWriter {
+
+    public CSkelSourceWriter(String outputFileLocation) {
+        super ( outputFileLocation);
+    }
+
+    public CSkelSourceWriter(File outputFileLocation, String language) {
+        super ( outputFileLocation, language );
+    }
+
+}

Added: webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/codegen/writer/CStubHeaderWriter.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/codegen/writer/CStubHeaderWriter.java?rev=414253&view=auto
==============================================================================
--- webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/codegen/writer/CStubHeaderWriter.java (added)
+++ webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/codegen/writer/CStubHeaderWriter.java Wed Jun 14 06:56:18 2006
@@ -0,0 +1,46 @@
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+ 
+package org.apache.axis2.wsdl.codegen.writer;
+
+import org.apache.axis2.util.FileWriter;
+
+import java.io.File;
+import java.io.FileOutputStream;
+
+public class CStubHeaderWriter extends ClassWriter {
+
+     public CStubHeaderWriter(String outputFileLocation) {
+        this.outputFileLocation = new File(outputFileLocation);
+    }
+
+    public CStubHeaderWriter(File outputFileLocation, String language) {
+        this.outputFileLocation = outputFileLocation;
+        this.language = language;
+    }
+
+    public void createOutFile(String packageName, String fileName) throws Exception {
+        outputFile = FileWriter.createClassFile(outputFileLocation,
+                "",
+                fileName,
+                ".h");
+        //set the existing flag
+        fileExists = outputFile.exists();
+        if (!fileExists) {
+            this.stream = new FileOutputStream(outputFile);
+        }
+    }
+}

Added: webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/codegen/writer/CStubSourceWriter.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/codegen/writer/CStubSourceWriter.java?rev=414253&view=auto
==============================================================================
--- webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/codegen/writer/CStubSourceWriter.java (added)
+++ webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/codegen/writer/CStubSourceWriter.java Wed Jun 14 06:56:18 2006
@@ -0,0 +1,47 @@
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.axis2.wsdl.codegen.writer;
+
+import org.apache.axis2.util.FileWriter;
+
+import java.io.File;
+import java.io.FileOutputStream;
+
+public class CStubSourceWriter extends ClassWriter {
+
+     public CStubSourceWriter(String outputFileLocation) {
+        this.outputFileLocation = new File(outputFileLocation);
+    }
+
+    public CStubSourceWriter(File outputFileLocation, String language) {
+        this.outputFileLocation = outputFileLocation;
+        this.language = language;
+    }
+
+    public void createOutFile(String packageName, String fileName) throws Exception {
+        outputFile = FileWriter.createClassFile(outputFileLocation,
+                "",
+                fileName,
+                getFileExtensionForLanguage(language));
+        //set the existing flag
+        fileExists = outputFile.exists();
+        if (!fileExists) {
+            this.stream = new FileOutputStream(outputFile);
+        }
+
+    }
+}

Added: webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/codegen/writer/CSvcSkeletonWriter.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/codegen/writer/CSvcSkeletonWriter.java?rev=414253&view=auto
==============================================================================
--- webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/codegen/writer/CSvcSkeletonWriter.java (added)
+++ webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/codegen/writer/CSvcSkeletonWriter.java Wed Jun 14 06:56:18 2006
@@ -0,0 +1,47 @@
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.axis2.wsdl.codegen.writer;
+
+import org.apache.axis2.util.FileWriter;
+
+import java.io.File;
+import java.io.FileOutputStream;
+
+public class CSvcSkeletonWriter extends ClassWriter {
+
+    public CSvcSkeletonWriter(String outputFileLocation) {
+        this.outputFileLocation = new File(outputFileLocation);
+    }
+
+    public CSvcSkeletonWriter(File outputFileLocation, String language) {
+        this.outputFileLocation = outputFileLocation;
+        this.language = language;
+    }
+
+    public void createOutFile(String packageName, String fileName) throws Exception {
+        outputFile = FileWriter.createClassFile(outputFileLocation,
+                "",
+                fileName,
+                getFileExtensionForLanguage(language));
+        //set the existing flag
+        fileExists = outputFile.exists();
+        if (!fileExists) {
+            this.stream = new FileOutputStream(outputFile);
+        }
+    }
+
+}

Added: webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/template/c/ServiceSkeleton.xsl
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/template/c/ServiceSkeleton.xsl?rev=414253&view=auto
==============================================================================
--- webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/template/c/ServiceSkeleton.xsl (added)
+++ webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/template/c/ServiceSkeleton.xsl Wed Jun 14 06:56:18 2006
@@ -0,0 +1,327 @@
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+    <xsl:output method="text"/>
+
+      <!--Template for in out message receiver -->
+      <xsl:template match="/interface">
+        <xsl:variable name="skeletonname"><xsl:value-of select="@name"/></xsl:variable>
+        <xsl:variable name="svcname"><xsl:value-of select="@svcname"/></xsl:variable>
+        <xsl:variable name="soapVersion"><xsl:value-of select="@soap-version"/></xsl:variable>
+
+        /**
+         * svc_skel_<xsl:value-of select="$skeletonname"/>.c
+         *
+         * This file was auto-generated from WSDL
+         * by the Apache Axis2 version: #axisVersion# #today#
+         *  <xsl:value-of select="$skeletonname"/>
+         */
+
+        #include "<xsl:value-of select="@svcname"/>.h"
+        #include &lt;axis2_svc_skeleton.h&gt;
+        #include &lt;axis2_array_list.h&gt;
+        #include &lt;stdio.h&gt;
+
+        /**
+         * functions prototypes
+         */
+
+        /* On fault, handle the fault */
+        axiom_node_t* AXIS2_CALL
+        <xsl:value-of select="$skeletonname"/>_on_fault(axis2_svc_skeleton_t *svc_skeleton,
+                  const axis2_env_t *env, axiom_node_t *node);
+
+        /* Free the service */
+        int AXIS2_CALL
+        <xsl:value-of select="$skeletonname"/>_free(axis2_svc_skeleton_t *svc_skeleton,
+                  const axis2_env_t *env);
+
+        /* This method invokes the right service method */
+        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,
+                    axis2_msg_ctx_t *msg_ctx);
+
+        /* Initializing the environment  */
+        int AXIS2_CALL
+        <xsl:value-of select="$skeletonname"/>_init(axis2_svc_skeleton_t *svc_skeleton,
+                        const axis2_env_t *env);
+
+        /* Create the service  */
+        axis2_svc_skeleton_t* AXIS2_CALL
+        <xsl:value-of select="$skeletonname"/>_create(const axis2_env_t *env);
+
+        /**
+         * Implementations for the functions
+         */
+
+	axis2_svc_skeleton_t* AXIS2_CALL
+	<xsl:value-of select="$skeletonname"/>_create(const axis2_env_t *env)
+	{
+	    axis2_svc_skeleton_t *svc_skeleton = NULL;
+	    svc_skeleton = AXIS2_MALLOC(env->allocator,
+	        sizeof(axis2_svc_skeleton_t));
+
+
+	    svc_skeleton->ops = AXIS2_MALLOC(
+	        env->allocator, sizeof(axis2_svc_skeleton_ops_t));
+
+	    svc_skeleton->func_array = NULL;
+
+	    svc_skeleton->ops->free = <xsl:value-of select="$skeletonname"/>_free;
+	    svc_skeleton->ops->init = <xsl:value-of select="$skeletonname"/>_init;
+	    svc_skeleton->ops->invoke = <xsl:value-of select="$skeletonname"/>_invoke;
+	    svc_skeleton->ops->on_fault = <xsl:value-of select="$skeletonname"/>_on_fault;
+
+	    return svc_skeleton;
+	}
+
+
+	int AXIS2_CALL
+	<xsl:value-of select="$skeletonname"/>_init(axis2_svc_skeleton_t *svc_skeleton,
+	                        const axis2_env_t *env)
+	{
+	    svc_skeleton->func_array = axis2_array_list_create(env, 0);
+            <xsl:for-each select="method">
+	      AXIS2_ARRAY_LIST_ADD(svc_skeleton->func_array, env, "<xsl:value-of select="@name"/>");
+            </xsl:for-each>
+
+	    /* Any initialization stuff of math goes here */
+	    return AXIS2_SUCCESS;
+	}
+
+	int AXIS2_CALL
+	<xsl:value-of select="$skeletonname"/>_free(axis2_svc_skeleton_t *svc_skeleton,
+				 const axis2_env_t *env)
+	{
+          if(svc_skeleton->func_array)
+          {
+            AXIS2_ARRAY_LIST_FREE(svc_skeleton->func_array, env);
+            svc_skeleton->func_array = NULL;
+          }
+
+          if(svc_skeleton->ops)
+          {
+            AXIS2_FREE(env->allocator, svc_skeleton->ops);
+            svc_skeleton->ops = NULL;
+          }
+
+          if(svc_skeleton)
+          {
+            AXIS2_FREE(env->allocator, svc_skeleton);
+            svc_skeleton = NULL;
+          }
+          return AXIS2_SUCCESS;
+	}
+
+
+	/*
+	 * This method invokes the right service method
+	 */
+	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,
+				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/param[@location='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:variable name="paramname"><xsl:value-of select="@name"></xsl:value-of></xsl:variable>
+               <xsl:variable name="paramtype"><xsl:if test="$inputours">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="$inputours">_t*</xsl:if></xsl:variable>
+               <xsl:value-of select="$paramtype"/><xsl:text> </xsl:text><xsl:value-of select="$paramname"/>;
+              </xsl:if>
+            </xsl:for-each>
+            <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:value-of select="$outputtype"/> ret_value<xsl:value-of select="position()"></xsl:value-of> = NULL;
+          </xsl:for-each>
+
+          <xsl:for-each select="method">
+           <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/param[@location='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'">
+                axiom_namespace_t* ns1 = NULL;
+                axiom_namespace_t* xsi = NULL;
+                axiom_namespace_t* xsd = NULL;
+                axiom_attribute_t* attri1 = 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 (AXIOM_NODE_GET_NODE_TYPE(node, env) == AXIOM_ELEMENT)
+            {
+               axiom_element_t *element = NULL;
+               element = (axiom_element_t *)AXIOM_NODE_GET_DATA_ELEMENT(node, env);
+               if (element)
+               {
+                  axis2_char_t *op_name = AXIOM_ELEMENT_GET_LOCALNAME(element, env);
+                  if (op_name)
+                  {
+                    <xsl:for-each select="method">
+                    <xsl:variable name="outputours"><xsl:if test="output/param/@type!='org.apache.axiom.om.OMElement'">yes</xsl:if></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>RESPONSE</xsl:otherwise></xsl:choose></xsl:variable>
+
+                    <xsl:variable name="returnvariable"><xsl:value-of select="output/param/@name"/></xsl:variable>
+                    <xsl:variable name="namespace"><xsl:value-of select="@namespace"/></xsl:variable>
+
+                    <xsl:variable name="soapAction"><xsl:value-of select="@soapaction"></xsl:value-of></xsl:variable>
+                    <xsl:variable name="name"><xsl:value-of select="@name"/></xsl:variable>
+                    <xsl:variable name="style"><xsl:value-of select="@style"/></xsl:variable>
+                    <xsl:variable name="paramcount"><xsl:value-of select="count(input/param[@location='body'])"/></xsl:variable>
+                    <xsl:variable name="method-name"><xsl:value-of select="@name"/></xsl:variable>
+                    <xsl:variable name="method-ns"><xsl:value-of select="@namespace"/> </xsl:variable>
+
+                    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/param[@location='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!=''">
+                        <xsl:variable name="paramname"><xsl:value-of select="@name"></xsl:value-of></xsl:variable>
+                        <xsl:variable name="paramtype">axis2_<xsl:value-of select="@type"></xsl:value-of></xsl:variable>
+                        <xsl:variable name="capsparamtype">AXIS2_<xsl:value-of select="@caps-type"></xsl:value-of></xsl:variable>
+                        <xsl:value-of select="$paramname"/> = <xsl:value-of select="$paramtype"/>_create ( env );
+                        <xsl:value-of select="$capsparamtype"/>_PARSE_OM ( <xsl:value-of select="$paramname"/>, env, content_node );
+                      </xsl:if>
+
+                    </xsl:for-each>
+                    <xsl:choose>
+                      <xsl:when test="not($outputtype) or $outputtype=''"></xsl:when>
+                      <xsl:otherwise>ret_value<xsl:value-of select="position()"></xsl:value-of> = </xsl:otherwise>
+                    </xsl:choose>
+                    <xsl:value-of select="$svcname"/>_<xsl:value-of select="$name"/>(env <xsl:for-each select="input/param[@location='body']"> ,<xsl:variable name="inputours"><xsl:if test="@type!='org.apache.axiom.om.OMElement'">yes</xsl:if></xsl:variable>
+                                                                          <xsl:choose><xsl:when test="$inputours and $inputours!=''"><xsl:value-of select="@name"/></xsl:when><xsl:otherwise>content_node</xsl:otherwise></xsl:choose>
+                                                                          </xsl:for-each>);
+                    <xsl:choose>
+                      <xsl:when test="not($outputtype) or $outputtype=''">return NULL;</xsl:when>
+                      <xsl:when test="not($outputours) or $outputours=''">return ret_value<xsl:value-of select="position()"></xsl:value-of>;</xsl:when>
+                        <xsl:otherwise>
+                       <xsl:choose>
+                         <xsl:when test="$style='rpc'">
+                           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);
+                           content_node = <xsl:value-of select="$capsoutputtype"/>_BUILD_OM ( ret_value<xsl:value-of select="position()"></xsl:value-of>, env, payload, xsi, 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 );
+                           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);
+                         </xsl:when>
+                         <xsl:when test="$style='document'">
+                           payload = <xsl:value-of select="$capsoutputtype"/>_BUILD_OM ( ret_value<xsl:value-of select="position()"></xsl:value-of>, env,NULL, NULL, NULL  );
+                         </xsl:when>
+                       </xsl:choose>
+                       return payload;
+                      </xsl:otherwise>
+                     </xsl:choose>
+                    }
+                    </xsl:for-each>
+                  }
+                }
+             }
+          }
+          printf("<xsl:value-of select="$skeletonname"/> service ERROR: invalid OM parameters in request\n");
+          return node;
+        }
+
+        axiom_node_t* AXIS2_CALL
+        <xsl:value-of select="$skeletonname"/>_on_fault(axis2_svc_skeleton_t *svc_skeleton,
+                  const axis2_env_t *env, axiom_node_t *node)
+	{
+    		axiom_node_t *error_node = NULL;
+		    axiom_node_t* text_node = NULL;
+    		axiom_element_t *error_ele = NULL;
+    		error_ele = axiom_element_create(env, node, "<xsl:value-of select="$skeletonname"/>Error", NULL,
+        					&amp;error_node);
+    		AXIOM_ELEMENT_SET_TEXT(error_ele, env, "<xsl:value-of select="$skeletonname"/>failed",
+        					text_node);
+    		return error_node;
+	}
+
+
+	/**
+	 * Following block distinguish the exposed part of the dll.
+ 	 */
+
+    AXIS2_EXTERN int AXIS2_CALL
+    axis2_get_instance(struct axis2_svc_skeleton **inst,
+	                        const axis2_env_t *env)
+	{
+		*inst = <xsl:value-of select="$skeletonname"/>_create(env);
+		/*if(NULL != *inst)
+	    	{
+			status = *inst->init();
+    	    	}*/
+    		if(!(*inst))
+    		{
+        		return AXIS2_FAILURE;
+    		}
+
+    		return AXIS2_SUCCESS;
+	}
+
+	AXIS2_EXTERN int AXIS2_CALL
+    axis2_remove_instance(axis2_svc_skeleton_t *inst,
+                            const axis2_env_t *env)
+	{
+    		axis2_status_t status = AXIS2_FAILURE;
+        	if (inst)
+        	{
+        		status = AXIS2_SVC_SKELETON_FREE(inst, env);
+    		}
+    		return status;
+	}
+
+
+    </xsl:template>
+
+</xsl:stylesheet>

Added: webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/template/c/ServiceXMLTemplate.xsl
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/template/c/ServiceXMLTemplate.xsl?rev=414253&view=auto
==============================================================================
--- webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/template/c/ServiceXMLTemplate.xsl (added)
+++ webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/template/c/ServiceXMLTemplate.xsl Wed Jun 14 06:56:18 2006
@@ -0,0 +1,25 @@
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+    <xsl:output method="xml" indent="yes" omit-xml-declaration="yes"/>
+
+    <xsl:template match="/">
+        <xsl:comment> This file was auto-generated from WSDL </xsl:comment>
+        <xsl:comment> by the Apache Axis2 version: #axisVersion# #today# </xsl:comment>
+        <xsl:apply-templates/>
+    </xsl:template>
+
+    <xsl:template match="interface">
+
+        <service>
+            <xsl:attribute name="name"><xsl:value-of select="@servicename"/></xsl:attribute>
+
+            <parameter name="ServiceClass" locked="false">
+                        <xsl:value-of select="@servicename"/>
+            </parameter>
+			<xsl:for-each select="method">
+				<operation>
+					<xsl:attribute name="name"><xsl:value-of select="@name"/></xsl:attribute>
+				</operation>
+			</xsl:for-each>
+        </service>
+    </xsl:template>
+</xsl:stylesheet>
\ No newline at end of file

Added: webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/template/c/SkelHeaderTemplate.xsl
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/template/c/SkelHeaderTemplate.xsl?rev=414253&view=auto
==============================================================================
--- webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/template/c/SkelHeaderTemplate.xsl (added)
+++ webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/template/c/SkelHeaderTemplate.xsl Wed Jun 14 06:56:18 2006
@@ -0,0 +1,64 @@
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+    <xsl:output method="text"/>
+    <xsl:template match="/interface">
+    <xsl:variable name="svc_name"><xsl:value-of select="@name"/></xsl:variable>
+    /**
+     * <xsl:value-of select="@name"/>.h
+     *
+     * This file was auto-generated from WSDL 
+     * by the Apache Axis2/Java version: #axisVersion# #today#
+     * <xsl:value-of select="@name"/> Axis2/C skeleton for the axisService- Header file
+     */
+
+	
+	#include &lt;axis2_svc_skeleton.h&gt;
+	#include &lt;axis2_log_default.h&gt;
+	#include &lt;axis2_error_default.h&gt;
+	#include &lt;axiom_text.h&gt;
+	#include &lt;axiom_node.h&gt;
+	#include &lt;axiom_element.h&gt;
+    #include &lt;stdio.h&gt;
+
+
+   <xsl:for-each select="method">
+    <xsl:variable name="outputours"><xsl:value-of select="output/param/@ours"></xsl:value-of></xsl:variable>
+    <xsl:if test="$outputours and output/param/@type!='' and output/param/@type!='org.apache.axiom.om.OMElement'">
+     <xsl:variable name="outputtype">axis2_<xsl:value-of select="output/param/@type"></xsl:value-of></xsl:variable>
+     #include  "<xsl:value-of select="$outputtype"/>.h"
+    </xsl:if>
+    <xsl:for-each select="input/param[@type!='' and @ours and @type!='org.apache.axiom.om.OMElement']">
+     <xsl:variable name="inputtype">axis2_<xsl:value-of select="@type"></xsl:value-of></xsl:variable>
+     #include "<xsl:value-of select="$inputtype"/>.h"
+    </xsl:for-each>
+   </xsl:for-each>
+
+
+     <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>
+
+		 <!-- regardless of the sync or async status, the generated method signature would be just a usual
+	           c function-->
+        /**
+         * Auto generated function declaration
+         <!--  select only the body parameters  -->
+          <xsl:for-each select="input/param[@location='body']">
+            <xsl:if test="@type!=''">* @param <xsl:value-of select="@name"></xsl:value-of><xsl:text>
+         </xsl:text></xsl:if></xsl:for-each>
+         */
+        <xsl:choose>
+        <xsl:when test="$count=0">axis2_status_t </xsl:when>
+        <xsl:when test="$outputtype=''">axis2_status_t </xsl:when>
+        <xsl:when test="$outputtype='axis2__t*'">void</xsl:when>
+        <xsl:otherwise>
+        <xsl:value-of select="$outputtype"/>
+        </xsl:otherwise>
+        </xsl:choose>
+        <xsl:value-of select="$svc_name"/>_<xsl:value-of select="@name"/> (const axis2_env_t* env <xsl:for-each select="input/param[@location='body']"> ,<xsl:variable name="paramtype"><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:value-of select="$paramtype"/><xsl:text> </xsl:text><xsl:value-of select="@name"/>
+                                          </xsl:for-each> );
+     </xsl:for-each>
+
+    </xsl:template>
+ </xsl:stylesheet>

Added: webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/template/c/SkelSourceTemplate.xsl
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/template/c/SkelSourceTemplate.xsl?rev=414253&view=auto
==============================================================================
--- webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/template/c/SkelSourceTemplate.xsl (added)
+++ webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/template/c/SkelSourceTemplate.xsl Wed Jun 14 06:56:18 2006
@@ -0,0 +1,49 @@
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+    <xsl:output method="text"/>
+    <xsl:template match="/interface">
+    <xsl:variable name="svc_name"><xsl:value-of select="@name"/></xsl:variable>
+    /**
+     * <xsl:value-of select="@name"/>.c 
+     *
+     * This file was auto-generated from WSDL 
+     * by the Apache Axis2/Java version: #axisVersion# #today#
+     * <xsl:value-of select="@name"/> Axis2/C skeleton for the axisService
+     */
+
+     #include "<xsl:value-of select="@name"/>.h"
+
+     <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>
+
+		 <!-- regardless of the sync or async status, the generated method signature would be just a usual
+	           c function-->
+        /**
+         * Auto generated function definition
+         <!--  select only the body parameters  -->
+          <xsl:for-each select="input/param[@location='body']">
+            <xsl:if test="@type!=''">* @param <xsl:value-of select="@name"></xsl:value-of><xsl:text>
+         </xsl:text></xsl:if></xsl:for-each>
+         */
+        <xsl:choose>
+        <xsl:when test="$count=0">axis2_status_t </xsl:when>
+        <xsl:when test="$outputtype=''">axis2_status_t </xsl:when>
+        <xsl:when test="$outputtype='axis2__t*'">void</xsl:when>
+        <xsl:otherwise>
+        <xsl:value-of select="$outputtype"/>
+        </xsl:otherwise>
+        </xsl:choose>
+        <xsl:value-of select="$svc_name"/>_<xsl:value-of select="@name"/> (const axis2_env_t* env <xsl:for-each select="input/param[@location='body']"> ,<xsl:variable name="paramtype"><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:value-of select="$paramtype"/><xsl:text> </xsl:text><xsl:value-of select="@name"/>
+                                          </xsl:for-each> )
+
+        {
+          /* Todo fill this with the necessary business logic */
+          <xsl:if test="$outputtype!=''">return NULL;</xsl:if>
+          <xsl:if test="$outputtype=''">return AXIS2_SUCCESS;</xsl:if>
+        }
+     </xsl:for-each>
+
+    </xsl:template>
+ </xsl:stylesheet>

Modified: webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/template/c/StubHeaderTemplate.xsl
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/template/c/StubHeaderTemplate.xsl?rev=414253&r1=414252&r2=414253&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/template/c/StubHeaderTemplate.xsl (original)
+++ webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/template/c/StubHeaderTemplate.xsl Wed Jun 14 06:56:18 2006
@@ -27,47 +27,60 @@
         */
 
         #include &lt;stdio.h&gt;
-        #include &lt;axis2_om.h&gt;
+        #include &lt;axiom.h&gt;
         #include &lt;axis2_util.h&gt;
-        #include &lt;axis2_soap.h&gt;
+        #include &lt;axiom_soap.h&gt;
         #include &lt;axis2_client.h&gt;
         #include &lt;axis2_stub.h&gt;
 
+       <xsl:for-each select="method">
+        <xsl:variable name="outputours"><xsl:value-of select="output/param/@ours"></xsl:value-of></xsl:variable>
+        <xsl:if test="$outputours and output/param/@type!='' and output/param/@type!='org.apache.axiom.om.OMElement'">
+         <xsl:variable name="outputtype">axis2_<xsl:value-of select="output/param/@type"></xsl:value-of></xsl:variable>
+         #include  "<xsl:value-of select="$outputtype"/>.h"
+        </xsl:if>
+        <xsl:for-each select="input/param[@type!='' and @ours and @type!='org.apache.axiom.om.OMElement']">
+         <xsl:variable name="inputtype">axis2_<xsl:value-of select="@type"></xsl:value-of></xsl:variable>
+         #include "<xsl:value-of select="$inputtype"/>.h"
+        </xsl:for-each>
+       </xsl:for-each>
         /* function prototypes - for header file*/
         /**
-         * axis2_create_<xsl:value-of select="$interfaceName"/>_stub 
+         * axis2_<xsl:value-of select="$interfaceName"/>_stub_create
          * create and return the stub with services populated
          * params - env : environment ( mandatory)
          *        - client_home : Axis2/C home ( mandatory )
-         *        - endpoint_ref : service endpoint ( optional ) - if NULL default picked from wsdl used
+         *        - endpoint_uri : service endpoint uri( optional ) - if NULL default picked from wsdl used
          */
         axis2_stub_t*
-        axis2_create_<xsl:value-of select="$interfaceName"/>_stub (axis2_env_t **env,
+        axis2_<xsl:value-of select="$interfaceName"/>_stub_create (const axis2_env_t *env,
                                         axis2_char_t *client_home,
-                                        axis2_endpoint_ref_t *endpoint_ref);
+                                        axis2_char_t *endpoint_uri);
         /**
          * axis2_populate_axis_service
          * populate the svc in stub with the service and operations
          */
-        void axis2_populate_axis_service( axis2_stub_t* stub, axis2_env_t** env);
+        void axis2_populate_axis_service( axis2_stub_t* stub, const axis2_env_t* env);
         /**
-         * axis2_get_endpoint_ref_from_wsdl
-         * return the endpoint reference picked from wsdl
+         * axis2_get_endpoint_uri_from_wsdl
+         * return the endpoint URI picked from wsdl
          */
-        axis2_endpoint_ref_t* axis2_get_endpoint_ref_from_wsdl ( axis2_env_t** env );
+        axis2_char_t* axis2_get_endpoint_uri_from_wsdl ( const axis2_env_t* env );
 
         <xsl:if test="$isSync='1'">
         <xsl:for-each select="method">
-        <xsl:variable name="outputtype"><xsl:value-of select="output/param/@type"></xsl:value-of></xsl:variable>
+        <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:choose>
-        <xsl:when test="$outputtype=''">axis2_status_t </xsl:when>
+        <xsl:when test="not($outputtype) or $outputtype=''">axis2_status_t </xsl:when>
+        <xsl:when test="$outputtype='axis2__t*'">void</xsl:when>
         <xsl:otherwise>
-        axis2_om_node_t*
+        <xsl:value-of select="$outputtype"/>
         </xsl:otherwise>
         </xsl:choose>
-        axis2_<xsl:value-of select="@name"/>( axis2_stub_t* stub, axis2_env_t** env <xsl:for-each select="input/param[@type!='']"> ,
-                                          axis2_om_node_t*<xsl:text> </xsl:text>payload<!--<xsl:value-of select="@name"/>-->
-                                          </xsl:for-each> );
+        axis2_<xsl:value-of select="@name"/>( axis2_stub_t* stub, const axis2_env_t* env <xsl:for-each select="input/param[@type!='']"> ,<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: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>
         </xsl:if>  <!--close for  test="$isSync='1'-->
 
@@ -75,12 +88,12 @@
         <xsl:if test="$isAsync='1'">
         <xsl:for-each select="method">
         <xsl:variable name="mep"><xsl:value-of select="@mep"/></xsl:variable>
-        <xsl:if test="$mep='12'"> <!-- These constants can be found in org.apache.axis2.wsdl.WSDLConstants -->
-        void axis2_start_<xsl:value-of select="@name"/>( axis2_stub_t* stub, axis2_env_t** env, <xsl:for-each select="input/param[@type!='']">
-                                                    axis2_om_node_t*<xsl:text> </xsl:text>payload<!--<xsl:value-of select="@name"></xsl:value-of>--> ,
-                                                    </xsl:for-each>
-                                                    axis2_status_t ( AXIS2_CALL *on_complete ) (struct axis2_callback *, axis2_env_t** ) ,
-                                                    axis2_status_t ( AXIS2_CALL *on_error ) (struct axis2_callback *, axis2_env_t**, int ) );
+        <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/param[@type!='']"><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: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* ) ,
+                                                    axis2_status_t ( AXIS2_CALL *on_error ) (struct axis2_callback *, const axis2_env_t*, int ) );
 
         </xsl:if>  <!--close for  test="$mep='http://www.w3.org/2004/08/wsdl/in-out'"-->
         </xsl:for-each>

Modified: webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/template/c/StubSourceTemplate.xsl
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/template/c/StubSourceTemplate.xsl?rev=414253&r1=414252&r2=414253&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/template/c/StubSourceTemplate.xsl (original)
+++ webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/template/c/StubSourceTemplate.xsl Wed Jun 14 06:56:18 2006
@@ -8,8 +8,8 @@
          URI resolver during the xslt transformations
      -->
     <xsl:include href="externalTemplate"/>
-    
-    
+
+
     <xsl:include href="policyExtensionTemplate"/>
 
     <xsl:template match="/class">
@@ -25,7 +25,6 @@
         * This file was auto-generated from WSDL for Axis2/C - stub code
         * by the Apache Axis2/Java version: #axisVersion# #today#
         */
-
         #include "<xsl:value-of select="@name"/>.h"
 
        /**
@@ -33,25 +32,28 @@
         */
 
         axis2_stub_t*
-        axis2_create_<xsl:value-of select="$interfaceName"/>_stub (axis2_env_t **env,
+        axis2_<xsl:value-of select="$interfaceName"/>_stub_create (const axis2_env_t *env,
                                         axis2_char_t *client_home,
-                                        axis2_endpoint_ref_t *endpoint_ref)
+                                        axis2_char_t *endpoint_uri)
         {
            axis2_stub_t* stub = NULL;
+           axis2_endpoint_ref_t* endpoint_ref = NULL;
            AXIS2_FUNC_PARAM_CHECK ( client_home, env, NULL)
-           
-           if (NULL == endpoint_ref )
+
+           if (NULL == endpoint_uri )
            {
-              endpoint_ref = axis2_get_endpoint_ref_from_wsdl( env );
+              endpoint_uri = axis2_get_endpoint_uri_from_wsdl( env );
            }
 
+           endpoint_ref = axis2_endpoint_ref_create(env, endpoint_uri);
+
            stub = axis2_stub_create_with_endpoint_ref_and_client_home ( env, endpoint_ref, client_home );
            axis2_populate_axis_service( stub, env );
            return stub;
         }
 
 
-        void axis2_populate_axis_service( axis2_stub_t* stub, axis2_env_t** env)
+        void axis2_populate_axis_service( axis2_stub_t* stub, const axis2_env_t* env)
         {
           axis2_svc_client_t* svc_client = NULL;
           axis2_qname_t *svc_qname =  NULL;
@@ -74,7 +76,7 @@
                                           NULL);
             op = axis2_op_create_with_qname(env, op_qname);
             <xsl:choose>
-              <xsl:when test="@mep='12'">
+              <xsl:when test="@mep='10'">
                 AXIS2_OP_SET_MSG_EXCHANGE_PATTERN(op, env, AXIS2_MEP_URI_IN_ONLY);
               </xsl:when>
               <xsl:otherwise>
@@ -82,74 +84,155 @@
               </xsl:otherwise>
             </xsl:choose>
             AXIS2_SVC_ADD_OP(svc, env, op);
-            
+
           </xsl:for-each>
         }
 
         /**
          * return end point picked from wsdl
          */
-        axis2_endpoint_ref_t* axis2_get_endpoint_ref_from_wsdl ( axis2_env_t** env )
+        axis2_char_t* axis2_get_endpoint_uri_from_wsdl ( const axis2_env_t* env )
         {
-          axis2_endpoint_ref_t* endpoint_ref = NULL;
-          axis2_char_t* address = NULL;
+          axis2_char_t* endpoint_uri = NULL;
           /*set the address from here*/
         <xsl:for-each select="endpoint">
           <xsl:choose>
             <xsl:when test="position()=1">
-              address = "<xsl:value-of select="."/>";
+              endpoint_uri = "<xsl:value-of select="."/>";
             </xsl:when>
             <xsl:otherwise>
               /* mulitiple address defined*/
             </xsl:otherwise>
            </xsl:choose>
         </xsl:for-each>
-          endpoint_ref = axis2_endpoint_ref_create(env, address);
-          return endpoint_ref;
+          return endpoint_uri;
         }
-     
+
 
     <xsl:for-each select="method">
-      <xsl:variable name="outputtype"><xsl:value-of select="output/param/@type"></xsl:value-of></xsl:variable>
+      <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="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>
-	    
-      <!-- MTOM -->
+
       <xsl:variable name="method-name"><xsl:value-of select="@name"/></xsl:variable>
       <xsl:variable name="method-ns"><xsl:value-of select="@namespace"/> </xsl:variable>
-      <!-- MTOM -->
 
       <!-- Code generation for the in-out mep -->
-      <xsl:if test="$mep='12'"> <!-- These constants can be found in org.apache.axis2.wsdl.WSDLConstants -->
+      <xsl:if test="not($mep='10')">
         <xsl:if test="$isSync='1'">
           /**
            * Auto generated method signature
            */
-           
+
            <xsl:choose>
            <xsl:when test="$outputtype=''">axis2_status_t</xsl:when>
+           <xsl:when test="$outputtype='axis2__t*'">void</xsl:when>
            <xsl:otherwise>
-           axis2_om_node_t*
+           <xsl:value-of select="$outputtype"/>
            </xsl:otherwise>
            </xsl:choose>
-           axis2_<xsl:value-of select="@name"/>( axis2_stub_t* stub, axis2_env_t** env <xsl:for-each select="input/param[@type!='']"> ,
-                                          axis2_om_node_t*<xsl:text> </xsl:text>payload<!--<xsl:value-of select="@name"/>-->
-                                          </xsl:for-each> )
+           axis2_<xsl:value-of select="@name"/>( axis2_stub_t* stub, const axis2_env_t* env <xsl:for-each select="input/param[@type!='']"> ,<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:if test="position()>1">,</xsl:if><xsl:value-of select="$paramtype"/><xsl:text> </xsl:text><xsl:value-of select="@name"/>
+                                                </xsl:for-each>)
            {
               axis2_svc_client_t* svc_client = NULL;
               axis2_options_t *options = NULL;
-              axis2_om_node_t* ret_node = NULL;
+              axiom_node_t* ret_node = NULL;
 
               axis2_char_t* soap_action = NULL;
               axis2_qname_t *op_qname =  NULL;
+              axiom_node_t* payload = NULL;
+              <xsl:if test="$outputours">
+              	<!-- this means data binding is enable -->
+                <xsl:value-of select="$outputtype"/> ret_val = NULL;
+              </xsl:if>
+
+
+             <xsl:for-each select="input/param[@type!='' 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;
+                  </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/param[@type!='']">
+              <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="$method-ns"/>",
+                                                "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:if test="position()=1">
+
+                           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>
+
+                           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 )
               {
-                AXIS2_LOG_ERROR((*env)->log, AXIS2_LOG_SI, "options is null in stub: Error code:"
-                     " %d :: %s", (*env)->error->error_number,
-                AXIS2_ERROR_GET_MESSAGE((*env)->error));
+                AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "options is null in stub: Error code:"
+                     " %d :: %s", env->error->error_number,
+                AXIS2_ERROR_GET_MESSAGE(env->error));
                 return NULL;
               }
               svc_client = AXIS2_STUB_GET_SVC_CLIENT (stub, env );
@@ -161,10 +244,10 @@
               }
               <xsl:choose>
                <xsl:when test="$soapVersion='1.2'">
-              AXIS2_OPTIONS_SET_SOAP_VERSION(options, env, AXIS2_SOAP12 );
+              AXIS2_OPTIONS_SET_SOAP_VERSION(options, env, AXIOM_SOAP12 );
                </xsl:when>
                <xsl:otherwise>
-              AXIS2_OPTIONS_SET_SOAP_VERSION(options, env, AXIS2_SOAP11 );
+              AXIS2_OPTIONS_SET_SOAP_VERSION(options, env, AXIOM_SOAP11 );
                </xsl:otherwise>
               </xsl:choose>
               op_qname = axis2_qname_create(env,
@@ -172,8 +255,31 @@
                                           "<xsl:value-of select="@namespace"/>",
                                           NULL);
               ret_node =  AXIS2_SVC_CLIENT_SEND_RECEIVE_WITH_OP_QNAME( svc_client, env, op_qname, payload);
-              return ret_node;
-        
+
+
+              <xsl:choose>
+                  <xsl:when test="$outputours">
+                    if ( NULL == ret_node )
+                      return NULL;
+                    ret_val = axis2_<xsl:value-of select="output/param/@type"/>_create(env);
+                    <xsl:choose>
+                     <xsl:when test="$style='rpc'">
+                       ret_node  = AXIOM_NODE_GET_FIRST_CHILD ( ret_node, env );
+                     </xsl:when>
+                      <xsl:when test="$style='document'">
+                       /* document style just parse ret_node to build the db */
+                      </xsl:when>
+                    </xsl:choose>
+                       <xsl:value-of select="$capsoutputtype"/>_PARSE_OM(ret_val, env, ret_node );
+                   return ret_val;
+                  </xsl:when>
+                  <xsl:otherwise>
+                   return ret_node;
+                  </xsl:otherwise>
+                  <xsl:when test="$outputtype='axis2__t*'">
+                       return;
+                  </xsl:when>
+              </xsl:choose>
           }
           </xsl:if>  <!--close for  test="$isSync='1'-->
           <!-- Async method generation -->
@@ -183,25 +289,100 @@
            */
            <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, axis2_env_t** env, <xsl:for-each select="input/param[@type!='']">
-                                                    axis2_om_node_t*<xsl:text> </xsl:text>payload<!--<xsl:value-of select="@name"></xsl:value-of>--> ,
-                                                    </xsl:for-each>
-                                                    axis2_status_t ( AXIS2_CALL *on_complete ) (struct axis2_callback *, axis2_env_t** ) ,
-                                                    axis2_status_t ( AXIS2_CALL *on_error ) (struct axis2_callback *, axis2_env_t**, int ) )
+           void axis2_start_<xsl:value-of select="@name"/>( axis2_stub_t* stub, const axis2_env_t *env, <xsl:for-each select="input/param[@type!='']"><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: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* ) ,
+                                                    axis2_status_t ( AXIS2_CALL *on_error ) (struct axis2_callback *, const axis2_env_t*, int ) )
            {
 
               axis2_callback_t *callback = NULL;
+
               axis2_svc_client_t* svc_client = NULL;
               axis2_options_t *options = NULL;
 
               axis2_char_t* soap_action = NULL;
+              axiom_node_t* payload = NULL;
+
+             <xsl:for-each select="input/param[@type!='' 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;
+                  </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/param[@type!='']">
+              <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:if test="position()=1">
+
+                           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>
+
+                           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 )
               {
-                AXIS2_LOG_ERROR((*env)->log, AXIS2_LOG_SI, "options is null in stub: Error code:"
-                     " %d :: %s", (*env)->error->error_number,
-                AXIS2_ERROR_GET_MESSAGE((*env)->error));
+                AXIS2_LOG_ERROR( env->log, AXIS2_LOG_SI, "options is null in stub: Error code:"
+                        " %d :: %s", env->error->error_number,
+                        AXIS2_ERROR_GET_MESSAGE(env->error));
                 return;
               }
               svc_client = AXIS2_STUB_GET_SVC_CLIENT (stub, env );
@@ -213,10 +394,10 @@
               }
               <xsl:choose>
                <xsl:when test="$soapVersion='1.2'">
-              AXIS2_OPTIONS_SET_SOAP_VERSION(options, env, AXIS2_SOAP12 );
+              AXIS2_OPTIONS_SET_SOAP_VERSION(options, env, AXIOM_SOAP12 );
                </xsl:when>
                <xsl:otherwise>
-              AXIS2_OPTIONS_SET_SOAP_VERSION(options, env, AXIS2_SOAP11 );
+              AXIS2_OPTIONS_SET_SOAP_VERSION(options, env, AXIOM_SOAP11 );
                </xsl:otherwise>
               </xsl:choose>
 
@@ -234,34 +415,104 @@
                 <!-- End of in-out mep -->
          </xsl:if> <!-- close for  test="$mep='http://www.w3.org/2004/08/wsdl/in-out' -->
 
-         <xsl:if test="$mep='10'">  <!-- These constants can be found in org.apache.axis2.wsdl.WSDLConstants -->
+         <xsl:if test="$mep='10'">
           /**
            * Auto generated method signature
            */
-           
-           <xsl:choose>
-           <xsl:when test="$outputtype=''">axis2_status_t </xsl:when>
-           <xsl:otherwise>
-           axis2_om_node_t*
-           </xsl:otherwise>
-           </xsl:choose>
-           axis2_<xsl:value-of select="@name"/>( axis2_stub_t* stub, axis2_env_t** env <xsl:for-each select="input/param[@type!='']"> ,
-                                          axis2_om_node_t*<xsl:text> </xsl:text>payload<!--<xsl:value-of select="@name"/>-->
-                                          </xsl:for-each> )
+
+           axis2_status_t
+           axis2_<xsl:value-of select="@name"/>( axis2_stub_t* stub, const axis2_env_t* env <xsl:for-each select="input/param[@type!='']"> ,<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: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 status;
+
               axis2_svc_client_t* svc_client = NULL;
               axis2_options_t *options = NULL;
-              int status;
 
               axis2_char_t* soap_action = NULL;
               axis2_qname_t *op_qname =  NULL;
+              axiom_node_t* payload = NULL;
+
+             <xsl:for-each select="input/param[@type!='' 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;
+                  </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/param[@type!='']">
+              <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:if test="position()=1">
+
+                           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>
+
+                           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 )
               {
-                AXIS2_LOG_ERROR((*env)->log, AXIS2_LOG_SI, "options is null in stub: Error code:"
-                     " %d :: %s", (*env)->error->error_number,
-                AXIS2_ERROR_GET_MESSAGE((*env)->error));
+                AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "options is null in stub: Error code:"
+                     " %d :: %s", env->error->error_number,
+                        AXIS2_ERROR_GET_MESSAGE(env->error));
                 return AXIS2_FAILURE;
               }
               svc_client = AXIS2_STUB_GET_SVC_CLIENT (stub, env );
@@ -273,10 +524,10 @@
               }
               <xsl:choose>
                <xsl:when test="$soapVersion='1.2'">
-              AXIS2_OPTIONS_SET_SOAP_VERSION(options, env, AXIS2_SOAP12 );
+              AXIS2_OPTIONS_SET_SOAP_VERSION(options, env, AXIOM_SOAP12 );
                </xsl:when>
                <xsl:otherwise>
-              AXIS2_OPTIONS_SET_SOAP_VERSION(options, env, AXIS2_SOAP11 );
+              AXIS2_OPTIONS_SET_SOAP_VERSION(options, env, AXIOM_SOAP11 );
                </xsl:otherwise>
               </xsl:choose>
               op_qname = axis2_qname_create(env,
@@ -285,10 +536,9 @@
                                           NULL);
               status =  AXIS2_SVC_CLIENT_SEND_ROBUST_WITH_OP_QNAME( svc_client, env, op_qname, payload);
               return status;
-        
-          }         
+
+          }
          </xsl:if> <!-- close for  test="$mep='http://www.w3.org/2004/08/wsdl/in-only' -->
     </xsl:for-each>   <!-- close of for-each select = "method" -->
-
    </xsl:template>
 </xsl:stylesheet>

Modified: webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/template/c/package.html
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/template/c/package.html?rev=414253&r1=414252&r2=414253&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/template/c/package.html (original)
+++ webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/template/c/package.html Wed Jun 14 06:56:18 2006
@@ -1,6 +1,6 @@
-<html>
-<body>
-This package is a "non class containing" one that has the xsl templates for the c class generation
-
-</body>
-</html>
+<html>
+<body>
+This package is a "non class containing" one that has the xsl templates for the c class generation
+
+</body>
+</html>



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