You are viewing a plain text version of this content. The canonical link for it is here.
Posted to axis-cvs@ws.apache.org by sa...@apache.org on 2007/09/28 12:29:43 UTC
svn commit: r580289 [16/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...
Modified: webservices/axis2/trunk/c/samples/server/mtom/mtom_skeleton.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/samples/server/mtom/mtom_skeleton.c?rev=580289&r1=580288&r2=580289&view=diff
==============================================================================
--- webservices/axis2/trunk/c/samples/server/mtom/mtom_skeleton.c (original)
+++ webservices/axis2/trunk/c/samples/server/mtom/mtom_skeleton.c Fri Sep 28 03:29:16 2007
@@ -1,3 +1,4 @@
+
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
@@ -18,27 +19,27 @@
#include "mtom.h"
#include <axutil_array_list.h>
-int AXIS2_CALL
-mtom_free(axis2_svc_skeleton_t *svc_skeleton,
- const axutil_env_t *env);
+int AXIS2_CALL mtom_free(
+ axis2_svc_skeleton_t * svc_skeleton,
+ const axutil_env_t * env);
/*
* This method invokes the right service method
*/
-axiom_node_t* AXIS2_CALL
-mtom_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
-mtom_init(axis2_svc_skeleton_t *svc_skeleton,
- const axutil_env_t *env);
-
-axiom_node_t* AXIS2_CALL
-mtom_on_fault(axis2_svc_skeleton_t *svc_skeli,
- const axutil_env_t *env, axiom_node_t *node);
+axiom_node_t *AXIS2_CALL mtom_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 mtom_init(
+ axis2_svc_skeleton_t * svc_skeleton,
+ const axutil_env_t * env);
+
+axiom_node_t *AXIS2_CALL mtom_on_fault(
+ axis2_svc_skeleton_t * svc_skeli,
+ const axutil_env_t * env,
+ axiom_node_t * node);
static const axis2_svc_skeleton_ops_t mtom_svc_skeleton_ops_var = {
mtom_init,
@@ -49,12 +50,12 @@
/*Create function */
axis2_svc_skeleton_t *
-axis2_mtom_create(const axutil_env_t *env)
+axis2_mtom_create(
+ const axutil_env_t * env)
{
axis2_svc_skeleton_t *svc_skeleton = NULL;
/* Allocate memory for the structs */
- 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 = &mtom_svc_skeleton_ops_var;
@@ -65,8 +66,9 @@
/* Initialize the service */
int AXIS2_CALL
-mtom_init(axis2_svc_skeleton_t *svc_skeleton,
- const axutil_env_t *env)
+mtom_init(
+ axis2_svc_skeleton_t * svc_skeleton,
+ const axutil_env_t * env)
{
/* Any initialization stuff of mtom service should go here */
return AXIS2_SUCCESS;
@@ -75,11 +77,12 @@
/*
* This method invokes the right service method
*/
-axiom_node_t* AXIS2_CALL
-mtom_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
+mtom_invoke(
+ axis2_svc_skeleton_t * svc_skeleton,
+ const axutil_env_t * env,
+ axiom_node_t * node,
+ axis2_msg_ctx_t * msg_ctx)
{
/* Invoke the business logic.
* Depending on the function name invoke the correct impl method.
@@ -91,27 +94,29 @@
}
/* On fault, handle the fault */
-axiom_node_t* AXIS2_CALL
-mtom_on_fault(axis2_svc_skeleton_t *svc_skeli,
- const axutil_env_t *env, axiom_node_t *node)
+axiom_node_t *AXIS2_CALL
+mtom_on_fault(
+ axis2_svc_skeleton_t * svc_skeli,
+ const axutil_env_t * env,
+ axiom_node_t * node)
{
/* Here we are just setting a simple error message inside an element
* called 'EchoServiceError'
*/
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;
}
/* Free the resources used */
int AXIS2_CALL
-mtom_free(axis2_svc_skeleton_t *svc_skeleton,
- const axutil_env_t *env)
+mtom_free(
+ axis2_svc_skeleton_t * svc_skeleton,
+ const axutil_env_t * env)
{
/* Free the function array */
if (svc_skeleton->func_array)
@@ -130,13 +135,13 @@
return AXIS2_SUCCESS;
}
-
/**
* Following block distinguish the exposed part of the dll.
*/
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_mtom_create(env);
if (!(*inst))
@@ -148,8 +153,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)
@@ -158,4 +164,3 @@
}
return status;
}
-
Modified: webservices/axis2/trunk/c/samples/server/notify/notify.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/samples/server/notify/notify.c?rev=580289&r1=580288&r2=580289&view=diff
==============================================================================
--- webservices/axis2/trunk/c/samples/server/notify/notify.c (original)
+++ webservices/axis2/trunk/c/samples/server/notify/notify.c Fri Sep 28 03:29:16 2007
@@ -1,3 +1,4 @@
+
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
@@ -18,7 +19,9 @@
#include <stdio.h>
void
-axis2_notify_notify(const axutil_env_t *env, axiom_node_t *node)
+axis2_notify_notify(
+ const axutil_env_t * env,
+ axiom_node_t * node)
{
axiom_node_t *text_node = NULL;
@@ -28,38 +31,43 @@
/* Expected request format is :-
<m:notify xmlns:m="http://example.org/notify">Message 3</m:notify>
*/
- if (!node) /* 'notify' node */
+ if (!node) /* 'notify' node */
{
- AXIS2_ERROR_SET(env->error, AXIS2_ERROR_SVC_SKEL_INPUT_OM_NODE_NULL, AXIS2_FAILURE);
+ AXIS2_ERROR_SET(env->error, AXIS2_ERROR_SVC_SKEL_INPUT_OM_NODE_NULL,
+ AXIS2_FAILURE);
printf("Echo client ERROR: input parameter NULL\n");
return;
}
text_node = axiom_node_get_first_child(node, env);
- if (!node) /* actual text to notify */
+ if (!node) /* actual text to notify */
{
- 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("Echo client ERROR: invalid XML in request\n");
return;
}
if (axiom_node_get_node_type(text_node, env) == AXIOM_TEXT)
{
- axiom_text_t *text = (axiom_text_t *)axiom_node_get_data_element(text_node, env);
- if (text && axiom_text_get_value(text , env))
+ axiom_text_t *text =
+ (axiom_text_t *) axiom_node_get_data_element(text_node, env);
+ if (text && axiom_text_get_value(text, env))
{
- axis2_char_t *text_str = (axis2_char_t *)axiom_text_get_value(text, env);
+ axis2_char_t *text_str =
+ (axis2_char_t *) axiom_text_get_value(text, env);
printf("Notification received : %s \n", text_str);
}
}
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("Echo client ERROR: invalid XML in request\n");
return;
}
return;
}
-
-
Modified: webservices/axis2/trunk/c/samples/server/notify/notify.h
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/samples/server/notify/notify.h?rev=580289&r1=580288&r2=580289&view=diff
==============================================================================
--- webservices/axis2/trunk/c/samples/server/notify/notify.h (original)
+++ webservices/axis2/trunk/c/samples/server/notify/notify.h Fri Sep 28 03:29:16 2007
@@ -1,3 +1,4 @@
+
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
@@ -17,7 +18,6 @@
#ifndef CALC_H
#define CALC_H
-
#include <axis2_svc_skeleton.h>
#include <axutil_log_default.h>
#include <axutil_error_default.h>
@@ -25,6 +25,8 @@
#include <axiom_node.h>
#include <axiom_element.h>
-void axis2_notify_notify(const axutil_env_t *env, axiom_node_t *node);
+void axis2_notify_notify(
+ const axutil_env_t * env,
+ axiom_node_t * node);
-#endif /* CALC_H*/
+#endif /* CALC_H */
Modified: webservices/axis2/trunk/c/samples/server/notify/notify_skeleton.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/samples/server/notify/notify_skeleton.c?rev=580289&r1=580288&r2=580289&view=diff
==============================================================================
--- webservices/axis2/trunk/c/samples/server/notify/notify_skeleton.c (original)
+++ webservices/axis2/trunk/c/samples/server/notify/notify_skeleton.c Fri Sep 28 03:29:16 2007
@@ -1,3 +1,4 @@
+
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
@@ -18,27 +19,27 @@
#include "notify.h"
#include <axutil_array_list.h>
-int AXIS2_CALL
-notify_free(axis2_svc_skeleton_t *svc_skeleton,
- const axutil_env_t *env);
+int AXIS2_CALL notify_free(
+ axis2_svc_skeleton_t * svc_skeleton,
+ const axutil_env_t * env);
/*
* This method invokes the right service method
*/
-axiom_node_t* AXIS2_CALL
-notify_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
-notify_init(axis2_svc_skeleton_t *svc_skeleton,
- const axutil_env_t *env);
-
-axiom_node_t* AXIS2_CALL
-notify_on_fault(axis2_svc_skeleton_t *svc_skeli,
- const axutil_env_t *env, axiom_node_t *node);
+axiom_node_t *AXIS2_CALL notify_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 notify_init(
+ axis2_svc_skeleton_t * svc_skeleton,
+ const axutil_env_t * env);
+
+axiom_node_t *AXIS2_CALL notify_on_fault(
+ axis2_svc_skeleton_t * svc_skeli,
+ const axutil_env_t * env,
+ axiom_node_t * node);
static const axis2_svc_skeleton_ops_t notify_svc_skeleton_ops_var = {
notify_init,
@@ -47,15 +48,14 @@
notify_free
};
-
/*Create function */
axis2_svc_skeleton_t *
-axis2_notify_create(const axutil_env_t *env)
+axis2_notify_create(
+ const axutil_env_t * env)
{
axis2_svc_skeleton_t *svc_skeleton = NULL;
/* Allocate memory for the structs */
- 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 = ¬ify_svc_skeleton_ops_var;
@@ -66,8 +66,9 @@
/* Initialize the service */
int AXIS2_CALL
-notify_init(axis2_svc_skeleton_t *svc_skeleton,
- const axutil_env_t *env)
+notify_init(
+ axis2_svc_skeleton_t * svc_skeleton,
+ const axutil_env_t * env)
{
/* Any initialization stuff of notify service should go here */
return AXIS2_SUCCESS;
@@ -76,11 +77,12 @@
/*
* This method invokes the right service method
*/
-axiom_node_t* AXIS2_CALL
-notify_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
+notify_invoke(
+ axis2_svc_skeleton_t * svc_skeleton,
+ const axutil_env_t * env,
+ axiom_node_t * node,
+ axis2_msg_ctx_t * msg_ctx)
{
/* Invoke the business logic.
* Depending on the function name invoke the correct impl method.
@@ -93,27 +95,29 @@
}
/* On fault, handle the fault */
-axiom_node_t* AXIS2_CALL
-notify_on_fault(axis2_svc_skeleton_t *svc_skeli,
- const axutil_env_t *env, axiom_node_t *node)
+axiom_node_t *AXIS2_CALL
+notify_on_fault(
+ axis2_svc_skeleton_t * svc_skeli,
+ const axutil_env_t * env,
+ axiom_node_t * node)
{
/* Here we are just setting a simple error message inside an element
* called 'EchoServiceError'
*/
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;
}
/* Free the resources used */
int AXIS2_CALL
-notify_free(axis2_svc_skeleton_t *svc_skeleton,
- const axutil_env_t *env)
+notify_free(
+ axis2_svc_skeleton_t * svc_skeleton,
+ const axutil_env_t * env)
{
/* Free the function array */
if (svc_skeleton->func_array)
@@ -132,13 +136,13 @@
return AXIS2_SUCCESS;
}
-
/**
* Following block distinguish the exposed part of the dll.
*/
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_notify_create(env);
if (!(*inst))
@@ -150,8 +154,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)
@@ -160,4 +165,3 @@
}
return status;
}
-
Modified: webservices/axis2/trunk/c/samples/server/sg_math/add.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/samples/server/sg_math/add.c?rev=580289&r1=580288&r2=580289&view=diff
==============================================================================
--- webservices/axis2/trunk/c/samples/server/sg_math/add.c (original)
+++ webservices/axis2/trunk/c/samples/server/sg_math/add.c Fri Sep 28 03:29:16 2007
@@ -1,3 +1,4 @@
+
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
@@ -19,7 +20,10 @@
#include <axis2_svc_grp_ctx.h>
axiom_node_t *
-axis2_add_add(const axutil_env_t *env, axiom_node_t *node, axis2_msg_ctx_t *msg_ctx)
+axis2_add_add(
+ const axutil_env_t * env,
+ axiom_node_t * node,
+ axis2_msg_ctx_t * msg_ctx)
{
axiom_node_t *param1_node = NULL;
axiom_node_t *param1_text_node = NULL;
@@ -32,7 +36,8 @@
if (!node)
{
- AXIS2_ERROR_SET(env->error, AXIS2_ERROR_SVC_SKEL_INPUT_OM_NODE_NULL, AXIS2_FAILURE);
+ AXIS2_ERROR_SET(env->error, AXIS2_ERROR_SVC_SKEL_INPUT_OM_NODE_NULL,
+ AXIS2_FAILURE);
printf("Math client request ERROR: input parameter NULL\n");
return NULL;
}
@@ -40,7 +45,9 @@
param1_node = axiom_node_get_first_child(node, env);
if (!param1_node)
{
- 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("Math service ERROR: invalid XML in request\n");
return NULL;
}
@@ -48,22 +55,27 @@
param1_text_node = axiom_node_get_first_child(param1_node, env);
if (!param1_text_node)
{
- 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("Math service ERROR: invalid XML in request\n");
return NULL;
}
if (axiom_node_get_node_type(param1_text_node, env) == AXIOM_TEXT)
{
- axiom_text_t *text = (axiom_text_t *)axiom_node_get_data_element(param1_text_node, env);
- if (text && axiom_text_get_value(text , env))
+ axiom_text_t *text =
+ (axiom_text_t *) axiom_node_get_data_element(param1_text_node, env);
+ if (text && axiom_text_get_value(text, env))
{
- param1_str = (axis2_char_t *)axiom_text_get_value(text, env);
+ param1_str = (axis2_char_t *) axiom_text_get_value(text, env);
}
}
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("Math service ERROR: invalid XML in request\n");
return NULL;
}
@@ -71,7 +83,9 @@
param2_node = axiom_node_get_next_sibling(param1_node, env);
if (!param2_node)
{
- 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("Math service ERROR: invalid XML in request\n");
return NULL;
}
@@ -79,22 +93,27 @@
param2_text_node = axiom_node_get_first_child(param2_node, env);
if (!param2_text_node)
{
- 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("Math service ERROR: invalid XML in request\n");
return NULL;
}
if (axiom_node_get_node_type(param2_text_node, env) == AXIOM_TEXT)
{
- axiom_text_t *text = (axiom_text_t *)axiom_node_get_data_element(param2_text_node, env);
- if (text && axiom_text_get_value(text , env))
+ axiom_text_t *text =
+ (axiom_text_t *) axiom_node_get_data_element(param2_text_node, env);
+ if (text && axiom_text_get_value(text, env))
{
- param2_str = (axis2_char_t *)axiom_text_get_value(text, env);
+ param2_str = (axis2_char_t *) axiom_text_get_value(text, env);
}
}
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("Math service ERROR: invalid XML in request\n");
return NULL;
}
@@ -105,7 +124,8 @@
axis2_char_t result_str[255];
axiom_element_t *ele1 = NULL;
- axiom_node_t *node1 = NULL, *node2 = NULL;
+ axiom_node_t *node1 = NULL,
+ *node2 = NULL;
axiom_namespace_t *ns1 = NULL;
axiom_text_t *text1 = NULL;
@@ -116,47 +136,45 @@
result = param1 + param2;
sprintf(result_str, "%ld", result);
-
-
ns1 = axiom_namespace_create(env,
- "http://axis2/test/namespace1",
- "ns1");
+ "http://axis2/test/namespace1", "ns1");
ele1 = axiom_element_create(env, NULL, "result", ns1, &node1);
text1 = axiom_text_create(env, node1, result_str, &node2);
/* Put the result into service group context */
- svc_grp_ctx = axis2_msg_ctx_get_svc_grp_ctx(msg_ctx, env);
+ svc_grp_ctx = axis2_msg_ctx_get_svc_grp_ctx(msg_ctx, env);
if (svc_grp_ctx)
{
- axis2_ctx_t* ctx = NULL;
- ctx = axis2_svc_grp_ctx_get_base(svc_grp_ctx, env);
+ axis2_ctx_t *ctx = NULL;
+ ctx = axis2_svc_grp_ctx_get_base(svc_grp_ctx, env);
if (ctx)
{
- axutil_property_t* prop = NULL;
+ axutil_property_t *prop = NULL;
/* get value */
- prop = axis2_ctx_get_property(ctx, env, "ADD_RESULT");
+ prop = axis2_ctx_get_property(ctx, env, "ADD_RESULT");
if (prop)
{
- axis2_char_t *val = (axis2_char_t*)axutil_property_get_value(prop, env);
+ axis2_char_t *val =
+ (axis2_char_t *) axutil_property_get_value(prop, env);
printf("Previous result = %s\n", val);
}
/* set value */
prop = axutil_property_create(env);
if (prop)
{
- axutil_property_set_value(prop, env, axutil_strdup(env, result_str));
+ axutil_property_set_value(prop, env,
+ axutil_strdup(env, result_str));
axis2_ctx_set_property(ctx, env, "ADD_RESULT", prop);
}
}
}
-
return node1;
}
- AXIS2_ERROR_SET(env->error, AXIS2_ERROR_SVC_SKEL_INVALID_OPERATION_PARAMETERS_IN_SOAP_REQUEST, AXIS2_FAILURE);
+ AXIS2_ERROR_SET(env->error,
+ AXIS2_ERROR_SVC_SKEL_INVALID_OPERATION_PARAMETERS_IN_SOAP_REQUEST,
+ AXIS2_FAILURE);
printf("Math service ERROR: invalid parameters\n");
return NULL;
}
-
-
Modified: webservices/axis2/trunk/c/samples/server/sg_math/add.h
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/samples/server/sg_math/add.h?rev=580289&r1=580288&r2=580289&view=diff
==============================================================================
--- webservices/axis2/trunk/c/samples/server/sg_math/add.h (original)
+++ webservices/axis2/trunk/c/samples/server/sg_math/add.h Fri Sep 28 03:29:16 2007
@@ -1,3 +1,4 @@
+
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
@@ -17,7 +18,6 @@
#ifndef ADD_H
#define ADD_H
-
#include <axis2_svc_skeleton.h>
#include <axutil_log_default.h>
#include <axutil_error_default.h>
@@ -25,8 +25,9 @@
#include <axiom_node.h>
#include <axiom_element.h>
-axiom_node_t *axis2_add_add(const axutil_env_t *env,
- axiom_node_t *node,
- axis2_msg_ctx_t *msg_ctx);
+axiom_node_t *axis2_add_add(
+ const axutil_env_t * env,
+ axiom_node_t * node,
+ axis2_msg_ctx_t * msg_ctx);
-#endif /* ADD_H*/
+#endif /* ADD_H */
Modified: webservices/axis2/trunk/c/samples/server/sg_math/add_skeleton.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/samples/server/sg_math/add_skeleton.c?rev=580289&r1=580288&r2=580289&view=diff
==============================================================================
--- webservices/axis2/trunk/c/samples/server/sg_math/add_skeleton.c (original)
+++ webservices/axis2/trunk/c/samples/server/sg_math/add_skeleton.c Fri Sep 28 03:29:16 2007
@@ -1,3 +1,4 @@
+
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
@@ -19,22 +20,22 @@
#include <axutil_array_list.h>
#include <stdio.h>
-int AXIS2_CALL
-add_free(axis2_svc_skeleton_t *svc_skeleton,
- const axutil_env_t *env);
+int AXIS2_CALL add_free(
+ axis2_svc_skeleton_t * svc_skeleton,
+ const axutil_env_t * env);
/*
* This method invokes the right service method
*/
-axiom_node_t* AXIS2_CALL
-add_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 add_init(axis2_svc_skeleton_t *svc_skeleton,
- const axutil_env_t *env);
-
+axiom_node_t *AXIS2_CALL add_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 add_init(
+ axis2_svc_skeleton_t * svc_skeleton,
+ const axutil_env_t * env);
static const axis2_svc_skeleton_ops_t add_svc_skeleton_ops_var = {
add_init,
@@ -43,13 +44,12 @@
add_free
};
-AXIS2_EXTERN axis2_svc_skeleton_t * AXIS2_CALL
-axis2_add_create(const axutil_env_t *env)
+AXIS2_EXTERN axis2_svc_skeleton_t *AXIS2_CALL
+axis2_add_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 = &add_svc_skeleton_ops_var;
@@ -59,16 +59,18 @@
}
int AXIS2_CALL
-add_init(axis2_svc_skeleton_t *svc_skeleton,
- const axutil_env_t *env)
+add_init(
+ axis2_svc_skeleton_t * svc_skeleton,
+ const axutil_env_t * env)
{
/* Any initialization stuff of add goes here */
return AXIS2_SUCCESS;
}
int AXIS2_CALL
-add_free(axis2_svc_skeleton_t *svc_skeleton,
- const axutil_env_t *env)
+add_free(
+ axis2_svc_skeleton_t * svc_skeleton,
+ const axutil_env_t * env)
{
if (svc_skeleton)
{
@@ -81,11 +83,12 @@
/*
* This method invokes the right service method
*/
-axiom_node_t* AXIS2_CALL
-add_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
+add_invoke(
+ axis2_svc_skeleton_t * svc_skeleton,
+ const axutil_env_t * env,
+ axiom_node_t * node,
+ axis2_msg_ctx_t * msg_ctx)
{
/* Depending on the function name invoke the
* corresponding add method
@@ -95,10 +98,12 @@
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);
+ element =
+ (axiom_element_t *) axiom_node_get_data_element(node, env);
if (element)
{
- axis2_char_t *op_name = axiom_element_get_localname(element, env);
+ axis2_char_t *op_name =
+ axiom_element_get_localname(element, env);
if (op_name)
{
if (axutil_strcmp(op_name, "add") == 0)
@@ -118,8 +123,10 @@
* Following block distinguish the exposed part of the dll.
*/
-AXIS2_EXPORT int axis2_get_instance(struct axis2_svc_skeleton **inst,
- const axutil_env_t *env)
+AXIS2_EXPORT int
+axis2_get_instance(
+ struct axis2_svc_skeleton **inst,
+ const axutil_env_t * env)
{
*inst = axis2_add_create(env);
if (!(*inst))
@@ -130,8 +137,10 @@
return AXIS2_SUCCESS;
}
-AXIS2_EXPORT int axis2_remove_instance(axis2_svc_skeleton_t *inst,
- const axutil_env_t *env)
+AXIS2_EXPORT int
+axis2_remove_instance(
+ axis2_svc_skeleton_t * inst,
+ const axutil_env_t * env)
{
axis2_status_t status = AXIS2_FAILURE;
if (inst)
@@ -140,4 +149,3 @@
}
return status;
}
-
Modified: webservices/axis2/trunk/c/samples/server/sg_math/div.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/samples/server/sg_math/div.c?rev=580289&r1=580288&r2=580289&view=diff
==============================================================================
--- webservices/axis2/trunk/c/samples/server/sg_math/div.c (original)
+++ webservices/axis2/trunk/c/samples/server/sg_math/div.c Fri Sep 28 03:29:16 2007
@@ -1,3 +1,4 @@
+
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
@@ -18,7 +19,9 @@
#include <stdio.h>
axiom_node_t *
-axis2_div_div(const axutil_env_t *env, axiom_node_t *node)
+axis2_div_div(
+ const axutil_env_t * env,
+ axiom_node_t * node)
{
axiom_node_t *param1_node = NULL;
axiom_node_t *param1_text_node = NULL;
@@ -31,7 +34,8 @@
if (!node)
{
- AXIS2_ERROR_SET(env->error, AXIS2_ERROR_SVC_SKEL_INPUT_OM_NODE_NULL, AXIS2_FAILURE);
+ AXIS2_ERROR_SET(env->error, AXIS2_ERROR_SVC_SKEL_INPUT_OM_NODE_NULL,
+ AXIS2_FAILURE);
printf("Math client request ERROR: input parameter NULL\n");
return NULL;
}
@@ -39,7 +43,9 @@
param1_node = axiom_node_get_first_child(node, env);
if (!param1_node)
{
- 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("Math service ERROR: invalid XML in request\n");
return NULL;
}
@@ -47,22 +53,27 @@
param1_text_node = axiom_node_get_first_child(param1_node, env);
if (!param1_text_node)
{
- 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("Math service ERROR: invalid XML in request\n");
return NULL;
}
if (axiom_node_get_node_type(param1_text_node, env) == AXIOM_TEXT)
{
- axiom_text_t *text = (axiom_text_t *)axiom_node_get_data_element(param1_text_node, env);
- if (text && axiom_text_get_value(text , env))
+ axiom_text_t *text =
+ (axiom_text_t *) axiom_node_get_data_element(param1_text_node, env);
+ if (text && axiom_text_get_value(text, env))
{
- param1_str = (axis2_char_t *)axiom_text_get_value(text, env);
+ param1_str = (axis2_char_t *) axiom_text_get_value(text, env);
}
}
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("Math service ERROR: invalid XML in request\n");
return NULL;
}
@@ -70,7 +81,9 @@
param2_node = axiom_node_get_next_sibling(param1_node, env);
if (!param2_node)
{
- 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("Math service ERROR: invalid XML in request\n");
return NULL;
}
@@ -78,22 +91,27 @@
param2_text_node = axiom_node_get_first_child(param2_node, env);
if (!param2_text_node)
{
- 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("Math service ERROR: invalid XML in request\n");
return NULL;
}
if (axiom_node_get_node_type(param2_text_node, env) == AXIOM_TEXT)
{
- axiom_text_t *text = (axiom_text_t *)axiom_node_get_data_element(param2_text_node, env);
- if (text && axiom_text_get_value(text , env))
+ axiom_text_t *text =
+ (axiom_text_t *) axiom_node_get_data_element(param2_text_node, env);
+ if (text && axiom_text_get_value(text, env))
{
- param2_str = (axis2_char_t *)axiom_text_get_value(text, env);
+ param2_str = (axis2_char_t *) axiom_text_get_value(text, env);
}
}
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("Math service ERROR: invalid XML in request\n");
return NULL;
}
@@ -104,7 +122,8 @@
axis2_char_t result_str[255];
axiom_element_t *ele1 = NULL;
- axiom_node_t *node1 = NULL, *node2 = NULL;
+ axiom_node_t *node1 = NULL,
+ *node2 = NULL;
axiom_namespace_t *ns1 = NULL;
axiom_text_t *text1 = NULL;
@@ -115,18 +134,17 @@
result = param1 / param2;
sprintf(result_str, "%ld", result);
-
-
ns1 = axiom_namespace_create(env,
- "http://axis2/test/namespace1",
- "ns1");
+ "http://axis2/test/namespace1", "ns1");
ele1 = axiom_element_create(env, NULL, "result", ns1, &node1);
text1 = axiom_text_create(env, node1, result_str, &node2);
return node1;
}
- AXIS2_ERROR_SET(env->error, AXIS2_ERROR_SVC_SKEL_INVALID_OPERATION_PARAMETERS_IN_SOAP_REQUEST, AXIS2_FAILURE);
+ AXIS2_ERROR_SET(env->error,
+ AXIS2_ERROR_SVC_SKEL_INVALID_OPERATION_PARAMETERS_IN_SOAP_REQUEST,
+ AXIS2_FAILURE);
printf("Math service ERROR: invalid parameters\n");
return NULL;
}
Modified: webservices/axis2/trunk/c/samples/server/sg_math/div.h
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/samples/server/sg_math/div.h?rev=580289&r1=580288&r2=580289&view=diff
==============================================================================
--- webservices/axis2/trunk/c/samples/server/sg_math/div.h (original)
+++ webservices/axis2/trunk/c/samples/server/sg_math/div.h Fri Sep 28 03:29:16 2007
@@ -1,3 +1,4 @@
+
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
@@ -17,7 +18,6 @@
#ifndef DIV_H
#define DIV_H
-
#include <axis2_svc_skeleton.h>
#include <axutil_log_default.h>
#include <axutil_error_default.h>
@@ -25,6 +25,8 @@
#include <axiom_node.h>
#include <axiom_element.h>
-axiom_node_t *axis2_div_div(const axutil_env_t *env, axiom_node_t *node);
+axiom_node_t *axis2_div_div(
+ const axutil_env_t * env,
+ axiom_node_t * node);
-#endif /* DIV_H*/
+#endif /* DIV_H */
Modified: webservices/axis2/trunk/c/samples/server/sg_math/div_skeleton.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/samples/server/sg_math/div_skeleton.c?rev=580289&r1=580288&r2=580289&view=diff
==============================================================================
--- webservices/axis2/trunk/c/samples/server/sg_math/div_skeleton.c (original)
+++ webservices/axis2/trunk/c/samples/server/sg_math/div_skeleton.c Fri Sep 28 03:29:16 2007
@@ -1,3 +1,4 @@
+
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
@@ -19,21 +20,22 @@
#include <axutil_array_list.h>
#include <stdio.h>
-int AXIS2_CALL
-div_free(axis2_svc_skeleton_t *svc_skeleton,
- const axutil_env_t *env);
+int AXIS2_CALL div_free(
+ axis2_svc_skeleton_t * svc_skeleton,
+ const axutil_env_t * env);
/*
* This method invokes the right service method
*/
-axiom_node_t* AXIS2_CALL
-div_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 div_init(axis2_svc_skeleton_t *svc_skeleton,
- const axutil_env_t *env);
+axiom_node_t *AXIS2_CALL div_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 div_init(
+ axis2_svc_skeleton_t * svc_skeleton,
+ const axutil_env_t * env);
static const axis2_svc_skeleton_ops_t div_svc_skeleton_ops_var = {
div_init,
@@ -42,14 +44,12 @@
div_free
};
-
-AXIS2_EXTERN axis2_svc_skeleton_t * AXIS2_CALL
-axis2_div_create(const axutil_env_t *env)
+AXIS2_EXTERN axis2_svc_skeleton_t *AXIS2_CALL
+axis2_div_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 = &div_svc_skeleton_ops_var;
@@ -59,16 +59,18 @@
}
int AXIS2_CALL
-div_init(axis2_svc_skeleton_t *svc_skeleton,
- const axutil_env_t *env)
+div_init(
+ axis2_svc_skeleton_t * svc_skeleton,
+ const axutil_env_t * env)
{
/* Any initialization stuff of div goes here */
return AXIS2_SUCCESS;
}
int AXIS2_CALL
-div_free(axis2_svc_skeleton_t *svc_skeleton,
- const axutil_env_t *env)
+div_free(
+ axis2_svc_skeleton_t * svc_skeleton,
+ const axutil_env_t * env)
{
if (svc_skeleton)
{
@@ -81,11 +83,12 @@
/*
* This method invokes the right service method
*/
-axiom_node_t* AXIS2_CALL
-div_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
+div_invoke(
+ axis2_svc_skeleton_t * svc_skeleton,
+ const axutil_env_t * env,
+ axiom_node_t * node,
+ axis2_msg_ctx_t * msg_ctx)
{
/* Depending on the function name invoke the
* corresponding div method
@@ -95,10 +98,12 @@
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);
+ element =
+ (axiom_element_t *) axiom_node_get_data_element(node, env);
if (element)
{
- axis2_char_t *op_name = axiom_element_get_localname(element, env);
+ axis2_char_t *op_name =
+ axiom_element_get_localname(element, env);
if (op_name)
{
if (axutil_strcmp(op_name, "div") == 0)
@@ -118,8 +123,10 @@
* Following block distinguish the exposed part of the dll.
*/
-AXIS2_EXPORT int axis2_get_instance(struct axis2_svc_skeleton **inst,
- const axutil_env_t *env)
+AXIS2_EXPORT int
+axis2_get_instance(
+ struct axis2_svc_skeleton **inst,
+ const axutil_env_t * env)
{
*inst = axis2_div_create(env);
if (!(*inst))
@@ -130,8 +137,10 @@
return AXIS2_SUCCESS;
}
-AXIS2_EXPORT int axis2_remove_instance(axis2_svc_skeleton_t *inst,
- const axutil_env_t *env)
+AXIS2_EXPORT int
+axis2_remove_instance(
+ axis2_svc_skeleton_t * inst,
+ const axutil_env_t * env)
{
axis2_status_t status = AXIS2_FAILURE;
if (inst)
@@ -140,4 +149,3 @@
}
return status;
}
-
Modified: webservices/axis2/trunk/c/samples/server/sg_math/mul.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/samples/server/sg_math/mul.c?rev=580289&r1=580288&r2=580289&view=diff
==============================================================================
--- webservices/axis2/trunk/c/samples/server/sg_math/mul.c (original)
+++ webservices/axis2/trunk/c/samples/server/sg_math/mul.c Fri Sep 28 03:29:16 2007
@@ -1,3 +1,4 @@
+
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
@@ -18,7 +19,9 @@
#include <stdio.h>
axiom_node_t *
-axis2_mul_mul(const axutil_env_t *env, axiom_node_t *node)
+axis2_mul_mul(
+ const axutil_env_t * env,
+ axiom_node_t * node)
{
axiom_node_t *param1_node = NULL;
axiom_node_t *param1_text_node = NULL;
@@ -31,7 +34,8 @@
if (!node)
{
- AXIS2_ERROR_SET(env->error, AXIS2_ERROR_SVC_SKEL_INPUT_OM_NODE_NULL, AXIS2_FAILURE);
+ AXIS2_ERROR_SET(env->error, AXIS2_ERROR_SVC_SKEL_INPUT_OM_NODE_NULL,
+ AXIS2_FAILURE);
printf("Math client request ERROR: input parameter NULL\n");
return NULL;
}
@@ -39,7 +43,9 @@
param1_node = axiom_node_get_first_child(node, env);
if (!param1_node)
{
- 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("Math service ERROR: invalid XML in request\n");
return NULL;
}
@@ -47,22 +53,27 @@
param1_text_node = axiom_node_get_first_child(param1_node, env);
if (!param1_text_node)
{
- 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("Math service ERROR: invalid XML in request\n");
return NULL;
}
if (axiom_node_get_node_type(param1_text_node, env) == AXIOM_TEXT)
{
- axiom_text_t *text = (axiom_text_t *)axiom_node_get_data_element(param1_text_node, env);
- if (text && axiom_text_get_value(text , env))
+ axiom_text_t *text =
+ (axiom_text_t *) axiom_node_get_data_element(param1_text_node, env);
+ if (text && axiom_text_get_value(text, env))
{
- param1_str = (axis2_char_t *)axiom_text_get_value(text, env);
+ param1_str = (axis2_char_t *) axiom_text_get_value(text, env);
}
}
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("Math service ERROR: invalid XML in request\n");
return NULL;
}
@@ -70,7 +81,9 @@
param2_node = axiom_node_get_next_sibling(param1_node, env);
if (!param2_node)
{
- 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("Math service ERROR: invalid XML in request\n");
return NULL;
}
@@ -78,22 +91,27 @@
param2_text_node = axiom_node_get_first_child(param2_node, env);
if (!param2_text_node)
{
- 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("Math service ERROR: invalid XML in request\n");
return NULL;
}
if (axiom_node_get_node_type(param2_text_node, env) == AXIOM_TEXT)
{
- axiom_text_t *text = (axiom_text_t *)axiom_node_get_data_element(param2_text_node, env);
- if (text && axiom_text_get_value(text , env))
+ axiom_text_t *text =
+ (axiom_text_t *) axiom_node_get_data_element(param2_text_node, env);
+ if (text && axiom_text_get_value(text, env))
{
- param2_str = (axis2_char_t *)axiom_text_get_value(text, env);
+ param2_str = (axis2_char_t *) axiom_text_get_value(text, env);
}
}
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("Math service ERROR: invalid XML in request\n");
return NULL;
}
@@ -104,7 +122,8 @@
axis2_char_t result_str[255];
axiom_element_t *ele1 = NULL;
- axiom_node_t *node1 = NULL, *node2 = NULL;
+ axiom_node_t *node1 = NULL,
+ *node2 = NULL;
axiom_namespace_t *ns1 = NULL;
axiom_text_t *text1 = NULL;
@@ -113,20 +132,17 @@
result = param1 * param2;
sprintf(result_str, "%ld", result);
-
-
ns1 = axiom_namespace_create(env,
- "http://axis2/test/namespace1",
- "ns1");
+ "http://axis2/test/namespace1", "ns1");
ele1 = axiom_element_create(env, NULL, "result", ns1, &node1);
text1 = axiom_text_create(env, node1, result_str, &node2);
return node1;
}
- AXIS2_ERROR_SET(env->error, AXIS2_ERROR_SVC_SKEL_INVALID_OPERATION_PARAMETERS_IN_SOAP_REQUEST, AXIS2_FAILURE);
+ AXIS2_ERROR_SET(env->error,
+ AXIS2_ERROR_SVC_SKEL_INVALID_OPERATION_PARAMETERS_IN_SOAP_REQUEST,
+ AXIS2_FAILURE);
printf("Math service ERROR: invalid parameters\n");
return NULL;
}
-
-
Modified: webservices/axis2/trunk/c/samples/server/sg_math/mul.h
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/samples/server/sg_math/mul.h?rev=580289&r1=580288&r2=580289&view=diff
==============================================================================
--- webservices/axis2/trunk/c/samples/server/sg_math/mul.h (original)
+++ webservices/axis2/trunk/c/samples/server/sg_math/mul.h Fri Sep 28 03:29:16 2007
@@ -1,3 +1,4 @@
+
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
@@ -17,7 +18,6 @@
#ifndef MUL_H
#define MUL_H
-
#include <axis2_svc_skeleton.h>
#include <axutil_log_default.h>
#include <axutil_error_default.h>
@@ -25,6 +25,8 @@
#include <axiom_node.h>
#include <axiom_element.h>
-axiom_node_t *axis2_mul_mul(const axutil_env_t *env, axiom_node_t *node);
+axiom_node_t *axis2_mul_mul(
+ const axutil_env_t * env,
+ axiom_node_t * node);
-#endif /* MUL_H*/
+#endif /* MUL_H */
Modified: webservices/axis2/trunk/c/samples/server/sg_math/mul_skeleton.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/samples/server/sg_math/mul_skeleton.c?rev=580289&r1=580288&r2=580289&view=diff
==============================================================================
--- webservices/axis2/trunk/c/samples/server/sg_math/mul_skeleton.c (original)
+++ webservices/axis2/trunk/c/samples/server/sg_math/mul_skeleton.c Fri Sep 28 03:29:16 2007
@@ -1,3 +1,4 @@
+
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
@@ -19,21 +20,22 @@
#include <axutil_array_list.h>
#include <stdio.h>
-int AXIS2_CALL
-mul_free(axis2_svc_skeleton_t *svc_skeleton,
- const axutil_env_t *env);
+int AXIS2_CALL mul_free(
+ axis2_svc_skeleton_t * svc_skeleton,
+ const axutil_env_t * env);
/*
* This method invokes the right service method
*/
-axiom_node_t* AXIS2_CALL
-mul_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 mul_init(axis2_svc_skeleton_t *svc_skeleton,
- const axutil_env_t *env);
+axiom_node_t *AXIS2_CALL mul_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 mul_init(
+ axis2_svc_skeleton_t * svc_skeleton,
+ const axutil_env_t * env);
static const axis2_svc_skeleton_ops_t mul_svc_skeleton_ops_var = {
mul_init,
@@ -42,14 +44,12 @@
mul_free
};
-
-AXIS2_EXTERN axis2_svc_skeleton_t * AXIS2_CALL
-axis2_mul_create(const axutil_env_t *env)
+AXIS2_EXTERN axis2_svc_skeleton_t *AXIS2_CALL
+axis2_mul_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 = &mul_svc_skeleton_ops_var;
@@ -59,16 +59,18 @@
}
int AXIS2_CALL
-mul_init(axis2_svc_skeleton_t *svc_skeleton,
- const axutil_env_t *env)
+mul_init(
+ axis2_svc_skeleton_t * svc_skeleton,
+ const axutil_env_t * env)
{
/* Any initialization stuff of mul goes here */
return AXIS2_SUCCESS;
}
int AXIS2_CALL
-mul_free(axis2_svc_skeleton_t *svc_skeleton,
- const axutil_env_t *env)
+mul_free(
+ axis2_svc_skeleton_t * svc_skeleton,
+ const axutil_env_t * env)
{
if (svc_skeleton)
{
@@ -81,11 +83,12 @@
/*
* This method invokes the right service method
*/
-axiom_node_t* AXIS2_CALL
-mul_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
+mul_invoke(
+ axis2_svc_skeleton_t * svc_skeleton,
+ const axutil_env_t * env,
+ axiom_node_t * node,
+ axis2_msg_ctx_t * msg_ctx)
{
/* Depending on the function name invoke the
* corresponding mul method
@@ -95,10 +98,12 @@
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);
+ element =
+ (axiom_element_t *) axiom_node_get_data_element(node, env);
if (element)
{
- axis2_char_t *op_name = axiom_element_get_localname(element, env);
+ axis2_char_t *op_name =
+ axiom_element_get_localname(element, env);
if (op_name)
{
if (axutil_strcmp(op_name, "mul") == 0)
@@ -118,8 +123,10 @@
* Following block distinguish the exposed part of the dll.
*/
-AXIS2_EXPORT int axis2_get_instance(struct axis2_svc_skeleton **inst,
- const axutil_env_t *env)
+AXIS2_EXPORT int
+axis2_get_instance(
+ struct axis2_svc_skeleton **inst,
+ const axutil_env_t * env)
{
*inst = axis2_mul_create(env);
if (!(*inst))
@@ -130,8 +137,10 @@
return AXIS2_SUCCESS;
}
-AXIS2_EXPORT int axis2_remove_instance(axis2_svc_skeleton_t *inst,
- const axutil_env_t *env)
+AXIS2_EXPORT int
+axis2_remove_instance(
+ axis2_svc_skeleton_t * inst,
+ const axutil_env_t * env)
{
axis2_status_t status = AXIS2_FAILURE;
if (inst)
@@ -140,4 +149,3 @@
}
return status;
}
-
Modified: webservices/axis2/trunk/c/samples/server/sg_math/sub.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/samples/server/sg_math/sub.c?rev=580289&r1=580288&r2=580289&view=diff
==============================================================================
--- webservices/axis2/trunk/c/samples/server/sg_math/sub.c (original)
+++ webservices/axis2/trunk/c/samples/server/sg_math/sub.c Fri Sep 28 03:29:16 2007
@@ -1,3 +1,4 @@
+
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
@@ -18,7 +19,9 @@
#include <stdio.h>
axiom_node_t *
-axis2_sub_sub(const axutil_env_t *env, axiom_node_t *node)
+axis2_sub_sub(
+ const axutil_env_t * env,
+ axiom_node_t * node)
{
axiom_node_t *param1_node = NULL;
axiom_node_t *param1_text_node = NULL;
@@ -31,7 +34,8 @@
if (!node)
{
- AXIS2_ERROR_SET(env->error, AXIS2_ERROR_SVC_SKEL_INPUT_OM_NODE_NULL, AXIS2_FAILURE);
+ AXIS2_ERROR_SET(env->error, AXIS2_ERROR_SVC_SKEL_INPUT_OM_NODE_NULL,
+ AXIS2_FAILURE);
printf("Math client request ERROR: input parameter NULL\n");
return NULL;
}
@@ -39,7 +43,9 @@
param1_node = axiom_node_get_first_child(node, env);
if (!param1_node)
{
- 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("Math service ERROR: invalid XML in request\n");
return NULL;
}
@@ -47,22 +53,27 @@
param1_text_node = axiom_node_get_first_child(param1_node, env);
if (!param1_text_node)
{
- 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("Math service ERROR: invalid XML in request\n");
return NULL;
}
if (axiom_node_get_node_type(param1_text_node, env) == AXIOM_TEXT)
{
- axiom_text_t *text = (axiom_text_t *)axiom_node_get_data_element(param1_text_node, env);
- if (text && axiom_text_get_value(text , env))
+ axiom_text_t *text =
+ (axiom_text_t *) axiom_node_get_data_element(param1_text_node, env);
+ if (text && axiom_text_get_value(text, env))
{
- param1_str = (axis2_char_t *)axiom_text_get_value(text, env);
+ param1_str = (axis2_char_t *) axiom_text_get_value(text, env);
}
}
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("Math service ERROR: invalid XML in request\n");
return NULL;
}
@@ -70,7 +81,9 @@
param2_node = axiom_node_get_next_sibling(param1_node, env);
if (!param2_node)
{
- 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("Math service ERROR: invalid XML in request\n");
return NULL;
}
@@ -78,22 +91,27 @@
param2_text_node = axiom_node_get_first_child(param2_node, env);
if (!param2_text_node)
{
- 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("Math service ERROR: invalid XML in request\n");
return NULL;
}
if (axiom_node_get_node_type(param2_text_node, env) == AXIOM_TEXT)
{
- axiom_text_t *text = (axiom_text_t *)axiom_node_get_data_element(param2_text_node, env);
- if (text && axiom_text_get_value(text , env))
+ axiom_text_t *text =
+ (axiom_text_t *) axiom_node_get_data_element(param2_text_node, env);
+ if (text && axiom_text_get_value(text, env))
{
- param2_str = (axis2_char_t *)axiom_text_get_value(text, env);
+ param2_str = (axis2_char_t *) axiom_text_get_value(text, env);
}
}
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("Math service ERROR: invalid XML in request\n");
return NULL;
}
@@ -104,7 +122,8 @@
axis2_char_t result_str[255];
axiom_element_t *ele1 = NULL;
- axiom_node_t *node1 = NULL, *node2 = NULL;
+ axiom_node_t *node1 = NULL,
+ *node2 = NULL;
axiom_namespace_t *ns1 = NULL;
axiom_text_t *text1 = NULL;
@@ -113,20 +132,17 @@
result = param1 - param2;
sprintf(result_str, "%ld", result);
-
-
ns1 = axiom_namespace_create(env,
- "http://axis2/test/namespace1",
- "ns1");
+ "http://axis2/test/namespace1", "ns1");
ele1 = axiom_element_create(env, NULL, "result", ns1, &node1);
text1 = axiom_text_create(env, node1, result_str, &node2);
return node1;
}
- AXIS2_ERROR_SET(env->error, AXIS2_ERROR_SVC_SKEL_INVALID_OPERATION_PARAMETERS_IN_SOAP_REQUEST, AXIS2_FAILURE);
+ AXIS2_ERROR_SET(env->error,
+ AXIS2_ERROR_SVC_SKEL_INVALID_OPERATION_PARAMETERS_IN_SOAP_REQUEST,
+ AXIS2_FAILURE);
printf("Math service ERROR: invalid parameters\n");
return NULL;
}
-
-
Modified: webservices/axis2/trunk/c/samples/server/sg_math/sub.h
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/samples/server/sg_math/sub.h?rev=580289&r1=580288&r2=580289&view=diff
==============================================================================
--- webservices/axis2/trunk/c/samples/server/sg_math/sub.h (original)
+++ webservices/axis2/trunk/c/samples/server/sg_math/sub.h Fri Sep 28 03:29:16 2007
@@ -1,3 +1,4 @@
+
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
@@ -17,7 +18,6 @@
#ifndef SUB_H
#define SUB_H
-
#include <axis2_svc_skeleton.h>
#include <axutil_log_default.h>
#include <axutil_error_default.h>
@@ -25,6 +25,8 @@
#include <axiom_node.h>
#include <axiom_element.h>
-axiom_node_t *axis2_sub_sub(const axutil_env_t *env, axiom_node_t *node);
+axiom_node_t *axis2_sub_sub(
+ const axutil_env_t * env,
+ axiom_node_t * node);
-#endif /* SUB_H*/
+#endif /* SUB_H */
Modified: webservices/axis2/trunk/c/samples/server/sg_math/sub_skeleton.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/samples/server/sg_math/sub_skeleton.c?rev=580289&r1=580288&r2=580289&view=diff
==============================================================================
--- webservices/axis2/trunk/c/samples/server/sg_math/sub_skeleton.c (original)
+++ webservices/axis2/trunk/c/samples/server/sg_math/sub_skeleton.c Fri Sep 28 03:29:16 2007
@@ -1,3 +1,4 @@
+
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
@@ -19,21 +20,22 @@
#include <axutil_array_list.h>
#include <stdio.h>
-int AXIS2_CALL
-sub_free(axis2_svc_skeleton_t *svc_skeleton,
- const axutil_env_t *env);
+int AXIS2_CALL sub_free(
+ axis2_svc_skeleton_t * svc_skeleton,
+ const axutil_env_t * env);
/*
* This method invokes the right service method
*/
-axiom_node_t* AXIS2_CALL
-sub_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 sub_init(axis2_svc_skeleton_t *svc_skeleton,
- const axutil_env_t *env);
+axiom_node_t *AXIS2_CALL sub_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 sub_init(
+ axis2_svc_skeleton_t * svc_skeleton,
+ const axutil_env_t * env);
static const axis2_svc_skeleton_ops_t sub_svc_skeleton_ops_var = {
sub_init,
@@ -42,13 +44,12 @@
sub_free
};
-AXIS2_EXTERN axis2_svc_skeleton_t * AXIS2_CALL
-axis2_sub_create(const axutil_env_t *env)
+AXIS2_EXTERN axis2_svc_skeleton_t *AXIS2_CALL
+axis2_sub_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 = &sub_svc_skeleton_ops_var;
@@ -58,16 +59,18 @@
}
int AXIS2_CALL
-sub_init(axis2_svc_skeleton_t *svc_skeleton,
- const axutil_env_t *env)
+sub_init(
+ axis2_svc_skeleton_t * svc_skeleton,
+ const axutil_env_t * env)
{
/* Any initialization stuff of sub goes here */
return AXIS2_SUCCESS;
}
int AXIS2_CALL
-sub_free(axis2_svc_skeleton_t *svc_skeleton,
- const axutil_env_t *env)
+sub_free(
+ axis2_svc_skeleton_t * svc_skeleton,
+ const axutil_env_t * env)
{
if (svc_skeleton)
{
@@ -80,11 +83,12 @@
/*
* This method invokes the right service method
*/
-axiom_node_t* AXIS2_CALL
-sub_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
+sub_invoke(
+ axis2_svc_skeleton_t * svc_skeleton,
+ const axutil_env_t * env,
+ axiom_node_t * node,
+ axis2_msg_ctx_t * msg_ctx)
{
/* Depending on the function name invoke the
* corresponding sub method
@@ -94,10 +98,12 @@
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);
+ element =
+ (axiom_element_t *) axiom_node_get_data_element(node, env);
if (element)
{
- axis2_char_t *op_name = axiom_element_get_localname(element, env);
+ axis2_char_t *op_name =
+ axiom_element_get_localname(element, env);
if (op_name)
{
if (axutil_strcmp(op_name, "sub") == 0)
@@ -117,8 +123,10 @@
* Following block distinguish the exposed part of the dll.
*/
-AXIS2_EXPORT int axis2_get_instance(struct axis2_svc_skeleton **inst,
- const axutil_env_t *env)
+AXIS2_EXPORT int
+axis2_get_instance(
+ struct axis2_svc_skeleton **inst,
+ const axutil_env_t * env)
{
*inst = axis2_sub_create(env);
if (!(*inst))
@@ -129,8 +137,10 @@
return AXIS2_SUCCESS;
}
-AXIS2_EXPORT int axis2_remove_instance(axis2_svc_skeleton_t *inst,
- const axutil_env_t *env)
+AXIS2_EXPORT int
+axis2_remove_instance(
+ axis2_svc_skeleton_t * inst,
+ const axutil_env_t * env)
{
axis2_status_t status = AXIS2_FAILURE;
if (inst)
@@ -139,4 +149,3 @@
}
return status;
}
-
Modified: webservices/axis2/trunk/c/samples/user_guide/clients/echo_blocking.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/samples/user_guide/clients/echo_blocking.c?rev=580289&r1=580288&r2=580289&view=diff
==============================================================================
--- webservices/axis2/trunk/c/samples/user_guide/clients/echo_blocking.c (original)
+++ webservices/axis2/trunk/c/samples/user_guide/clients/echo_blocking.c Fri Sep 28 03:29:16 2007
@@ -1,3 +1,4 @@
+
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
@@ -20,14 +21,17 @@
#include <axiom_soap.h>
#include <axis2_client.h>
-int main(int argc, char** argv)
+int
+main(
+ int argc,
+ char **argv)
{
const axutil_env_t *env = NULL;
const axis2_char_t *address = NULL;
- axis2_endpoint_ref_t* endpoint_ref = NULL;
+ axis2_endpoint_ref_t *endpoint_ref = NULL;
axis2_options_t *options = NULL;
const axis2_char_t *client_home = NULL;
- axis2_svc_client_t* svc_client = NULL;
+ axis2_svc_client_t *svc_client = NULL;
axiom_node_t *payload = NULL;
axiom_node_t *ret_node = NULL;
@@ -61,24 +65,26 @@
* modules that the client uses
*/
client_home = AXIS2_GETENV("AXIS2C_HOME");
- if (!client_home || !strcmp (client_home, ""))
+ if (!client_home || !strcmp(client_home, ""))
client_home = "../..";
/* Create service client */
svc_client = axis2_svc_client_create(env, client_home);
if (!svc_client)
{
- printf("Error creating service client, Please check AXIS2C_HOME again\n");
- AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Stub invoke FAILED: Error code:"
- " %d :: %s", env->error->error_number,
- AXIS2_ERROR_GET_MESSAGE(env->error));
- return -1;
+ printf
+ ("Error creating service client, Please check AXIS2C_HOME again\n");
+ AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI,
+ "Stub invoke FAILED: Error code:" " %d :: %s",
+ env->error->error_number,
+ AXIS2_ERROR_GET_MESSAGE(env->error));
+ return -1;
}
/* Set service client options */
axis2_svc_client_set_options(svc_client, env, options);
- /* Build the SOAP request message payload using OM API.*/
+ /* Build the SOAP request message payload using OM API. */
payload = build_om_payload_for_echo_svc(env);
/* Send request */
@@ -97,9 +103,10 @@
}
else
{
- AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Stub invoke FAILED: Error code:"
- " %d :: %s", env->error->error_number,
- AXIS2_ERROR_GET_MESSAGE(env->error));
+ AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI,
+ "Stub invoke FAILED: Error code:" " %d :: %s",
+ env->error->error_number,
+ AXIS2_ERROR_GET_MESSAGE(env->error));
printf("echo client invoke FAILED!\n");
}
Modified: webservices/axis2/trunk/c/samples/user_guide/clients/echo_blocking_addr.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/samples/user_guide/clients/echo_blocking_addr.c?rev=580289&r1=580288&r2=580289&view=diff
==============================================================================
--- webservices/axis2/trunk/c/samples/user_guide/clients/echo_blocking_addr.c (original)
+++ webservices/axis2/trunk/c/samples/user_guide/clients/echo_blocking_addr.c Fri Sep 28 03:29:16 2007
@@ -1,3 +1,4 @@
+
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
@@ -20,19 +21,23 @@
#include <axiom_soap.h>
#include <axis2_client.h>
-int main(int argc, char** argv)
+int
+main(
+ int argc,
+ char **argv)
{
const axutil_env_t *env = NULL;
const axis2_char_t *address = NULL;
- axis2_endpoint_ref_t* endpoint_ref = NULL;
+ axis2_endpoint_ref_t *endpoint_ref = NULL;
axis2_options_t *options = NULL;
const axis2_char_t *client_home = NULL;
- axis2_svc_client_t* svc_client = NULL;
+ axis2_svc_client_t *svc_client = NULL;
axiom_node_t *payload = NULL;
axiom_node_t *ret_node = NULL;
/* Set up the environment */
- env = axutil_env_create_all("echo_blocking_addr.log", AXIS2_LOG_LEVEL_TRACE);
+ env =
+ axutil_env_create_all("echo_blocking_addr.log", AXIS2_LOG_LEVEL_TRACE);
/* Set end point reference of echo service */
address = "http://localhost:9090/axis2/services/echo";
@@ -53,7 +58,7 @@
options = axis2_options_create(env);
axis2_options_set_to(options, env, endpoint_ref);
axis2_options_set_action(options, env,
- "http://ws.apache.org/axis2/c/samples/echoString");
+ "http://ws.apache.org/axis2/c/samples/echoString");
/* Set up deploy folder. It is from the deploy folder, the configuration is picked up
* using the axis2.xml file.
@@ -63,18 +68,20 @@
* modules that the client uses
*/
client_home = AXIS2_GETENV("AXIS2C_HOME");
- if (!client_home || !strcmp (client_home, ""))
+ if (!client_home || !strcmp(client_home, ""))
client_home = "../..";
/* Create service client */
svc_client = axis2_svc_client_create(env, client_home);
if (!svc_client)
{
- printf("Error creating service client, Please check AXIS2C_HOME again\n");
- AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Stub invoke FAILED: Error code:"
- " %d :: %s", env->error->error_number,
- AXIS2_ERROR_GET_MESSAGE(env->error));
- return -1;
+ printf
+ ("Error creating service client, Please check AXIS2C_HOME again\n");
+ AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI,
+ "Stub invoke FAILED: Error code:" " %d :: %s",
+ env->error->error_number,
+ AXIS2_ERROR_GET_MESSAGE(env->error));
+ return -1;
}
/* Set service client options */
@@ -83,7 +90,7 @@
/* Engage addressing module */
axis2_svc_client_engage_module(svc_client, env, AXIS2_MODULE_ADDRESSING);
- /* Build the SOAP request message payload using OM API.*/
+ /* Build the SOAP request message payload using OM API. */
payload = build_om_payload_for_echo_svc(env);
/* Send request */
@@ -102,9 +109,10 @@
}
else
{
- AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Stub invoke FAILED: Error code:"
- " %d :: %s", env->error->error_number,
- AXIS2_ERROR_GET_MESSAGE(env->error));
+ AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI,
+ "Stub invoke FAILED: Error code:" " %d :: %s",
+ env->error->error_number,
+ AXIS2_ERROR_GET_MESSAGE(env->error));
printf("echo client invoke FAILED!\n");
}
@@ -119,6 +127,6 @@
axutil_env_free((axutil_env_t *) env);
env = NULL;
}
-
+
return 0;
}
Modified: webservices/axis2/trunk/c/samples/user_guide/clients/echo_blocking_dual.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/samples/user_guide/clients/echo_blocking_dual.c?rev=580289&r1=580288&r2=580289&view=diff
==============================================================================
--- webservices/axis2/trunk/c/samples/user_guide/clients/echo_blocking_dual.c (original)
+++ webservices/axis2/trunk/c/samples/user_guide/clients/echo_blocking_dual.c Fri Sep 28 03:29:16 2007
@@ -1,3 +1,4 @@
+
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
@@ -20,20 +21,24 @@
#include <axiom_soap.h>
#include <axis2_client.h>
-int main(int argc, char** argv)
+int
+main(
+ int argc,
+ char **argv)
{
const axutil_env_t *env = NULL;
const axis2_char_t *address = NULL;
- axis2_endpoint_ref_t* endpoint_ref = NULL;
- axis2_endpoint_ref_t* reply_to = NULL;
+ axis2_endpoint_ref_t *endpoint_ref = NULL;
+ axis2_endpoint_ref_t *reply_to = NULL;
axis2_options_t *options = NULL;
const axis2_char_t *client_home = NULL;
- axis2_svc_client_t* svc_client = NULL;
+ axis2_svc_client_t *svc_client = NULL;
axiom_node_t *payload = NULL;
axiom_node_t *ret_node = NULL;
/* Set up the environment */
- env = axutil_env_create_all("echo_blocking_dual.log", AXIS2_LOG_LEVEL_TRACE);
+ env =
+ axutil_env_create_all("echo_blocking_dual.log", AXIS2_LOG_LEVEL_TRACE);
/* Set end point reference of echo service */
address = "http://localhost:9090/axis2/services/echo";
@@ -57,8 +62,10 @@
/* Seperate listner needs addressing, hence addressing stuff in options */
axis2_options_set_action(options, env,
- "http://ws.apache.org/axis2/c/samples/echoString");
- reply_to = axis2_endpoint_ref_create(env, "http://localhost:6060/axis2/services/__ANONYMOUS_SERVICE__/__OPERATION_OUT_IN__");
+ "http://ws.apache.org/axis2/c/samples/echoString");
+ reply_to =
+ axis2_endpoint_ref_create(env,
+ "http://localhost:6060/axis2/services/__ANONYMOUS_SERVICE__/__OPERATION_OUT_IN__");
axis2_options_set_reply_to(options, env, reply_to);
/* Set up deploy folder. It is from the deploy folder, the configuration is picked up
@@ -69,18 +76,20 @@
* modules that the client uses
*/
client_home = AXIS2_GETENV("AXIS2C_HOME");
- if (!client_home || !strcmp (client_home, ""))
+ if (!client_home || !strcmp(client_home, ""))
client_home = "../..";
/* Create service client */
svc_client = axis2_svc_client_create(env, client_home);
if (!svc_client)
{
- printf("Error creating service client, Please check AXIS2C_HOME again\n");
- AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Stub invoke FAILED: Error code:"
- " %d :: %s", env->error->error_number,
- AXIS2_ERROR_GET_MESSAGE(env->error));
- return -1;
+ printf
+ ("Error creating service client, Please check AXIS2C_HOME again\n");
+ AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI,
+ "Stub invoke FAILED: Error code:" " %d :: %s",
+ env->error->error_number,
+ AXIS2_ERROR_GET_MESSAGE(env->error));
+ return -1;
}
/* Set service client options */
@@ -88,7 +97,7 @@
axis2_svc_client_engage_module(svc_client, env, AXIS2_MODULE_ADDRESSING);
- /* Build the SOAP request message payload using OM API.*/
+ /* Build the SOAP request message payload using OM API. */
payload = build_om_payload_for_echo_svc(env);
/* Send request */
@@ -107,9 +116,10 @@
}
else
{
- AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Stub invoke FAILED: Error code:"
- " %d :: %s", env->error->error_number,
- AXIS2_ERROR_GET_MESSAGE(env->error));
+ AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI,
+ "Stub invoke FAILED: Error code:" " %d :: %s",
+ env->error->error_number,
+ AXIS2_ERROR_GET_MESSAGE(env->error));
printf("echo client invoke FAILED!\n");
}
@@ -125,6 +135,6 @@
axutil_env_free((axutil_env_t *) env);
env = NULL;
}
-
+
return 0;
}
Modified: webservices/axis2/trunk/c/samples/user_guide/clients/echo_blocking_soap11.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/samples/user_guide/clients/echo_blocking_soap11.c?rev=580289&r1=580288&r2=580289&view=diff
==============================================================================
--- webservices/axis2/trunk/c/samples/user_guide/clients/echo_blocking_soap11.c (original)
+++ webservices/axis2/trunk/c/samples/user_guide/clients/echo_blocking_soap11.c Fri Sep 28 03:29:16 2007
@@ -1,3 +1,4 @@
+
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
@@ -20,20 +21,25 @@
#include <axiom_soap.h>
#include <axis2_client.h>
-int main(int argc, char** argv)
+int
+main(
+ int argc,
+ char **argv)
{
const axutil_env_t *env = NULL;
const axis2_char_t *address = NULL;
- axis2_endpoint_ref_t* endpoint_ref = NULL;
+ axis2_endpoint_ref_t *endpoint_ref = NULL;
axis2_options_t *options = NULL;
const axis2_char_t *client_home = NULL;
- axis2_svc_client_t* svc_client = NULL;
+ axis2_svc_client_t *svc_client = NULL;
axiom_node_t *payload = NULL;
axiom_node_t *ret_node = NULL;
axutil_string_t *soap_action = NULL;
/* Set up the environment */
- env = axutil_env_create_all("echo_blocking_soap11.log", AXIS2_LOG_LEVEL_TRACE);
+ env =
+ axutil_env_create_all("echo_blocking_soap11.log",
+ AXIS2_LOG_LEVEL_TRACE);
/* Set end point reference of echo service */
address = "http://localhost:9090/axis2/services/echo";
@@ -54,7 +60,9 @@
options = axis2_options_create(env);
axis2_options_set_to(options, env, endpoint_ref);
axis2_options_set_soap_version(options, env, AXIOM_SOAP11);
- soap_action = axutil_string_create(env, "http://ws.apache.org/axis2/c/samples/echo/soap_action");
+ soap_action =
+ axutil_string_create(env,
+ "http://ws.apache.org/axis2/c/samples/echo/soap_action");
axis2_options_set_soap_action(options, env, soap_action);
axutil_string_free(soap_action, env);
@@ -66,24 +74,26 @@
* modules that the client uses
*/
client_home = AXIS2_GETENV("AXIS2C_HOME");
- if (!client_home || !strcmp (client_home, ""))
+ if (!client_home || !strcmp(client_home, ""))
client_home = "../..";
/* Create service client */
svc_client = axis2_svc_client_create(env, client_home);
if (!svc_client)
{
- printf("Error creating service client, Please check AXIS2C_HOME again\n");
- AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Stub invoke FAILED: Error code:"
- " %d :: %s", env->error->error_number,
- AXIS2_ERROR_GET_MESSAGE(env->error));
- return -1;
+ printf
+ ("Error creating service client, Please check AXIS2C_HOME again\n");
+ AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI,
+ "Stub invoke FAILED: Error code:" " %d :: %s",
+ env->error->error_number,
+ AXIS2_ERROR_GET_MESSAGE(env->error));
+ return -1;
}
/* Set service client options */
axis2_svc_client_set_options(svc_client, env, options);
- /* Build the SOAP request message payload using OM API.*/
+ /* Build the SOAP request message payload using OM API. */
payload = build_om_payload_for_echo_svc(env);
/* Send request */
@@ -102,9 +112,10 @@
}
else
{
- AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Stub invoke FAILED: Error code:"
- " %d :: %s", env->error->error_number,
- AXIS2_ERROR_GET_MESSAGE(env->error));
+ AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI,
+ "Stub invoke FAILED: Error code:" " %d :: %s",
+ env->error->error_number,
+ AXIS2_ERROR_GET_MESSAGE(env->error));
printf("echo client invoke FAILED!\n");
}
Modified: webservices/axis2/trunk/c/samples/user_guide/clients/echo_non_blocking.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/samples/user_guide/clients/echo_non_blocking.c?rev=580289&r1=580288&r2=580289&view=diff
==============================================================================
--- webservices/axis2/trunk/c/samples/user_guide/clients/echo_non_blocking.c (original)
+++ webservices/axis2/trunk/c/samples/user_guide/clients/echo_non_blocking.c Fri Sep 28 03:29:16 2007
@@ -1,3 +1,4 @@
+
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
@@ -21,27 +22,30 @@
#include <axis2_client.h>
/* my on_complete callback function */
-axis2_status_t AXIS2_CALL
-echo_callback_on_complete(struct axis2_callback *callback,
- const axutil_env_t *env);
+axis2_status_t AXIS2_CALL echo_callback_on_complete(
+ struct axis2_callback * callback,
+ const axutil_env_t * env);
/* my on_error callback function */
-axis2_status_t AXIS2_CALL
-echo_callback_on_error(struct axis2_callback *callback,
- const axutil_env_t *env,
- int exception);
+axis2_status_t AXIS2_CALL echo_callback_on_error(
+ struct axis2_callback *callback,
+ const axutil_env_t * env,
+ int exception);
/* to check whether the callback is completed */
int isComplete = 0;
-int main(int argc, char** argv)
+int
+main(
+ int argc,
+ char **argv)
{
const axutil_env_t *env = NULL;
const axis2_char_t *address = NULL;
- axis2_endpoint_ref_t* endpoint_ref = NULL;
+ axis2_endpoint_ref_t *endpoint_ref = NULL;
axis2_options_t *options = NULL;
const axis2_char_t *client_home = NULL;
- axis2_svc_client_t* svc_client = NULL;
+ axis2_svc_client_t *svc_client = NULL;
axiom_node_t *payload = NULL;
axis2_callback_t *callback = NULL;
int count = 0;
@@ -76,24 +80,26 @@
* modules that the client uses
*/
client_home = AXIS2_GETENV("AXIS2C_HOME");
- if (!client_home || !strcmp (client_home, ""))
+ if (!client_home || !strcmp(client_home, ""))
client_home = "../..";
/* Create service client */
svc_client = axis2_svc_client_create(env, client_home);
if (!svc_client)
{
- printf("Error creating service client, Please check AXIS2C_HOME again\n");
- AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Stub invoke FAILED: Error code:"
- " %d :: %s", env->error->error_number,
- AXIS2_ERROR_GET_MESSAGE(env->error));
- return -1;
+ printf
+ ("Error creating service client, Please check AXIS2C_HOME again\n");
+ AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI,
+ "Stub invoke FAILED: Error code:" " %d :: %s",
+ env->error->error_number,
+ AXIS2_ERROR_GET_MESSAGE(env->error));
+ return -1;
}
/* Set service client options */
axis2_svc_client_set_options(svc_client, env, options);
- /* Build the SOAP request message payload using OM API.*/
+ /* Build the SOAP request message payload using OM API. */
payload = build_om_payload_for_echo_svc(env);
/* Create the callback object with default on_complete and on_error
@@ -106,10 +112,9 @@
/* Set our on_error function pointer to the callback object */
axis2_callback_set_on_error(callback, echo_callback_on_error);
-
/* Send request */
axis2_svc_client_send_receive_non_blocking(svc_client, env,
- payload, callback);
+ payload, callback);
/** Wait till callback is complete. Simply keep the parent thread running
until our on_complete or on_error is invoked */
@@ -145,9 +150,11 @@
}
axis2_status_t AXIS2_CALL
-echo_callback_on_complete(struct axis2_callback *callback,
- const axutil_env_t *env)
+echo_callback_on_complete(
+ struct axis2_callback * callback,
+ const axutil_env_t * env)
{
+
/** SOAP response has arrived here; get the soap envelope
from the callback object and do whatever you want to do with it */
@@ -159,9 +166,10 @@
if (!soap_envelope)
{
- AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Stub invoke FAILED: Error code:"
- " %d :: %s", env->error->error_number,
- AXIS2_ERROR_GET_MESSAGE(env->error));
+ AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI,
+ "Stub invoke FAILED: Error code:" " %d :: %s",
+ env->error->error_number,
+ AXIS2_ERROR_GET_MESSAGE(env->error));
printf("echo stub invoke FAILED!\n");
status = AXIS2_FAILURE;
}
@@ -171,9 +179,10 @@
if (!ret_node)
{
- AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Stub invoke FAILED: Error code:"
- " %d :: %s", env->error->error_number,
- AXIS2_ERROR_GET_MESSAGE(env->error));
+ AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI,
+ "Stub invoke FAILED: Error code:" " %d :: %s",
+ env->error->error_number,
+ AXIS2_ERROR_GET_MESSAGE(env->error));
printf("echo stub invoke FAILED!\n");
status = AXIS2_FAILURE;
}
@@ -194,13 +203,15 @@
}
axis2_status_t AXIS2_CALL
-echo_callback_on_error(struct axis2_callback *callback,
- const axutil_env_t *env,
- int exception)
+echo_callback_on_error(
+ struct axis2_callback * callback,
+ const axutil_env_t * env,
+ int exception)
{
+
/** take necessary action on error */
printf("\necho client invike FAILED. Error code:%d ::%s", exception,
- AXIS2_ERROR_GET_MESSAGE(env->error));
+ AXIS2_ERROR_GET_MESSAGE(env->error));
isComplete = 1;
return AXIS2_SUCCESS;
}
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-cvs-help@ws.apache.org