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/02/07 11:24:12 UTC
svn commit: r504489 - in /webservices/axis2/scratch/c/dinesh/486/c: include/
modules/core/clientapi/ modules/core/context/ modules/core/engine/
modules/core/transport/http/sender/
Author: dinesh
Date: Wed Feb 7 02:24:11 2007
New Revision: 504489
URL: http://svn.apache.org/viewvc?view=rev&rev=504489
Log:
fixed:axis2c-525, removed engine depandancies on http transport
Modified:
webservices/axis2/scratch/c/dinesh/486/c/include/axis2_msg_ctx.h
webservices/axis2/scratch/c/dinesh/486/c/modules/core/clientapi/mep_client.c
webservices/axis2/scratch/c/dinesh/486/c/modules/core/context/msg_ctx.c
webservices/axis2/scratch/c/dinesh/486/c/modules/core/engine/Makefile.am
webservices/axis2/scratch/c/dinesh/486/c/modules/core/transport/http/sender/Makefile.am
webservices/axis2/scratch/c/dinesh/486/c/modules/core/transport/http/sender/http_transport_sender.c
Modified: webservices/axis2/scratch/c/dinesh/486/c/include/axis2_msg_ctx.h
URL: http://svn.apache.org/viewvc/webservices/axis2/scratch/c/dinesh/486/c/include/axis2_msg_ctx.h?view=diff&rev=504489&r1=504488&r2=504489
==============================================================================
--- webservices/axis2/scratch/c/dinesh/486/c/include/axis2_msg_ctx.h (original)
+++ webservices/axis2/scratch/c/dinesh/486/c/include/axis2_msg_ctx.h Wed Feb 7 02:24:11 2007
@@ -234,6 +234,11 @@
axis2_msg_ctx_get_soap_envelope(const axis2_msg_ctx_t *msg_ctx,
const axis2_env_t *env);
+
+ AXIS2_EXTERN struct axiom_soap_envelope *AXIS2_CALL
+ axis2_msg_ctx_get_response_soap_envelope(const axis2_msg_ctx_t *msg_ctx,
+ const axis2_env_t *env);
+
/**
* Gets fault SOAP envelope.
* @param msg_ctx message context
@@ -390,6 +395,12 @@
const axis2_env_t *env,
struct axiom_soap_envelope *soap_envelope);
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_msg_ctx_set_response_soap_envelope(axis2_msg_ctx_t *msg_ctx,
+ const axis2_env_t *env,
+ struct axiom_soap_envelope *soap_envelope);
+
+
/**
* Sets fault SOAP envelope.
* @param msg_ctx message context
@@ -1429,6 +1440,9 @@
#define AXIS2_MSG_CTX_GET_SOAP_ENVELOPE(msg_ctx, env) \
axis2_msg_ctx_get_soap_envelope(msg_ctx, env)
+#define AXIS2_MSG_CTX_GET_RESPONSE_SOAP_ENVELOPE(msg_ctx, env) \
+ axis2_msg_ctx_get_response_soap_envelope(msg_ctx, env)
+
/** Gets fault SOAP envelope. */
#define AXIS2_MSG_CTX_GET_FAULT_SOAP_ENVELOPE(msg_ctx, env) \
axis2_msg_ctx_get_fault_soap_envelope(msg_ctx, env)
@@ -1481,6 +1495,10 @@
/** Sets SOAP envelope. */
#define AXIS2_MSG_CTX_SET_SOAP_ENVELOPE(msg_ctx, env, soap_envelope) \
axis2_msg_ctx_set_soap_envelope(msg_ctx, env, soap_envelope)
+
+#define AXIS2_MSG_CTX_SET_RESPONSE_SOAP_ENVELOPE(msg_ctx, env, soap_envelope) \
+ axis2_msg_ctx_set_response_soap_envelope(msg_ctx, env, soap_envelope)
+
/** Sats fault SOAP envelope. */
#define AXIS2_MSG_CTX_SET_FAULT_SOAP_ENVELOPE(msg_ctx, env, soap_envelope) \
Modified: webservices/axis2/scratch/c/dinesh/486/c/modules/core/clientapi/mep_client.c
URL: http://svn.apache.org/viewvc/webservices/axis2/scratch/c/dinesh/486/c/modules/core/clientapi/mep_client.c?view=diff&rev=504489&r1=504488&r2=504489
==============================================================================
--- webservices/axis2/scratch/c/dinesh/486/c/modules/core/clientapi/mep_client.c (original)
+++ webservices/axis2/scratch/c/dinesh/486/c/modules/core/clientapi/mep_client.c Wed Feb 7 02:24:11 2007
@@ -675,11 +675,8 @@
/* 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));
- soap_ns_uri = AXIS2_MSG_CTX_GET_IS_SOAP_11(msg_ctx, env) ?
- 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);
+ /* set response envelope */
+ 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);
@@ -771,11 +768,7 @@
/* 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));
- soap_ns_uri = AXIS2_MSG_CTX_GET_IS_SOAP_11(msg_ctx, env) ?
- 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);
+ 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);
Modified: webservices/axis2/scratch/c/dinesh/486/c/modules/core/context/msg_ctx.c
URL: http://svn.apache.org/viewvc/webservices/axis2/scratch/c/dinesh/486/c/modules/core/context/msg_ctx.c?view=diff&rev=504489&r1=504488&r2=504489
==============================================================================
--- webservices/axis2/scratch/c/dinesh/486/c/modules/core/context/msg_ctx.c (original)
+++ webservices/axis2/scratch/c/dinesh/486/c/modules/core/context/msg_ctx.c Wed Feb 7 02:24:11 2007
@@ -61,6 +61,8 @@
/** SOAP envelope */
axiom_soap_envelope_t *soap_envelope;
+ /** Response SOAP envelope */
+ axiom_soap_envelope_t *response_soap_envelope;
/** SOAP Fault envelope */
axiom_soap_envelope_t *fault_soap_envelope;
/** response written? */
@@ -331,7 +333,7 @@
if (msg_ctx->soap_envelope)
{
- AXIOM_SOAP_ENVELOPE_FREE(msg_ctx->soap_envelope, env);
+/* AXIOM_SOAP_ENVELOPE_FREE(msg_ctx->soap_envelope, env); */
msg_ctx->soap_envelope = NULL;
}
@@ -448,6 +450,15 @@
}
axiom_soap_envelope_t *AXIS2_CALL
+axis2_msg_ctx_get_response_soap_envelope(
+ const axis2_msg_ctx_t *msg_ctx,
+ const axis2_env_t *env)
+{
+ AXIS2_ENV_CHECK(env, NULL);
+ return msg_ctx->response_soap_envelope;
+}
+
+axiom_soap_envelope_t *AXIS2_CALL
axis2_msg_ctx_get_fault_soap_envelope(
const axis2_msg_ctx_t *msg_ctx,
const axis2_env_t *env)
@@ -628,6 +639,28 @@
msg_ctx->soap_envelope = NULL;
}
+ return AXIS2_SUCCESS;
+}
+
+
+axis2_status_t AXIS2_CALL
+axis2_msg_ctx_set_response_soap_envelope(
+ struct axis2_msg_ctx *msg_ctx,
+ const axis2_env_t *env,
+ axiom_soap_envelope_t *soap_envelope)
+{
+ AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+
+ if (soap_envelope)
+ {
+ int soap_v = AXIOM_SOAP12;
+ soap_v = AXIOM_SOAP_ENVELOPE_GET_SOAP_VERSION(soap_envelope, env);
+ msg_ctx->response_soap_envelope = soap_envelope;
+ }
+ else
+ {
+ msg_ctx->response_soap_envelope = NULL;
+ }
return AXIS2_SUCCESS;
}
Modified: webservices/axis2/scratch/c/dinesh/486/c/modules/core/engine/Makefile.am
URL: http://svn.apache.org/viewvc/webservices/axis2/scratch/c/dinesh/486/c/modules/core/engine/Makefile.am?view=diff&rev=504489&r1=504488&r2=504489
==============================================================================
--- webservices/axis2/scratch/c/dinesh/486/c/modules/core/engine/Makefile.am (original)
+++ webservices/axis2/scratch/c/dinesh/486/c/modules/core/engine/Makefile.am Wed Feb 7 02:24:11 2007
@@ -22,7 +22,6 @@
$(top_builddir)/modules/core/clientapi/libaxis2_clientapi.la \
$(top_builddir)/modules/core/phaseresolver/libaxis2_phaseresolver.la \
$(top_builddir)/modules/core/util/libaxis2_core_utils.la \
- $(top_builddir)/modules/core/transport/http/libaxis2_http.la \
$(top_builddir)/util/src/libaxis2_util.la \
$(top_builddir)/axiom/src/om/libaxis2_axiom.la
Modified: webservices/axis2/scratch/c/dinesh/486/c/modules/core/transport/http/sender/Makefile.am
URL: http://svn.apache.org/viewvc/webservices/axis2/scratch/c/dinesh/486/c/modules/core/transport/http/sender/Makefile.am?view=diff&rev=504489&r1=504488&r2=504489
==============================================================================
--- webservices/axis2/scratch/c/dinesh/486/c/modules/core/transport/http/sender/Makefile.am (original)
+++ webservices/axis2/scratch/c/dinesh/486/c/modules/core/transport/http/sender/Makefile.am Wed Feb 7 02:24:11 2007
@@ -6,8 +6,9 @@
http_client.c
libaxis2_http_sender_la_LIBADD = $(top_builddir)/modules/core/engine/libaxis2_engine.la \
- $(top_builddir)/axiom/src/om/libaxis2_axiom.la \
- $(top_builddir)/util/src/libaxis2_util.la
+ $(top_builddir)/modules/core/transport/http/libaxis2_http.la \
+ $(top_builddir)/axiom/src/om/libaxis2_axiom.la \
+ $(top_builddir)/util/src/libaxis2_util.la
if AXIS2_SSL_ENABLED
libaxis2_http_sender_la_SOURCES += ssl/ssl_stream.c\
Modified: webservices/axis2/scratch/c/dinesh/486/c/modules/core/transport/http/sender/http_transport_sender.c
URL: http://svn.apache.org/viewvc/webservices/axis2/scratch/c/dinesh/486/c/modules/core/transport/http/sender/http_transport_sender.c?view=diff&rev=504489&r1=504488&r2=504489
==============================================================================
--- webservices/axis2/scratch/c/dinesh/486/c/modules/core/transport/http/sender/http_transport_sender.c (original)
+++ webservices/axis2/scratch/c/dinesh/486/c/modules/core/transport/http/sender/http_transport_sender.c Wed Feb 7 02:24:11 2007
@@ -339,6 +339,7 @@
/* AXIOM_OUTPUT_SET_DO_OPTIMIZE(om_output, env,
* AXIS2_MSG_CTX_GET_IS_DOING_MTOM(msg_ctx, env);
*/
+
if (AXIS2_TRUE == AXIS2_MSG_CTX_GET_DOING_REST(msg_ctx, env))
{
axiom_node_t *body_node = NULL;
@@ -424,6 +425,8 @@
}
}
+
+
AXIOM_OUTPUT_FREE(om_output, env);
om_output = NULL;
xml_writer = NULL;
@@ -571,6 +574,9 @@
const axis2_char_t *url = NULL;
axis2_soap_over_http_sender_t *sender = NULL;
axis2_status_t status = AXIS2_FAILURE;
+ const axis2_char_t *soap_ns_uri = NULL;
+ axiom_soap_envelope_t *response_envelope = NULL;
+ axis2_op_t *op = NULL;
AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
AXIS2_PARAM_CHECK(env->error, msg_ctx, AXIS2_FAILURE);
@@ -638,12 +644,34 @@
AXIS2_INTF_TO_IMPL(transport_sender)->http_version);
status = AXIS2_SOAP_OVER_HTTP_SENDER_SEND(sender, env, msg_ctx, out, url
, soap_action);
- /*
+
+ /*
* TODO check for errors
*/
AXIS2_SOAP_OVER_HTTP_SENDER_FREE(sender, env);
sender = NULL;
}
+
+ op = AXIS2_MSG_CTX_GET_OP(msg_ctx, env);
+ if (op)
+ {
+ /* handle one way case */
+ const axis2_char_t *mep = AXIS2_OP_GET_MSG_EXCHANGE_PATTERN(op, env);
+ if (AXIS2_STRCMP(mep, AXIS2_MEP_URI_OUT_ONLY) == 0 ||
+ AXIS2_STRCMP(mep, AXIS2_MEP_URI_ROBUST_OUT_ONLY) == 0)
+ {
+ return status;
+ }
+ else
+ {
+ soap_ns_uri = AXIS2_MSG_CTX_GET_IS_SOAP_11(msg_ctx, env) ?
+ 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);
+ }
+ }
+
return status;
}
@@ -677,3 +705,6 @@
}
return status;
}
+
+
+
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-cvs-help@ws.apache.org