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 di...@apache.org on 2007/07/16 18:43:11 UTC
svn commit: r556666 [6/7] - in /webservices/axis2/scratch/c/dinesh/602/c: ./
build/win32/ guththila/ guththila/include/ guththila/src/ ides/vc/axis2c/
ides/vc/axis2c/axis2_engine/ ides/vc/axis2c/clients/echo_blocking/
ides/vc/axis2c/clients/echo_blocki...
Modified: webservices/axis2/scratch/c/dinesh/602/c/src/core/clientapi/op_client.c
URL: http://svn.apache.org/viewvc/webservices/axis2/scratch/c/dinesh/602/c/src/core/clientapi/op_client.c?view=diff&rev=556666&r1=556665&r2=556666
==============================================================================
--- webservices/axis2/scratch/c/dinesh/602/c/src/core/clientapi/op_client.c (original)
+++ webservices/axis2/scratch/c/dinesh/602/c/src/core/clientapi/op_client.c Mon Jul 16 09:42:53 2007
@@ -64,8 +64,7 @@
axis2_callback_t *callback;
axis2_op_t *op;
axis2_msg_ctx_t *msg_ctx;
-}
-axis2_op_client_worker_func_args_t;
+}axis2_op_client_worker_func_args_t;
void *AXIS2_THREAD_FUNC
axis2_op_client_worker_func(
@@ -115,7 +114,7 @@
op_client->wsa_action = NULL;
op_client->op_ctx = axis2_op_ctx_create(env, op,
- op_client->svc_ctx);
+ op_client->svc_ctx);
if(!(op_client->op_ctx))
{
axis2_op_client_free(op_client, env);
@@ -220,11 +219,11 @@
dump_property = axis2_msg_ctx_get_property(out_msg_ctx, env,
AXIS2_DUMP_INPUT_MSG_TRUE);
if(dump_property)
- {
+ {
dump_value = (axis2_char_t *) axutil_property_get_value (
dump_property, env);
}
- }
+ }
if(axutil_strcmp(dump_value, AXIS2_VALUE_TRUE))
{
@@ -311,21 +310,21 @@
conf_ctx = axis2_svc_ctx_get_conf_ctx(op_client->svc_ctx, env);
msg_ctx = (axis2_msg_ctx_t *)axis2_op_client_get_msg_ctx(op_client, env,
- AXIS2_WSDL_MESSAGE_LABEL_OUT);
+ AXIS2_WSDL_MESSAGE_LABEL_OUT);
if(!msg_ctx)
{
return AXIS2_FAILURE;
}
- axis2_msg_ctx_set_options(msg_ctx, env, op_client->options);
+ axis2_msg_ctx_set_options(msg_ctx, env, op_client->options);
/**
- if the transport to use for sending is not specified, try to find it
- from the URL
+ if the transport to use for sending is not specified, try to find it
+ from the URL
*/
transport_out = axis2_options_get_transport_out(op_client->options,
- env);
+ env);
if(!transport_out)
{
axis2_endpoint_ref_t *to_epr = NULL;
@@ -333,17 +332,20 @@
property = axis2_options_get_property(op_client->options, env,
AXIS2_TARGET_EPR);
if(property)
- {
+ {
to_epr = axutil_property_get_value(property, env);
- }
+ }
+
if(!to_epr)
- {
+ {
to_epr = axis2_options_get_to(op_client->options, env);
- }
+ }
+
if(!to_epr)
- {
+ {
to_epr = axis2_msg_ctx_get_to(msg_ctx, env);
- }
+ }
+
transport_out = axis2_op_client_infer_transport(op_client, env, to_epr);
}
@@ -352,9 +354,9 @@
return AXIS2_FAILURE;
}
- if(!( axis2_msg_ctx_get_transport_out_desc(msg_ctx, env)))
+ if(!(axis2_msg_ctx_get_transport_out_desc(msg_ctx, env)))
{
- axis2_msg_ctx_set_transport_out_desc(msg_ctx, env, transport_out);
+ axis2_msg_ctx_set_transport_out_desc(msg_ctx, env, transport_out);
}
@@ -374,9 +376,9 @@
}
}
- if(!( axis2_msg_ctx_get_transport_in_desc(msg_ctx, env)))
+ if(!(axis2_msg_ctx_get_transport_in_desc(msg_ctx, env)))
{
- axis2_msg_ctx_set_transport_in_desc(msg_ctx, env, transport_in);
+ axis2_msg_ctx_set_transport_in_desc(msg_ctx, env, transport_in);
}
op = axis2_op_ctx_get_op(op_client->op_ctx, env);
@@ -391,7 +393,7 @@
return AXIS2_FAILURE;
}
msg_id = (axis2_char_t*)axutil_uuid_gen(env);
- axis2_msg_ctx_set_message_id(msg_ctx, env, msg_id);
+ axis2_msg_ctx_set_message_id(msg_ctx, env, msg_id);
if(msg_id)
{
AXIS2_FREE(env->allocator, msg_id);
@@ -405,16 +407,16 @@
AXIS2_CALLBACK_RECV_ADD_CALLBACK(op_client->callback_recv, env,
axis2_msg_ctx_get_msg_id(msg_ctx, env),
op_client->callback);
- axis2_msg_ctx_set_op_ctx(msg_ctx, env, axis2_op_find_op_ctx(op, env,
- msg_ctx, op_client->svc_ctx));
- axis2_msg_ctx_set_svc_ctx(msg_ctx, env, op_client->svc_ctx);
+ axis2_msg_ctx_set_op_ctx(msg_ctx, env, axis2_op_find_op_ctx(op, env,
+ msg_ctx, op_client->svc_ctx));
+ axis2_msg_ctx_set_svc_ctx(msg_ctx, env, op_client->svc_ctx);
/* send the message */
engine = axis2_engine_create(env, conf_ctx);
if(!engine)
- {
+ {
return AXIS2_FAILURE;
- }
+ }
axis2_engine_send(engine, env, msg_ctx);
axis2_engine_free(engine, env);
}
@@ -435,22 +437,22 @@
if(!response_mc)
{
const axis2_char_t *mep = axis2_op_get_msg_exchange_pattern(op, env);
- if(axutil_strcmp(mep, AXIS2_MEP_URI_OUT_ONLY) == 0 ||
- axutil_strcmp(mep, AXIS2_MEP_URI_ROBUST_OUT_ONLY) == 0)
+ if(!(axutil_strcmp(mep, AXIS2_MEP_URI_OUT_ONLY)) ||
+ !(axutil_strcmp(mep, AXIS2_MEP_URI_ROBUST_OUT_ONLY)))
{
if(env->error)
- {
+ {
return env->error->status_code;
}
else
- {
+ {
return AXIS2_FAILURE;
}
}
else
- {
+ {
return AXIS2_FAILURE;
- }
+ }
}
axis2_op_client_add_msg_ctx(op_client, env,
response_mc);
@@ -477,15 +479,17 @@
axis2_op_client_worker_func, (void*)arg_list);
if(! worker_thread)
{
- AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Thread creation failed"
- "call invoke non blocking");
+ AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI,
+ "Thread creation failed call invoke non blocking");
}
- axutil_thread_pool_thread_detach(env->thread_pool, worker_thread);
+ axutil_thread_pool_thread_detach(env->thread_pool,
+ worker_thread);
}
else
{
- AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Thread pool not set in environment."
- " Cannot invoke call non blocking");
+ AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI,
+ "Thread pool not set in environment"
+ "Cannot invoke call non blocking");
}
#else
axis2_op_client_worker_func(NULL, (void*)arg_list);
@@ -597,7 +601,8 @@
AXIS2_ENV_CHECK(args_list->env, AXIS2_FAILURE);
th_env = axutil_init_thread_env(args_list->env);
- op_ctx = axis2_op_ctx_create(th_env, args_list->op, args_list->op_client->svc_ctx);
+ op_ctx = axis2_op_ctx_create(th_env, args_list->op,
+ args_list->op_client->svc_ctx);
if(!op_ctx)
{
return NULL;
@@ -609,8 +614,10 @@
response = axis2_op_client_two_way_send(th_env, args_list->msg_ctx);
axis2_op_client_add_msg_ctx(args_list->op_client, th_env, response);
- args_list->op_client->async_result = axis2_async_result_create(th_env, response);
- axis2_callback_invoke_on_complete(args_list->callback, th_env, args_list->op_client->async_result);
+ args_list->op_client->async_result = axis2_async_result_create(th_env,
+ response);
+ axis2_callback_invoke_on_complete(args_list->callback,
+ th_env, args_list->op_client->async_result);
axis2_callback_set_complete(args_list->callback, th_env, AXIS2_TRUE);
/* clean up memory */
@@ -650,8 +657,7 @@
}
AXIS2_EXTERN axis2_status_t AXIS2_CALL
-axis2_op_client_prepare_invocation(
- axis2_op_client_t *op_client,
+axis2_op_client_prepare_invocation(axis2_op_client_t *op_client,
const axutil_env_t *env,
axis2_op_t *op,
axis2_msg_ctx_t *msg_ctx)
@@ -665,22 +671,25 @@
/* make sure operation's MEP is the same as given MEP */
if (op_client->mep)
{
- if (axutil_strcmp(op_client->mep, axis2_op_get_msg_exchange_pattern(op, env)) != 0)
+ if (axutil_strcmp(op_client->mep,
+ axis2_op_get_msg_exchange_pattern(op, env)))
{
- AXIS2_ERROR_SET(env->error, AXIS2_ERROR_MEP_MISMATCH_IN_MEP_CLIENT, AXIS2_FAILURE);
+ AXIS2_ERROR_SET(env->error, AXIS2_ERROR_MEP_MISMATCH_IN_MEP_CLIENT,
+ AXIS2_FAILURE);
return AXIS2_FAILURE;
}
}
else
{
- AXIS2_ERROR_SET(env->error, AXIS2_ERROR_MEP_CANNOT_BE_NULL_IN_MEP_CLIENT, AXIS2_FAILURE);
+ AXIS2_ERROR_SET(env->error, AXIS2_ERROR_MEP_CANNOT_BE_NULL_IN_MEP_CLIENT,
+ AXIS2_FAILURE);
return AXIS2_FAILURE;
}
/* If operation has a parent service get it */
svc = axis2_op_get_parent(op, env);
if (svc)
{
- axis2_svc_ctx_set_svc(op_client->svc_ctx, env, svc);
+ axis2_svc_ctx_set_svc(op_client->svc_ctx, env, svc);
}
else
{
@@ -699,20 +708,19 @@
if (op_client->wsa_action)
{
- axis2_msg_ctx_set_wsa_action(msg_ctx, env, op_client->wsa_action);
+ axis2_msg_ctx_set_wsa_action(msg_ctx, env, op_client->wsa_action);
}
if (op_client->soap_action)
{
- axis2_msg_ctx_set_soap_action(msg_ctx, env, op_client->soap_action);
+ axis2_msg_ctx_set_soap_action(msg_ctx, env, op_client->soap_action);
}
return AXIS2_SUCCESS;
}
AXIS2_EXTERN axis2_msg_ctx_t *AXIS2_CALL
-axis2_op_client_prepare_soap_envelope(
- axis2_op_client_t *op_client,
+axis2_op_client_prepare_soap_envelope(axis2_op_client_t *op_client,
const axutil_env_t *env,
axiom_node_t *to_send)
{
@@ -725,8 +733,8 @@
if (op_client->svc_ctx)
{
msg_ctx = axis2_msg_ctx_create(env,
- axis2_svc_ctx_get_conf_ctx(op_client->svc_ctx, env),
- NULL, NULL);
+ axis2_svc_ctx_get_conf_ctx(op_client->svc_ctx, env),
+ NULL, NULL);
}
if (!msg_ctx)
@@ -736,14 +744,15 @@
if (op_client->soap_version_uri)
{
- if (axutil_strcmp(op_client->soap_version_uri,
- AXIOM_SOAP11_SOAP_ENVELOPE_NAMESPACE_URI) == 0)
+ if (!(axutil_strcmp(op_client->soap_version_uri,
+ AXIOM_SOAP11_SOAP_ENVELOPE_NAMESPACE_URI)))
soap_version = AXIOM_SOAP11;
else
soap_version = AXIOM_SOAP12;
}
- envelope = axiom_soap_envelope_create_default_soap_envelope(env, soap_version);
+ envelope = axiom_soap_envelope_create_default_soap_envelope(env,
+ soap_version);
if (!envelope)
{
return NULL;
@@ -770,8 +779,7 @@
}
AXIS2_EXTERN axis2_transport_out_desc_t *AXIS2_CALL
-axis2_op_client_infer_transport(
- axis2_op_client_t *op_client,
+axis2_op_client_infer_transport(axis2_op_client_t *op_client,
const axutil_env_t *env,
axis2_endpoint_ref_t *epr)
{
@@ -793,14 +801,19 @@
axis2_transport_out_desc_t *transport_out_desc = NULL;
AXIS2_TRANSPORT_ENUMS transport_enum = 0;
- if (!axutil_strcmp(transport, "http"))
+ if (!axutil_strcmp(transport, "http"))
{
- transport_enum = AXIS2_TRANSPORT_ENUM_HTTP;
+ transport_enum = AXIS2_TRANSPORT_ENUM_HTTP;
}
- else if (!axutil_strcmp (transport, "https"))
+ else if (!axutil_strcmp (transport, "https"))
{
- transport_enum = AXIS2_TRANSPORT_ENUM_HTTPS;
+ transport_enum = AXIS2_TRANSPORT_ENUM_HTTPS;
}
+ else if (!axutil_strcmp (transport, "xmpp"))
+ {
+ transport_enum = AXIS2_TRANSPORT_ENUM_XMPP;
+ }
+
conf_ctx = axis2_svc_ctx_get_conf_ctx(op_client->svc_ctx, env);
if (conf_ctx)
@@ -808,7 +821,8 @@
conf = axis2_conf_ctx_get_conf(conf_ctx, env);
if (conf)
{
- transport_out_desc = axis2_conf_get_transport_out(conf, env, transport_enum);
+ transport_out_desc = axis2_conf_get_transport_out(conf,
+ env, transport_enum);
}
}
@@ -823,29 +837,32 @@
}
AXIS2_EXTERN axiom_soap_envelope_t *AXIS2_CALL
-axis2_op_client_create_default_soap_envelope(
- axis2_op_client_t *op_client,
+axis2_op_client_create_default_soap_envelope(axis2_op_client_t *op_client,
const axutil_env_t *env)
{
axiom_soap_envelope_t *envelope = NULL;
AXIS2_ENV_CHECK(env, NULL);
- if (axutil_strcmp(AXIOM_SOAP12_SOAP_ENVELOPE_NAMESPACE_URI, op_client->soap_version_uri) == 0)
+ if (!(axutil_strcmp(AXIOM_SOAP12_SOAP_ENVELOPE_NAMESPACE_URI,
+ op_client->soap_version_uri)))
{
- envelope = axiom_soap_envelope_create_with_soap_version_prefix(env, AXIOM_SOAP12, NULL);
+ envelope = axiom_soap_envelope_create_with_soap_version_prefix(env,
+ AXIOM_SOAP12, NULL);
}
-
- if (axutil_strcmp(AXIOM_SOAP11_SOAP_ENVELOPE_NAMESPACE_URI, op_client->soap_version_uri) == 0)
+
+ if (!(axutil_strcmp(AXIOM_SOAP11_SOAP_ENVELOPE_NAMESPACE_URI,
+ op_client->soap_version_uri)))
{
- envelope = axiom_soap_envelope_create_with_soap_version_prefix(env, AXIOM_SOAP11, NULL);
+ envelope = axiom_soap_envelope_create_with_soap_version_prefix(env,
+ AXIOM_SOAP11, NULL);
}
return envelope;
}
+
AXIS2_EXTERN axis2_status_t AXIS2_CALL
-axis2_op_client_engage_module(
- axis2_op_client_t *op_client,
+axis2_op_client_engage_module(axis2_op_client_t *op_client,
const axutil_env_t *env,
const axutil_qname_t *qname)
{
@@ -875,8 +892,7 @@
}
AXIS2_EXTERN axis2_status_t AXIS2_CALL
-axis2_op_client_set_soap_version_uri(
- axis2_op_client_t *op_client,
+axis2_op_client_set_soap_version_uri(axis2_op_client_t *op_client,
const axutil_env_t *env,
const axis2_char_t *soap_version_uri)
{
@@ -902,8 +918,7 @@
}
AXIS2_EXTERN axis2_status_t AXIS2_CALL
-axis2_op_client_set_soap_action(
- axis2_op_client_t *op_client,
+axis2_op_client_set_soap_action(axis2_op_client_t *op_client,
const axutil_env_t *env,
axutil_string_t *soap_action)
{
@@ -929,8 +944,7 @@
}
AXIS2_EXTERN axis2_status_t AXIS2_CALL
-axis2_op_client_set_wsa_action(
- axis2_op_client_t *op_client,
+axis2_op_client_set_wsa_action(axis2_op_client_t *op_client,
const axutil_env_t *env,
const axis2_char_t *wsa_action)
{
@@ -956,8 +970,7 @@
}
static axis2_char_t *AXIS2_CALL
-axis2_get_transport_from_url(
- const axis2_char_t *url,
+axis2_get_transport_from_url(const axis2_char_t *url,
const axutil_env_t *env)
{
axis2_char_t *transport = NULL;
@@ -988,8 +1001,7 @@
}
AXIS2_EXTERN axis2_svc_ctx_t *AXIS2_CALL
-axis2_op_client_get_svc_ctx(
- const axis2_op_client_t *op_client,
+axis2_op_client_get_svc_ctx(const axis2_op_client_t *op_client,
const axutil_env_t *env)
{
return op_client->svc_ctx;
@@ -997,8 +1009,7 @@
AXIS2_EXTERN axis2_msg_ctx_t *AXIS2_CALL
-axis2_op_client_two_way_send(
- const axutil_env_t *env,
+axis2_op_client_two_way_send(const axutil_env_t *env,
axis2_msg_ctx_t *msg_ctx)
{
axis2_engine_t *engine = NULL;
@@ -1032,7 +1043,7 @@
status = axis2_engine_send(engine, env, msg_ctx);
- axis2_engine_free(engine, env);
+ axis2_engine_free(engine, env);
engine = NULL;
if (status != AXIS2_SUCCESS)
@@ -1043,8 +1054,8 @@
{
/* handle one way case */
const axis2_char_t *mep = axis2_op_get_msg_exchange_pattern(op, env);
- if (axutil_strcmp(mep, AXIS2_MEP_URI_OUT_ONLY) == 0 ||
- axutil_strcmp(mep, AXIS2_MEP_URI_ROBUST_OUT_ONLY) == 0)
+ if (!(axutil_strcmp(mep, AXIS2_MEP_URI_OUT_ONLY)) ||
+ !(axutil_strcmp(mep, AXIS2_MEP_URI_ROBUST_OUT_ONLY)))
{
return NULL;
}
@@ -1052,35 +1063,40 @@
/* create the response */
response = axis2_msg_ctx_create(env, conf_ctx,
- axis2_msg_ctx_get_transport_in_desc(msg_ctx, env),
- axis2_msg_ctx_get_transport_out_desc(msg_ctx, env));
+ axis2_msg_ctx_get_transport_in_desc(msg_ctx, env),
+ axis2_msg_ctx_get_transport_out_desc(msg_ctx, env));
if (!response)
return NULL;
property = axis2_msg_ctx_get_property(msg_ctx, env,AXIS2_TRANSPORT_IN);
if (property)
{
- axis2_msg_ctx_set_property(response, env, AXIS2_TRANSPORT_IN, property);
+ axis2_msg_ctx_set_property(response, env, AXIS2_TRANSPORT_IN, property);
property = NULL;
}
if (op)
{
- axis2_op_register_op_ctx(op, env, response, axis2_msg_ctx_get_op_ctx(msg_ctx, env));
+ axis2_op_register_op_ctx(op,
+ env, response, axis2_msg_ctx_get_op_ctx(msg_ctx, env));
}
- axis2_msg_ctx_set_server_side(response, env, AXIS2_FALSE);
- axis2_msg_ctx_set_conf_ctx(response, env, axis2_msg_ctx_get_conf_ctx(msg_ctx, env));
- axis2_msg_ctx_set_svc_grp_ctx(response, env, axis2_msg_ctx_get_svc_grp_ctx(msg_ctx, env));
+ axis2_msg_ctx_set_server_side(response, env, AXIS2_FALSE);
+ axis2_msg_ctx_set_conf_ctx(response, env,
+ axis2_msg_ctx_get_conf_ctx(msg_ctx, env));
+ axis2_msg_ctx_set_svc_grp_ctx(response, env,
+ axis2_msg_ctx_get_svc_grp_ctx(msg_ctx, env));
/* If request is REST we assume the response is REST, so set the variable*/
- axis2_msg_ctx_set_doing_rest(response, env, axis2_msg_ctx_get_doing_rest(msg_ctx, env));
+ axis2_msg_ctx_set_doing_rest(response, env,
+ axis2_msg_ctx_get_doing_rest(msg_ctx, env));
/* set response envelope */
if (engine)
{
- axis2_engine_free(engine, env);
+ axis2_engine_free(engine, env);
engine = NULL;
}
- response_envelope = axis2_msg_ctx_get_response_soap_envelope (msg_ctx, env);
+ response_envelope = axis2_msg_ctx_get_response_soap_envelope (msg_ctx,
+ env);
if(response_envelope)
{
axis2_msg_ctx_set_soap_envelope(response, env, response_envelope);
@@ -1117,7 +1133,7 @@
if(property)
{
axis2_char_t *value = axutil_property_get_value(property, env);
- if(0 == axutil_strcmp(AXIS2_VALUE_TRUE, value))
+ if(!axutil_strcmp(AXIS2_VALUE_TRUE, value))
{
return response;
}
@@ -1134,33 +1150,34 @@
{
if (AXIS2_ERROR_GET_STATUS_CODE(env->error) != AXIS2_SUCCESS)
{
- AXIS2_ERROR_SET(env->error, AXIS2_ERROR_BLOCKING_INVOCATION_EXPECTS_RESPONSE, AXIS2_FAILURE);
+ AXIS2_ERROR_SET(env->error,
+ AXIS2_ERROR_BLOCKING_INVOCATION_EXPECTS_RESPONSE,
+ AXIS2_FAILURE);
if (engine)
{
- axis2_engine_free(engine, env);
+ axis2_engine_free(engine, env);
engine = NULL;
}
- axis2_msg_ctx_free(response, env);
+ axis2_msg_ctx_free(response, env);
return NULL;
}
}
}
/* property is NULL, and we set null for AXIS2_TRANSPORT_IN in msg_ctx to
- avoid double free of this property */
- axis2_msg_ctx_set_property(msg_ctx, env, AXIS2_TRANSPORT_IN, property);
+ avoid double free of this property */
+ axis2_msg_ctx_set_property(msg_ctx, env, AXIS2_TRANSPORT_IN, property);
if (engine)
{
- axis2_engine_free(engine, env);
+ axis2_engine_free(engine, env);
engine = NULL;
}
return response;
}
AXIS2_EXTERN axis2_msg_ctx_t *AXIS2_CALL
-axis2_op_client_receive(
- const axutil_env_t *env,
+axis2_op_client_receive(const axutil_env_t *env,
axis2_msg_ctx_t *msg_ctx)
{
axis2_engine_t *engine = NULL;
@@ -1175,15 +1192,15 @@
/* create the response */
response = axis2_msg_ctx_create(env, conf_ctx,
- axis2_msg_ctx_get_transport_in_desc(msg_ctx, env),
- axis2_msg_ctx_get_transport_out_desc(msg_ctx, env));
+ axis2_msg_ctx_get_transport_in_desc(msg_ctx, env),
+ axis2_msg_ctx_get_transport_out_desc(msg_ctx, env));
if (!response)
return NULL;
property = axis2_msg_ctx_get_property(msg_ctx, env, AXIS2_TRANSPORT_IN);
if (property)
{
- axis2_msg_ctx_set_property(response, env, AXIS2_TRANSPORT_IN, property);
+ axis2_msg_ctx_set_property(response, env, AXIS2_TRANSPORT_IN, property);
property = NULL;
}
@@ -1192,12 +1209,15 @@
{
axis2_op_register_op_ctx(op, env, response, axis2_msg_ctx_get_op_ctx(msg_ctx, env));
}
- axis2_msg_ctx_set_server_side(response, env, AXIS2_FALSE);
- axis2_msg_ctx_set_conf_ctx(response, env, axis2_msg_ctx_get_conf_ctx(msg_ctx, env));
- axis2_msg_ctx_set_svc_grp_ctx(response, env, axis2_msg_ctx_get_svc_grp_ctx(msg_ctx, env));
+ axis2_msg_ctx_set_server_side(response, env, AXIS2_FALSE);
+ axis2_msg_ctx_set_conf_ctx(response, env,
+ axis2_msg_ctx_get_conf_ctx(msg_ctx, env));
+ axis2_msg_ctx_set_svc_grp_ctx(response, env,
+ axis2_msg_ctx_get_svc_grp_ctx(msg_ctx, env));
/* If request is REST we assume the response is REST, so set the variable*/
- axis2_msg_ctx_set_doing_rest(response, env, axis2_msg_ctx_get_doing_rest(msg_ctx, env));
+ axis2_msg_ctx_set_doing_rest(response, env,
+ axis2_msg_ctx_get_doing_rest(msg_ctx, env));
response_envelope = axis2_msg_ctx_get_response_soap_envelope (msg_ctx, env);
if (response_envelope)
@@ -1205,7 +1225,7 @@
axis2_msg_ctx_set_soap_envelope(response, env, response_envelope);
if (engine)
{
- axis2_engine_free(engine, env);
+ axis2_engine_free(engine, env);
engine = NULL;
}
@@ -1226,18 +1246,20 @@
else it is a one way message */
if (AXIS2_ERROR_GET_STATUS_CODE(env->error) != AXIS2_SUCCESS)
{
- AXIS2_ERROR_SET(env->error, AXIS2_ERROR_BLOCKING_INVOCATION_EXPECTS_RESPONSE, AXIS2_FAILURE);
+ AXIS2_ERROR_SET(env->error,
+ AXIS2_ERROR_BLOCKING_INVOCATION_EXPECTS_RESPONSE,
+ AXIS2_FAILURE);
return NULL;
}
}
/* property is NULL, and we set null for AXIS2_TRANSPORT_IN in msg_ctx to
- avoid double free of this property */
- axis2_msg_ctx_set_property(msg_ctx, env, AXIS2_TRANSPORT_IN, property);
+ avoid double free of this property */
+ axis2_msg_ctx_set_property(msg_ctx, env, AXIS2_TRANSPORT_IN, property);
if (engine)
{
- axis2_engine_free(engine, env);
+ axis2_engine_free(engine, env);
engine = NULL;
}
return response;
Modified: webservices/axis2/scratch/c/dinesh/602/c/src/core/clientapi/svc_client.c
URL: http://svn.apache.org/viewvc/webservices/axis2/scratch/c/dinesh/602/c/src/core/clientapi/svc_client.c?view=diff&rev=556666&r1=556665&r2=556666
==============================================================================
--- webservices/axis2/scratch/c/dinesh/602/c/src/core/clientapi/svc_client.c (original)
+++ webservices/axis2/scratch/c/dinesh/602/c/src/core/clientapi/svc_client.c Mon Jul 16 09:42:53 2007
@@ -32,6 +32,10 @@
#include <axis2_conf_init.h>
#include <platforms/axutil_platform_auto_sense.h>
#include <stdio.h>
+#include <axutil_generic_obj.h>
+#include <axis2_http_transport.h>
+#include <neethi_util.h>
+#include <axis2_policy_include.h>
struct axis2_svc_client
{
@@ -1288,6 +1292,10 @@
axutil_param_t *param;
axis2_char_t *proxy = AXIS2_HTTP_PROXY_API;
axutil_hash_t *attribute;
+ axutil_generic_obj_t *host_obj = NULL;
+ axutil_generic_obj_t *port_obj = NULL;
+ axiom_attribute_t *host_attr = NULL;
+ axiom_attribute_t *port_attr = NULL;
AXIS2_PARAM_CHECK(env->error, proxy_host, AXIS2_FAILURE);
AXIS2_PARAM_CHECK(env->error, proxy_port, AXIS2_FAILURE);
@@ -1309,11 +1317,72 @@
}
attribute = axutil_hash_make (env);
- axutil_hash_set (attribute, AXIS2_HTTP_PROXY_HOST, AXIS2_HASH_KEY_STRING, proxy_host);
- axutil_hash_set (attribute, AXIS2_HTTP_PROXY_PORT, AXIS2_HASH_KEY_STRING, proxy_port);
+ host_obj = axutil_generic_obj_create(env);
+ port_obj = axutil_generic_obj_create(env);
+ host_attr = axiom_attribute_create(env, proxy_host, NULL, NULL);
+ port_attr = axiom_attribute_create(env, proxy_port, NULL, NULL);
+ axutil_generic_obj_set_value(host_obj, env, host_attr);
+ axutil_generic_obj_set_value(port_obj, env, port_attr);
+
+ axutil_hash_set (attribute, AXIS2_HTTP_PROXY_HOST, AXIS2_HASH_KEY_STRING, host_obj);
+ axutil_hash_set (attribute, AXIS2_HTTP_PROXY_PORT, AXIS2_HASH_KEY_STRING, port_obj);
axutil_param_set_attributes (param, env, attribute);
axutil_param_container_add_param (param_container, env, param);
}
return AXIS2_SUCCESS;
}
+
+AXIS2_EXTERN axis2_status_t AXIS2_CALL
+axis2_svc_client_set_policy_from_om(axis2_svc_client_t *svc_client,
+ const axutil_env_t *env,
+ axiom_node_t *root_node)
+{
+
+ neethi_policy_t *neethi_policy = NULL;
+
+ neethi_policy = neethi_util_create_policy_from_om(env, root_node);
+
+ if(neethi_policy)
+ {
+ return axis2_svc_client_set_policy(svc_client, env, neethi_policy);
+ }
+ else
+ {
+ return AXIS2_FAILURE;
+ }
+}
+
+
+AXIS2_EXTERN axis2_status_t AXIS2_CALL
+axis2_svc_client_set_policy(axis2_svc_client_t *svc_client,
+ const axutil_env_t *env,
+ neethi_policy_t *policy)
+{
+
+ axis2_svc_t *svc = NULL;
+ axis2_desc_t *desc = NULL;
+ axis2_policy_include_t *policy_include = NULL;
+
+ svc = axis2_svc_client_get_svc(svc_client, env);
+
+ if(!svc)
+ {
+ return AXIS2_FAILURE;
+ }
+
+ desc = axis2_svc_get_base(svc, env);
+ if(!desc)
+ {
+ return AXIS2_FAILURE;
+ }
+
+ policy_include = axis2_desc_get_policy_include(desc, env);
+ if(!policy_include)
+ {
+ return AXIS2_FAILURE;
+ }
+ axis2_policy_include_add_policy_element(policy_include, env, AXIS2_SERVICE_POLICY, policy);
+ return AXIS2_SUCCESS;
+}
+
Modified: webservices/axis2/scratch/c/dinesh/602/c/src/core/context/msg_ctx.c
URL: http://svn.apache.org/viewvc/webservices/axis2/scratch/c/dinesh/602/c/src/core/context/msg_ctx.c?view=diff&rev=556666&r1=556665&r2=556666
==============================================================================
--- webservices/axis2/scratch/c/dinesh/602/c/src/core/context/msg_ctx.c (original)
+++ webservices/axis2/scratch/c/dinesh/602/c/src/core/context/msg_ctx.c Mon Jul 16 09:42:53 2007
@@ -1138,6 +1138,38 @@
return param;
}
+AXIS2_EXTERN void * AXIS2_CALL
+axis2_msg_ctx_get_property_value(
+ axis2_msg_ctx_t *msg_ctx,
+ const axutil_env_t *env,
+ const axis2_char_t *property_str)
+{
+ axutil_property_t *property;
+ void *property_value = NULL;
+
+ property = axis2_msg_ctx_get_property(msg_ctx, env, property_str);
+
+ if (!property)
+ {
+ AXIS2_LOG_WARNING(env->log,
+ AXIS2_LOG_SI,
+ "%s not set in message context", property_str);
+ return NULL;
+ }
+
+ property_value = axutil_property_get_value(property, env);
+ if (!property_value)
+ {
+ AXIS2_LOG_WARNING(env->log, AXIS2_LOG_SI,
+ "%s properties not set in message context",
+ property_str);
+ return NULL;
+ }
+
+ return property_value;
+}
+
+
axutil_property_t *AXIS2_CALL
axis2_msg_ctx_get_property(
const axis2_msg_ctx_t *msg_ctx,
@@ -1219,10 +1251,10 @@
axutil_property_t *value)
{
AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
-
return axis2_ctx_set_property(msg_ctx->base, env, key, value);
}
+
const axutil_string_t *AXIS2_CALL
axis2_msg_ctx_get_paused_handler_name(
const axis2_msg_ctx_t *msg_ctx,
@@ -1565,13 +1597,14 @@
msg_ctx->msg_info_headers, env);
}
msg_ctx->msg_info_headers =
+
axis2_options_get_msg_info_headers(options, env);
msg_ctx->msg_info_headers_deep_copy = AXIS2_FALSE;
msg_ctx->doing_mtom = axis2_options_get_enable_mtom(options, env);
- axis2_ctx_set_property_map(msg_ctx->base, env,
- axis2_options_get_properties(options, env));
+ axis2_ctx_set_property_map(msg_ctx->base, env,
+ axis2_options_get_properties(options, env));
rest_val = (axutil_property_t *) axis2_msg_ctx_get_property(msg_ctx, env,
AXIS2_ENABLE_REST);
if (rest_val)
@@ -1958,3 +1991,6 @@
return AXIS2_SUCCESS;
}
+
+
+
Modified: webservices/axis2/scratch/c/dinesh/602/c/src/core/deployment/Makefile.am
URL: http://svn.apache.org/viewvc/webservices/axis2/scratch/c/dinesh/602/c/src/core/deployment/Makefile.am?view=diff&rev=556666&r1=556665&r2=556666
==============================================================================
--- webservices/axis2/scratch/c/dinesh/602/c/src/core/deployment/Makefile.am (original)
+++ webservices/axis2/scratch/c/dinesh/602/c/src/core/deployment/Makefile.am Mon Jul 16 09:42:53 2007
@@ -34,4 +34,5 @@
-I$(top_builddir)/src/core/deployment \
-I$(top_builddir)/src/core/util \
-I$(top_builddir)/axiom/include \
+ -I$(top_builddir)/neethi/include \
-I$(top_builddir)/util/include
Modified: webservices/axis2/scratch/c/dinesh/602/c/src/core/deployment/axis2_deployment.h
URL: http://svn.apache.org/viewvc/webservices/axis2/scratch/c/dinesh/602/c/src/core/deployment/axis2_deployment.h?view=diff&rev=556666&r1=556665&r2=556666
==============================================================================
--- webservices/axis2/scratch/c/dinesh/602/c/src/core/deployment/axis2_deployment.h (original)
+++ webservices/axis2/scratch/c/dinesh/602/c/src/core/deployment/axis2_deployment.h Mon Jul 16 09:42:53 2007
@@ -89,6 +89,10 @@
#define AXIS2_ATUSE "use"
#define AXIS2_MEP "mep"
+/* for messages */
+#define AXIS2_MESSAGE "message"
+#define AXIS2_LABEL "label"
+
/* for handlers */
#define AXIS2_REF "ref"
#define AXIS2_CLASSNAME "class"
Modified: webservices/axis2/scratch/c/dinesh/602/c/src/core/deployment/axis2_desc_builder.h
URL: http://svn.apache.org/viewvc/webservices/axis2/scratch/c/dinesh/602/c/src/core/deployment/axis2_desc_builder.h?view=diff&rev=556666&r1=556665&r2=556666
==============================================================================
--- webservices/axis2/scratch/c/dinesh/602/c/src/core/deployment/axis2_desc_builder.h (original)
+++ webservices/axis2/scratch/c/dinesh/602/c/src/core/deployment/axis2_desc_builder.h Mon Jul 16 09:42:53 2007
@@ -44,6 +44,7 @@
#include <axiom_children_with_specific_attribute_iterator.h>
#include <axis2_phase.h>
#include <axutil_dll_desc.h>
+#include <axis2_policy_include.h>
#ifdef __cplusplus
@@ -231,6 +232,17 @@
axis2_char_t *file_name,
struct axis2_dep_engine *engine);
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_process_policy_elements(const axutil_env_t *env,
+ int type,
+ axiom_children_qname_iterator_t *iterator,
+ axis2_policy_include_t *policy_include);
+
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_process_policy_reference_elements(const axutil_env_t *env,
+ int type,
+ axiom_children_qname_iterator_t *iterator,
+ axis2_policy_include_t *policy_include);
/** @} */
#ifdef __cplusplus
Modified: webservices/axis2/scratch/c/dinesh/602/c/src/core/deployment/conf_init.c
URL: http://svn.apache.org/viewvc/webservices/axis2/scratch/c/dinesh/602/c/src/core/deployment/conf_init.c?view=diff&rev=556666&r1=556665&r2=556666
==============================================================================
--- webservices/axis2/scratch/c/dinesh/602/c/src/core/deployment/conf_init.c (original)
+++ webservices/axis2/scratch/c/dinesh/602/c/src/core/deployment/conf_init.c Mon Jul 16 09:42:53 2007
@@ -21,6 +21,7 @@
#include <axis2_const.h>
#include <axutil_error.h>
#include <axutil_allocator.h>
+#include <axutil_class_loader.h>
#include <axis2_dep_engine.h>
#include <axis2_module.h>
@@ -28,6 +29,11 @@
axis2_init_modules(const axutil_env_t *env,
axis2_conf_ctx_t *conf_ctx);
+static axis2_status_t AXIS2_CALL
+axis2_load_services(
+ const axutil_env_t *env,
+ axis2_conf_ctx_t *conf_ctx);
+
axis2_status_t AXIS2_CALL
axis2_init_transports(const axutil_env_t *env,
axis2_conf_ctx_t *conf_ctx);
@@ -67,6 +73,7 @@
axis2_phase_resolver_build_chains(phase_resolver, env);
axis2_init_modules(env, conf_ctx);
+ axis2_load_services(env, conf_ctx);
axis2_init_transports(env, conf_ctx);
axis2_phase_resolver_free(phase_resolver, env);
@@ -152,6 +159,61 @@
{
AXIS2_MODULE_INIT(mod, env, conf_ctx, mod_desc);
}
+ }
+ }
+ }
+ }
+ status = AXIS2_SUCCESS;
+ }
+
+ return status;
+}
+
+static axis2_status_t AXIS2_CALL
+axis2_load_services(
+ const axutil_env_t *env,
+ axis2_conf_ctx_t *conf_ctx)
+{
+ axis2_conf_t *conf = NULL;
+ axis2_status_t status = AXIS2_FAILURE;
+
+ AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+ AXIS2_PARAM_CHECK(env->error, conf_ctx, AXIS2_FAILURE);
+
+ conf = axis2_conf_ctx_get_conf(conf_ctx, env);
+ if (conf)
+ {
+ axutil_hash_t *svc_map = axis2_conf_get_all_svcs_to_load(conf, env);
+ if (svc_map)
+ {
+ axutil_hash_index_t *hi = NULL;
+ void *svc = NULL;
+ for (hi = axutil_hash_first(svc_map, env);
+ hi; hi = axutil_hash_next(env, hi))
+ {
+ axutil_hash_this(hi, NULL, NULL, &svc);
+ if (svc)
+ {
+ axis2_svc_t *svc_desc = (axis2_svc_t*)svc;
+ if (svc_desc)
+ {
+ axutil_param_t *impl_info_param = NULL;
+ void *impl_class = NULL;
+ impl_info_param = axis2_svc_get_param(svc_desc, env,
+ AXIS2_SERVICE_CLASS);
+ if (!impl_info_param)
+ {
+ AXIS2_ERROR_SET(env->error, AXIS2_ERROR_INVALID_STATE_SVC,
+ AXIS2_FAILURE);
+ return AXIS2_FAILURE;
+ }
+ axutil_allocator_switch_to_global_pool(env->allocator);
+ axutil_class_loader_init(env);
+ impl_class = axutil_class_loader_create_dll(env, impl_info_param);
+ axis2_svc_set_impl_class(svc_desc, env, impl_class);
+ AXIS2_SVC_SKELETON_INIT_WITH_CONF(
+ (axis2_svc_skeleton_t *)impl_class, env, conf);
+ axutil_allocator_switch_to_local_pool(env->allocator);
}
}
}
Modified: webservices/axis2/scratch/c/dinesh/602/c/src/core/deployment/desc_builder.c
URL: http://svn.apache.org/viewvc/webservices/axis2/scratch/c/dinesh/602/c/src/core/deployment/desc_builder.c?view=diff&rev=556666&r1=556665&r2=556666
==============================================================================
--- webservices/axis2/scratch/c/dinesh/602/c/src/core/deployment/desc_builder.c (original)
+++ webservices/axis2/scratch/c/dinesh/602/c/src/core/deployment/desc_builder.c Mon Jul 16 09:42:53 2007
@@ -21,6 +21,7 @@
#include <axutil_utils.h>
#include <axutil_generic_obj.h>
#include <axis2_raw_xml_in_out_msg_recv.h>
+#include <neethi_engine.h>
struct axis2_desc_builder
{
@@ -788,7 +789,6 @@
return AXIS2_SUCCESS;
}
-
AXIS2_EXTERN axis2_status_t AXIS2_CALL
axis2_desc_builder_process_op_module_refs(axis2_desc_builder_t *desc_builder,
const axutil_env_t *env,
@@ -1000,3 +1000,54 @@
{
return desc_builder->engine;
}
+
+AXIS2_EXTERN axis2_status_t AXIS2_CALL
+axis2_process_policy_elements(const axutil_env_t *env,
+ int type,
+ axiom_children_qname_iterator_t *iterator,
+ axis2_policy_include_t *policy_include)
+{
+ while (axiom_children_qname_iterator_has_next(iterator, env))
+ {
+ axiom_node_t *node = NULL;
+ node = axiom_children_qname_iterator_next(iterator, env);
+ if (node)
+ {
+ axiom_element_t *element = NULL;
+ neethi_policy_t *policy = NULL;
+
+ element = axiom_node_get_data_element(node, env);
+ policy = neethi_engine_get_policy(env, node, element);
+ axis2_policy_include_add_policy_element(policy_include, env,
+ type, policy);
+ }
+ }
+ return AXIS2_SUCCESS;
+}
+
+AXIS2_EXTERN axis2_status_t AXIS2_CALL
+axis2_process_policy_reference_elements(const axutil_env_t *env,
+ int type,
+ axiom_children_qname_iterator_t *iterator,
+ axis2_policy_include_t *policy_include)
+{
+ while (axiom_children_qname_iterator_has_next(iterator, env))
+ {
+ axiom_node_t *node = NULL;
+ node = axiom_children_qname_iterator_next(iterator, env);
+ if (node)
+ {
+ axiom_element_t *element = NULL;
+ neethi_reference_t *reference = NULL;
+
+ element = axiom_node_get_data_element(node, env);
+ /* TODO: add neethi_engine_get_policy_reference
+ reference = neethi_engine_get_policy_reference(env, node, element);*/
+ axis2_policy_include_add_policy_reference_element(policy_include, env,
+ type, reference);
+ }
+ }
+ return AXIS2_SUCCESS;
+}
+
+
Modified: webservices/axis2/scratch/c/dinesh/602/c/src/core/deployment/svc_builder.c
URL: http://svn.apache.org/viewvc/webservices/axis2/scratch/c/dinesh/602/c/src/core/deployment/svc_builder.c?view=diff&rev=556666&r1=556665&r2=556666
==============================================================================
--- webservices/axis2/scratch/c/dinesh/602/c/src/core/deployment/svc_builder.c (original)
+++ webservices/axis2/scratch/c/dinesh/602/c/src/core/deployment/svc_builder.c Mon Jul 16 09:42:53 2007
@@ -19,6 +19,7 @@
#include <axutil_class_loader.h>
#include <axutil_utils.h>
#include <axutil_property.h>
+#include <axis2_msg.h>
struct axis2_svc_builder
{
@@ -31,6 +32,12 @@
const axutil_env_t *env,
axiom_children_qname_iterator_t *op_itr);
+static void
+axis2_svc_builder_process_msgs(axis2_svc_builder_t *svc_builder,
+ const axutil_env_t *env,
+ axiom_children_qname_iterator_t *iterator,
+ axis2_op_t *op);
+
AXIS2_EXTERN axis2_svc_builder_t *AXIS2_CALL
axis2_svc_builder_create(const axutil_env_t *env)
{
@@ -148,6 +155,7 @@
axutil_qname_t *qout_faultflowst = NULL;
axutil_qname_t *qopst = NULL;
axutil_qname_t *qattname = NULL;
+ axutil_qname_t *qpolicy = NULL;
axis2_status_t status = AXIS2_FAILURE;
axis2_svc_grp_t *parent = NULL;
axiom_element_t *desc_element = NULL;
@@ -177,6 +185,8 @@
int i = 0;
int size = 0;
AXIS2_TIME_T timestamp = 0;
+ axis2_desc_t *desc = NULL;
+ axis2_policy_include_t *policy_include = NULL;
AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
AXIS2_PARAM_CHECK(env->error, svc_node, AXIS2_FAILURE);
@@ -193,7 +203,11 @@
svc_node);
axutil_qname_free(qparamst, env);
qparamst = NULL;
+
parent = axis2_svc_get_parent(svc_builder->svc, env);
+
+ desc = axis2_svc_get_base(svc_builder->svc, env);
+ policy_include = axis2_desc_get_policy_include(desc, env);
status = axis2_desc_builder_process_params(svc_builder->desc_builder, env,
itr,
@@ -371,6 +385,37 @@
axis2_svc_add_op(svc_builder->svc, env, op_desc);
}
axutil_array_list_free(ops, env);
+
+ /*
+ <schema targetNamespace="http://x.y.z"/>
+ setting the PolicyInclude
+ processing <wsp:Policy> .. </..> elements
+ */
+ qpolicy = axutil_qname_create(env, NEETHI_POLICY, NEETHI_NAMESPACE, NULL);
+ itr = axiom_element_get_children_with_qname(svc_element, env,
+ qpolicy, svc_node);
+ axutil_qname_free(qpolicy, env) ;
+ qpolicy = NULL;
+
+ if (itr)
+ {
+ axis2_process_policy_elements(env, AXIS2_SERVICE_POLICY, itr,
+ policy_include);
+ }
+
+ /* processing <wsp:PolicyReference> .. </..> elements */
+ qpolicy = axutil_qname_create(env, NEETHI_REFERENCE, NEETHI_NAMESPACE, NULL);
+ itr = axiom_element_get_children_with_qname(svc_element, env,
+ qpolicy, svc_node);
+ axutil_qname_free(qpolicy, env) ;
+ qpolicy = NULL;
+
+ if (itr)
+ {
+ axis2_process_policy_reference_elements(env, AXIS2_POLICY_REF, itr,
+ policy_include);
+ }
+
return AXIS2_SUCCESS;
}
@@ -406,6 +451,11 @@
axiom_node_t *recv_node = NULL;
axis2_status_t status = AXIS2_FAILURE;
struct axis2_dep_engine *dep_engine = NULL;
+ axis2_desc_t *desc = NULL;
+ axis2_policy_include_t *policy_include = NULL;
+ axiom_children_qname_iterator_t *itr = NULL;
+ axutil_qname_t *qpolicy = NULL;
+ axutil_qname_t *qmessage = NULL;
op_node = axiom_children_qname_iterator_next(op_itr, env);
/* getting operation name */
@@ -420,14 +470,20 @@
AXIS2_FAILURE);
return AXIS2_FAILURE;
}
+
+ op_name = axiom_attribute_get_value(op_name_att, env);
+ qopname = axutil_qname_create(env, op_name, NULL, NULL);
+ op_desc = axis2_op_create(env);
+ axis2_op_set_qname(op_desc, env, qopname);
+ axutil_qname_free(qopname, env);
+ qopname = NULL;
+
/* set the mep of the operation */
qmep = axutil_qname_create(env, AXIS2_MEP, NULL, NULL);
op_mep_att = axiom_element_get_attribute(op_element, env, qmep);
axutil_qname_free(qmep, env);
qmep = NULL;
op_name = axiom_attribute_get_value(op_name_att, env);
- qopname = axutil_qname_create(env, op_name, NULL, NULL);
- op_desc = axis2_op_create(env);
if (op_mep_att)
{
@@ -438,10 +494,9 @@
}
}
- axis2_op_set_qname(op_desc, env, qopname);
+ desc = axis2_op_get_base(op_desc, env);
+ policy_include = axis2_desc_get_policy_include(desc, env);
- axutil_qname_free(qopname, env);
- qopname = NULL;
/* operation parameters */
qparamst = axutil_qname_create(env, AXIS2_PARAMETERST, NULL, NULL);
params_itr = axiom_element_get_children_with_qname(op_element, env,
@@ -489,6 +544,48 @@
{
return AXIS2_FAILURE;
}
+
+ /* setting the policy_include */
+
+ /* processing <wsp:Policy> .. </..> elements */
+
+ qpolicy = axutil_qname_create(env, NEETHI_POLICY, NEETHI_NAMESPACE, NULL);
+ itr = axiom_element_get_children_with_qname(op_element, env,
+ qpolicy, op_node);
+ axutil_qname_free(qpolicy, env) ;
+ qpolicy = NULL;
+
+ if (itr)
+ {
+ axis2_process_policy_elements(env, AXIS2_SERVICE_POLICY, itr,
+ policy_include);
+ }
+
+ /* processing <wsp:PolicyReference> .. </..> elements */
+ qpolicy = axutil_qname_create(env, NEETHI_REFERENCE, NEETHI_NAMESPACE, NULL);
+ itr = axiom_element_get_children_with_qname(op_element, env,
+ qpolicy, op_node);
+ axutil_qname_free(qpolicy, env) ;
+ qpolicy = NULL;
+
+ if (itr)
+ {
+ axis2_process_policy_reference_elements(env, AXIS2_POLICY_REF, itr,
+ policy_include);
+ }
+
+ qmessage = axutil_qname_create(env, AXIS2_MESSAGE, NULL, NULL);
+ itr = axiom_element_get_children_with_qname(op_element, env,
+ qmessage, op_node);
+ axutil_qname_free(qmessage, env) ;
+ qmessage = NULL;
+
+ if (itr)
+ {
+ axis2_svc_builder_process_msgs(svc_builder, env,
+ itr, op_desc);
+ }
+
/* setting operation phase */
dep_engine =
axis2_desc_builder_get_dep_engine(svc_builder->desc_builder, env);
@@ -506,6 +603,91 @@
return ops;
}
+static void
+axis2_svc_builder_process_msgs(axis2_svc_builder_t *svc_builder,
+ const axutil_env_t *env,
+ axiom_children_qname_iterator_t *iterator,
+ axis2_op_t *op)
+{
+ while (AXIS2_TRUE == axiom_children_qname_iterator_has_next(iterator, env))
+ {
+ axiom_node_t *node = NULL;
+ axiom_element_t *element = NULL;
+ axutil_qname_t *qname = NULL;
+ axis2_char_t *msg_label = NULL;
+ axis2_msg_t *msg = NULL;
+ axiom_children_qname_iterator_t *itr = NULL;
+ axutil_qname_t *qpolicy = NULL;
+ axis2_desc_t *desc = NULL;
+ axis2_policy_include_t *policy_include = NULL;
+
+
+ node = axiom_children_qname_iterator_next(iterator, env);
+ element = axiom_node_get_data_element(node, env);
+ qname = axutil_qname_create(env, AXIS2_LABEL, NULL, NULL);
+
+ if (element)
+ {
+ msg_label = axiom_element_get_attribute_value(element, env, qname);
+ }
+
+ if(msg_label)
+ {
+ msg = axis2_op_get_msg(op, env, msg_label);
+ }
+
+ if (msg)
+ {
+ /* operation parameters */
+ axiom_children_qname_iterator_t *params_itr = NULL;
+ axutil_qname_t *qparamst = NULL;
+ qparamst = axutil_qname_create(env, AXIS2_PARAMETERST, NULL, NULL);
+ params_itr = axiom_element_get_children_with_qname(element, env,
+ qparamst, node);
+ axutil_qname_free(qparamst, env);
+ qparamst = NULL;
+ axis2_desc_builder_process_params(svc_builder->desc_builder,
+ env, params_itr,
+ axis2_msg_get_param_container(msg, env),
+ axis2_op_get_param_container(op, env));
+
+ desc = axis2_msg_get_base(msg, env);
+ policy_include = axis2_desc_get_policy_include(desc, env);
+
+ /* setting the policy_include */
+
+ /* processing <wsp:Policy> .. </..> elements */
+
+ qpolicy = axutil_qname_create(env, NEETHI_POLICY, NEETHI_NAMESPACE, NULL);
+ itr = axiom_element_get_children_with_qname(element, env,
+ qpolicy, node);
+ axutil_qname_free(qpolicy, env) ;
+ qpolicy = NULL;
+
+ if (itr)
+ {
+ axis2_process_policy_elements(env, AXIS2_SERVICE_POLICY, itr,
+ policy_include);
+ /* axis2_process_policy_elements(env, AXIS2_MESSAGE_POLICY, itr,
+ policy_include);*/
+
+ }
+
+ /* processing <wsp:PolicyReference> .. </..> elements */
+ qpolicy = axutil_qname_create(env, NEETHI_REFERENCE, NEETHI_NAMESPACE, NULL);
+ itr = axiom_element_get_children_with_qname(element, env,
+ qpolicy, node);
+ axutil_qname_free(qpolicy, env) ;
+ qpolicy = NULL;
+
+ if (itr)
+ {
+ axis2_process_policy_reference_elements(env, AXIS2_POLICY_REF, itr,
+ policy_include);
+ }
+ }
+ }
+}
AXIS2_EXTERN axis2_status_t AXIS2_CALL
axis2_svc_builder_process_svc_module_conf(axis2_svc_builder_t *svc_builder,
Modified: webservices/axis2/scratch/c/dinesh/602/c/src/core/description/Makefile.am
URL: http://svn.apache.org/viewvc/webservices/axis2/scratch/c/dinesh/602/c/src/core/description/Makefile.am?view=diff&rev=556666&r1=556665&r2=556666
==============================================================================
--- webservices/axis2/scratch/c/dinesh/602/c/src/core/description/Makefile.am (original)
+++ webservices/axis2/scratch/c/dinesh/602/c/src/core/description/Makefile.am Mon Jul 16 09:42:53 2007
@@ -2,6 +2,7 @@
libaxis2_description_la_SOURCES =desc.c \
op.c \
+ policy_include.c \
svc.c \
module_desc.c \
svc_grp.c \
@@ -13,8 +14,11 @@
transport_out_desc.c \
msg.c
+libaxis2_engine_la_LDFLAGS = -version-info $(VERSION_NO)
+
INCLUDES = -I$(top_builddir)/include \
-I$(top_builddir)/src/core/engine \
-I$(top_builddir)/util/include \
- -I$(top_builddir)/axiom/include
+ -I$(top_builddir)/axiom/include \
+ -I$(top_builddir)/neethi/include
Modified: webservices/axis2/scratch/c/dinesh/602/c/src/core/description/desc.c
URL: http://svn.apache.org/viewvc/webservices/axis2/scratch/c/dinesh/602/c/src/core/description/desc.c?view=diff&rev=556666&r1=556665&r2=556666
==============================================================================
--- webservices/axis2/scratch/c/dinesh/602/c/src/core/description/desc.c (original)
+++ webservices/axis2/scratch/c/dinesh/602/c/src/core/description/desc.c Mon Jul 16 09:42:53 2007
@@ -18,6 +18,7 @@
#include <axis2_desc.h>
#include <axutil_property.h>
#include <axis2_msg.h>
+#include <axis2_policy_include.h>
struct axis2_desc
{
@@ -26,6 +27,10 @@
/** children of this description */
axutil_hash_t *children;
+
+ axis2_desc_t *parent;
+
+ axis2_policy_include_t *policy_include;
};
AXIS2_EXTERN axis2_desc_t *AXIS2_CALL
@@ -46,6 +51,8 @@
desc->param_container = NULL;
desc->children = NULL;
+ desc->parent = NULL;
+ desc->policy_include = NULL;
desc->param_container = (axutil_param_container_t *)
axutil_param_container_create(env);
@@ -95,6 +102,11 @@
axutil_param_container_free(desc->param_container, env);
}
+ if (desc->policy_include)
+ {
+ axis2_policy_include_free(desc->policy_include, env);
+ }
+
if (desc)
{
AXIS2_FREE(env->allocator, desc);
@@ -195,4 +207,48 @@
}
return AXIS2_FAILURE;
}
+
+AXIS2_EXTERN axis2_desc_t *AXIS2_CALL
+axis2_desc_get_parent(const axis2_desc_t *desc,
+ const axutil_env_t *env)
+{
+ return desc->parent;
+}
+
+AXIS2_EXTERN axis2_status_t AXIS2_CALL
+axis2_desc_set_parent(axis2_desc_t *desc,
+ const axutil_env_t *env,
+ axis2_desc_t *parent)
+{
+ desc->parent = parent;
+ return AXIS2_SUCCESS;
+}
+
+AXIS2_EXTERN axis2_status_t AXIS2_CALL
+axis2_desc_set_policy_include(axis2_desc_t *desc,
+ const axutil_env_t *env,
+ axis2_policy_include_t *policy_include)
+{
+ if (desc->policy_include)
+ {
+ axis2_policy_include_free(desc->policy_include, env);
+ desc->policy_include = NULL;
+ }
+
+ desc->policy_include = policy_include;
+ return AXIS2_SUCCESS;
+}
+
+AXIS2_EXTERN axis2_policy_include_t *AXIS2_CALL
+axis2_desc_get_policy_include(axis2_desc_t *desc,
+ const axutil_env_t *env)
+{
+ if (!desc->policy_include)
+ {
+ /*desc->policy_include = axis2_policy_include_create(env);*/
+ desc->policy_include = axis2_policy_include_create_with_desc(env, desc);
+ }
+ return desc->policy_include;
+}
+
Modified: webservices/axis2/scratch/c/dinesh/602/c/src/core/description/msg.c
URL: http://svn.apache.org/viewvc/webservices/axis2/scratch/c/dinesh/602/c/src/core/description/msg.c?view=diff&rev=556666&r1=556665&r2=556666
==============================================================================
--- webservices/axis2/scratch/c/dinesh/602/c/src/core/description/msg.c (original)
+++ webservices/axis2/scratch/c/dinesh/602/c/src/core/description/msg.c Mon Jul 16 09:42:53 2007
@@ -32,6 +32,8 @@
axis2_char_t *direction;
/** parameter container to hold message parameters */
struct axutil_param_container *param_container;
+ /** base description struct */
+ axis2_desc_t *base;
};
AXIS2_EXTERN axis2_msg_t *AXIS2_CALL
@@ -55,6 +57,7 @@
msg->name = NULL;
msg->element_qname = NULL;
msg->direction = NULL;
+ msg->base = NULL;
msg->param_container =
(axutil_param_container_t *)axutil_param_container_create(env);
@@ -70,7 +73,14 @@
axis2_msg_free(msg, env);
return NULL;
}
-
+
+ msg->base = axis2_desc_create(env);
+ if (!msg->base)
+ {
+ axis2_msg_free(msg, env);
+ return NULL;
+ }
+
return msg;
}
@@ -105,6 +115,11 @@
axutil_param_container_free(msg->param_container, env);
}
+ if (msg->base)
+ {
+ axis2_desc_free(msg->base, env);
+ }
+
msg->parent = NULL;
if (msg)
@@ -167,6 +182,10 @@
{
AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
msg->parent = op;
+ if (op)
+ {
+ axis2_desc_set_parent(msg->base, env, axis2_op_get_base(op, env));
+ }
return AXIS2_SUCCESS;
}
@@ -328,4 +347,16 @@
return AXIS2_SUCCESS;
}
+AXIS2_EXTERN axis2_desc_t *AXIS2_CALL
+axis2_msg_get_base(const axis2_msg_t *msg,
+ const axutil_env_t *env)
+{
+ return msg->base;
+}
+AXIS2_EXTERN axutil_param_container_t *AXIS2_CALL
+axis2_msg_get_param_container(const axis2_msg_t *msg,
+ const axutil_env_t *env)
+{
+ return msg->param_container;
+}
Modified: webservices/axis2/scratch/c/dinesh/602/c/src/core/description/op.c
URL: http://svn.apache.org/viewvc/webservices/axis2/scratch/c/dinesh/602/c/src/core/description/op.c?view=diff&rev=556666&r1=556665&r2=556666
==============================================================================
--- webservices/axis2/scratch/c/dinesh/602/c/src/core/description/op.c (original)
+++ webservices/axis2/scratch/c/dinesh/602/c/src/core/description/op.c Mon Jul 16 09:42:53 2007
@@ -355,6 +355,10 @@
op->parent = NULL;
}
op->parent = svc;
+ if (svc)
+ {
+ axis2_desc_set_parent(op->base, env, axis2_svc_get_base(svc, env));
+ }
return AXIS2_SUCCESS;
}
@@ -1184,4 +1188,12 @@
{
return op->param_container;
}
+
+AXIS2_EXTERN axis2_desc_t *AXIS2_CALL
+axis2_op_get_base(const axis2_op_t *op,
+ const axutil_env_t *env)
+{
+ return op->base;
+}
+
Modified: webservices/axis2/scratch/c/dinesh/602/c/src/core/description/svc.c
URL: http://svn.apache.org/viewvc/webservices/axis2/scratch/c/dinesh/602/c/src/core/description/svc.c?view=diff&rev=556666&r1=556665&r2=556666
==============================================================================
--- webservices/axis2/scratch/c/dinesh/602/c/src/core/description/svc.c (original)
+++ webservices/axis2/scratch/c/dinesh/602/c/src/core/description/svc.c Mon Jul 16 09:42:53 2007
@@ -93,6 +93,8 @@
struct axutil_param_container *param_container;
/** flow container that encapsulates the flow related data */
struct axis2_flow_container *flow_container;
+ /** base description struct */
+ axis2_desc_t *base;
};
AXIS2_EXTERN axis2_svc_t *AXIS2_CALL
@@ -136,6 +138,7 @@
svc->impl_class = NULL;
svc->qname = NULL;
svc->style = NULL;
+ svc->base = NULL;
svc->param_container = axutil_param_container_create(env);
if (! svc->param_container)
@@ -216,6 +219,13 @@
}
svc->target_ns_prefix = axutil_strdup(env, "tns");
svc->sc_calc_count = 0;
+
+ svc->base = axis2_desc_create(env);
+ if (!svc->base)
+ {
+ axis2_svc_free(svc, env);
+ return NULL;
+ }
return svc;
}
@@ -379,6 +389,11 @@
{
AXIS2_FREE(env->allocator, svc->style);
}
+
+ if (svc->base)
+ {
+ axis2_desc_free(svc->base, env);
+ }
if (svc)
{
@@ -473,6 +488,10 @@
AXIS2_PARAM_CHECK(env->error, svc_grp, AXIS2_FAILURE);
svc->parent = svc_grp;
+ if (svc_grp)
+ {
+ axis2_desc_set_parent(svc->base, env, axis2_svc_grp_get_base(svc_grp, env));
+ }
return AXIS2_SUCCESS;
}
@@ -1084,3 +1103,12 @@
svc->wsdl_path = (axis2_char_t *)wsdl_path;
return AXIS2_SUCCESS;
}
+
+
+AXIS2_EXTERN axis2_desc_t *AXIS2_CALL
+axis2_svc_get_base(const axis2_svc_t *svc,
+ const axutil_env_t *env)
+{
+ return svc->base;
+}
+
Modified: webservices/axis2/scratch/c/dinesh/602/c/src/core/description/svc_grp.c
URL: http://svn.apache.org/viewvc/webservices/axis2/scratch/c/dinesh/602/c/src/core/description/svc_grp.c?view=diff&rev=556666&r1=556665&r2=556666
==============================================================================
--- webservices/axis2/scratch/c/dinesh/602/c/src/core/description/svc_grp.c (original)
+++ webservices/axis2/scratch/c/dinesh/602/c/src/core/description/svc_grp.c Mon Jul 16 09:42:53 2007
@@ -32,6 +32,8 @@
axutil_array_list_t *module_list;
/** parameter container to hold service related parameters */
axutil_param_container_t *param_container;
+ /** base description struct */
+ axis2_desc_t *base;
};
AXIS2_EXTERN axis2_svc_grp_t *AXIS2_CALL
@@ -55,6 +57,7 @@
svc_grp->parent = NULL;
svc_grp->svc_grp_name = NULL;
svc_grp->module_list = NULL;
+ svc_grp->base = NULL;
svc_grp->param_container = axutil_param_container_create(env);
if (!svc_grp->param_container)
@@ -87,6 +90,13 @@
AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
return NULL;
}
+
+ svc_grp->base = axis2_desc_create(env);
+ if (!svc_grp->base)
+ {
+ axis2_svc_grp_free(svc_grp, env);
+ return NULL;
+ }
return svc_grp;
}
@@ -104,6 +114,10 @@
svc_grp = (axis2_svc_grp_t *) axis2_svc_grp_create(env);
if (svc_grp)
svc_grp->parent = conf;
+ if (conf)
+ {
+ axis2_desc_set_parent(svc_grp->base, env, axis2_conf_get_base(conf, env));
+ }
return svc_grp;
@@ -143,6 +157,11 @@
axutil_array_list_free(svc_grp->module_list, env);
}
+ if (svc_grp->base)
+ {
+ axis2_desc_free(svc_grp->base, env);
+ }
+
if (svc_grp)
{
AXIS2_FREE(env->allocator, svc_grp);
@@ -410,6 +429,10 @@
if (svc_grp->parent)
axis2_conf_free(svc_grp->parent, env);
svc_grp->parent = parent;
+ if (parent)
+ {
+ axis2_desc_set_parent(svc_grp->base, env, axis2_conf_get_base(parent, env));
+ }
return AXIS2_SUCCESS;
}
@@ -559,4 +582,10 @@
return svc_grp->param_container;
}
+AXIS2_EXTERN axis2_desc_t *AXIS2_CALL
+axis2_svc_grp_get_base(const axis2_svc_grp_t *svc_grp,
+ const axutil_env_t *env)
+{
+ return svc_grp->base;
+}
Modified: webservices/axis2/scratch/c/dinesh/602/c/src/core/engine/Makefile.am
URL: http://svn.apache.org/viewvc/webservices/axis2/scratch/c/dinesh/602/c/src/core/engine/Makefile.am?view=diff&rev=556666&r1=556665&r2=556666
==============================================================================
--- webservices/axis2/scratch/c/dinesh/602/c/src/core/engine/Makefile.am (original)
+++ webservices/axis2/scratch/c/dinesh/602/c/src/core/engine/Makefile.am Mon Jul 16 09:42:53 2007
@@ -20,11 +20,12 @@
$(top_builddir)/src/core/clientapi/libaxis2_clientapi.la \
$(top_builddir)/src/core/phaseresolver/libaxis2_phaseresolver.la \
$(top_builddir)/src/core/util/libaxis2_core_utils.la \
- $(top_builddir)/src/core/transport/http/common/libaxis2_http_common.la \
- $(top_builddir)/src/core/transport/http/util/libaxis2_http_util.la \
$(top_builddir)/util/src/libaxutil.la \
+ $(top_builddir)/neethi/src/libneethi.la \
$(top_builddir)/axiom/src/om/libaxis2_axiom.la
+libaxis2_engine_la_LDFLAGS = -version-info $(VERSION_NO)
+
INCLUDES = -I$(top_builddir)/include \
-I$(top_builddir)/src/wsdl \
-I$(top_builddir)/src/core/description \
@@ -35,6 +36,7 @@
-I$(top_builddir)/src/core/util \
-I$(top_builddir)/src/core/clientapi \
-I$(top_builddir)/util/include \
+ -I$(top_builddir)/neethi/include \
-I$(top_builddir)/axiom/include
EXTRA_DIST=axis2_disp_checker.h
Modified: webservices/axis2/scratch/c/dinesh/602/c/src/core/engine/conf.c
URL: http://svn.apache.org/viewvc/webservices/axis2/scratch/c/dinesh/602/c/src/core/engine/conf.c?view=diff&rev=556666&r1=556665&r2=556666
==============================================================================
--- webservices/axis2/scratch/c/dinesh/602/c/src/core/engine/conf.c (original)
+++ webservices/axis2/scratch/c/dinesh/602/c/src/core/engine/conf.c Mon Jul 16 09:42:53 2007
@@ -44,6 +44,7 @@
axutil_array_list_t *in_phases_upto_and_including_post_dispatch;
axis2_phases_info_t *phases_info;
axutil_hash_t *all_svcs;
+ axutil_hash_t *all_init_svcs;
axutil_hash_t *msg_recvs;
axutil_hash_t *faulty_svcs;
axutil_hash_t *faulty_modules;
@@ -55,6 +56,11 @@
axis2_bool_t enable_security;
/** configuration parameter container */
axutil_param_container_t *param_container;
+ /** base description struct */
+ axis2_desc_t *base;
+
+ /* this is a hack to keep rampart_context at client side*/
+ void *security_context;
};
AXIS2_EXTERN axis2_conf_t *AXIS2_CALL
@@ -86,6 +92,7 @@
conf->out_fault_phases = NULL;
conf->phases_info = NULL;
conf->all_svcs = NULL;
+ conf->all_init_svcs = NULL;
conf->msg_recvs = NULL;
conf->faulty_svcs = NULL;
conf->faulty_modules = NULL;
@@ -96,6 +103,8 @@
conf->handlers = NULL;
conf->enable_mtom = AXIS2_FALSE;
conf->enable_security = AXIS2_FALSE;
+ conf->base = NULL;
+ conf->security_context = NULL;
conf->param_container = (axutil_param_container_t *)
axutil_param_container_create(env);
@@ -151,6 +160,7 @@
else
{
axis2_disp_t *uri_dispatch = NULL;
+ axis2_disp_t *add_dispatch = NULL;
phase = axis2_phase_create(env, AXIS2_PHASE_TRANSPORT_IN);
if (! phase)
@@ -163,14 +173,22 @@
uri_dispatch = axis2_req_uri_disp_create(env);
if (uri_dispatch)
{
- axis2_handler_t *handler = NULL;
- handler = axis2_disp_get_base(uri_dispatch, env);
- axis2_disp_free(uri_dispatch, env);
- axis2_phase_add_handler_at(phase, env, 0, handler);
- axutil_array_list_add(conf->handlers, env, axis2_handler_get_handler_desc(handler, env));
- handler = NULL;
+ axis2_handler_t *handler = NULL;
+ handler = axis2_disp_get_base(uri_dispatch, env);
+ axis2_disp_free(uri_dispatch, env);
+ axis2_phase_add_handler_at(phase, env, 0, handler);
+ axutil_array_list_add(conf->handlers, env, axis2_handler_get_handler_desc(handler, env));
+ }
+
+ add_dispatch = axis2_addr_disp_create(env);
+ if (add_dispatch)
+ {
+ axis2_handler_t *handler = NULL;
+ handler = axis2_disp_get_base(add_dispatch, env);
+ axis2_disp_free(add_dispatch, env);
+ axis2_phase_add_handler_at(phase, env, 1, handler);
+ axutil_array_list_add(conf->handlers, env, axis2_handler_get_handler_desc(handler, env));
}
-
status = axutil_array_list_add(conf->
in_phases_upto_and_including_post_dispatch, env, phase);
if (AXIS2_FAILURE == status)
@@ -205,6 +223,14 @@
return NULL;
}
+ conf->all_init_svcs = axutil_hash_make(env);
+ if (! conf->all_init_svcs)
+ {
+ axis2_conf_free(conf, env);
+ AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
+ return NULL;
+ }
+
conf->msg_recvs = axutil_hash_make(env);
if (! conf->msg_recvs)
{
@@ -245,6 +271,13 @@
return NULL;
}
+ conf->base = axis2_desc_create(env);
+ if (!conf->base)
+ {
+ axis2_conf_free(conf, env);
+ return NULL;
+ }
+
return conf;
}
@@ -409,6 +442,11 @@
{
axutil_hash_free(conf->all_svcs, env);
}
+
+ if (conf->all_init_svcs)
+ {
+ axutil_hash_free(conf->all_init_svcs, env);
+ }
if (conf->msg_recvs)
{
@@ -469,6 +507,11 @@
{
AXIS2_FREE(env->allocator, conf->axis2_repo);
}
+
+ if (conf->base)
+ {
+ axis2_desc_free(conf->base, env);
+ }
if (conf)
{
@@ -937,6 +980,51 @@
return conf->all_svcs;
}
+AXIS2_EXTERN axutil_hash_t *AXIS2_CALL
+axis2_conf_get_all_svcs_to_load(
+ const axis2_conf_t *conf,
+ const axutil_env_t *env)
+{
+ axutil_hash_t *sgs = NULL;
+ axutil_hash_index_t *index_i = NULL;
+ axutil_hash_index_t *index_j = NULL;
+ void *value = NULL;
+ void *value2 = NULL;
+ axis2_svc_grp_t *axis_svc_grp = NULL;
+ axutil_hash_t *svcs = NULL;
+ axis2_svc_t *svc = NULL;
+ axis2_char_t *svc_name = NULL;
+
+ AXIS2_ENV_CHECK(env, NULL);
+
+ sgs = axis2_conf_get_all_svc_grps(conf, env);
+ index_i = axutil_hash_first(sgs, env);
+ while (index_i)
+ {
+ axutil_hash_this(index_i, NULL, NULL, &value);
+ axis_svc_grp = (axis2_svc_grp_t *) value;
+ svcs = axis2_svc_grp_get_all_svcs(axis_svc_grp, env);
+ index_j = axutil_hash_first(svcs, env);
+ while (index_j)
+ {
+ axutil_param_t *param = NULL;
+ axutil_hash_this(index_j, NULL, NULL, &value2);
+ svc = (axis2_svc_t *) value2;
+ svc_name =
+ axutil_qname_get_localpart(axis2_svc_get_qname(svc, env), env);
+ param = axis2_svc_get_param(svc, env, AXIS2_LOAD_SVC_STARTUP);
+ if(param)
+ axutil_hash_set(conf->all_init_svcs, svc_name,
+ AXIS2_HASH_KEY_STRING, svc);
+
+ index_j = axutil_hash_next(env, index_j);
+ }
+
+ index_i = axutil_hash_next(env, index_i);
+ }
+ return conf->all_init_svcs;
+}
+
AXIS2_EXTERN axis2_bool_t AXIS2_CALL
axis2_conf_is_engaged(
axis2_conf_t *conf,
@@ -1141,7 +1229,6 @@
{
axis2_phase_t *dispatch = NULL;
axis2_status_t status = AXIS2_FAILURE;
- axis2_disp_t *add_dispatch = NULL;
axis2_disp_t *soap_action_based_dispatch = NULL;
axis2_disp_t *soap_msg_body_based_dispatch = NULL;
axis2_handler_t *handler = NULL;
@@ -1167,18 +1254,7 @@
axis2_phase_add_handler_at(dispatch, env, 0, handler);
axutil_array_list_add(conf->handlers, env, axis2_handler_get_handler_desc(handler, env));
- add_dispatch = axis2_addr_disp_create(env);
- if (!add_dispatch)
- {
- axis2_phase_free(dispatch, env);
- return AXIS2_FAILURE;
- }
-
- handler = axis2_disp_get_base(add_dispatch, env);
- axis2_disp_free(add_dispatch, env);
- axis2_phase_add_handler_at(dispatch, env, 1, handler);
- axutil_array_list_add(conf->handlers, env, axis2_handler_get_handler_desc(handler, env));
-
+
soap_action_based_dispatch = axiom_soap_action_disp_create(env);
if (!soap_action_based_dispatch)
{
@@ -1583,6 +1659,28 @@
return AXIS2_SUCCESS;
}
+AXIS2_EXTERN void* AXIS2_CALL
+axis2_conf_get_security_context(
+ axis2_conf_t *conf,
+ const axutil_env_t *env)
+{
+ return conf->security_context;
+}
+
+AXIS2_EXTERN axis2_status_t AXIS2_CALL
+axis2_conf_set_security_context(
+ axis2_conf_t *conf,
+ const axutil_env_t *env,
+ void* security_context)
+{
+ AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+ AXIS2_PARAM_CHECK(env->error, conf, AXIS2_FAILURE);
+
+ conf->security_context = (void *)security_context;
+ return AXIS2_SUCCESS;
+}
+
+
AXIS2_EXTERN axutil_param_container_t *AXIS2_CALL
axis2_conf_get_param_container(const axis2_conf_t *conf,
const axutil_env_t *env)
@@ -1590,3 +1688,9 @@
return conf->param_container;
}
+AXIS2_EXTERN axis2_desc_t *AXIS2_CALL
+axis2_conf_get_base(const axis2_conf_t *conf,
+ const axutil_env_t *env)
+{
+ return conf->base;
+}
Modified: webservices/axis2/scratch/c/dinesh/602/c/src/core/engine/soap_body_disp.c
URL: http://svn.apache.org/viewvc/webservices/axis2/scratch/c/dinesh/602/c/src/core/engine/soap_body_disp.c?view=diff&rev=556666&r1=556665&r2=556666
==============================================================================
--- webservices/axis2/scratch/c/dinesh/602/c/src/core/engine/soap_body_disp.c (original)
+++ webservices/axis2/scratch/c/dinesh/602/c/src/core/engine/soap_body_disp.c Mon Jul 16 09:42:53 2007
@@ -123,11 +123,11 @@
if (uri)
{
axis2_char_t **url_tokens = NULL;
- AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI,
- "Checking for service \
- using SOAP message body's\
- first child's namespace \
- URI : %s",uri);
+ AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI,
+ "Checking for service "
+ "using SOAP message body's "
+ "first child's namespace "
+ "URI : %s",uri);
url_tokens =
axutil_parse_request_url_for_svc_and_op(
Modified: webservices/axis2/scratch/c/dinesh/602/c/src/core/phaseresolver/phase_resolver.c
URL: http://svn.apache.org/viewvc/webservices/axis2/scratch/c/dinesh/602/c/src/core/phaseresolver/phase_resolver.c?view=diff&rev=556666&r1=556665&r2=556666
==============================================================================
--- webservices/axis2/scratch/c/dinesh/602/c/src/core/phaseresolver/phase_resolver.c (original)
+++ webservices/axis2/scratch/c/dinesh/602/c/src/core/phaseresolver/phase_resolver.c Mon Jul 16 09:42:53 2007
@@ -321,10 +321,10 @@
}
else
{
- AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI, "This handler is\
- trying to added to system pre defined phases , but those\
- handlers are already added to global chain which run\
- irrespective of the service");
+ AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI, "This handler is"
+ " trying to added to system pre defined phases , but those"
+ " handlers are already added to global chain which run"
+ " irrespective of the service");
}
}
}
Modified: webservices/axis2/scratch/c/dinesh/602/c/src/core/receivers/msg_recv.c
URL: http://svn.apache.org/viewvc/webservices/axis2/scratch/c/dinesh/602/c/src/core/receivers/msg_recv.c?view=diff&rev=556666&r1=556665&r2=556666
==============================================================================
--- webservices/axis2/scratch/c/dinesh/602/c/src/core/receivers/msg_recv.c (original)
+++ webservices/axis2/scratch/c/dinesh/602/c/src/core/receivers/msg_recv.c Mon Jul 16 09:42:53 2007
@@ -154,7 +154,10 @@
impl_class = axutil_class_loader_create_dll(env, impl_info_param);
axis2_svc_set_impl_class(svc, env, impl_class);
- AXIS2_SVC_SKELETON_INIT((axis2_svc_skeleton_t *)impl_class, env);
+ if (impl_class)
+ {
+ AXIS2_SVC_SKELETON_INIT((axis2_svc_skeleton_t *)impl_class, env);
+ }
axutil_allocator_switch_to_local_pool(env->allocator);
Modified: webservices/axis2/scratch/c/dinesh/602/c/src/core/transport/Makefile.am
URL: http://svn.apache.org/viewvc/webservices/axis2/scratch/c/dinesh/602/c/src/core/transport/Makefile.am?view=diff&rev=556666&r1=556665&r2=556666
==============================================================================
--- webservices/axis2/scratch/c/dinesh/602/c/src/core/transport/Makefile.am (original)
+++ webservices/axis2/scratch/c/dinesh/602/c/src/core/transport/Makefile.am Mon Jul 16 09:42:53 2007
@@ -1 +1,2 @@
-SUBDIRS = http
+SUBDIRS=http
+EXTRA_DIST=Makefile.am
Modified: webservices/axis2/scratch/c/dinesh/602/c/src/core/transport/http/common/Makefile.am
URL: http://svn.apache.org/viewvc/webservices/axis2/scratch/c/dinesh/602/c/src/core/transport/http/common/Makefile.am?view=diff&rev=556666&r1=556665&r2=556666
==============================================================================
--- webservices/axis2/scratch/c/dinesh/602/c/src/core/transport/http/common/Makefile.am (original)
+++ webservices/axis2/scratch/c/dinesh/602/c/src/core/transport/http/common/Makefile.am Mon Jul 16 09:42:53 2007
@@ -14,6 +14,8 @@
http_worker.c
+libaxis2_http_common_la_LDFLAGS = -version-info $(VERSION_NO)
+
INCLUDES = -I$(top_builddir)/include \
-I$(top_builddir)/src/core/transport\
-I$(top_builddir)/src/core/transport/http \
Modified: webservices/axis2/scratch/c/dinesh/602/c/src/core/transport/http/common/http_worker.c
URL: http://svn.apache.org/viewvc/webservices/axis2/scratch/c/dinesh/602/c/src/core/transport/http/common/http_worker.c?view=diff&rev=556666&r1=556665&r2=556666
==============================================================================
--- webservices/axis2/scratch/c/dinesh/602/c/src/core/transport/http/common/http_worker.c (original)
+++ webservices/axis2/scratch/c/dinesh/602/c/src/core/transport/http/common/http_worker.c Mon Jul 16 09:42:53 2007
@@ -261,6 +261,7 @@
if (AXIS2_FALSE == processed)
{
axis2_http_header_t *cont_len = NULL;
+ axis2_http_header_t *cont_type = NULL;
axis2_char_t *body_string = NULL;
axis2_char_t *wsdl = NULL;
axis2_http_simple_response_set_status_line(response, env,
@@ -268,7 +269,8 @@
wsdl = strstr (url_external_form, AXIS2_REQUEST_WSDL);
if (wsdl)
{
- body_string = axis2_http_transport_utils_get_services_static_wsdl(env, conf_ctx, url_external_form);
+ body_string = axis2_http_transport_utils_get_services_static_wsdl(
+ env, conf_ctx, url_external_form);
}
else
{
@@ -284,7 +286,10 @@
cont_len = axis2_http_header_create(env,
AXIS2_HTTP_HEADER_CONTENT_LENGTH, str_len);
axis2_http_simple_response_set_header(response, env, cont_len);
- }
+ cont_type = axis2_http_header_create(env,
+ AXIS2_HTTP_HEADER_CONTENT_TYPE, AXIS2_HTTP_HEADER_ACCEPT_TEXT_HTML);
+ axis2_http_simple_response_set_header(response, env, cont_type);
+ }
axis2_http_worker_set_response_headers(http_worker, env, svr_conn,
simple_request, response, 0);
axis2_simple_http_svr_conn_write_response(svr_conn, env, response);
Modified: webservices/axis2/scratch/c/dinesh/602/c/src/core/transport/http/receiver/Makefile.am
URL: http://svn.apache.org/viewvc/webservices/axis2/scratch/c/dinesh/602/c/src/core/transport/http/receiver/Makefile.am?view=diff&rev=556666&r1=556665&r2=556666
==============================================================================
--- webservices/axis2/scratch/c/dinesh/602/c/src/core/transport/http/receiver/Makefile.am (original)
+++ webservices/axis2/scratch/c/dinesh/602/c/src/core/transport/http/receiver/Makefile.am Mon Jul 16 09:42:53 2007
@@ -7,6 +7,8 @@
http_svr_thread.c
+libaxis2_http_receiver_la_LDFLAGS = -version-info $(VERSION_NO)
+
INCLUDES = -I$(top_builddir)/include \
-I$(top_builddir)/src/core/transport\
-I$(top_builddir)/src/core/transport/http \
Modified: webservices/axis2/scratch/c/dinesh/602/c/src/core/transport/http/receiver/http_svr_thread.c
URL: http://svn.apache.org/viewvc/webservices/axis2/scratch/c/dinesh/602/c/src/core/transport/http/receiver/http_svr_thread.c?view=diff&rev=556666&r1=556665&r2=556666
==============================================================================
--- webservices/axis2/scratch/c/dinesh/602/c/src/core/transport/http/receiver/http_svr_thread.c (original)
+++ webservices/axis2/scratch/c/dinesh/602/c/src/core/transport/http/receiver/http_svr_thread.c Mon Jul 16 09:42:53 2007
@@ -28,6 +28,8 @@
#include <axiom_xml_reader.h>
#include <signal.h>
+AXIS2_EXPORT int axis2_http_socket_read_timeout = AXIS2_HTTP_DEFAULT_SO_TIMEOUT;
+
struct axis2_http_svr_thread
{
int listen_socket;
@@ -292,12 +294,13 @@
if (thread_env)
{
- /*axutil_free_thread_env(thread_env);*/
+ axutil_free_thread_env(thread_env);
thread_env = NULL;
}
#ifdef AXIS2_SVR_MULTI_THREADED
- /*axutil_thread_pool_exit_thread(env->thread_pool, thd);*/
+ axutil_thread_pool_exit_thread(env->thread_pool, thd);
#endif
return NULL;
}
+
Modified: webservices/axis2/scratch/c/dinesh/602/c/src/core/transport/http/sender/Makefile.am
URL: http://svn.apache.org/viewvc/webservices/axis2/scratch/c/dinesh/602/c/src/core/transport/http/sender/Makefile.am?view=diff&rev=556666&r1=556665&r2=556666
==============================================================================
--- webservices/axis2/scratch/c/dinesh/602/c/src/core/transport/http/sender/Makefile.am (original)
+++ webservices/axis2/scratch/c/dinesh/602/c/src/core/transport/http/sender/Makefile.am Mon Jul 16 09:42:53 2007
@@ -1,34 +1,42 @@
SUBDIRS=ssl libcurl
lib_LTLIBRARIES = libaxis2_http_sender.la
-libaxis2_http_sender_la_SOURCES = http_transport_sender.c\
- http_sender.c\
- http_client.c
-libaxis2_http_sender_la_LIBADD = $(top_builddir)/src/core/transport/http/common/libaxis2_http_common.la\
- $(top_builddir)/src/core/transport/http/util/libaxis2_http_util.la\
- $(top_builddir)/axiom/src/om/libaxis2_axiom.la\
- $(top_builddir)/util/src/libaxutil.la
if AXIS2_LIBCURL_ENABLED
-libaxis2_http_sender_la_SOURCES +=libcurl/axis2_libcurl.c\
- libcurl/libcurl_stream.c
-
-libaxis2_http_sender_la_LIBADD +=-lssl\
- -lcrypto\
- -lcurl\
- -ldl\
- -lz
+LIBCURL_SOURCES=libcurl/axis2_libcurl.c\
+ libcurl/libcurl_stream.c
+LIBCURL_LIBS=-lssl -lcrypto -lcurl -ldl -lz
+else
+LIBCURL_SOURCES=
+LIBCURL_LIBS=
endif
if AXIS2_SSL_ENABLED
-libaxis2_http_sender_la_SOURCES += ssl/ssl_stream.c\
- ssl/ssl_utils.c
-libaxis2_http_sender_la_LIBADD += -lssl\
- -lcrypto
+SSL_SOURCES = ssl/ssl_stream.c\
+ ssl/ssl_utils.c
+SSL_LIBS = -lssl -lcrypto
+else
+SSL_SOURCES=
+SSL_LIBS=
endif
+libaxis2_http_sender_la_SOURCES = http_transport_sender.c \
+ http_sender.c \
+ http_client.c \
+ $(SSL_SOURCES) \
+ $(LIBCURL_SOURCES)
+
+libaxis2_http_sender_la_LIBADD = $(top_builddir)/src/core/transport/http/common/libaxis2_http_common.la\
+ $(top_builddir)/src/core/transport/http/util/libaxis2_http_util.la\
+ $(top_builddir)/axiom/src/om/libaxis2_axiom.la\
+ $(top_builddir)/util/src/libaxutil.la\
+ $(LIBCURL_LIBS)\
+ $(SSL_LIBS)
+
+
+libaxis2_http_sender_la_LDFLAGS = -version-info $(VERSION_NO)
INCLUDES = -I$(top_builddir)/include \
-I$(top_builddir)/src/core/transport\
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-cvs-help@ws.apache.org