You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by na...@apache.org on 2006/09/01 14:46:04 UTC

svn commit: r439295 [5/15] - in /webservices/axis2/trunk/c: tools/ tools/codegen/ tools/codegen/include/ tools/codegen/samples/ tools/codegen/samples/client/ tools/codegen/samples/client/calculator/ tools/codegen/samples/client/interop_test_svc/ tools/...

Added: webservices/axis2/trunk/c/tools/codegen/samples/client/interop_test_svc/test_svc.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/tools/codegen/samples/client/interop_test_svc/test_svc.c?rev=439295&view=auto
==============================================================================
--- webservices/axis2/trunk/c/tools/codegen/samples/client/interop_test_svc/test_svc.c (added)
+++ webservices/axis2/trunk/c/tools/codegen/samples/client/interop_test_svc/test_svc.c Fri Sep  1 05:45:57 2006
@@ -0,0 +1,126 @@
+#include "axis2_stub_interop_test_port_type_doc_service.h"
+
+axiom_node_t* generate_request_xml (const  axis2_env_t* env, 
+                             axis2_char_t *operation,
+                             axis2_char_t *value );
+void handle_respone_xml ( const  axis2_env_t* env, axiom_node_t* res );
+
+int main(int argc, char** argv)
+{
+    axis2_env_t* env = NULL;
+    axis2_char_t* client_home = NULL;
+    axis2_char_t* endpoint_uri = NULL;
+    axis2_svc_client_t *svc_client = NULL;
+    axis2_options_t *options = NULL;
+
+    axis2_stub_t* stub= NULL;
+
+    axiom_node_t* req = NULL;
+    axiom_node_t* res = NULL;
+
+    endpoint_uri = "http://localhost:9090/axis2/services/InteropTestPortTypeDocService";
+
+    env = axis2_env_create_all( "w2c_test.log", AXIS2_LOG_LEVEL_TRACE);
+
+    /* Set up deploy folder.*/
+    client_home = AXIS2_GETENV("AXIS2C_HOME");
+    if (!client_home)
+        client_home = "../../../deploy";
+    
+    stub = axis2_stub_interop_test_port_type_doc_service_create( env, client_home , endpoint_uri); 
+    svc_client = AXIS2_STUB_GET_SVC_CLIENT( stub, env);
+    /*AXIS2_SVC_CLIENT_DISENGAGE_MODULE(svc_client, env, AXIS2_MODULE_ADDRESSING);*/
+    options = AXIS2_STUB_GET_OPTIONS( stub, env);
+    AXIS2_OPTIONS_SET_ACTION( options, env, "http://soapinterop.org");
+
+    /** testing echoString */ 
+    printf("echoing string..\n");
+    req =  generate_request_xml (env, "echoString", "test string" );
+    res = axis2_stub_interop_test_port_type_doc_service_echo_string(  stub, env, req );
+    handle_respone_xml ( env , res );
+    printf("\n");
+
+    stub = axis2_stub_interop_test_port_type_doc_service_create( env, client_home , endpoint_uri); 
+    svc_client = AXIS2_STUB_GET_SVC_CLIENT( stub, env);
+    /*AXIS2_SVC_CLIENT_DISENGAGE_MODULE(svc_client, env, AXIS2_MODULE_ADDRESSING);*/
+    options = AXIS2_STUB_GET_OPTIONS( stub, env);
+    AXIS2_OPTIONS_SET_ACTION( options, env, "http://soapinterop.org");
+
+    /** testing echoInteger*/ 
+    printf("echoing integer..\n");
+    req =  generate_request_xml (env, "echoInteger", "1343" );
+    res = axis2_stub_interop_test_port_type_doc_service_echo_integer(  stub, env, req );
+    handle_respone_xml ( env , res );
+    printf("\n");
+
+    stub = axis2_stub_interop_test_port_type_doc_service_create( env, client_home , endpoint_uri); 
+    svc_client = AXIS2_STUB_GET_SVC_CLIENT( stub, env);
+    /*AXIS2_SVC_CLIENT_DISENGAGE_MODULE(svc_client, env, AXIS2_MODULE_ADDRESSING);*/
+    options = AXIS2_STUB_GET_OPTIONS( stub, env);
+    AXIS2_OPTIONS_SET_ACTION( options, env, "http://soapinterop.org");
+
+    /** testing echoString */ 
+    printf("echoing float..\n");
+    req =  generate_request_xml (env, "echoFloat", "400.23" );
+    res = axis2_stub_interop_test_port_type_doc_service_echo_float(  stub, env, req );
+    handle_respone_xml ( env , res );
+    printf("\n");
+
+    return 0;
+}
+
+axiom_node_t* generate_request_xml (const  axis2_env_t* env, 
+                             axis2_char_t *operation,
+                             axis2_char_t *value )
+{
+    axiom_node_t *op_node = NULL;
+    axiom_element_t* op_ele = NULL;
+    axiom_node_t* value_node = NULL;
+    axiom_element_t * value_ele = NULL;
+    axiom_namespace_t *ns1 = NULL;
+    axis2_char_t *om_str = NULL;
+     
+
+    ns1 = axiom_namespace_create (env, "http://soapinterop.org", "ns1");
+    op_ele = axiom_element_create(env, NULL, operation, ns1, &op_node);
+   
+    /** here according to wsdl schema definite name should be provided anyway
+     * we used "arg" for all the tests */ 
+    value_ele = axiom_element_create(env, op_node, "arg", NULL, &value_node);
+    AXIOM_ELEMENT_SET_TEXT(value_ele, env, value, value_node);
+ 
+
+    printf ("requesting %s\n" ,value);
+    om_str = AXIOM_NODE_TO_STRING(op_node, env);
+    if (om_str)
+        printf("\nSending OM : %s\n", om_str);
+
+    return op_node;
+    
+}
+
+void handle_respone_xml ( const  axis2_env_t* env, axiom_node_t* res )
+{
+    axiom_node_t* node = NULL;
+    axiom_element_t* ele = NULL;
+    axis2_char_t* text =  NULL;
+    axis2_char_t *om_str = NULL;
+ 
+    if ( NULL ==res)
+    {
+        printf ("response null\n" );
+        return;
+    }  
+    om_str = AXIOM_NODE_TO_STRING(res, env);
+    if (om_str)
+        printf("\nRetrieving OM : %s\n", om_str);
+    node = AXIOM_NODE_GET_FIRST_CHILD ( res, env );
+    if ( node )
+    {
+        ele = AXIOM_NODE_GET_DATA_ELEMENT (node, env );
+        text = AXIOM_ELEMENT_GET_TEXT ( ele,env, node );
+       
+        printf ( "response= %s\n", text );
+    }
+    
+}

Propchange: webservices/axis2/trunk/c/tools/codegen/samples/client/interop_test_svc/test_svc.c
------------------------------------------------------------------------------
    svn:executable = *

