axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sam...@apache.org
Subject svn commit: r580289 [20/20] - in /webservices/axis2/trunk/c: guththila/include/ guththila/samples/ guththila/src/ guththila/tests/ neethi/include/ neethi/src/ neethi/src/secpolicy/builder/ neethi/src/secpolicy/model/ neethi/test/ samples/client/echo/ s...
Date Fri, 28 Sep 2007 10:29:43 GMT
Modified: webservices/axis2/trunk/c/xdocs/docs/hello/service/hello_svc.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/xdocs/docs/hello/service/hello_svc.c?rev=580289&r1=580288&r2=580289&view=diff
==============================================================================
--- webservices/axis2/trunk/c/xdocs/docs/hello/service/hello_svc.c (original)
+++ webservices/axis2/trunk/c/xdocs/docs/hello/service/hello_svc.c Fri Sep 28 03:29:16 2007
@@ -1,3 +1,4 @@
+
 /*
  * Copyright 2004,2005 The Apache Software Foundation.
  *
@@ -22,35 +23,37 @@
 #include <axiom_element.h>
 #include <stdio.h>
 
-axiom_node_t *axis2_hello_greet(const axutil_env_t *env,
-        axiom_node_t *node);
-
-int AXIS2_CALL
-hello_free(axis2_svc_skeleton_t *svc_skeleton,
-        const axutil_env_t *env);
-
-axiom_node_t* AXIS2_CALL
-hello_invoke(axis2_svc_skeleton_t *svc_skeleton,
-        const axutil_env_t *env,
-        axiom_node_t *node,
-        axis2_msg_ctx_t *msg_ctx);
-
-
-int AXIS2_CALL
-hello_init(axis2_svc_skeleton_t *svc_skeleton,
-        const axutil_env_t *env);
-
-axiom_node_t* AXIS2_CALL
-hello_on_fault(axis2_svc_skeleton_t *svc_skeli,
-        const axutil_env_t *env, axiom_node_t *node);
-
+axiom_node_t *axis2_hello_greet(
+    const axutil_env_t * env,
+    axiom_node_t * node);
+
+int AXIS2_CALL hello_free(
+    axis2_svc_skeleton_t * svc_skeleton,
+    const axutil_env_t * env);
+
+axiom_node_t *AXIS2_CALL hello_invoke(
+    axis2_svc_skeleton_t * svc_skeleton,
+    const axutil_env_t * env,
+    axiom_node_t * node,
+    axis2_msg_ctx_t * msg_ctx);
+
+int AXIS2_CALL hello_init(
+    axis2_svc_skeleton_t * svc_skeleton,
+    const axutil_env_t * env);
+
+axiom_node_t *AXIS2_CALL hello_on_fault(
+    axis2_svc_skeleton_t * svc_skeli,
+    const axutil_env_t * env,
+    axiom_node_t * node);
+
+axiom_node_t *build_greeting_response(
+    const axutil_env_t * env,
+    axis2_char_t * greeting);
 
 axiom_node_t *
-build_greeting_response(const axutil_env_t *env, 
-        axis2_char_t *greeting);
-
-axiom_node_t *
-axis2_hello_greet(const axutil_env_t *env, axiom_node_t *node)
+axis2_hello_greet(
+    const axutil_env_t * env,
+    axiom_node_t * node)
 {
     axiom_node_t *client_greeting_node = NULL;
     axiom_node_t *return_node = NULL;
@@ -61,12 +64,15 @@
     {
         client_greeting_node = axiom_node_get_first_child(node, env);
         if (client_greeting_node &&
-                axiom_node_get_node_type(client_greeting_node, env) == AXIOM_TEXT)
+            axiom_node_get_node_type(client_greeting_node, env) == AXIOM_TEXT)
         {
-            axiom_text_t *greeting = (axiom_text_t *)axiom_node_get_data_element(client_greeting_node,
env);
-            if (greeting && axiom_text_get_value(greeting , env))
+            axiom_text_t *greeting =
+                (axiom_text_t *)
+                axiom_node_get_data_element(client_greeting_node, env);
+            if (greeting && axiom_text_get_value(greeting, env))
             {
-                const axis2_char_t *greeting_str = axiom_text_get_value(greeting, env);
+                const axis2_char_t *greeting_str =
+                    axiom_text_get_value(greeting, env);
                 printf("Client greeted saying \"%s\" \n", greeting_str);
                 return_node = build_greeting_response(env, "Hello Client!");
             }
@@ -74,7 +80,9 @@
     }
     else
     {
-        AXIS2_ERROR_SET(env->error, AXIS2_ERROR_SVC_SKEL_INVALID_XML_FORMAT_IN_REQUEST,
AXIS2_FAILURE);
+        AXIS2_ERROR_SET(env->error,
+                        AXIS2_ERROR_SVC_SKEL_INVALID_XML_FORMAT_IN_REQUEST,
+                        AXIS2_FAILURE);
         printf("ERROR: invalid XML in request\n");
         return_node = build_greeting_response(env, "Client! Who are you?");
     }
@@ -83,12 +91,16 @@
 }
 
 axiom_node_t *
-build_greeting_response(const axutil_env_t *env, axis2_char_t *greeting)
-{
-    axiom_node_t* greeting_om_node = NULL;
-    axiom_element_t * greeting_om_ele = NULL;
-
-    greeting_om_ele = axiom_element_create(env, NULL, "greetResponse", NULL, &greeting_om_node);
+build_greeting_response(
+    const axutil_env_t * env,
+    axis2_char_t * greeting)
+{
+    axiom_node_t *greeting_om_node = NULL;
+    axiom_element_t *greeting_om_ele = NULL;
+
+    greeting_om_ele =
+        axiom_element_create(env, NULL, "greetResponse", NULL,
+                             &greeting_om_node);
 
     axiom_element_set_text(greeting_om_ele, env, greeting, greeting_om_node);
 
@@ -103,54 +115,58 @@
 };
 
 axis2_svc_skeleton_t *
-axis2_hello_create(const axutil_env_t *env)
+axis2_hello_create(
+    const axutil_env_t * env)
 {
     axis2_svc_skeleton_t *svc_skeleton = NULL;
-    svc_skeleton = AXIS2_MALLOC(env->allocator,
-            sizeof(axis2_svc_skeleton_t));
+    svc_skeleton = AXIS2_MALLOC(env->allocator, sizeof(axis2_svc_skeleton_t));
 
     svc_skeleton->ops = &hello_svc_skeleton_ops_var;
 
     svc_skeleton->func_array = NULL;
- 
+
     return svc_skeleton;
 }
 
 int AXIS2_CALL
-hello_init(axis2_svc_skeleton_t *svc_skeleton,
-        const axutil_env_t *env)
+hello_init(
+    axis2_svc_skeleton_t * svc_skeleton,
+    const axutil_env_t * env)
 {
     svc_skeleton->func_array = axutil_array_list_create(env, 0);
     axutil_array_list_add(svc_skeleton->func_array, env, "helloString");
     return AXIS2_SUCCESS;
 }
 
-axiom_node_t* AXIS2_CALL
-hello_invoke(axis2_svc_skeleton_t *svc_skeleton,
-        const axutil_env_t *env,
-        axiom_node_t *node,
-        axis2_msg_ctx_t *msg_ctx)
+axiom_node_t *AXIS2_CALL
+hello_invoke(
+    axis2_svc_skeleton_t * svc_skeleton,
+    const axutil_env_t * env,
+    axiom_node_t * node,
+    axis2_msg_ctx_t * msg_ctx)
 {
     return axis2_hello_greet(env, node);
 }
 
-axiom_node_t* AXIS2_CALL
-hello_on_fault(axis2_svc_skeleton_t *svc_skeli,
-        const axutil_env_t *env, axiom_node_t *node)
+axiom_node_t *AXIS2_CALL
+hello_on_fault(
+    axis2_svc_skeleton_t * svc_skeli,
+    const axutil_env_t * env,
+    axiom_node_t * node)
 {
     axiom_node_t *error_node = NULL;
-    axiom_node_t* text_node = NULL;
+    axiom_node_t *text_node = NULL;
     axiom_element_t *error_ele = NULL;
     error_ele = axiom_element_create(env, node, "EchoServiceError", NULL,
-            &error_node);
-    axiom_element_set_text(error_ele, env, "Echo service failed ",
-            text_node);
+                                     &error_node);
+    axiom_element_set_text(error_ele, env, "Echo service failed ", text_node);
     return error_node;
 }
 
 int AXIS2_CALL
-hello_free(axis2_svc_skeleton_t *svc_skeleton,
-        const axutil_env_t *env)
+hello_free(
+    axis2_svc_skeleton_t * svc_skeleton,
+    const axutil_env_t * env)
 {
     if (svc_skeleton->func_array)
     {
@@ -167,10 +183,10 @@
     return AXIS2_SUCCESS;
 }
 
-
 AXIS2_EXPORT int
-axis2_get_instance(axis2_svc_skeleton_t **inst,
-        const axutil_env_t *env)
+axis2_get_instance(
+    axis2_svc_skeleton_t ** inst,
+    const axutil_env_t * env)
 {
     *inst = axis2_hello_create(env);
     if (!(*inst))
@@ -182,8 +198,9 @@
 }
 
 AXIS2_EXPORT int
-axis2_remove_instance(axis2_svc_skeleton_t *inst,
-        const axutil_env_t *env)
+axis2_remove_instance(
+    axis2_svc_skeleton_t * inst,
+    const axutil_env_t * env)
 {
     axis2_status_t status = AXIS2_FAILURE;
     if (inst)
@@ -192,5 +209,3 @@
     }
     return status;
 }
-
-



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