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 sa...@apache.org on 2007/02/26 17:40:30 UTC
svn commit: r511883 - in /webservices/axis2/trunk/c: axiom/src/attachments/
include/ modules/core/clientapi/ modules/core/description/
modules/core/transport/http/sender/ util/src/
Author: samisa
Date: Mon Feb 26 08:40:29 2007
New Revision: 511883
URL: http://svn.apache.org/viewvc?view=rev&rev=511883
Log:
Fixed some attachment problems and some module engagement related problems
Modified:
webservices/axis2/trunk/c/axiom/src/attachments/mime_body_part.c
webservices/axis2/trunk/c/include/axis2_const.h
webservices/axis2/trunk/c/modules/core/clientapi/mep_client.c
webservices/axis2/trunk/c/modules/core/description/svc.c
webservices/axis2/trunk/c/modules/core/transport/http/sender/http_transport_sender.c
webservices/axis2/trunk/c/util/src/stream.c
Modified: webservices/axis2/trunk/c/axiom/src/attachments/mime_body_part.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/axiom/src/attachments/mime_body_part.c?view=diff&rev=511883&r1=511882&r2=511883
==============================================================================
--- webservices/axis2/trunk/c/axiom/src/attachments/mime_body_part.c (original)
+++ webservices/axis2/trunk/c/axiom/src/attachments/mime_body_part.c Mon Feb 26 08:40:29 2007
@@ -266,8 +266,8 @@
if (data_handler_stream)
{
memcpy(byte_stream + header_str_size, data_handler_stream, data_handler_stream_size);
- AXIS2_FREE(env->allocator, data_handler_stream);
- data_handler_stream = NULL;
+ /*AXIS2_FREE(env->allocator, data_handler_stream);
+ data_handler_stream = NULL;*/
}
*output_stream = byte_stream;
Modified: webservices/axis2/trunk/c/include/axis2_const.h
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/include/axis2_const.h?view=diff&rev=511883&r1=511882&r2=511883
==============================================================================
--- webservices/axis2/trunk/c/include/axis2_const.h (original)
+++ webservices/axis2/trunk/c/include/axis2_const.h Mon Feb 26 08:40:29 2007
@@ -343,6 +343,7 @@
#define AXIS2_SVC_GRP_ID "ServiceGroupId"
+#define AXIS2_RESPONSE_SOAP_ENVELOPE "Axis2ResponseEnvelope"
#ifdef __cplusplus
}
Modified: webservices/axis2/trunk/c/modules/core/clientapi/mep_client.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/modules/core/clientapi/mep_client.c?view=diff&rev=511883&r1=511882&r2=511883
==============================================================================
--- webservices/axis2/trunk/c/modules/core/clientapi/mep_client.c (original)
+++ webservices/axis2/trunk/c/modules/core/clientapi/mep_client.c Mon Feb 26 08:40:29 2007
@@ -703,8 +703,38 @@
}
else
{
+ int count = 0;
+ while (!response_envelope && count < 5)
+ {
+ count++;
+ sleep(1);
+ axis2_op_ctx_t *op_ctx = AXIS2_MSG_CTX_GET_OP_CTX(msg_ctx, env);
+ axis2_svc_ctx_t *svc_ctx = AXIS2_OP_CTX_GET_PARENT(op_ctx, env);
+ axis2_ctx_t *ctx = AXIS2_SVC_CTX_GET_BASE((const axis2_svc_ctx_t *)svc_ctx, env);
+ axis2_property_t *prop = AXIS2_CTX_GET_PROPERTY(ctx, env, AXIS2_RESPONSE_SOAP_ENVELOPE, AXIS2_FALSE);
+ if (prop)
+ response_envelope = AXIS2_PROPERTY_GET_VALUE(prop, env);
+ if (response_envelope)
+ AXIS2_MSG_CTX_SET_RESPONSE_SOAP_ENVELOPE (msg_ctx, env, response_envelope);
+ }
+
+
/* if it is a two way message, then the status should be in error,
else it is a one way message */
+ if (response_envelope)
+ {
+ AXIS2_MSG_CTX_SET_SOAP_ENVELOPE(response, env, response_envelope);
+ engine = axis2_engine_create(env, conf_ctx);
+ if (engine)
+ {
+ status = AXIS2_ENGINE_RECEIVE(engine, env, response);
+ if (status != AXIS2_SUCCESS)
+ return NULL;
+ }
+ }
+ else
+ {
+
if (AXIS2_ERROR_GET_STATUS_CODE(env->error) != AXIS2_SUCCESS)
{
AXIS2_ERROR_SET(env->error, AXIS2_ERROR_BLOCKING_INVOCATION_EXPECTS_RESPONSE, AXIS2_FAILURE);
@@ -716,6 +746,7 @@
AXIS2_MSG_CTX_FREE(response, env);
return NULL;
}
+ }
}
/* property is NULL, and we set null for AXIS2_TRANSPORT_IN in msg_ctx to
@@ -788,7 +819,9 @@
{
status = AXIS2_ENGINE_RECEIVE(engine, env, response);
if (status != AXIS2_SUCCESS)
+ {
return NULL;
+ }
}
}
Modified: webservices/axis2/trunk/c/modules/core/description/svc.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/modules/core/description/svc.c?view=diff&rev=511883&r1=511882&r2=511883
==============================================================================
--- webservices/axis2/trunk/c/modules/core/description/svc.c (original)
+++ webservices/axis2/trunk/c/modules/core/description/svc.c Mon Feb 26 08:40:29 2007
@@ -1244,7 +1244,10 @@
module_desc);
if (status)
{
+ const axis2_qname_t *qname = NULL;
status = AXIS2_ARRAY_LIST_ADD(svc_impl->engaged_modules, env, module_desc);
+ qname = AXIS2_MODULE_DESC_GET_QNAME(module_desc, env);
+ axis2_svc_add_module_qname(svc, env, qname);
}
if (phase_resolver)
{
Modified: webservices/axis2/trunk/c/modules/core/transport/http/sender/http_transport_sender.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/modules/core/transport/http/sender/http_transport_sender.c?view=diff&rev=511883&r1=511882&r2=511883
==============================================================================
--- webservices/axis2/trunk/c/modules/core/transport/http/sender/http_transport_sender.c (original)
+++ webservices/axis2/trunk/c/modules/core/transport/http/sender/http_transport_sender.c Mon Feb 26 08:40:29 2007
@@ -251,7 +251,8 @@
AXIS2_FAILURE);
AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "%s",
AXIS2_ERROR_GET_MESSAGE(env->error));
- return AXIS2_FAILURE;
+ /*return AXIS2_FAILURE;*/
+ return AXIS2_SUCCESS;
}
xml_writer = axiom_xml_writer_create_for_memory(env, NULL,
AXIS2_TRUE, 0, AXIS2_XML_PARSER_TYPE_BUFFER);
@@ -627,8 +628,11 @@
{
/* handle one way case */
const axis2_char_t *mep = AXIS2_OP_GET_MSG_EXCHANGE_PATTERN(op, env);
+ AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI, "OP name axis2_qname_get_localpart = %s",
+ mep);
if (AXIS2_STRCMP(mep, AXIS2_MEP_URI_OUT_ONLY) == 0 ||
- AXIS2_STRCMP(mep, AXIS2_MEP_URI_ROBUST_OUT_ONLY) == 0)
+ AXIS2_STRCMP(mep, AXIS2_MEP_URI_ROBUST_OUT_ONLY) == 0 ||
+ AXIS2_STRCMP(mep, AXIS2_MEP_URI_IN_ONLY) == 0)
{
return status;
}
@@ -638,7 +642,8 @@
AXIOM_SOAP11_SOAP_ENVELOPE_NAMESPACE_URI : AXIOM_SOAP12_SOAP_ENVELOPE_NAMESPACE_URI;
response_envelope = axis2_http_transport_utils_create_soap_msg(env,
msg_ctx, soap_ns_uri);
- AXIS2_MSG_CTX_SET_RESPONSE_SOAP_ENVELOPE (msg_ctx, env, response_envelope);
+ if (response_envelope)
+ AXIS2_MSG_CTX_SET_RESPONSE_SOAP_ENVELOPE (msg_ctx, env, response_envelope);
}
}
Modified: webservices/axis2/trunk/c/util/src/stream.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/util/src/stream.c?view=diff&rev=511883&r1=511882&r2=511883
==============================================================================
--- webservices/axis2/trunk/c/util/src/stream.c (original)
+++ webservices/axis2/trunk/c/util/src/stream.c Mon Feb 26 08:40:29 2007
@@ -274,6 +274,8 @@
if (NULL == buffer)
return -1;
+ AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI, "[axis2_stream_write_basic] %s %d",(char*)buffer, count);
+
stream_impl = AXIS2_INTF_TO_IMPL(stream);
new_len = stream_impl->len + count;
if (new_len > stream_impl->max_len)
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-cvs-help@ws.apache.org