Added: webservices/axis2/trunk/c/tools/codegen/samples/server/calculator/Makefile.am
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/tools/codegen/samples/server/calculator/Makefile.am?rev=439295&view=auto
==============================================================================
--- webservices/axis2/trunk/c/tools/codegen/samples/server/calculator/Makefile.am (added)
+++ webservices/axis2/trunk/c/tools/codegen/samples/server/calculator/Makefile.am Fri Sep  1 05:45:57 2006
@@ -0,0 +1,14 @@
+prglibdir=$(prefix)/services/calculator
+samplesdir=$(prefix)/samples/server/calculator
+prglib_LTLIBRARIES = libcalculator.la
+prglib_DATA= services.xml
+EXTRA_DIST = services.xml
+SUBDIRS =
+libcalculator_la_SOURCES =  \
+	axis2_skel_calculator.c \
+    axis2_svc_skel_calculator.c
+
+libcalculator_la_LIBADD  =
+INCLUDES = -I$(AXIS2C_HOME)/include \
+			@UTILINC@ \
+			@AXIOMINC@

Propchange: webservices/axis2/trunk/c/tools/codegen/samples/server/calculator/Makefile.am
------------------------------------------------------------------------------
    svn:executable = *

Added: webservices/axis2/trunk/c/tools/codegen/samples/server/calculator/axis2_skel_calculator.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/tools/codegen/samples/server/calculator/axis2_skel_calculator.c?rev=439295&view=auto
==============================================================================
--- webservices/axis2/trunk/c/tools/codegen/samples/server/calculator/axis2_skel_calculator.c (added)
+++ webservices/axis2/trunk/c/tools/codegen/samples/server/calculator/axis2_skel_calculator.c Fri Sep  1 05:45:57 2006
@@ -0,0 +1,106 @@
+
+
+/**
+ * axis2_skel_calculator.c 
+ *
+ * This file was auto-generated from WSDL for "Calculator|http://localhost/axis/Calculator" service
+ * by the Apache Axis2/C version: #axisVersion# #today#
+ * axis2_skel_calculator Axis2/C skeleton for the axisService
+ */
+
+ #include "axis2_skel_calculator.h"
+
+
+/**
+ * auto generated function definition signature
+ * for "add|http://localhost/axis/Calculator" operation.
+ * @param content0
+ */
+axiom_node_t* axis2_skel_calculator_add (const axis2_env_t *env  ,
+                                  axiom_node_t* content0 )
+{
+    /* TODO fill this with the necessary business logic */
+    axiom_node_t* req = content0;
+    axiom_node_t* node = NULL;
+    axiom_element_t* ele = NULL;
+    axis2_char_t* text =  NULL;
+    
+    axiom_node_t *op_node = NULL;
+    axiom_element_t* op_ele = NULL;
+    axiom_node_t* value_node = NULL;
+    axiom_element_t * value_ele = NULL;
+    axiom_namespace_t *ns1 = NULL;
+    
+    char value_str[64];
+    
+    int result = 0;
+    
+    int value1, value2;
+    if (NULL== req)
+    {
+        printf ("request null\n" );
+        return NULL;
+    }
+    else
+    {
+        node = AXIOM_NODE_GET_FIRST_CHILD ( req, env );
+        ele = AXIOM_NODE_GET_DATA_ELEMENT (node, env );
+        text = AXIOM_ELEMENT_GET_TEXT ( ele,env, node );
+        value1 = atoi ( text );
+    
+        node = AXIOM_NODE_GET_NEXT_SIBLING( node, env );
+        ele = AXIOM_NODE_GET_DATA_ELEMENT (node, env );
+        text = AXIOM_ELEMENT_GET_TEXT ( ele,env, node );
+        value2 = atoi ( text );
+    
+    }
+    
+    result = value1 + value2;
+    printf("%d = %d + %d\n", result, value1, value2 );
+    
+    ns1 = axiom_namespace_create (env, "http://localhost/axis/Calculator", "ns1");
+    op_ele = axiom_element_create(env, NULL, "addResponse", ns1, &op_node);
+    
+    value_ele = axiom_element_create(env, op_node, "in1", NULL, &value_node);
+    sprintf ( value_str, "%d", result);
+    AXIOM_ELEMENT_SET_TEXT(value_ele, env, value_str , value_node);
+    
+    return op_node;
+}
+
+/**
+ * auto generated function definition signature
+ * for "sub|http://localhost/axis/Calculator" operation.
+ * @param content2
+ */
+axiom_node_t* axis2_skel_calculator_sub (const axis2_env_t *env  ,
+                                  axiom_node_t* content2 )
+{
+    /* TODO fill this with the necessary business logic */
+    return NULL;
+}
+
+/**
+ * auto generated function definition signature
+ * for "mul|http://localhost/axis/Calculator" operation.
+ * @param content4
+ */
+axiom_node_t* axis2_skel_calculator_mul (const axis2_env_t *env  ,
+                                  axiom_node_t* content4 )
+{
+    /* TODO fill this with the necessary business logic */
+    return NULL;
+}
+
+/**
+ * auto generated function definition signature
+ * for "div|http://localhost/axis/Calculator" operation.
+ * @param content6
+ */
+axiom_node_t* axis2_skel_calculator_div (const axis2_env_t *env  ,
+                                  axiom_node_t* content6 )
+{
+    /* TODO fill this with the necessary business logic */
+    return NULL;
+}
+

Added: webservices/axis2/trunk/c/tools/codegen/samples/server/calculator/axis2_skel_calculator.h
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/tools/codegen/samples/server/calculator/axis2_skel_calculator.h?rev=439295&view=auto
==============================================================================
--- webservices/axis2/trunk/c/tools/codegen/samples/server/calculator/axis2_skel_calculator.h (added)
+++ webservices/axis2/trunk/c/tools/codegen/samples/server/calculator/axis2_skel_calculator.h Fri Sep  1 05:45:57 2006
@@ -0,0 +1,53 @@
+
+
+/**
+ * axis2_skel_calculator.h
+ *
+ * This file was auto-generated from WSDL for "Calculator|http://localhost/axis/Calculator" service
+ * by the Apache Axis2/C version: #axisVersion# #today#
+ * axis2_skel_calculator Axis2/C skeleton for the axisService- Header file
+ */
+
+
+#include <axis2_svc_skeleton.h>
+#include <axis2_log_default.h>
+#include <axis2_error_default.h>
+#include <axiom_text.h>
+#include <axiom_node.h>
+#include <axiom_element.h>
+#include <stdio.h>
+
+
+
+/**
+ * auto generated function declaration
+ * for "add|http://localhost/axis/Calculator" operation.
+ * @param content0
+ */
+axiom_node_t* axis2_skel_calculator_add (const axis2_env_t *env  ,
+                                  axiom_node_t* content0 );
+
+/**
+ * auto generated function declaration
+ * for "sub|http://localhost/axis/Calculator" operation.
+ * @param content2
+ */
+axiom_node_t* axis2_skel_calculator_sub (const axis2_env_t *env  ,
+                                  axiom_node_t* content2 );
+
+/**
+ * auto generated function declaration
+ * for "mul|http://localhost/axis/Calculator" operation.
+ * @param content4
+ */
+axiom_node_t* axis2_skel_calculator_mul (const axis2_env_t *env  ,
+                                  axiom_node_t* content4 );
+
+/**
+ * auto generated function declaration
+ * for "div|http://localhost/axis/Calculator" operation.
+ * @param content6
+ */
+axiom_node_t* axis2_skel_calculator_div (const axis2_env_t *env  ,
+                                  axiom_node_t* content6 );
+

