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 da...@apache.org on 2006/01/31 04:14:23 UTC
svn commit: r373680 - in /webservices/axis2/trunk/c: include/
modules/core/clientapi/ modules/core/deployment/ modules/core/description/
test/client/echo/
Author: damitha
Date: Mon Jan 30 19:14:04 2006
New Revision: 373680
URL: http://svn.apache.org/viewcvs?rev=373680&view=rev
Log:
Wrote a missing method in call.c. Now echo client
is not segfaulting. But still the client return with
failure.
Modified:
webservices/axis2/trunk/c/include/axis2_call.h
webservices/axis2/trunk/c/include/axis2_conf.h
webservices/axis2/trunk/c/include/axis2_stub.h
webservices/axis2/trunk/c/include/axis2_transport_in_desc.h
webservices/axis2/trunk/c/modules/core/clientapi/Makefile.am
webservices/axis2/trunk/c/modules/core/clientapi/call.c
webservices/axis2/trunk/c/modules/core/clientapi/listener_manager.c
webservices/axis2/trunk/c/modules/core/clientapi/listener_manager.h
webservices/axis2/trunk/c/modules/core/clientapi/stub.c
webservices/axis2/trunk/c/modules/core/deployment/axis2_deployment.h
webservices/axis2/trunk/c/modules/core/deployment/dep_engine.c
webservices/axis2/trunk/c/modules/core/deployment/phases_info.c
webservices/axis2/trunk/c/modules/core/description/transport_in_desc.c
webservices/axis2/trunk/c/test/client/echo/axis2_echo_stub.c
webservices/axis2/trunk/c/test/client/echo/axis2_echo_stub.h
webservices/axis2/trunk/c/test/client/echo/echo_client.c
Modified: webservices/axis2/trunk/c/include/axis2_call.h
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/include/axis2_call.h?rev=373680&r1=373679&r2=373680&view=diff
==============================================================================
--- webservices/axis2/trunk/c/include/axis2_call.h (original)
+++ webservices/axis2/trunk/c/include/axis2_call.h Mon Jan 30 19:14:04 2006
@@ -212,6 +212,11 @@
AXIS2_DECLARE(axis2_call_t*) axis2_call_create(axis2_env_t **env, axis2_svc_ctx_t *svc_ctx);
+AXIS2_DECLARE(axis2_call_t*)
+axis2_call_create_with_svc_ctx_and_client_home(axis2_env_t **env,
+ axis2_svc_ctx_t *svc_ctx,
+ axis2_char_t *client_home);
+
/************************** Start of function macros **************************/
Modified: webservices/axis2/trunk/c/include/axis2_conf.h
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/include/axis2_conf.h?rev=373680&r1=373679&r2=373680&view=diff
==============================================================================
--- webservices/axis2/trunk/c/include/axis2_conf.h (original)
+++ webservices/axis2/trunk/c/include/axis2_conf.h Mon Jan 30 19:14:04 2006
@@ -336,7 +336,7 @@
((conf)->ops->get_svc_grps (conf, env))
#define AXIS2_CONF_ADD_SVC(conf, env, svc) \
- ((conf)->ops->get_svc (conf, env, svc))
+ ((conf)->ops->add_svc (conf, env, svc))
#define AXIS2_CONF_GET_SVC(conf, env, svc_name) \
((conf)->ops->get_svc (conf, env, svc_name))
Modified: webservices/axis2/trunk/c/include/axis2_stub.h
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/include/axis2_stub.h?rev=373680&r1=373679&r2=373680&view=diff
==============================================================================
--- webservices/axis2/trunk/c/include/axis2_stub.h (original)
+++ webservices/axis2/trunk/c/include/axis2_stub.h Mon Jan 30 19:14:04 2006
@@ -165,8 +165,9 @@
* @return pointer to newly created axis2_stub struct
*/
AXIS2_DECLARE(axis2_stub_t *)
-axis2_stub_create_with_endpoint_ref(axis2_env_t **env,
- axis2_endpoint_ref_t *endpoint_ref);
+axis2_stub_create_with_endpoint_refand_client_home(axis2_env_t **env,
+ axis2_endpoint_ref_t *endpoint_ref,
+ axis2_char_t *client_home);
/**
* Creates axis2_stub struct
@@ -174,8 +175,9 @@
* @return pointer to newly created axis2_stub struct
*/
AXIS2_DECLARE(axis2_stub_t *)
-axis2_stub_create_with_endpoint_uri(axis2_env_t **env,
- axis2_char_t *endpoint_uri);
+axis2_stub_create_with_endpoint_uri_and_client_home(axis2_env_t **env,
+ axis2_char_t *endpoint_uri,
+ axis2_char_t *client_home);
/*************************** Function macros **********************************/
Modified: webservices/axis2/trunk/c/include/axis2_transport_in_desc.h
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/include/axis2_transport_in_desc.h?rev=373680&r1=373679&r2=373680&view=diff
==============================================================================
--- webservices/axis2/trunk/c/include/axis2_transport_in_desc.h (original)
+++ webservices/axis2/trunk/c/include/axis2_transport_in_desc.h Mon Jan 30 19:14:04 2006
@@ -99,7 +99,7 @@
/**
* @return
*/
- struct axis2_transport_listener * (AXIS2_CALL *
+ struct axis2_transport_receiver * (AXIS2_CALL *
get_recv) (struct axis2_transport_in_desc *transport_in,
axis2_env_t **env);
Modified: webservices/axis2/trunk/c/modules/core/clientapi/Makefile.am
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/core/clientapi/Makefile.am?rev=373680&r1=373679&r2=373680&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/core/clientapi/Makefile.am (original)
+++ webservices/axis2/trunk/c/modules/core/clientapi/Makefile.am Mon Jan 30 19:14:04 2006
@@ -15,6 +15,7 @@
-I$(top_builddir)/modules/core/clientapi \
-I$(top_builddir)/modules/wsdl \
-I$(top_builddir)/modules/core/description \
+ -I$(top_builddir)/modules/core/deployment \
-I$(top_builddir)/modules/core/transport \
-I$(top_builddir)/modules/platforms \
-I$(top_builddir)/modules/xml/parser
Modified: webservices/axis2/trunk/c/modules/core/clientapi/call.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/core/clientapi/call.c?rev=373680&r1=373679&r2=373680&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/core/clientapi/call.c (original)
+++ webservices/axis2/trunk/c/modules/core/clientapi/call.c Mon Jan 30 19:14:04 2006
@@ -23,6 +23,7 @@
#include <callback_recv.h>
#include <axis2_engine.h>
#include <axis2_soap_body.h>
+#include <axis2_conf_init.h>
typedef struct axis2_call_impl
{
@@ -64,6 +65,8 @@
/** Interface to implementation conversion macro */
#define AXIS2_INTF_TO_IMPL(call) ((axis2_call_impl_t *)call)
+/******************************************************************************/
+
axis2_msg_ctx_t* AXIS2_CALL
axis2_call_invoke_blocking(struct axis2_call *call,
axis2_env_t **env,
@@ -144,10 +147,24 @@
axis2_char_t *key,
void *value);
+/**
+ * Assume the values for the conf_ctx and svc_ctx to make the
+ * NON WSDL cases simple.
+ * @return svc_ctx that has a conf_ctx set in and has assumed
+ * values.
+ */
+axis2_svc_ctx_t *
+axis2_call_assume_svc_ctx(axis2_call_t *call,
+ axis2_env_t **env,
+ axis2_char_t *client_home);
+
axis2_status_t AXIS2_CALL axis2_call_free(struct axis2_call *call,
axis2_env_t **env);
-axis2_call_t* AXIS2_CALL axis2_call_create(axis2_env_t **env, axis2_svc_ctx_t *svc_ctx)
+/******************************************************************************/
+
+axis2_call_t* AXIS2_CALL axis2_call_create(axis2_env_t **env,
+ axis2_svc_ctx_t *svc_ctx)
{
axis2_call_impl_t *call_impl = NULL;
@@ -179,6 +196,10 @@
{
call_impl->svc_ctx = svc_ctx;
}
+ else
+ {
+ /*assume svc ctx */
+ }
call_impl->base = axis2_mep_client_create(env, svc_ctx, AXIS2_MEP_URI_OUT_IN);
if (!(call_impl->base))
@@ -219,6 +240,41 @@
return &(call_impl->call);
}
+axis2_call_t* AXIS2_CALL
+axis2_call_create_with_svc_ctx_and_client_home(axis2_env_t **env,
+ axis2_svc_ctx_t *svc_ctx,
+ axis2_char_t *client_home)
+{
+ axis2_call_impl_t *call_impl = NULL;
+
+ AXIS2_ENV_CHECK(env, NULL);
+ /*AXIS2_PARAM_CHECK((*env)->error, svc_ctx, NULL);*/
+
+ call_impl = (axis2_call_impl_t *) axis2_call_create(env, NULL);
+ if (!call_impl)
+ {
+ AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
+ return NULL;
+ }
+ call_impl->svc_ctx = NULL;
+ if(svc_ctx)
+ {
+ call_impl->svc_ctx = svc_ctx;
+ }
+ else
+ {
+ /*assume svc ctx */
+ call_impl->svc_ctx = axis2_call_assume_svc_ctx(&(call_impl->call), env,
+ client_home);
+ }
+
+
+
+ return &(call_impl->call);
+}
+
+/******************************************************************************/
+
axis2_status_t AXIS2_CALL axis2_call_free(struct axis2_call *call,
axis2_env_t **env)
{
@@ -1053,14 +1109,16 @@
if (op_qname)
{
axis2_svc_t *svc = NULL;
+ axis2_array_list_t *remaining_phases = NULL;
op = axis2_op_create_with_qname(env, op_qname);
if(!op)
{
return AXIS2_FAILURE;
}
- AXIS2_OP_SET_REMAINING_PHASES_INFLOW(op, env,
- AXIS2_OP_GET_REMAINING_PHASES_INFLOW(call_impl->op_template, env));
+ remaining_phases = AXIS2_OP_GET_REMAINING_PHASES_INFLOW(call_impl->
+ op_template, env);
+ AXIS2_OP_SET_REMAINING_PHASES_INFLOW(op, env, remaining_phases);
AXIS2_OP_SET_PHASES_OUTFLOW(op, env,
AXIS2_OP_GET_PHASES_OUTFLOW(call_impl->op_template, env));
AXIS2_OP_SET_PHASES_IN_FAULT_FLOW(op, env,
@@ -1118,4 +1176,83 @@
{
AXIS2_FUNC_PARAM_CHECK(call, env, AXIS2_FAILURE);
return AXIS2_INTF_TO_IMPL(call)->last_res_msg_ctx;
+}
+
+/**
+ * Assume the values for the conf_ctx and svc_ctx to make the
+ * NON WSDL cases simple.
+ * @return svc_ctx that has a conf_ctx set in and has assumed
+ * values.
+ */
+axis2_svc_ctx_t *
+axis2_call_assume_svc_ctx(axis2_call_t *call,
+ axis2_env_t **env,
+ axis2_char_t *client_home)
+{
+ axis2_call_impl_t *call_impl = NULL;
+ axis2_conf_ctx_t *conf_ctx = NULL;
+ axis2_conf_t *conf = NULL;
+ axis2_svc_grp_t *svc_grp = NULL;
+ axis2_svc_grp_ctx_t *svc_grp_ctx = NULL;
+ axis2_svc_ctx_t *svc_ctx = NULL;
+ axis2_char_t *assumed_svc_name = NULL;
+ axis2_qname_t *assumed_svc_qname = NULL;
+ axis2_svc_t *axis_svc = NULL;
+ axis2_char_t *svc_name = NULL;
+
+ AXIS2_ENV_CHECK(env, NULL);
+ AXIS2_PARAM_CHECK((*env)->error, client_home, NULL);
+ call_impl = AXIS2_INTF_TO_IMPL(call);
+
+ /* we are trying to keep one configuration Context at the Client side.
+ * That make it easier to manage the TransportListeners.
+ */
+ if(call_impl->listener_manager)
+ {
+ conf_ctx = AXIS2_LISTNER_MANAGER_GET_CONF_CTX(call_impl->
+ listener_manager, env);
+ }
+ if(!conf_ctx)
+ {
+ conf_ctx = build_client_conf_ctx(env, client_home);
+ }
+ if(!conf_ctx)
+ {
+ return NULL;
+ }
+ svc_name = "AnonymousService";
+ assumed_svc_qname = axis2_qname_create(env, svc_name, NULL, NULL);
+ conf = AXIS2_CONF_CTX_GET_CONF(conf_ctx, env);
+ if(!conf)
+ {
+ return NULL;
+ }
+ axis_svc = AXIS2_CONF_GET_SVC(conf, env, svc_name);
+ if(!axis_svc)
+ {
+ axis2_qname_t *qtemp_op = NULL;
+ axis2_phases_info_t *info = NULL;
+
+ /* we will assume a Service and operations */
+ axis_svc = axis2_svc_create_with_qname(env, assumed_svc_qname);
+ /*axisOperationTemplate = new AxisOperation(new QName(
+ "TemplateOperation")); */
+ qtemp_op = axis2_qname_create(env, "TemplateOperation", NULL, NULL);
+ call_impl->op_template = axis2_op_create_with_qname(env, qtemp_op);
+ AXIS2_QNAME_FREE(qtemp_op, env);
+ info = AXIS2_CONF_GET_PHASESINFO(conf, env);
+ /* to set the operation flows */
+ if(info != NULL)
+ {
+ AXIS2_PHASES_INFO_SET_OP_PHASES(info, env, call_impl->op_template);
+ }
+ AXIS2_SVC_ADD_OP(axis_svc, env, call_impl->op_template);
+ AXIS2_CONF_ADD_SVC(conf, env, axis_svc);
+ }
+ svc_grp = AXIS2_SVC_GET_PARENT(axis_svc, env);
+ svc_grp_ctx = AXIS2_SVC_GRP_GET_SVC_GRP_CTX(svc_grp, env, conf_ctx);
+ assumed_svc_name = AXIS2_QNAME_GET_LOCALPART(assumed_svc_qname, env);
+ AXIS2_QNAME_FREE(assumed_svc_qname, env);
+ svc_ctx = AXIS2_SVC_GRP_CTX_GET_SVC_CTX(svc_grp_ctx, env, assumed_svc_name);
+ return svc_ctx;
}
Modified: webservices/axis2/trunk/c/modules/core/clientapi/listener_manager.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/core/clientapi/listener_manager.c?rev=373680&r1=373679&r2=373680&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/core/clientapi/listener_manager.c (original)
+++ webservices/axis2/trunk/c/modules/core/clientapi/listener_manager.c Mon Jan 30 19:14:04 2006
@@ -55,6 +55,10 @@
axis2_status_t AXIS2_CALL axis2_listener_manager_free (struct axis2_listener_manager *listener_manager,
axis2_env_t **env);
+axis2_conf_ctx_t *AXIS2_CALL
+axis2_listener_manager_get_conf_ctx(axis2_listener_manager_t *listener_manager,
+ axis2_env_t **env);
+
axis2_listener_manager_t* AXIS2_CALL axis2_listener_manager_create(axis2_env_t **env)
{
axis2_listener_manager_impl_t *listener_manager_impl = NULL;
@@ -91,6 +95,8 @@
listener_manager_impl->listener_manager.ops->make_sure_started = axis2_listener_manager_make_sure_started;
listener_manager_impl->listener_manager.ops->stop = axis2_listener_manager_stop;
listener_manager_impl->listener_manager.ops->reply_to_epr = axis2_listener_manager_reply_to_epr;
+ listener_manager_impl->listener_manager.ops->get_conf_ctx =
+ axis2_listener_manager_get_conf_ctx;
listener_manager_impl->listener_manager.ops->free = axis2_listener_manager_free;
return &(listener_manager_impl->listener_manager);
@@ -248,4 +254,12 @@
listener_manager_impl = NULL;
return AXIS2_SUCCESS;
+}
+
+axis2_conf_ctx_t *AXIS2_CALL
+axis2_listener_manager_get_conf_ctx(axis2_listener_manager_t *listener_manager,
+ axis2_env_t **env)
+{
+ AXIS2_ENV_CHECK(env, NULL);
+ return AXIS2_INTF_TO_IMPL(listener_manager)->conf_ctx;
}
Modified: webservices/axis2/trunk/c/modules/core/clientapi/listener_manager.h
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/core/clientapi/listener_manager.h?rev=373680&r1=373679&r2=373680&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/core/clientapi/listener_manager.h (original)
+++ webservices/axis2/trunk/c/modules/core/clientapi/listener_manager.h Mon Jan 30 19:14:04 2006
@@ -71,6 +71,11 @@
axis2_env_t **env,
axis2_char_t *svc_name,
axis2_char_t *transport);
+
+ axis2_conf_ctx_t *(AXIS2_CALL *
+ get_conf_ctx)(axis2_listener_manager_t *listener_manager,
+ axis2_env_t **env);
+
axis2_status_t (AXIS2_CALL *free)(struct axis2_listener_manager *listener_manager,
axis2_env_t **env);
};
@@ -91,6 +96,8 @@
#define AXIS2_LISTNER_MANAGER_MAKE_SURE_STARTED(listener_manager, env, transport, conf_ctx) ((listener_manager)->ops->make_sure_started(listener_manager, env, transport, conf_ctx))
#define AXIS2_LISTNER_MANAGER_STOP(listener_manager, env, transport) ((listener_manager)->ops->stop(listener_manager, env, transport))
#define AXIS2_LISTNER_MANAGER_REPLY_TO_EPR(listener_manager, env, svc_name, transport) ((listener_manager)->ops->reply_to_epr(listener_manager, env, svc_name, transport))
+#define AXIS2_LISTNER_MANAGER_GET_CONF_CTX(listener_manager, env) \
+ ((listener_manager)->ops->get_conf_ctx(listener_manager, env))
#define AXIS2_LISTNER_MANAGER_FREE(listener_manager, env) ((listener_manager)->ops->free(listener_manager, env))
/************************** End of function macros ****************************/
Modified: webservices/axis2/trunk/c/modules/core/clientapi/stub.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/core/clientapi/stub.c?rev=373680&r1=373679&r2=373680&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/core/clientapi/stub.c (original)
+++ webservices/axis2/trunk/c/modules/core/clientapi/stub.c Mon Jan 30 19:14:04 2006
@@ -257,8 +257,9 @@
}
axis2_stub_t * AXIS2_CALL
-axis2_stub_create_with_endpoint_ref (axis2_env_t **env,
- axis2_endpoint_ref_t *endpoint_ref)
+axis2_stub_create_with_endpoint_ref_and_client_home (axis2_env_t **env,
+ axis2_endpoint_ref_t *endpoint_ref,
+ axis2_char_t *client_home)
{
axis2_stub_impl_t *stub_impl = NULL;
@@ -273,7 +274,9 @@
return NULL;
}
/* create call without passing svc_ctx_t struct */
- stub_impl->call = axis2_call_create(env, NULL);
+ stub_impl->call = axis2_call_create_with_svc_ctx_and_client_home(env, NULL,
+ client_home);
+
if(!stub_impl->call)
{
axis2_stub_free(&(stub_impl->stub), env);
@@ -286,8 +289,9 @@
}
axis2_stub_t * AXIS2_CALL
-axis2_stub_create_with_endpoint_uri (axis2_env_t **env,
- axis2_char_t *endpoint_uri)
+axis2_stub_create_with_endpoint_uri_and_client_home (axis2_env_t **env,
+ axis2_char_t *endpoint_uri,
+ axis2_char_t *client_home)
{
axis2_stub_impl_t *stub_impl = NULL;
axis2_endpoint_ref_t *endpoint_ref = NULL;
@@ -300,8 +304,9 @@
{
return NULL;
}
- stub_impl = (axis2_stub_impl_t *) axis2_stub_create_with_endpoint_ref(env,
- endpoint_ref);
+ stub_impl = (axis2_stub_impl_t *)
+ axis2_stub_create_with_endpoint_ref_and_client_home(env, endpoint_ref,
+ client_home);
if(!stub_impl)
{
Modified: webservices/axis2/trunk/c/modules/core/deployment/axis2_deployment.h
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/core/deployment/axis2_deployment.h?rev=373680&r1=373679&r2=373680&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/core/deployment/axis2_deployment.h (original)
+++ webservices/axis2/trunk/c/modules/core/deployment/axis2_deployment.h Mon Jan 30 19:14:04 2006
@@ -120,6 +120,7 @@
#define AXIS2_SVC_GRP_ELEMENT "serviceGroup"
#define AXIS2_SERVER_XML_FILE "axis2.xml"
+#define AXIS2_CLIENT_XML_FILE "axis2_client.xml"
#define AXIS2_MODULE_FOLDER "modules"
#define AXIS2_SERVICE_FOLDER "services"
Modified: webservices/axis2/trunk/c/modules/core/deployment/dep_engine.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/core/deployment/dep_engine.c?rev=373680&r1=373679&r2=373680&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/core/deployment/dep_engine.c (original)
+++ webservices/axis2/trunk/c/modules/core/deployment/dep_engine.c Mon Jan 30 19:14:04 2006
@@ -767,8 +767,11 @@
}
if(NULL != client_home && 0 != AXIS2_STRCMP("", client_home))
{
- axis2_dep_engine_check_client_home(dep_engine, env, client_home);
- is_repos_exist = AXIS2_TRUE;
+ status = axis2_dep_engine_check_client_home(dep_engine, env, client_home);
+ if(AXIS2_SUCCESS == status)
+ {
+ is_repos_exist = AXIS2_TRUE;
+ }
}
else
{
@@ -839,13 +842,13 @@
engine_impl = AXIS2_INTF_TO_IMPL(dep_engine);
engine_impl->folder_name = AXIS2_STRDUP(client_home, env);
- if(engine_impl->folder_name)
+ if(!engine_impl->folder_name)
{
AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
return AXIS2_FAILURE;
}
path_l = AXIS2_STRACAT(client_home, AXIS2_PATH_SEP_STR, env);
- engine_impl->conf_name = AXIS2_STRACAT(path_l,AXIS2_SERVER_XML_FILE, env);
+ engine_impl->conf_name = AXIS2_STRACAT(path_l,AXIS2_CLIENT_XML_FILE, env);
AXIS2_FREE((*env)->allocator, path_l);
if(!engine_impl->conf_name)
{
Modified: webservices/axis2/trunk/c/modules/core/deployment/phases_info.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/core/deployment/phases_info.c?rev=373680&r1=373679&r2=373680&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/core/deployment/phases_info.c (original)
+++ webservices/axis2/trunk/c/modules/core/deployment/phases_info.c Mon Jan 30 19:14:04 2006
@@ -295,6 +295,7 @@
axis2_phases_info_impl_t *info_impl = NULL;
struct axis2_phase *phase = NULL;
int i = 0;
+ int size = 0;
axis2_char_t *phase_name = NULL;
axis2_array_list_t * op_in_phases = NULL;
axis2_status_t status = AXIS2_FAILURE;
@@ -303,6 +304,10 @@
info_impl = AXIS2_INTF_TO_IMPL(phases_info);
op_in_phases = axis2_array_list_create(env, 20);
+ if(!op_in_phases)
+ {
+ return NULL;
+ }
phase = axis2_phase_create(env, AXIS2_PHASE_POLICY_DETERMINATION);
status = AXIS2_ARRAY_LIST_ADD(op_in_phases, env, phase);
@@ -314,7 +319,12 @@
op_in_phases = NULL;
return NULL;
}
- for (i = 0; i < AXIS2_ARRAY_LIST_SIZE(info_impl->in_phases, env); i++)
+ if(!info_impl->in_phases)
+ {
+ return op_in_phases;
+ }
+ size = AXIS2_ARRAY_LIST_SIZE(info_impl->in_phases, env);
+ for (i = 0; i < size; i++)
{
phase_name = (axis2_char_t *) AXIS2_ARRAY_LIST_GET(info_impl->in_phases, env, i);
if (0 == AXIS2_STRCMP(AXIS2_PHASE_TRANSPORTIN, phase_name) ||
@@ -347,6 +357,7 @@
axis2_phases_info_impl_t *info_impl = NULL;
struct axis2_phase *phase = NULL;
int i = 0;
+ int size = 0;
axis2_char_t *phase_name = NULL;
axis2_array_list_t * op_out_phases = NULL;
axis2_status_t status = AXIS2_FAILURE;
@@ -355,7 +366,12 @@
info_impl = AXIS2_INTF_TO_IMPL(phases_info);
op_out_phases = axis2_array_list_create(env, 20);
- for (i = 0; i < AXIS2_ARRAY_LIST_SIZE(info_impl->out_phases, env); i++)
+ if(!info_impl->out_phases)
+ {
+ return op_out_phases;
+ }
+ size = AXIS2_ARRAY_LIST_SIZE(info_impl->out_phases, env);
+ for (i = 0; i < size; i++)
{
phase_name = (axis2_char_t *) AXIS2_ARRAY_LIST_GET(info_impl->out_phases, env, i);
if (0 == AXIS2_STRCMP(AXIS2_PHASE_TRANSPORT_OUT, phase_name))
@@ -405,6 +421,7 @@
{
axis2_phases_info_impl_t *info_impl = NULL;
int i = 0;
+ int size = 0;
axis2_status_t status = AXIS2_FAILURE;
axis2_char_t *phase_name = NULL;
axis2_array_list_t * op_in_faultphases = NULL;
@@ -414,8 +431,12 @@
info_impl = AXIS2_INTF_TO_IMPL(phases_info);
op_in_faultphases = axis2_array_list_create(env, 20);
-
- for (i = 0; i < AXIS2_ARRAY_LIST_SIZE(info_impl->in_faultphases, env); i++)
+ if(!info_impl->in_faultphases)
+ {
+ return op_in_faultphases;
+ }
+ size = AXIS2_ARRAY_LIST_SIZE(info_impl->in_faultphases, env);
+ for (i = 0; i < size; i++)
{
phase_name = (axis2_char_t *) AXIS2_ARRAY_LIST_GET(info_impl->in_faultphases, env, i);
phase = axis2_phase_create(env, phase_name);
@@ -439,6 +460,7 @@
{
axis2_phases_info_impl_t *info_impl = NULL;
int i = 0;
+ int size = 0;
axis2_status_t status = AXIS2_FAILURE;
axis2_char_t *phase_name = NULL;
axis2_array_list_t * op_out_faultphases = NULL;
@@ -448,8 +470,12 @@
info_impl = AXIS2_INTF_TO_IMPL(phases_info);
op_out_faultphases = axis2_array_list_create(env, 20);
-
- for (i = 0; i < AXIS2_ARRAY_LIST_SIZE(info_impl->out_faultphases, env); i++)
+ if(!info_impl->out_faultphases)
+ {
+ return op_out_faultphases;
+ }
+ size = AXIS2_ARRAY_LIST_SIZE(info_impl->out_faultphases, env);
+ for (i = 0; i < size; i++)
{
phase_name = (axis2_char_t *) AXIS2_ARRAY_LIST_GET(info_impl->out_faultphases, env, i);
phase = axis2_phase_create(env, phase_name);
Modified: webservices/axis2/trunk/c/modules/core/description/transport_in_desc.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/core/description/transport_in_desc.c?rev=373680&r1=373679&r2=373680&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/core/description/transport_in_desc.c (original)
+++ webservices/axis2/trunk/c/modules/core/description/transport_in_desc.c Mon Jan 30 19:14:04 2006
@@ -46,7 +46,7 @@
/**
* This will have a shallow copy and will not be freed by the descructor
*/
- struct axis2_transport_listener *recv;
+ axis2_transport_receiver_t *recv;
/** to store handler in inFlow */
struct axis2_phase *in_phase;
@@ -93,14 +93,14 @@
axis2_env_t **env,
struct axis2_flow *faultflow);
-struct axis2_transport_listener * AXIS2_CALL
+axis2_transport_receiver_t * AXIS2_CALL
axis2_transport_in_desc_get_recv(struct axis2_transport_in_desc *transport_in,
axis2_env_t **env);
axis2_status_t AXIS2_CALL
axis2_transport_in_desc_set_recv(struct axis2_transport_in_desc *transport_in,
axis2_env_t **env,
- struct axis2_transport_listener *recv);
+ axis2_transport_receiver_t *recv);
struct axis2_phase * AXIS2_CALL
axis2_transport_in_desc_get_in_phase(struct axis2_transport_in_desc *transport_in,
@@ -341,7 +341,7 @@
return AXIS2_SUCCESS;
}
-struct axis2_transport_listener * AXIS2_CALL
+axis2_transport_receiver_t * AXIS2_CALL
axis2_transport_in_desc_get_recv(struct axis2_transport_in_desc *transport_in,
axis2_env_t **env)
{
@@ -352,7 +352,7 @@
axis2_status_t AXIS2_CALL
axis2_transport_in_desc_set_recv(struct axis2_transport_in_desc *transport_in,
axis2_env_t **env,
- struct axis2_transport_listener *recv)
+ axis2_transport_receiver_t *recv)
{
axis2_transport_in_desc_impl_t *transport_in_impl = NULL;
AXIS2_FUNC_PARAM_CHECK(transport_in, env, AXIS2_FAILURE);
Modified: webservices/axis2/trunk/c/test/client/echo/axis2_echo_stub.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/test/client/echo/axis2_echo_stub.c?rev=373680&r1=373679&r2=373680&view=diff
==============================================================================
--- webservices/axis2/trunk/c/test/client/echo/axis2_echo_stub.c (original)
+++ webservices/axis2/trunk/c/test/client/echo/axis2_echo_stub.c Mon Jan 30 19:14:04 2006
@@ -21,14 +21,17 @@
axis2_stub_t *AXIS2_CALL
-axis2_echo_stub_create_with_endpoint_ref(axis2_env_t **env,
- axis2_endpoint_ref_t *endpoint_ref)
+axis2_echo_stub_create_with_endpoint_ref_and_client_home(axis2_env_t **env,
+ axis2_endpoint_ref_t *endpoint_ref,
+ axis2_char_t *client_home)
{
axis2_stub_t *stub = NULL;
AXIS2_ENV_CHECK(env, NULL);
- stub = (axis2_stub_t *) axis2_stub_create_with_endpoint_ref(env, endpoint_ref);
+ stub = (axis2_stub_t *)
+ axis2_stub_create_with_endpoint_ref_and_client_home(env, endpoint_ref,
+ client_home);
if(NULL == stub)
{
AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
@@ -39,14 +42,17 @@
}
axis2_stub_t *AXIS2_CALL
-axis2_echo_stub_create_with_endpoint_uri(axis2_env_t **env,
- axis2_char_t *endpoint_uri)
+axis2_echo_stub_create_with_endpoint_uri_and_client_home(axis2_env_t **env,
+ axis2_char_t *endpoint_uri,
+ axis2_char_t *client_home)
{
axis2_stub_t *stub = NULL;
AXIS2_ENV_CHECK(env, NULL);
- stub = (axis2_stub_t *) axis2_stub_create_with_endpoint_uri(env, endpoint_uri);
+ stub = (axis2_stub_t *)
+ axis2_stub_create_with_endpoint_uri_and_client_home(env, endpoint_uri,
+ client_home);
if(NULL == stub)
{
AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
Modified: webservices/axis2/trunk/c/test/client/echo/axis2_echo_stub.h
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/test/client/echo/axis2_echo_stub.h?rev=373680&r1=373679&r2=373680&view=diff
==============================================================================
--- webservices/axis2/trunk/c/test/client/echo/axis2_echo_stub.h (original)
+++ webservices/axis2/trunk/c/test/client/echo/axis2_echo_stub.h Mon Jan 30 19:14:04 2006
@@ -47,8 +47,9 @@
* @return pointer to newly created axis2_stub struct
*/
AXIS2_DECLARE(axis2_stub_t *)
-axis2_echo_stub_create_with_endpoint_ref(axis2_env_t **env,
- axis2_endpoint_ref_t *endpoint_ref);
+axis2_echo_stub_create_with_endpoint_ref_and_client_home(axis2_env_t **env,
+ axis2_endpoint_ref_t *endpoint_ref,
+ axis2_char_t *client_home);
/**
* Creates axis2_stub struct
@@ -56,8 +57,9 @@
* @return pointer to newly created axis2_stub struct
*/
AXIS2_DECLARE(axis2_stub_t *)
-axis2_echo_stub_create_with_endpoint_uri(axis2_env_t **env,
- axis2_char_t *endpoint_uri);
+axis2_echo_stub_create_with_endpoint_uri_and_client_home(axis2_env_t **env,
+ axis2_char_t *endpoint_uri,
+ axis2_char_t *client_home);
/** @} */
#ifdef __cplusplus
Modified: webservices/axis2/trunk/c/test/client/echo/echo_client.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/test/client/echo/echo_client.c?rev=373680&r1=373679&r2=373680&view=diff
==============================================================================
--- webservices/axis2/trunk/c/test/client/echo/echo_client.c (original)
+++ webservices/axis2/trunk/c/test/client/echo/echo_client.c Mon Jan 30 19:14:04 2006
@@ -36,7 +36,9 @@
axis2_allocator_t *allocator = NULL;
axis2_endpoint_ref_t *epr = NULL;
axis2_char_t *address = NULL;
+ axis2_char_t *client_home = NULL;
+ client_home = AXIS2_GETENV("AXIS2C_HOME");
allocator = axis2_allocator_init (NULL);
error = axis2_error_create(allocator);
log = axis2_log_create(allocator, NULL);
@@ -47,7 +49,9 @@
node = AXIS2_SOAP_ENVELOPE_GET_BASE_NODE(envelope, &env);
address = "http://localhost:9090/echo";
epr = axis2_endpoint_ref_create(&env, address);
- stub = axis2_echo_stub_create_with_endpoint_ref(&env, epr);
+ stub =
+ axis2_echo_stub_create_with_endpoint_ref_and_client_home(&env, epr,
+ client_home);
AXIS2_STUB_SET_TRANSPORT_INFO(stub, &env, AXIS2_TRANSPORT_HTTP,
AXIS2_TRANSPORT_HTTP, AXIS2_FALSE);
/* create node and invoke echo */