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 2006/03/28 11:23:11 UTC
svn commit: r389448 - in /webservices/axis2/trunk/c: include/axis2_addr.h
include/axis2_msg_info_headers.h modules/core/addr/msg_info_headers.c
modules/core/transport/http/sender/http_client.c
modules/mod_addr/addr_out_handler.c
Author: samisa
Date: Tue Mar 28 01:23:08 2006
New Revision: 389448
URL: http://svn.apache.org/viewcvs?rev=389448&view=rev
Log:
Fixes to get addressign working properly. These changes are required to get the interop test working with public endpoints
Modified:
webservices/axis2/trunk/c/include/axis2_addr.h
webservices/axis2/trunk/c/include/axis2_msg_info_headers.h
webservices/axis2/trunk/c/modules/core/addr/msg_info_headers.c
webservices/axis2/trunk/c/modules/core/transport/http/sender/http_client.c
webservices/axis2/trunk/c/modules/mod_addr/addr_out_handler.c
Modified: webservices/axis2/trunk/c/include/axis2_addr.h
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/include/axis2_addr.h?rev=389448&r1=389447&r2=389448&view=diff
==============================================================================
--- webservices/axis2/trunk/c/include/axis2_addr.h (original)
+++ webservices/axis2/trunk/c/include/axis2_addr.h Tue Mar 28 01:23:08 2006
@@ -48,6 +48,7 @@
#define AXIS2_WSA_NAMESPACE_SUBMISSION "http://schemas.xmlsoap.org/ws/2004/08/addressing"
#define AXIS2_WSA_RELATES_TO_RELATIONSHIP_TYPE_DEFAULT_VALUE_SUBMISSION "wsa:Reply"
#define AXIS2_WSA_ANONYMOUS_URL_SUBMISSION "http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous"
+ #define AXIS2_WSA_NONE_URL_SUBMISSION "http://schemas.xmlsoap.org/ws/2004/08/addressing/role/none"
#define EPR_REFERENCE_PROPERTIES "ReferenceProperties"
#define EPR_PORT_TYPE "PortType"
@@ -57,6 +58,7 @@
#define AXIS2_WSA_NAMESPACE "http://www.w3.org/2005/08/addressing"
#define AXIS2_WSA_RELATES_TO_RELATIONSHIP_TYPE_DEFAULT_VALUE "http://www.w3.org/2005/08/addressing/reply"
#define AXIS2_WSA_ANONYMOUS_URL "http://www.w3.org/2005/08/addressing/anonymous"
+ #define AXIS2_WSA_NONE_URL "http://www.w3.org/2005/08/addressing/none"
#define AXIS2_WSA_IS_REFERENCE_PARAMETER_ATTRIBUTE "IsReferenceParameter"
#define AXIS2_WSA_TYPE_ATTRIBUTE_VALUE "true"
Modified: webservices/axis2/trunk/c/include/axis2_msg_info_headers.h
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/include/axis2_msg_info_headers.h?rev=389448&r1=389447&r2=389448&view=diff
==============================================================================
--- webservices/axis2/trunk/c/include/axis2_msg_info_headers.h (original)
+++ webservices/axis2/trunk/c/include/axis2_msg_info_headers.h Tue Mar 28 01:23:08 2006
@@ -85,8 +85,9 @@
set_from)(struct axis2_msg_info_headers *msg_info_headers,
axis2_env_t **env,
axis2_endpoint_ref_t *from);
+
/**
- * Method getReply_to
+ * Method get_reply_to
*
* @return
*/
@@ -102,6 +103,23 @@
set_reply_to)(struct axis2_msg_info_headers *msg_info_headers,
axis2_env_t **env,
axis2_endpoint_ref_t *reply_to);
+
+ axis2_status_t (AXIS2_CALL *
+ set_reply_to_none)(struct axis2_msg_info_headers *msg_info_headers,
+ axis2_env_t **env, axis2_bool_t none);
+
+ axis2_bool_t (AXIS2_CALL *
+ get_reply_to_none)(struct axis2_msg_info_headers *msg_info_headers,
+ axis2_env_t **env);
+
+ axis2_status_t (AXIS2_CALL *
+ set_reply_to_anonymous)(struct axis2_msg_info_headers *msg_info_headers,
+ axis2_env_t **env, axis2_bool_t anonymous);
+
+ axis2_bool_t (AXIS2_CALL *
+ get_reply_to_anonymous)(struct axis2_msg_info_headers *msg_info_headers,
+ axis2_env_t **env);
+
/**
* Method getFault_to
*
@@ -119,6 +137,23 @@
set_fault_to)(struct axis2_msg_info_headers *msg_info_headers,
axis2_env_t **env,
axis2_endpoint_ref_t *fault_to);
+
+ axis2_status_t (AXIS2_CALL *
+ set_fault_to_none)(struct axis2_msg_info_headers *msg_info_headers,
+ axis2_env_t **env, axis2_bool_t none);
+
+ axis2_bool_t (AXIS2_CALL *
+ get_fault_to_none)(struct axis2_msg_info_headers *msg_info_headers,
+ axis2_env_t **env);
+
+ axis2_status_t (AXIS2_CALL *
+ set_fault_to_anonymous)(struct axis2_msg_info_headers *msg_info_headers,
+ axis2_env_t **env, axis2_bool_t anonymous);
+
+ axis2_bool_t (AXIS2_CALL *
+ get_fault_to_anonymous)(struct axis2_msg_info_headers *msg_info_headers,
+ axis2_env_t **env);
+
/**
* Method get_action
*
@@ -227,12 +262,36 @@
#define AXIS2_MSG_INFO_HEADERS_SET_REPLY_TO(msg_info_headers, env, reply_to) \
((msg_info_headers)->ops->set_reply_to(msg_info_headers, env, reply_to))
+#define AXIS2_MSG_INFO_HEADERS_SET_REPLY_TO_NONE(msg_info_headers, env, none) \
+ ((msg_info_headers)->ops->set_reply_to_none(msg_info_headers, env, none))
+
+#define AXIS2_MSG_INFO_HEADERS_GET_REPLY_TO_NONE(msg_info_headers, env) \
+ ((msg_info_headers)->ops->get_reply_to_none(msg_info_headers, env))
+
+#define AXIS2_MSG_INFO_HEADERS_SET_REPLY_TO_ANONYMOUS(msg_info_headers, env, anonymous) \
+ ((msg_info_headers)->ops->set_reply_to_anonymous(msg_info_headers, env, anonymous))
+
+#define AXIS2_MSG_INFO_HEADERS_GET_REPLY_TO_ANONYMOUS(msg_info_headers, env) \
+ ((msg_info_headers)->ops->get_reply_to_anonymous(msg_info_headers, env))
+
#define AXIS2_MSG_INFO_HEADERS_GET_FAULT_TO(msg_info_headers, env) \
((msg_info_headers)->ops->get_fault_to(msg_info_headers, env))
#define AXIS2_MSG_INFO_HEADERS_SET_FAULT_TO(msg_info_headers, env, fault_to) \
((msg_info_headers)->ops->set_fault_to(msg_info_headers, env, fault_to))
+#define AXIS2_MSG_INFO_HEADERS_SET_FAULT_TO_NONE(msg_info_headers, env, none) \
+ ((msg_info_headers)->ops->set_fault_to_none(msg_info_headers, env, none))
+
+#define AXIS2_MSG_INFO_HEADERS_GET_FAULT_TO_NONE(msg_info_headers, env) \
+ ((msg_info_headers)->ops->get_fault_to_none(msg_info_headers, env))
+
+#define AXIS2_MSG_INFO_HEADERS_SET_FAULT_TO_ANONYMOUS(msg_info_headers, env, anonymous) \
+ ((msg_info_headers)->ops->set_fault_to_anonymous(msg_info_headers, env, anonymous))
+
+#define AXIS2_MSG_INFO_HEADERS_GET_FAULT_TO_ANONYMOUS(msg_info_headers, env) \
+ ((msg_info_headers)->ops->get_fault_to_anonymous(msg_info_headers, env))
+
#define AXIS2_MSG_INFO_HEADERS_GET_ACTION(msg_info_headers, env) \
((msg_info_headers)->ops->get_action(msg_info_headers, env))
Modified: webservices/axis2/trunk/c/modules/core/addr/msg_info_headers.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/core/addr/msg_info_headers.c?rev=389448&r1=389447&r2=389448&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/core/addr/msg_info_headers.c (original)
+++ webservices/axis2/trunk/c/modules/core/addr/msg_info_headers.c Tue Mar 28 01:23:08 2006
@@ -28,10 +28,20 @@
axis2_endpoint_ref_t *from;
/** Pair of values that indicate how this message related to another message */
axis2_relates_to_t *relates_to;
- /** identifies the intended receiver for replies to the message */
+ /** identifies the intended receiver for replies to the message,
+ if this is set, none and anonymous settings are ignored */
axis2_endpoint_ref_t *reply_to;
- /** identifies the intended receiver for faults related to the message */
+ /** reply to should be none */
+ axis2_bool_t reply_to_none;
+ /** reply to should be anonymous, this is overwridden by none*/
+ axis2_bool_t reply_to_anonymous;
+ /** identifies the intended receiver for faults related to the message
+ if this is set, none and anonymous settings are ignored */
axis2_endpoint_ref_t *fault_to;
+ /** fault to should be none */
+ axis2_bool_t fault_to_none;
+ /** fault to should be anonymous, this is overwridden by none*/
+ axis2_bool_t fault_to_anonymous;
/** action */
axis2_char_t *action;
/** message Id */
@@ -62,6 +72,22 @@
axis2_env_t **env,
axis2_endpoint_ref_t *from);
+axis2_status_t AXIS2_CALL
+axis2_msg_info_headers_set_reply_to_none(struct axis2_msg_info_headers *msg_info_headers,
+ axis2_env_t **env, axis2_bool_t none);
+
+axis2_bool_t AXIS2_CALL
+axis2_msg_info_headers_get_reply_to_none(struct axis2_msg_info_headers *msg_info_headers,
+ axis2_env_t **env);
+
+axis2_status_t AXIS2_CALL
+axis2_msg_info_headers_set_reply_to_anonymous(struct axis2_msg_info_headers *msg_info_headers,
+ axis2_env_t **env, axis2_bool_t anonymous);
+
+axis2_bool_t AXIS2_CALL
+axis2_msg_info_headers_get_reply_to_anonymous(struct axis2_msg_info_headers *msg_info_headers,
+ axis2_env_t **env);
+
axis2_endpoint_ref_t* AXIS2_CALL
axis2_msg_info_headers_get_reply_to(struct axis2_msg_info_headers *msg_info_headers,
axis2_env_t **env);
@@ -80,6 +106,22 @@
axis2_env_t **env,
axis2_endpoint_ref_t *fault_to);
+axis2_status_t AXIS2_CALL
+axis2_msg_info_headers_set_fault_to_none(struct axis2_msg_info_headers *msg_info_headers,
+ axis2_env_t **env, axis2_bool_t none);
+
+axis2_bool_t AXIS2_CALL
+axis2_msg_info_headers_get_fault_to_none(struct axis2_msg_info_headers *msg_info_headers,
+ axis2_env_t **env);
+
+axis2_status_t AXIS2_CALL
+axis2_msg_info_headers_set_fault_to_anonymous(struct axis2_msg_info_headers *msg_info_headers,
+ axis2_env_t **env, axis2_bool_t anonymous);
+
+axis2_bool_t AXIS2_CALL
+axis2_msg_info_headers_get_fault_to_anonymous(struct axis2_msg_info_headers *msg_info_headers,
+ axis2_env_t **env);
+
axis2_char_t* AXIS2_CALL
axis2_msg_info_headers_get_action(struct axis2_msg_info_headers *msg_info_headers,
axis2_env_t **env);
@@ -149,7 +191,11 @@
msg_info_headers_impl->to = NULL;
msg_info_headers_impl->from = NULL;
msg_info_headers_impl->relates_to = NULL;
+ msg_info_headers_impl->reply_to_none= AXIS2_FALSE;
+ msg_info_headers_impl->reply_to_anonymous = AXIS2_FALSE;
msg_info_headers_impl->reply_to = NULL;
+ msg_info_headers_impl->fault_to_none= AXIS2_FALSE;
+ msg_info_headers_impl->fault_to_anonymous = AXIS2_FALSE;
msg_info_headers_impl->fault_to = NULL;
msg_info_headers_impl->action = NULL;
msg_info_headers_impl->message_id = NULL;
@@ -194,12 +240,36 @@
msg_info_headers_impl->msg_info_headers.ops->set_from =
axis2_msg_info_headers_set_from;
+ msg_info_headers_impl->msg_info_headers.ops->set_reply_to_none =
+ axis2_msg_info_headers_set_reply_to_none;
+
+ msg_info_headers_impl->msg_info_headers.ops->get_reply_to_none =
+ axis2_msg_info_headers_get_reply_to_none;
+
+ msg_info_headers_impl->msg_info_headers.ops->set_reply_to_anonymous=
+ axis2_msg_info_headers_set_reply_to_anonymous;
+
+ msg_info_headers_impl->msg_info_headers.ops->get_reply_to_anonymous =
+ axis2_msg_info_headers_get_reply_to_anonymous;
+
msg_info_headers_impl->msg_info_headers.ops->get_reply_to =
axis2_msg_info_headers_get_reply_to;
msg_info_headers_impl->msg_info_headers.ops->set_reply_to =
axis2_msg_info_headers_set_reply_to;
+ msg_info_headers_impl->msg_info_headers.ops->set_fault_to_none =
+ axis2_msg_info_headers_set_fault_to_none;
+
+ msg_info_headers_impl->msg_info_headers.ops->get_fault_to_none =
+ axis2_msg_info_headers_get_fault_to_none;
+
+ msg_info_headers_impl->msg_info_headers.ops->set_fault_to_anonymous=
+ axis2_msg_info_headers_set_fault_to_anonymous;
+
+ msg_info_headers_impl->msg_info_headers.ops->get_fault_to_anonymous =
+ axis2_msg_info_headers_get_fault_to_anonymous;
+
msg_info_headers_impl->msg_info_headers.ops->get_fault_to =
axis2_msg_info_headers_get_fault_to;
@@ -560,3 +630,73 @@
return AXIS2_SUCCESS;
}
+
+
+axis2_status_t AXIS2_CALL
+axis2_msg_info_headers_set_reply_to_none(struct axis2_msg_info_headers *msg_info_headers,
+ axis2_env_t **env, axis2_bool_t none)
+{
+ AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+ AXIS2_INTF_TO_IMPL(msg_info_headers)->reply_to_none = none;
+ return AXIS2_SUCCESS;
+}
+
+axis2_bool_t AXIS2_CALL
+axis2_msg_info_headers_get_reply_to_none(struct axis2_msg_info_headers *msg_info_headers,
+ axis2_env_t **env)
+{
+ AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+ return AXIS2_INTF_TO_IMPL(msg_info_headers)->reply_to_none;
+}
+
+axis2_status_t AXIS2_CALL
+axis2_msg_info_headers_set_reply_to_anonymous(struct axis2_msg_info_headers *msg_info_headers,
+ axis2_env_t **env, axis2_bool_t anonymous)
+{
+ AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+ AXIS2_INTF_TO_IMPL(msg_info_headers)->reply_to_anonymous = anonymous;
+ return AXIS2_SUCCESS;
+}
+
+axis2_bool_t AXIS2_CALL
+axis2_msg_info_headers_get_reply_to_anonymous(struct axis2_msg_info_headers *msg_info_headers,
+ axis2_env_t **env)
+{
+ AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+ return AXIS2_INTF_TO_IMPL(msg_info_headers)->reply_to_anonymous;
+}
+
+axis2_status_t AXIS2_CALL
+axis2_msg_info_headers_set_fault_to_none(struct axis2_msg_info_headers *msg_info_headers,
+ axis2_env_t **env, axis2_bool_t none)
+{
+ AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+ AXIS2_INTF_TO_IMPL(msg_info_headers)->fault_to_none = none;
+ return AXIS2_SUCCESS;
+}
+
+axis2_bool_t AXIS2_CALL
+axis2_msg_info_headers_get_fault_to_none(struct axis2_msg_info_headers *msg_info_headers,
+ axis2_env_t **env)
+{
+ AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+ return AXIS2_INTF_TO_IMPL(msg_info_headers)->fault_to_none;
+}
+
+axis2_status_t AXIS2_CALL
+axis2_msg_info_headers_set_fault_to_anonymous(struct axis2_msg_info_headers *msg_info_headers,
+ axis2_env_t **env, axis2_bool_t anonymous)
+{
+ AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+ AXIS2_INTF_TO_IMPL(msg_info_headers)->fault_to_anonymous = anonymous;
+ return AXIS2_SUCCESS;
+}
+
+axis2_bool_t AXIS2_CALL
+axis2_msg_info_headers_get_fault_to_anonymous(struct axis2_msg_info_headers *msg_info_headers,
+ axis2_env_t **env)
+{
+ AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+ return AXIS2_INTF_TO_IMPL(msg_info_headers)->fault_to_anonymous;
+}
+
Modified: webservices/axis2/trunk/c/modules/core/transport/http/sender/http_client.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/core/transport/http/sender/http_client.c?rev=389448&r1=389447&r2=389448&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/core/transport/http/sender/http_client.c (original)
+++ webservices/axis2/trunk/c/modules/core/transport/http/sender/http_client.c Tue Mar 28 01:23:08 2006
@@ -438,7 +438,9 @@
}
if(AXIS2_FALSE == AXIS2_HTTP_SIMPLE_RESPONSE_CONTAINS_HEADER(
client_impl->response, env,
- AXIS2_HTTP_HEADER_CONTENT_TYPE) && 202 != status_code)
+ AXIS2_HTTP_HEADER_CONTENT_TYPE) && 202 != status_code
+ && AXIS2_HTTP_SIMPLE_RESPONSE_GET_CONTENT_LENGTH(
+ client_impl->response, env) > 0)
{
AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_RESPONSE_CONTENT_TYPE_MISSING
, AXIS2_FAILURE);
Modified: webservices/axis2/trunk/c/modules/mod_addr/addr_out_handler.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/mod_addr/addr_out_handler.c?rev=389448&r1=389447&r2=389448&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/mod_addr/addr_out_handler.c (original)
+++ webservices/axis2/trunk/c/modules/mod_addr/addr_out_handler.c Tue Mar 28 01:23:08 2006
@@ -303,18 +303,28 @@
if (!epr)
{
axis2_char_t *anonymous_uri = NULL;
+ axis2_bool_t anonymous = AXIS2_MSG_INFO_HEADERS_GET_REPLY_TO_ANONYMOUS(msg_info_headers, env);
+ axis2_bool_t none = AXIS2_MSG_INFO_HEADERS_GET_REPLY_TO_NONE(msg_info_headers, env);
if (AXIS2_STRCMP (addr_ns, AXIS2_WSA_NAMESPACE_SUBMISSION) == 0)
{
- anonymous_uri = AXIS2_WSA_ANONYMOUS_URL_SUBMISSION;
+ if (none)
+ anonymous_uri = AXIS2_WSA_NONE_URL_SUBMISSION;
+ else if (anonymous)
+ anonymous_uri = AXIS2_WSA_ANONYMOUS_URL_SUBMISSION;
}
else
{
- anonymous_uri = AXIS2_WSA_ANONYMOUS_URL;
+ if (none)
+ anonymous_uri = AXIS2_WSA_NONE_URL;
+ else if (anonymous)
+ anonymous_uri = AXIS2_WSA_ANONYMOUS_URL;
}
- epr = axis2_endpoint_ref_create (env, anonymous_uri);
-
+ if (anonymous_uri)
+ epr = axis2_endpoint_ref_create (env, anonymous_uri);
}
+
+
/* add the service group id as a reference parameter */
svc_group_context_id = AXIS2_MSG_CTX_GET_SVC_GRP_CTX_ID (msg_ctx, env);
@@ -359,6 +369,29 @@
}
epr = AXIS2_MSG_INFO_HEADERS_GET_FAULT_TO (msg_info_headers, env);
+ if (!epr)
+ {
+ axis2_char_t *anonymous_uri = NULL;
+ axis2_bool_t anonymous = AXIS2_MSG_INFO_HEADERS_GET_FAULT_TO_ANONYMOUS(msg_info_headers, env);
+ axis2_bool_t none = AXIS2_MSG_INFO_HEADERS_GET_FAULT_TO_NONE(msg_info_headers, env);
+ if (AXIS2_STRCMP (addr_ns, AXIS2_WSA_NAMESPACE_SUBMISSION) == 0)
+ {
+ if (none)
+ anonymous_uri = AXIS2_WSA_NONE_URL_SUBMISSION;
+ else if (anonymous)
+ anonymous_uri = AXIS2_WSA_ANONYMOUS_URL_SUBMISSION;
+ }
+ else
+ {
+ if (none)
+ anonymous_uri = AXIS2_WSA_NONE_URL;
+ else if (anonymous)
+ anonymous_uri = AXIS2_WSA_ANONYMOUS_URL;
+ }
+
+ if (anonymous_uri)
+ epr = axis2_endpoint_ref_create (env, anonymous_uri);
+ }
if (epr)
{