Added: webservices/axis2/trunk/c/tools/codegen/samples/server/calculator/axis2_svc_skel_calculator.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/tools/codegen/samples/server/calculator/axis2_svc_skel_calculator.c?rev=439295&view=auto
==============================================================================
--- webservices/axis2/trunk/c/tools/codegen/samples/server/calculator/axis2_svc_skel_calculator.c (added)
+++ webservices/axis2/trunk/c/tools/codegen/samples/server/calculator/axis2_svc_skel_calculator.c Fri Sep  1 05:45:57 2006
@@ -0,0 +1,232 @@
+
+
+/**
+ * axis2_svc_skel_calculator.c
+ *
+ * This file was auto-generated from WSDL for "Calculator|http://localhost/axis/Calculator" service
+ * by the Apache Axis2 version: #axisVersion# #today#
+ *  axis2_svc_skel_calculator
+ */
+
+#include "axis2_skel_calculator.h"
+#include <axis2_svc_skeleton.h>
+#include <axis2_array_list.h>
+#include <stdio.h>
+
+/**
+ * functions prototypes
+ */
+
+/* On fault, handle the fault */
+axiom_node_t* AXIS2_CALL
+axis2_svc_skel_calculator_on_fault(axis2_svc_skeleton_t *svc_skeleton,
+          const axis2_env_t *env, axiom_node_t *node);
+
+/* Free the service */
+int AXIS2_CALL
+axis2_svc_skel_calculator_free(axis2_svc_skeleton_t *svc_skeleton,
+          const axis2_env_t *env);
+
+/* This method invokes the right service method */
+axiom_node_t* AXIS2_CALL
+axis2_svc_skel_calculator_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
+axis2_svc_skel_calculator_init(axis2_svc_skeleton_t *svc_skeleton,
+                const axis2_env_t *env);
+
+/* Create the service  */
+axis2_svc_skeleton_t* AXIS2_CALL
+axis2_svc_skel_calculator_create(const axis2_env_t *env);
+
+/**
+ * Implementations for the functions
+ */
+
+axis2_svc_skeleton_t* AXIS2_CALL
+axis2_svc_skel_calculator_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 = axis2_svc_skel_calculator_free;
+    svc_skeleton->ops->init = axis2_svc_skel_calculator_init;
+    svc_skeleton->ops->invoke = axis2_svc_skel_calculator_invoke;
+    svc_skeleton->ops->on_fault = axis2_svc_skel_calculator_on_fault;
+    
+    return svc_skeleton;
+}
+
+
+int AXIS2_CALL
+axis2_svc_skel_calculator_init(axis2_svc_skeleton_t *svc_skeleton,
+                        const axis2_env_t *env)
+{
+    svc_skeleton->func_array = axis2_array_list_create(env, 10);
+    
+    AXIS2_ARRAY_LIST_ADD(svc_skeleton->func_array, env, "add");
+    
+    AXIS2_ARRAY_LIST_ADD(svc_skeleton->func_array, env, "sub");
+    
+    AXIS2_ARRAY_LIST_ADD(svc_skeleton->func_array, env, "mul");
+    
+    AXIS2_ARRAY_LIST_ADD(svc_skeleton->func_array, env, "div");
+    
+    
+    /* Any initialization stuff of axis2_skel_calculator goes here */
+    return AXIS2_SUCCESS;
+}
+
+int AXIS2_CALL
+axis2_svc_skel_calculator_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
+axis2_svc_skel_calculator_invoke(axis2_svc_skeleton_t *svc_skeleton,
+   const axis2_env_t *env,
+   axiom_node_t *content_node,
+   axis2_msg_ctx_t *msg_ctx)
+{
+    /* depending on the function name invoke the
+     * corresponding  method
+     */
+     
+     axiom_element_t *element = NULL;
+    
+    if (content_node)
+    {
+        if (AXIOM_NODE_GET_NODE_TYPE(content_node, env) == AXIOM_ELEMENT)
+        {
+            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);
+                if (op_name)
+                {
+                    
+                    
+                    if ( AXIS2_STRCMP(op_name, "add") == 0 )
+                    {
+                        return  axis2_skel_calculator_add(env  ,
+                                             content_node );
+                        
+                        
+                    }
+                    
+                    
+                    if ( AXIS2_STRCMP(op_name, "sub") == 0 )
+                    {
+                        return  axis2_skel_calculator_sub(env  ,
+                                             content_node );
+                        
+                        
+                    }
+                    
+                    
+                    if ( AXIS2_STRCMP(op_name, "mul") == 0 )
+                    {
+                        return  axis2_skel_calculator_mul(env  ,
+                                             content_node );
+                        
+                        
+                    }
+                    
+                    
+                    if ( AXIS2_STRCMP(op_name, "div") == 0 )
+                    {
+                        return  axis2_skel_calculator_div(env  ,
+                                             content_node );
+                        
+                        
+                    }
+                    
+                }
+            }
+        }
+    }
+    printf("axis2_svc_skel_calculator service ERROR: invalid OM parameters in request\n");
+    return content_node;
+}
+
+axiom_node_t* AXIS2_CALL
+axis2_svc_skel_calculator_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, "axis2_svc_skel_calculatorError", NULL,
+           &error_node);
+    AXIOM_ELEMENT_SET_TEXT(error_ele, env, "axis2_svc_skel_calculatorfailed",
+           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 = axis2_svc_skel_calculator_create(env);
+    
+    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;
+}
+
+
+

Added: webservices/axis2/trunk/c/tools/codegen/samples/server/calculator/readme
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/tools/codegen/samples/server/calculator/readme?rev=439295&view=auto
==============================================================================
--- webservices/axis2/trunk/c/tools/codegen/samples/server/calculator/readme (added)
+++ webservices/axis2/trunk/c/tools/codegen/samples/server/calculator/readme Fri Sep  1 05:45:57 2006
@@ -0,0 +1,11 @@
+This is a sample generated from Axis2/C Codegen tool.
+
+sample source        axis2_skel_calculator.c
+wsdl                 $AXIS2C_HOME/test/resources/wsdl/CalculatorDoc.wsdl
+
+Command to execute the code generation: 
+( server side(ss) and service description(sd) with converting names(cn) and indenting code(id) )
+
+w2c -uri $AXIS2C_HOME/test/resources/wsdl/CalculatorDoc.wsdl -ss -cn -id
+
+NOTE:here the services.xml should be edited to rename the service name to calculator from Calculator. (because there is another service name Calculator)

Propchange: webservices/axis2/trunk/c/tools/codegen/samples/server/calculator/readme
------------------------------------------------------------------------------
    svn:executable = *

Added: webservices/axis2/trunk/c/tools/codegen/samples/server/calculator/services.xml
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/tools/codegen/samples/server/calculator/services.xml?rev=439295&view=auto
==============================================================================
--- webservices/axis2/trunk/c/tools/codegen/samples/server/calculator/services.xml (added)
+++ webservices/axis2/trunk/c/tools/codegen/samples/server/calculator/services.xml Fri Sep  1 05:45:57 2006
@@ -0,0 +1,10 @@
+<!-- This file was auto-generated from WSDL -->
+<!-- by the Apache Axis2 version: #axisVersion# #today# -->
+<service name="Calculator">
+  <parameter name="ServiceClass" locked="false">calculator</parameter>
+  <operation name="add"/>
+  <operation name="sub"/>
+  <operation name="mul"/>
+  <operation name="div"/>
+</service>
+

Added: webservices/axis2/trunk/c/tools/codegen/samples/server/interop_test_svc/Makefile.am
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/tools/codegen/samples/server/interop_test_svc/Makefile.am?rev=439295&view=auto
==============================================================================
--- webservices/axis2/trunk/c/tools/codegen/samples/server/interop_test_svc/Makefile.am (added)
+++ webservices/axis2/trunk/c/tools/codegen/samples/server/interop_test_svc/Makefile.am Fri Sep  1 05:45:57 2006
@@ -0,0 +1,14 @@
+prglibdir=$(prefix)/services/interop_test_port_type_doc_service
+samplesdir=$(prefix)/samples/server/InteropTestPortTypeDocService
+prglib_LTLIBRARIES = libInteropTestPortTypeDocService.la
+prglib_DATA= services.xml
+EXTRA_DIST = services.xml
+SUBDIRS =
+libInteropTestPortTypeDocService_la_SOURCES =  \
+	axis2_skel_interop_test_port_type_doc_service.c \
+    axis2_svc_skel_interop_test_port_type_doc_service.c
+
+libInteropTestPortTypeDocService_la_LIBADD  =
+INCLUDES = -I$(AXIS2C_HOME)/include \
+			@UTILINC@ \
+			@AXIOMINC@

Propchange: webservices/axis2/trunk/c/tools/codegen/samples/server/interop_test_svc/Makefile.am
------------------------------------------------------------------------------
    svn:executable = *

Added: webservices/axis2/trunk/c/tools/codegen/samples/server/interop_test_svc/axis2_skel_interop_test_port_type_doc_service.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/tools/codegen/samples/server/interop_test_svc/axis2_skel_interop_test_port_type_doc_service.c?rev=439295&view=auto
==============================================================================
--- webservices/axis2/trunk/c/tools/codegen/samples/server/interop_test_svc/axis2_skel_interop_test_port_type_doc_service.c (added)
+++ webservices/axis2/trunk/c/tools/codegen/samples/server/interop_test_svc/axis2_skel_interop_test_port_type_doc_service.c Fri Sep  1 05:45:57 2006
@@ -0,0 +1,265 @@
+
+
+/**
+ * axis2_skel_interop_test_port_type_doc_service.c 
+ *
+ * This file was auto-generated from WSDL for "InteropTestPortTypeDocService|http://soapinterop.org" service
+ * by the Apache Axis2/C version: #axisVersion# #today#
+ * axis2_skel_interop_test_port_type_doc_service Axis2/C skeleton for the axisService
+ */
+
+ #include "axis2_skel_interop_test_port_type_doc_service.h"
+
+
+/**
+ * auto generated function definition signature
+ * for "echoString|http://soapinterop.org" operation.
+ * @param content0
+ */
+axiom_node_t* axis2_skel_interop_test_port_type_doc_service_echo_string (const axis2_env_t *env  ,
+                                  axiom_node_t* content0 )
+{
+    /* TODO fill this with the necessary business logic */
+    axiom_node_t* req = content0;
+    axiom_node_t* node = NULL;
+    axiom_element_t* ele = NULL;
+    axis2_char_t* text =  NULL;
+         
+    axiom_node_t *op_node = NULL;
+    axiom_element_t* op_ele = NULL;
+    axiom_node_t* value_node = NULL;
+    axiom_element_t * value_ele = NULL;
+    axiom_namespace_t *ns1 = NULL;
+         
+    if (NULL== req)
+    {
+       printf ("request null\n" );
+       return NULL;
+    }
+    node = AXIOM_NODE_GET_FIRST_CHILD ( req, env );
+    ele = AXIOM_NODE_GET_DATA_ELEMENT (node, env );
+    text = AXIOM_ELEMENT_GET_TEXT ( ele,env, node );
+    
+    printf("echoing string: %s\n", text);     
+    
+    ns1 = axiom_namespace_create (env, "http://soapinterop.org", "ns1");
+    op_ele = axiom_element_create(env, NULL, "echoStringResponse", ns1, &op_node);
+         
+    value_ele = axiom_element_create(env, op_node, "arg", NULL, &value_node);
+    AXIOM_ELEMENT_SET_TEXT(value_ele, env, text, value_node);
+         
+    return op_node;
+}
+
+/**
+ * auto generated function definition signature
+ * for "echoStringArray|http://soapinterop.org" operation.
+ * @param content2
+ */
+axiom_node_t* axis2_skel_interop_test_port_type_doc_service_echo_string_array (const axis2_env_t *env  ,
+                                  axiom_node_t* content2 )
+{
+    /* TODO fill this with the necessary business logic */
+    return NULL;
+}
+
+/**
+ * auto generated function definition signature
+ * for "echoInteger|http://soapinterop.org" operation.
+ * @param content4
+ */
+axiom_node_t* axis2_skel_interop_test_port_type_doc_service_echo_integer (const axis2_env_t *env  ,
+                                  axiom_node_t* content4 )
+{
+    /* TODO fill this with the necessary business logic */
+    axiom_node_t* req = content4;
+    axiom_node_t* node = NULL;
+    axiom_element_t* ele = NULL;
+    axis2_char_t* text =  NULL;
+         
+    axiom_node_t *op_node = NULL;
+    axiom_element_t* op_ele = NULL;
+    axiom_node_t* value_node = NULL;
+    axiom_element_t * value_ele = NULL;
+    axiom_namespace_t *ns1 = NULL;
+         
+    if (NULL== req)
+    {
+       printf ("request null\n" );
+       return NULL;
+    }
+    node = AXIOM_NODE_GET_FIRST_CHILD ( req, env );
+    ele = AXIOM_NODE_GET_DATA_ELEMENT (node, env );
+    text = AXIOM_ELEMENT_GET_TEXT ( ele,env, node );
+    
+    printf("echoing integer: %s\n", text);     
+    
+    ns1 = axiom_namespace_create (env, "http://soapinterop.org", "ns1");
+    op_ele = axiom_element_create(env, NULL, "echoIntegerResponse", ns1, &op_node);
+         
+    value_ele = axiom_element_create(env, op_node, "arg", NULL, &value_node);
+    AXIOM_ELEMENT_SET_TEXT(value_ele, env, text, value_node);
+         
+    return op_node;
+}
+
+/**
+ * auto generated function definition signature
+ * for "echoIntegerArray|http://soapinterop.org" operation.
+ * @param content6
+ */
+axiom_node_t* axis2_skel_interop_test_port_type_doc_service_echo_integer_array (const axis2_env_t *env  ,
+                                  axiom_node_t* content6 )
+{
+    /* TODO fill this with the necessary business logic */
+    return NULL;
+}
+
+/**
+ * auto generated function definition signature
+ * for "echoFloat|http://soapinterop.org" operation.
+ * @param content8
+ */
+axiom_node_t* axis2_skel_interop_test_port_type_doc_service_echo_float (const axis2_env_t *env  ,
+                                  axiom_node_t* content8 )
+{
+    /* TODO fill this with the necessary business logic */
+    axiom_node_t* req = content8;
+    axiom_node_t* node = NULL;
+    axiom_element_t* ele = NULL;
+    axis2_char_t* text =  NULL;
+         
+    axiom_node_t *op_node = NULL;
+    axiom_element_t* op_ele = NULL;
+    axiom_node_t* value_node = NULL;
+    axiom_element_t * value_ele = NULL;
+    axiom_namespace_t *ns1 = NULL;
+         
+    if (NULL== req)
+    {
+       printf ("request null\n" );
+       return NULL;
+    }
+    node = AXIOM_NODE_GET_FIRST_CHILD ( req, env );
+    ele = AXIOM_NODE_GET_DATA_ELEMENT (node, env );
+    text = AXIOM_ELEMENT_GET_TEXT ( ele,env, node );
+    
+    printf("echoing float: %s\n", text);     
+    
+    ns1 = axiom_namespace_create (env, "http://soapinterop.org", "ns1");
+    op_ele = axiom_element_create(env, NULL, "echoFloatResponse", ns1, &op_node);
+         
+    value_ele = axiom_element_create(env, op_node, "arg", NULL, &value_node);
+    AXIOM_ELEMENT_SET_TEXT(value_ele, env, text, value_node);
+         
+    return op_node;
+}
+
+/**
+ * auto generated function definition signature
+ * for "echoFloatArray|http://soapinterop.org" operation.
+ * @param content10
+ */
+axiom_node_t* axis2_skel_interop_test_port_type_doc_service_echo_float_array (const axis2_env_t *env  ,
+                                  axiom_node_t* content10 )
+{
+    /* TODO fill this with the necessary business logic */
+    return NULL;
+}
+
+/**
+ * auto generated function definition signature
+ * for "echoStruct|http://soapinterop.org" operation.
+ * @param content12
+ */
+axiom_node_t* axis2_skel_interop_test_port_type_doc_service_echo_struct (const axis2_env_t *env  ,
+                                  axiom_node_t* content12 )
+{
+    /* TODO fill this with the necessary business logic */
+    return NULL;
+}
+
+/**
+ * auto generated function definition signature
+ * for "echoStructArray|http://soapinterop.org" operation.
+ * @param content14
+ */
+axiom_node_t* axis2_skel_interop_test_port_type_doc_service_echo_struct_array (const axis2_env_t *env  ,
+                                  axiom_node_t* content14 )
+{
+    /* TODO fill this with the necessary business logic */
+    return NULL;
+}
+
+/**
+ * auto generated function definition signature
+ * for "echoVoid|http://soapinterop.org" operation.
+ * @param content16
+ */
+axiom_node_t* axis2_skel_interop_test_port_type_doc_service_echo_void (const axis2_env_t *env  ,
+                                  axiom_node_t* content16 )
+{
+    /* TODO fill this with the necessary business logic */
+    return NULL;
+}
+
+/**
+ * auto generated function definition signature
+ * for "echoBase64|http://soapinterop.org" operation.
+ * @param content18
+ */
+axiom_node_t* axis2_skel_interop_test_port_type_doc_service_echo_base64 (const axis2_env_t *env  ,
+                                  axiom_node_t* content18 )
+{
+    /* TODO fill this with the necessary business logic */
+    return NULL;
+}
+
+/**
+ * auto generated function definition signature
+ * for "echoDate|http://soapinterop.org" operation.
+ * @param content20
+ */
+axiom_node_t* axis2_skel_interop_test_port_type_doc_service_echo_date (const axis2_env_t *env  ,
+                                  axiom_node_t* content20 )
+{
+    /* TODO fill this with the necessary business logic */
+    return NULL;
+}
+
+/**
+ * auto generated function definition signature
+ * for "echoHexBinary|http://soapinterop.org" operation.
+ * @param content22
+ */
+axiom_node_t* axis2_skel_interop_test_port_type_doc_service_echo_hex_binary (const axis2_env_t *env  ,
+                                  axiom_node_t* content22 )
+{
+    /* TODO fill this with the necessary business logic */
+    return NULL;
+}
+
+/**
+ * auto generated function definition signature
+ * for "echoDecimal|http://soapinterop.org" operation.
+ * @param content24
+ */
+axiom_node_t* axis2_skel_interop_test_port_type_doc_service_echo_decimal (const axis2_env_t *env  ,
+                                  axiom_node_t* content24 )
+{
+    /* TODO fill this with the necessary business logic */
+    return NULL;
+}
+
+/**
+ * auto generated function definition signature
+ * for "echoBoolean|http://soapinterop.org" operation.
+ * @param content26
+ */
+axiom_node_t* axis2_skel_interop_test_port_type_doc_service_echo_boolean (const axis2_env_t *env  ,
+                                  axiom_node_t* content26 )
+{
+    /* TODO fill this with the necessary business logic */
+    return NULL;
+}
+

Added: webservices/axis2/trunk/c/tools/codegen/samples/server/interop_test_svc/axis2_skel_interop_test_port_type_doc_service.h
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/tools/codegen/samples/server/interop_test_svc/axis2_skel_interop_test_port_type_doc_service.h?rev=439295&view=auto
==============================================================================
--- webservices/axis2/trunk/c/tools/codegen/samples/server/interop_test_svc/axis2_skel_interop_test_port_type_doc_service.h (added)
+++ webservices/axis2/trunk/c/tools/codegen/samples/server/interop_test_svc/axis2_skel_interop_test_port_type_doc_service.h Fri Sep  1 05:45:57 2006
@@ -0,0 +1,133 @@
+
+
+/**
+ * axis2_skel_interop_test_port_type_doc_service.h
+ *
+ * This file was auto-generated from WSDL for "InteropTestPortTypeDocService|http://soapinterop.org" service
+ * by the Apache Axis2/C version: #axisVersion# #today#
+ * axis2_skel_interop_test_port_type_doc_service Axis2/C skeleton for the axisService- Header file
+ */
+
+
+#include <axis2_svc_skeleton.h>
+#include <axis2_log_default.h>
+#include <axis2_error_default.h>
+#include <axiom_text.h>
+#include <axiom_node.h>
+#include <axiom_element.h>
+#include <stdio.h>
+
+
+
+/**
+ * auto generated function declaration
+ * for "echoString|http://soapinterop.org" operation.
+ * @param content0
+ */
+axiom_node_t* axis2_skel_interop_test_port_type_doc_service_echo_string (const axis2_env_t *env  ,
+                                  axiom_node_t* content0 );
+
+/**
+ * auto generated function declaration
+ * for "echoStringArray|http://soapinterop.org" operation.
+ * @param content2
+ */
+axiom_node_t* axis2_skel_interop_test_port_type_doc_service_echo_string_array (const axis2_env_t *env  ,
+                                  axiom_node_t* content2 );
+
+/**
+ * auto generated function declaration
+ * for "echoInteger|http://soapinterop.org" operation.
+ * @param content4
+ */
+axiom_node_t* axis2_skel_interop_test_port_type_doc_service_echo_integer (const axis2_env_t *env  ,
+                                  axiom_node_t* content4 );
+
+/**
+ * auto generated function declaration
+ * for "echoIntegerArray|http://soapinterop.org" operation.
+ * @param content6
+ */
+axiom_node_t* axis2_skel_interop_test_port_type_doc_service_echo_integer_array (const axis2_env_t *env  ,
+                                  axiom_node_t* content6 );
+
+/**
+ * auto generated function declaration
+ * for "echoFloat|http://soapinterop.org" operation.
+ * @param content8
+ */
+axiom_node_t* axis2_skel_interop_test_port_type_doc_service_echo_float (const axis2_env_t *env  ,
+                                  axiom_node_t* content8 );
+
+/**
+ * auto generated function declaration
+ * for "echoFloatArray|http://soapinterop.org" operation.
+ * @param content10
+ */
+axiom_node_t* axis2_skel_interop_test_port_type_doc_service_echo_float_array (const axis2_env_t *env  ,
+                                  axiom_node_t* content10 );
+
+/**
+ * auto generated function declaration
+ * for "echoStruct|http://soapinterop.org" operation.
+ * @param content12
+ */
+axiom_node_t* axis2_skel_interop_test_port_type_doc_service_echo_struct (const axis2_env_t *env  ,
+                                  axiom_node_t* content12 );
+
+/**
+ * auto generated function declaration
+ * for "echoStructArray|http://soapinterop.org" operation.
+ * @param content14
+ */
+axiom_node_t* axis2_skel_interop_test_port_type_doc_service_echo_struct_array (const axis2_env_t *env  ,
+                                  axiom_node_t* content14 );
+
+/**
+ * auto generated function declaration
+ * for "echoVoid|http://soapinterop.org" operation.
+ * @param content16
+ */
+axiom_node_t* axis2_skel_interop_test_port_type_doc_service_echo_void (const axis2_env_t *env  ,
+                                  axiom_node_t* content16 );
+
+/**
+ * auto generated function declaration
+ * for "echoBase64|http://soapinterop.org" operation.
+ * @param content18
+ */
+axiom_node_t* axis2_skel_interop_test_port_type_doc_service_echo_base64 (const axis2_env_t *env  ,
+                                  axiom_node_t* content18 );
+
+/**
+ * auto generated function declaration
+ * for "echoDate|http://soapinterop.org" operation.
+ * @param content20
+ */
+axiom_node_t* axis2_skel_interop_test_port_type_doc_service_echo_date (const axis2_env_t *env  ,
+                                  axiom_node_t* content20 );
+
+/**
+ * auto generated function declaration
+ * for "echoHexBinary|http://soapinterop.org" operation.
+ * @param content22
+ */
+axiom_node_t* axis2_skel_interop_test_port_type_doc_service_echo_hex_binary (const axis2_env_t *env  ,
+                                  axiom_node_t* content22 );
+
+/**
+ * auto generated function declaration
+ * for "echoDecimal|http://soapinterop.org" operation.
+ * @param content24
+ */
+axiom_node_t* axis2_skel_interop_test_port_type_doc_service_echo_decimal (const axis2_env_t *env  ,
+                                  axiom_node_t* content24 );
+
+/**
+ * auto generated function declaration
+ * for "echoBoolean|http://soapinterop.org" operation.
+ * @param content26
+ */
+axiom_node_t* axis2_skel_interop_test_port_type_doc_service_echo_boolean (const axis2_env_t *env  ,
+                                  axiom_node_t* content26 );
+

Added: webservices/axis2/trunk/c/tools/codegen/samples/server/interop_test_svc/axis2_svc_skel_interop_test_port_type_doc_service.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/tools/codegen/samples/server/interop_test_svc/axis2_svc_skel_interop_test_port_type_doc_service.c?rev=439295&view=auto
==============================================================================
--- webservices/axis2/trunk/c/tools/codegen/samples/server/interop_test_svc/axis2_svc_skel_interop_test_port_type_doc_service.c (added)
+++ webservices/axis2/trunk/c/tools/codegen/samples/server/interop_test_svc/axis2_svc_skel_interop_test_port_type_doc_service.c Fri Sep  1 05:45:57 2006
@@ -0,0 +1,342 @@
+
+
+/**
+ * axis2_svc_skel_interop_test_port_type_doc_service.c
+ *
+ * This file was auto-generated from WSDL for "InteropTestPortTypeDocService|http://soapinterop.org" service
+ * by the Apache Axis2 version: #axisVersion# #today#
+ *  axis2_svc_skel_interop_test_port_type_doc_service
+ */
+
+#include "axis2_skel_interop_test_port_type_doc_service.h"
+#include <axis2_svc_skeleton.h>
+#include <axis2_array_list.h>
+#include <stdio.h>
+
+/**
+ * functions prototypes
+ */
+
+/* On fault, handle the fault */
+axiom_node_t* AXIS2_CALL
+axis2_svc_skel_interop_test_port_type_doc_service_on_fault(axis2_svc_skeleton_t *svc_skeleton,
+          const axis2_env_t *env, axiom_node_t *node);
+
+/* Free the service */
+int AXIS2_CALL
+axis2_svc_skel_interop_test_port_type_doc_service_free(axis2_svc_skeleton_t *svc_skeleton,
+          const axis2_env_t *env);
+
+/* This method invokes the right service method */
+axiom_node_t* AXIS2_CALL
+axis2_svc_skel_interop_test_port_type_doc_service_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
+axis2_svc_skel_interop_test_port_type_doc_service_init(axis2_svc_skeleton_t *svc_skeleton,
+                const axis2_env_t *env);
+
+/* Create the service  */
+axis2_svc_skeleton_t* AXIS2_CALL
+axis2_svc_skel_interop_test_port_type_doc_service_create(const axis2_env_t *env);
+
+/**
+ * Implementations for the functions
+ */
+
+axis2_svc_skeleton_t* AXIS2_CALL
+axis2_svc_skel_interop_test_port_type_doc_service_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 = axis2_svc_skel_interop_test_port_type_doc_service_free;
+    svc_skeleton->ops->init = axis2_svc_skel_interop_test_port_type_doc_service_init;
+    svc_skeleton->ops->invoke = axis2_svc_skel_interop_test_port_type_doc_service_invoke;
+    svc_skeleton->ops->on_fault = axis2_svc_skel_interop_test_port_type_doc_service_on_fault;
+    
+    return svc_skeleton;
+}
+
+
+int AXIS2_CALL
+axis2_svc_skel_interop_test_port_type_doc_service_init(axis2_svc_skeleton_t *svc_skeleton,
+                        const axis2_env_t *env)
+{
+    svc_skeleton->func_array = axis2_array_list_create(env, 10);
+    
+    AXIS2_ARRAY_LIST_ADD(svc_skeleton->func_array, env, "echoString");
+    
+    AXIS2_ARRAY_LIST_ADD(svc_skeleton->func_array, env, "echoStringArray");
+    
+    AXIS2_ARRAY_LIST_ADD(svc_skeleton->func_array, env, "echoInteger");
+    
+    AXIS2_ARRAY_LIST_ADD(svc_skeleton->func_array, env, "echoIntegerArray");
+    
+    AXIS2_ARRAY_LIST_ADD(svc_skeleton->func_array, env, "echoFloat");
+    
+    AXIS2_ARRAY_LIST_ADD(svc_skeleton->func_array, env, "echoFloatArray");
+    
+    AXIS2_ARRAY_LIST_ADD(svc_skeleton->func_array, env, "echoStruct");
+    
+    AXIS2_ARRAY_LIST_ADD(svc_skeleton->func_array, env, "echoStructArray");
+    
+    AXIS2_ARRAY_LIST_ADD(svc_skeleton->func_array, env, "echoVoid");
+    
+    AXIS2_ARRAY_LIST_ADD(svc_skeleton->func_array, env, "echoBase64");
+    
+    AXIS2_ARRAY_LIST_ADD(svc_skeleton->func_array, env, "echoDate");
+    
+    AXIS2_ARRAY_LIST_ADD(svc_skeleton->func_array, env, "echoHexBinary");
+    
+    AXIS2_ARRAY_LIST_ADD(svc_skeleton->func_array, env, "echoDecimal");
+    
+    AXIS2_ARRAY_LIST_ADD(svc_skeleton->func_array, env, "echoBoolean");
+    
+    
+    /* Any initialization stuff of axis2_skel_interop_test_port_type_doc_service goes here */
+    return AXIS2_SUCCESS;
+}
+
+int AXIS2_CALL
+axis2_svc_skel_interop_test_port_type_doc_service_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
+axis2_svc_skel_interop_test_port_type_doc_service_invoke(axis2_svc_skeleton_t *svc_skeleton,
+   const axis2_env_t *env,
+   axiom_node_t *content_node,
+   axis2_msg_ctx_t *msg_ctx)
+{
+    /* depending on the function name invoke the
+     * corresponding  method
+     */
+     
+     axiom_element_t *element = NULL;
+    
+    if (content_node)
+    {
+        if (AXIOM_NODE_GET_NODE_TYPE(content_node, env) == AXIOM_ELEMENT)
+        {
+            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);
+                if (op_name)
+                {
+                    
+                    
+                    if ( AXIS2_STRCMP(op_name, "echoString") == 0 )
+                    {
+                        return  axis2_skel_interop_test_port_type_doc_service_echo_string(env  ,
+                                             content_node );
+                        
+                        
+                    }
+                    
+                    
+                    if ( AXIS2_STRCMP(op_name, "echoStringArray") == 0 )
+                    {
+                        return  axis2_skel_interop_test_port_type_doc_service_echo_string_array(env  ,
+                                             content_node );
+                        
+                        
+                    }
+                    
+                    
+                    if ( AXIS2_STRCMP(op_name, "echoInteger") == 0 )
+                    {
+                        return  axis2_skel_interop_test_port_type_doc_service_echo_integer(env  ,
+                                             content_node );
+                        
+                        
+                    }
+                    
+                    
+                    if ( AXIS2_STRCMP(op_name, "echoIntegerArray") == 0 )
+                    {
+                        return  axis2_skel_interop_test_port_type_doc_service_echo_integer_array(env  ,
+                                             content_node );
+                        
+                        
+                    }
+                    
+                    
+                    if ( AXIS2_STRCMP(op_name, "echoFloat") == 0 )
+                    {
+                        return  axis2_skel_interop_test_port_type_doc_service_echo_float(env  ,
+                                             content_node );
+                        
+                        
+                    }
+                    
+                    
+                    if ( AXIS2_STRCMP(op_name, "echoFloatArray") == 0 )
+                    {
+                        return  axis2_skel_interop_test_port_type_doc_service_echo_float_array(env  ,
+                                             content_node );
+                        
+                        
+                    }
+                    
+                    
+                    if ( AXIS2_STRCMP(op_name, "echoStruct") == 0 )
+                    {
+                        return  axis2_skel_interop_test_port_type_doc_service_echo_struct(env  ,
+                                             content_node );
+                        
+                        
+                    }
+                    
+                    
+                    if ( AXIS2_STRCMP(op_name, "echoStructArray") == 0 )
+                    {
+                        return  axis2_skel_interop_test_port_type_doc_service_echo_struct_array(env  ,
+                                             content_node );
+                        
+                        
+                    }
+                    
+                    
+                    if ( AXIS2_STRCMP(op_name, "echoVoid") == 0 )
+                    {
+                        return  axis2_skel_interop_test_port_type_doc_service_echo_void(env  ,
+                                             content_node );
+                        
+                        
+                    }
+                    
+                    
+                    if ( AXIS2_STRCMP(op_name, "echoBase64") == 0 )
+                    {
+                        return  axis2_skel_interop_test_port_type_doc_service_echo_base64(env  ,
+                                             content_node );
+                        
+                        
+                    }
+                    
+                    
+                    if ( AXIS2_STRCMP(op_name, "echoDate") == 0 )
+                    {
+                        return  axis2_skel_interop_test_port_type_doc_service_echo_date(env  ,
+                                             content_node );
+                        
+                        
+                    }
+                    
+                    
+                    if ( AXIS2_STRCMP(op_name, "echoHexBinary") == 0 )
+                    {
+                        return  axis2_skel_interop_test_port_type_doc_service_echo_hex_binary(env  ,
+                                             content_node );
+                        
+                        
+                    }
+                    
+                    
+                    if ( AXIS2_STRCMP(op_name, "echoDecimal") == 0 )
+                    {
+                        return  axis2_skel_interop_test_port_type_doc_service_echo_decimal(env  ,
+                                             content_node );
+                        
+                        
+                    }
+                    
+                    
+                    if ( AXIS2_STRCMP(op_name, "echoBoolean") == 0 )
+                    {
+                        return  axis2_skel_interop_test_port_type_doc_service_echo_boolean(env  ,
+                                             content_node );
+                        
+                        
+                    }
+                    
+                }
+            }
+        }
+    }
+    printf("axis2_svc_skel_interop_test_port_type_doc_service service ERROR: invalid OM parameters in request\n");
+    return content_node;
+}
+
+axiom_node_t* AXIS2_CALL
+axis2_svc_skel_interop_test_port_type_doc_service_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, "axis2_svc_skel_interop_test_port_type_doc_serviceError", NULL,
+           &error_node);
+    AXIOM_ELEMENT_SET_TEXT(error_ele, env, "axis2_svc_skel_interop_test_port_type_doc_servicefailed",
+           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 = axis2_svc_skel_interop_test_port_type_doc_service_create(env);
+    
+    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;
+}
+
+
+

Added: webservices/axis2/trunk/c/tools/codegen/samples/server/interop_test_svc/readme
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/tools/codegen/samples/server/interop_test_svc/readme?rev=439295&view=auto
==============================================================================
--- webservices/axis2/trunk/c/tools/codegen/samples/server/interop_test_svc/readme (added)
+++ webservices/axis2/trunk/c/tools/codegen/samples/server/interop_test_svc/readme Fri Sep  1 05:45:57 2006
@@ -0,0 +1,11 @@
+This is a sample generated from Axis2/C Codegen tool.
+
+sample source        axis2_skel_interop_test_port_type_doc_service.c
+wsdl                 $AXIS2C_HOME/test/resources/wsdl/CalculatorDoc.wsdl
+
+Command to execute the code generation: 
+( server side(ss) and service description(sd) with converting names(cn) and indenting code(id) )
+
+w2c -uri $AXIS2C_HOME/test/resources/wsdl/CalculatorDoc.wsdl -ss -cn -id
+
+NOTE:here the services.xml should be edited to rename the service name to calculator from Calculator. (because there is another service name Calculator)

Propchange: webservices/axis2/trunk/c/tools/codegen/samples/server/interop_test_svc/readme
------------------------------------------------------------------------------
    svn:executable = *

Added: webservices/axis2/trunk/c/tools/codegen/samples/server/interop_test_svc/services.xml
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/tools/codegen/samples/server/interop_test_svc/services.xml?rev=439295&view=auto
==============================================================================
--- webservices/axis2/trunk/c/tools/codegen/samples/server/interop_test_svc/services.xml (added)
+++ webservices/axis2/trunk/c/tools/codegen/samples/server/interop_test_svc/services.xml Fri Sep  1 05:45:57 2006
@@ -0,0 +1,20 @@
+<!-- This file was auto-generated from WSDL -->
+<!-- by the Apache Axis2 version: #axisVersion# #today# -->
+<service name="InteropTestPortTypeDocService">
+  <parameter name="ServiceClass" locked="false">InteropTestPortTypeDocService</parameter>
+  <operation name="echoString"/>
+  <operation name="echoStringArray"/>
+  <operation name="echoInteger"/>
+  <operation name="echoIntegerArray"/>
+  <operation name="echoFloat"/>
+  <operation name="echoFloatArray"/>
+  <operation name="echoStruct"/>
+  <operation name="echoStructArray"/>
+  <operation name="echoVoid"/>
+  <operation name="echoBase64"/>
+  <operation name="echoDate"/>
+  <operation name="echoHexBinary"/>
+  <operation name="echoDecimal"/>
+  <operation name="echoBoolean"/>
+</service>
+

Added: webservices/axis2/trunk/c/tools/codegen/src/Makefile.am
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/tools/codegen/src/Makefile.am?rev=439295&view=auto
==============================================================================
--- webservices/axis2/trunk/c/tools/codegen/src/Makefile.am (added)
+++ webservices/axis2/trunk/c/tools/codegen/src/Makefile.am Fri Sep  1 05:45:57 2006
@@ -0,0 +1,27 @@
+SUBDIRS = util wsdl
+
+templatesdir=$(prefix)/conf
+typemappersdir=$(prefix)/conf
+
+prgbindir=$(prefix)/bin
+prgbin_PROGRAMS = w2c
+
+w2c_SOURCES =  wsdl2code.c
+w2c_LDADD =  \
+             $(top_builddir)/src/wsdl/libw2c_codegen.la \
+             -L$(AXIS2C_HOME)/lib \
+             -lw2c_codegen \
+             -laxis2_util \
+             -laxis2_axiom \
+             -laxis2_parser \
+             -lxml2 \
+             -lxslt
+
+
+INCLUDES = -I$(top_builddir)/include \
+                        @UTILINC@ \
+                        @AXIOMINC@
+
+install:install-recursive
+	cp templates $(templatesdir) -rf
+	cp typemappers $(typemappersdir) -rf

Added: webservices/axis2/trunk/c/tools/codegen/src/schema/schema-compile.properties
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/tools/codegen/src/schema/schema-compile.properties?rev=439295&view=auto
==============================================================================
--- webservices/axis2/trunk/c/tools/codegen/src/schema/schema-compile.properties (added)
+++ webservices/axis2/trunk/c/tools/codegen/src/schema/schema-compile.properties Fri Sep  1 05:45:57 2006
@@ -0,0 +1,25 @@
+###############################################################################
+##########################Schema Compiler properties   ########################
+###############################################################################
+#
+# all the keys are prefixed with the language name.
+#
+# The writer class
+# The writer is the class used by the schema compiler to write the beans
+# and should implement the w2c_schema_writer
+# inteface
+#
+c.schema.writer.class=w2c_c_schema_writer_t
+#
+# writer template
+# The bean writers template is it's own responsibilty. (A bean writer provider
+# may choose not to use a template at all!) However the property loader will
+# load the following templates (reference) and provide it and in the case when the
+# bean writer is not statically bound to a template, this'll be useful.
+#
+c.schema.writer.template=c/c_adb_template.xsl
+
+#
+# The type map to be used by the schema compiler
+#
+c.schema.typemap=c/adbtypemap.xml



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