You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by da...@apache.org on 2009/12/22 13:08:16 UTC
svn commit: r893151 - in /webservices/axis2/trunk/c: axiom/include/
axiom/src/om/ axiom/src/parser/ axiom/src/parser/guththila/ axiom/src/soap/
guththila/include/ guththila/src/ include/ src/core/deployment/
src/core/transport/ src/core/transport/http/...
Author: damitha
Date: Tue Dec 22 12:08:15 2009
New Revision: 893151
URL: http://svn.apache.org/viewvc?rev=893151&view=rev
Log:
I have updated the code base so that at message receiver level one can access the basic stream without going through the OM/Soap builder.
Modified:
webservices/axis2/trunk/c/axiom/include/axiom_node.h
webservices/axis2/trunk/c/axiom/include/axiom_soap_body.h
webservices/axis2/trunk/c/axiom/include/axiom_soap_builder.h
webservices/axis2/trunk/c/axiom/include/axiom_soap_envelope.h
webservices/axis2/trunk/c/axiom/include/axiom_stax_builder.h
webservices/axis2/trunk/c/axiom/include/axiom_xml_reader.h
webservices/axis2/trunk/c/axiom/src/om/axiom_node_internal.h
webservices/axis2/trunk/c/axiom/src/om/om_node.c
webservices/axis2/trunk/c/axiom/src/om/om_stax_builder.c
webservices/axis2/trunk/c/axiom/src/parser/guththila/guththila_xml_reader_wrapper.c
webservices/axis2/trunk/c/axiom/src/parser/xml_reader.c
webservices/axis2/trunk/c/axiom/src/soap/soap_body.c
webservices/axis2/trunk/c/axiom/src/soap/soap_builder.c
webservices/axis2/trunk/c/axiom/src/soap/soap_envelope.c
webservices/axis2/trunk/c/guththila/include/guththila.h
webservices/axis2/trunk/c/guththila/src/guththila_xml_parser.c
webservices/axis2/trunk/c/include/axis2_http_transport.h
webservices/axis2/trunk/c/include/axis2_http_worker.h
webservices/axis2/trunk/c/include/axis2_transport_receiver.h
webservices/axis2/trunk/c/src/core/deployment/conf_builder.c
webservices/axis2/trunk/c/src/core/transport/http/common/http_worker.c
webservices/axis2/trunk/c/src/core/transport/http/receiver/http_receiver.c
webservices/axis2/trunk/c/src/core/transport/http/util/http_transport_utils.c
webservices/axis2/trunk/c/src/core/transport/transport_receiver.c
Modified: webservices/axis2/trunk/c/axiom/include/axiom_node.h
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/axiom/include/axiom_node.h?rev=893151&r1=893150&r2=893151&view=diff
==============================================================================
--- webservices/axis2/trunk/c/axiom/include/axiom_node.h (original)
+++ webservices/axis2/trunk/c/axiom/include/axiom_node.h Tue Dec 22 12:08:15 2009
@@ -365,6 +365,11 @@
axiom_node_to_string_non_optimized(
axiom_node_t * om_node,
const axutil_env_t * env);
+
+ AXIS2_EXTERN struct axiom_stax_builder *AXIS2_CALL
+ axiom_node_get_builder(
+ axiom_node_t * om_node,
+ const axutil_env_t * env);
/** @} */
#ifdef __cplusplus
Modified: webservices/axis2/trunk/c/axiom/include/axiom_soap_body.h
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/axiom/include/axiom_soap_body.h?rev=893151&r1=893150&r2=893151&view=diff
==============================================================================
--- webservices/axis2/trunk/c/axiom/include/axiom_soap_body.h (original)
+++ webservices/axis2/trunk/c/axiom/include/axiom_soap_body.h Tue Dec 22 12:08:15 2009
@@ -172,6 +172,10 @@
void *user_param,
axis2_char_t *callback_name);
+ AXIS2_EXTERN struct axiom_soap_builder *AXIS2_CALL
+ axiom_soap_body_get_builder(
+ axiom_soap_body_t * soap_body,
+ const axutil_env_t * env);
#ifdef __cplusplus
}
Modified: webservices/axis2/trunk/c/axiom/include/axiom_soap_builder.h
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/axiom/include/axiom_soap_builder.h?rev=893151&r1=893150&r2=893151&view=diff
==============================================================================
--- webservices/axis2/trunk/c/axiom/include/axiom_soap_builder.h (original)
+++ webservices/axis2/trunk/c/axiom/include/axiom_soap_builder.h Tue Dec 22 12:08:15 2009
@@ -254,6 +254,10 @@
axiom_node_t *om_element_node,
axiom_element_t *om_element);
+ AXIS2_EXTERN axiom_stax_builder_t *AXIS2_CALL
+ axiom_soap_builder_get_om_builder(
+ axiom_soap_builder_t * builder,
+ const axutil_env_t * env);
Modified: webservices/axis2/trunk/c/axiom/include/axiom_soap_envelope.h
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/axiom/include/axiom_soap_envelope.h?rev=893151&r1=893150&r2=893151&view=diff
==============================================================================
--- webservices/axis2/trunk/c/axiom/include/axiom_soap_envelope.h (original)
+++ webservices/axis2/trunk/c/axiom/include/axiom_soap_envelope.h Tue Dec 22 12:08:15 2009
@@ -229,6 +229,11 @@
axiom_soap_envelope_get_soap_builder(
axiom_soap_envelope_t * envelope,
const axutil_env_t * env);
+
+ AXIS2_EXTERN struct axiom_soap_builder *AXIS2_CALL
+ axiom_soap_envelope_get_builder(
+ axiom_soap_envelope_t * envelope,
+ const axutil_env_t * env);
/** @} */
Modified: webservices/axis2/trunk/c/axiom/include/axiom_stax_builder.h
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/axiom/include/axiom_stax_builder.h?rev=893151&r1=893150&r2=893151&view=diff
==============================================================================
--- webservices/axis2/trunk/c/axiom/include/axiom_stax_builder.h (original)
+++ webservices/axis2/trunk/c/axiom/include/axiom_stax_builder.h Tue Dec 22 12:08:15 2009
@@ -134,6 +134,17 @@
struct axiom_stax_builder *builder,
const axutil_env_t * env);
+ AXIS2_EXTERN axiom_xml_reader_t *AXIS2_CALL
+ axiom_stax_builder_get_parser(
+ axiom_stax_builder_t * om_builder,
+ const axutil_env_t * env);
+
+ AXIS2_EXTERN void AXIS2_CALL
+ axiom_stax_builder_set_cache(
+ axiom_stax_builder_t * om_builder,
+ const axutil_env_t * env,
+ axis2_bool_t enable_cache);
+
/** @} */
#ifdef __cplusplus
Modified: webservices/axis2/trunk/c/axiom/include/axiom_xml_reader.h
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/axiom/include/axiom_xml_reader.h?rev=893151&r1=893150&r2=893151&view=diff
==============================================================================
--- webservices/axis2/trunk/c/axiom/include/axiom_xml_reader.h (original)
+++ webservices/axis2/trunk/c/axiom/include/axiom_xml_reader.h Tue Dec 22 12:08:15 2009
@@ -344,6 +344,18 @@
axiom_xml_reader_t * parser,
const axutil_env_t * env,
axis2_char_t * prefix);
+
+ void *(
+ AXIS2_CALL
+ * get_context)(
+ axiom_xml_reader_t * parser,
+ const axutil_env_t * env);
+
+ axis2_char_t *(
+ AXIS2_CALL
+ * get_current_buffer)(
+ axiom_xml_reader_t * parser,
+ const axutil_env_t * env);
};
/**
@@ -660,6 +672,16 @@
axiom_xml_reader_t * parser,
const axutil_env_t * env,
axis2_char_t * prefix);
+
+ AXIS2_EXTERN void *AXIS2_CALL
+ axiom_xml_reader_get_context(
+ axiom_xml_reader_t * parser,
+ const axutil_env_t * env);
+
+ axis2_char_t *AXIS2_CALL
+ axiom_xml_reader_get_current_buffer(
+ axiom_xml_reader_t * parser,
+ const axutil_env_t * env);
/** @} */
Modified: webservices/axis2/trunk/c/axiom/src/om/axiom_node_internal.h
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/axiom/src/om/axiom_node_internal.h?rev=893151&r1=893150&r2=893151&view=diff
==============================================================================
--- webservices/axis2/trunk/c/axiom/src/om/axiom_node_internal.h (original)
+++ webservices/axis2/trunk/c/axiom/src/om/axiom_node_internal.h Tue Dec 22 12:08:15 2009
@@ -155,11 +155,6 @@
const axutil_env_t * env,
struct axiom_stax_builder *builder);
- AXIS2_EXTERN struct axiom_stax_builder *AXIS2_CALL
-
- axiom_node_get_builder(
- axiom_node_t * om_node,
- const axutil_env_t * env);
/** @} */
Modified: webservices/axis2/trunk/c/axiom/src/om/om_node.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/axiom/src/om/om_node.c?rev=893151&r1=893150&r2=893151&view=diff
==============================================================================
--- webservices/axis2/trunk/c/axiom/src/om/om_node.c (original)
+++ webservices/axis2/trunk/c/axiom/src/om/om_node.c Tue Dec 22 12:08:15 2009
@@ -1444,3 +1444,4 @@
axiom_output_free(om_output, env);
return xml;
}
+
Modified: webservices/axis2/trunk/c/axiom/src/om/om_stax_builder.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/axiom/src/om/om_stax_builder.c?rev=893151&r1=893150&r2=893151&view=diff
==============================================================================
--- webservices/axis2/trunk/c/axiom/src/om/om_stax_builder.c (original)
+++ webservices/axis2/trunk/c/axiom/src/om/om_stax_builder.c Tue Dec 22 12:08:15 2009
@@ -1049,6 +1049,7 @@
if(!(om_builder->cache))
{
+ AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI, "Cacheing disabled");
return -1;
}
switch(token)
@@ -1131,3 +1132,22 @@
}
return token;
}
+
+
+AXIS2_EXTERN axiom_xml_reader_t *AXIS2_CALL
+axiom_stax_builder_get_parser(
+ axiom_stax_builder_t * om_builder,
+ const axutil_env_t * env)
+{
+ return om_builder->parser;
+}
+
+AXIS2_EXTERN void AXIS2_CALL
+axiom_stax_builder_set_cache(
+ axiom_stax_builder_t * om_builder,
+ const axutil_env_t * env,
+ axis2_bool_t enable_cache)
+{
+ om_builder->cache = enable_cache;
+}
+
Modified: webservices/axis2/trunk/c/axiom/src/parser/guththila/guththila_xml_reader_wrapper.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/axiom/src/parser/guththila/guththila_xml_reader_wrapper.c?rev=893151&r1=893150&r2=893151&view=diff
==============================================================================
--- webservices/axis2/trunk/c/axiom/src/parser/guththila/guththila_xml_reader_wrapper.c (original)
+++ webservices/axis2/trunk/c/axiom/src/parser/guththila/guththila_xml_reader_wrapper.c Tue Dec 22 12:08:15 2009
@@ -117,6 +117,16 @@
const axutil_env_t * env,
axis2_char_t * prefix);
+void *AXIS2_CALL
+guththila_xml_reader_wrapper_get_context(
+ axiom_xml_reader_t * parser,
+ const axutil_env_t * env);
+
+axis2_char_t *AXIS2_CALL
+guththila_xml_reader_wrapper_get_current_buffer(
+ axiom_xml_reader_t * parser,
+ const axutil_env_t * env);
+
/*********** guththila_xml_reader_wrapper_impl_t wrapper struct *******************/
typedef struct guththila_xml_reader_wrapper_impl
@@ -125,6 +135,7 @@
guththila_t *guththila_parser;
guththila_reader_t *reader;
int event_map[10];
+ void *context;
} guththila_xml_reader_wrapper_impl_t;
@@ -169,7 +180,9 @@
guththila_xml_reader_wrapper_get_dtd, guththila_xml_reader_wrapper_xml_free,
guththila_xml_reader_wrapper_get_char_set_encoding,
guththila_xml_reader_wrapper_get_namespace_uri,
- guththila_xml_reader_wrapper_get_namespace_uri_by_prefix };
+ guththila_xml_reader_wrapper_get_namespace_uri_by_prefix,
+ guththila_xml_reader_wrapper_get_context,
+ guththila_xml_reader_wrapper_get_current_buffer};
/********************************************************************************/
@@ -211,6 +224,7 @@
}
guththila_impl->guththila_parser = guththila;
+ guththila_impl->context = NULL;
guththila_impl->parser.ops = NULL;
/* guththila_impl->parser.ops =
(axiom_xml_reader_ops_t *) AXIS2_MALLOC(env->allocator,
@@ -276,6 +290,7 @@
}
guththila_impl->guththila_parser = guththila;
+ guththila_impl->context = ctx;
guththila_impl->parser.ops = NULL;
/* guththila_impl->parser.ops = (axiom_xml_reader_ops_t *)
AXIS2_MALLOC(env->allocator, sizeof(axiom_xml_reader_ops_t));
@@ -353,6 +368,7 @@
}
guththila_impl->guththila_parser = guththila;
+ guththila_impl->context = NULL;
guththila_impl->parser.ops = NULL;
/* guththila_impl->parser.ops = (axiom_xml_reader_ops_t *)
AXIS2_MALLOC(env->allocator, sizeof(axiom_xml_reader_ops_t));
@@ -576,3 +592,22 @@
{
return (axis2_char_t *)NULL;
}
+
+void *AXIS2_CALL
+guththila_xml_reader_wrapper_get_context(
+ axiom_xml_reader_t * parser,
+ const axutil_env_t * env)
+{
+ guththila_xml_reader_wrapper_impl_t* parser_impl = NULL;
+ parser_impl = AXIS2_INTF_TO_IMPL(parser);
+ return parser_impl->context;
+}
+
+axis2_char_t *AXIS2_CALL
+guththila_xml_reader_wrapper_get_current_buffer(
+ axiom_xml_reader_t * parser,
+ const axutil_env_t * env)
+{
+ return guththila_get_current_buffer(AXIS2_INTF_TO_IMPL(parser)->guththila_parser, env);
+}
+
Modified: webservices/axis2/trunk/c/axiom/src/parser/xml_reader.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/axiom/src/parser/xml_reader.c?rev=893151&r1=893150&r2=893151&view=diff
==============================================================================
--- webservices/axis2/trunk/c/axiom/src/parser/xml_reader.c (original)
+++ webservices/axis2/trunk/c/axiom/src/parser/xml_reader.c Tue Dec 22 12:08:15 2009
@@ -184,3 +184,20 @@
{
return (parser)->ops->get_namespace_uri_by_prefix(parser, env, prefix);
}
+
+AXIS2_EXTERN void *AXIS2_CALL
+axiom_xml_reader_get_context(
+ axiom_xml_reader_t * parser,
+ const axutil_env_t * env)
+{
+ return (parser)->ops->get_context(parser, env);
+}
+
+AXIS2_EXTERN axis2_char_t *AXIS2_CALL
+axiom_xml_reader_get_current_buffer(
+ axiom_xml_reader_t * parser,
+ const axutil_env_t * env)
+{
+ return (parser)->ops->get_current_buffer(parser, env);
+}
+
Modified: webservices/axis2/trunk/c/axiom/src/soap/soap_body.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/axiom/src/soap/soap_body.c?rev=893151&r1=893150&r2=893151&view=diff
==============================================================================
--- webservices/axis2/trunk/c/axiom/src/soap/soap_body.c (original)
+++ webservices/axis2/trunk/c/axiom/src/soap/soap_body.c Tue Dec 22 12:08:15 2009
@@ -235,6 +235,18 @@
return AXIS2_SUCCESS;
}
+AXIS2_EXTERN axiom_soap_builder_t *AXIS2_CALL
+axiom_soap_body_get_builder(
+ axiom_soap_body_t * soap_body,
+ const axutil_env_t * env)
+{
+ if(!soap_body)
+ {
+ return NULL;
+ }
+ return soap_body->soap_builder;
+}
+
AXIS2_EXTERN axis2_status_t AXIS2_CALL
axiom_soap_body_build(
axiom_soap_body_t * soap_body,
@@ -528,3 +540,5 @@
return axiom_soap_body_build(soap_body, env);
}
}
+
+
Modified: webservices/axis2/trunk/c/axiom/src/soap/soap_builder.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/axiom/src/soap/soap_builder.c?rev=893151&r1=893150&r2=893151&view=diff
==============================================================================
--- webservices/axis2/trunk/c/axiom/src/soap/soap_builder.c (original)
+++ webservices/axis2/trunk/c/axiom/src/soap/soap_builder.c Tue Dec 22 12:08:15 2009
@@ -1287,3 +1287,16 @@
return is_replaced;
}
+
+AXIS2_EXTERN axiom_stax_builder_t *AXIS2_CALL
+axiom_soap_builder_get_om_builder(
+ axiom_soap_builder_t * soap_builder,
+ const axutil_env_t * env)
+{
+ if(!soap_builder)
+ {
+ return NULL;
+ }
+ return soap_builder->om_builder;
+}
+
Modified: webservices/axis2/trunk/c/axiom/src/soap/soap_envelope.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/axiom/src/soap/soap_envelope.c?rev=893151&r1=893150&r2=893151&view=diff
==============================================================================
--- webservices/axis2/trunk/c/axiom/src/soap/soap_envelope.c (original)
+++ webservices/axis2/trunk/c/axiom/src/soap/soap_envelope.c Tue Dec 22 12:08:15 2009
@@ -402,6 +402,18 @@
return AXIS2_SUCCESS;
}
+AXIS2_EXTERN axiom_soap_builder_t *AXIS2_CALL
+axiom_soap_envelope_get_builder(
+ axiom_soap_envelope_t * soap_envelope,
+ const axutil_env_t * env)
+{
+ if(!soap_envelope)
+ {
+ return NULL;
+ }
+ return soap_envelope->soap_builder;
+}
+
AXIS2_EXTERN axiom_soap_envelope_t *AXIS2_CALL
axiom_soap_envelope_create_default_soap_envelope(
const axutil_env_t * env,
Modified: webservices/axis2/trunk/c/guththila/include/guththila.h
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/guththila/include/guththila.h?rev=893151&r1=893150&r2=893151&view=diff
==============================================================================
--- webservices/axis2/trunk/c/guththila/include/guththila.h (original)
+++ webservices/axis2/trunk/c/guththila/include/guththila.h Tue Dec 22 12:08:15 2009
@@ -342,6 +342,12 @@
GUTHTHILA_EXPORT void GUTHTHILA_CALL
guththila_set_error_handler(guththila_t * m, guththila_error_func,
const axutil_env_t * env);
+
+GUTHTHILA_EXPORT guththila_char_t *GUTHTHILA_CALL
+guththila_get_current_buffer(
+ guththila_t * m,
+ const axutil_env_t * env);
+
EXTERN_C_END()
#endif
Modified: webservices/axis2/trunk/c/guththila/src/guththila_xml_parser.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/guththila/src/guththila_xml_parser.c?rev=893151&r1=893150&r2=893151&view=diff
==============================================================================
--- webservices/axis2/trunk/c/guththila/src/guththila_xml_parser.c (original)
+++ webservices/axis2/trunk/c/guththila/src/guththila_xml_parser.c Tue Dec 22 12:08:15 2009
@@ -1781,3 +1781,12 @@
}
return -1;
}
+
+GUTHTHILA_EXPORT guththila_char_t *GUTHTHILA_CALL
+guththila_get_current_buffer(
+ guththila_t * m,
+ const axutil_env_t * env)
+{
+ return guththila_buffer_get(&m->buffer, env);
+}
+
Modified: webservices/axis2/trunk/c/include/axis2_http_transport.h
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/include/axis2_http_transport.h?rev=893151&r1=893150&r2=893151&view=diff
==============================================================================
--- webservices/axis2/trunk/c/include/axis2_http_transport.h (original)
+++ webservices/axis2/trunk/c/include/axis2_http_transport.h Tue Dec 22 12:08:15 2009
@@ -671,6 +671,7 @@
*/
#define AXIS2_HTTP_HEADER_CONNECTION_KEEPALIVE "Keep-Alive"
+ #define AXIS2_TRANPORT_IS_APPLICATION_CLIENT_SIDE "is_app_client_side"
/**
* HEADER_ACCEPT
*/
Modified: webservices/axis2/trunk/c/include/axis2_http_worker.h
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/include/axis2_http_worker.h?rev=893151&r1=893150&r2=893151&view=diff
==============================================================================
--- webservices/axis2/trunk/c/include/axis2_http_worker.h (original)
+++ webservices/axis2/trunk/c/include/axis2_http_worker.h Tue Dec 22 12:08:15 2009
@@ -70,6 +70,12 @@
axis2_http_worker_t * http_worker,
const axutil_env_t * env,
int port);
+
+ AXIS2_EXTERN void AXIS2_CALL
+ axis2_http_worker_set_is_application_client_side(
+ axis2_http_worker_t *http_worker,
+ const axutil_env_t *env,
+ axis2_bool_t application_client_side);
/**
* @param http_worker pointer to http worker
Modified: webservices/axis2/trunk/c/include/axis2_transport_receiver.h
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/include/axis2_transport_receiver.h?rev=893151&r1=893150&r2=893151&view=diff
==============================================================================
--- webservices/axis2/trunk/c/include/axis2_transport_receiver.h (original)
+++ webservices/axis2/trunk/c/include/axis2_transport_receiver.h Tue Dec 22 12:08:15 2009
@@ -112,6 +112,11 @@
axis2_bool_t(AXIS2_CALL * is_running)(
axis2_transport_receiver_t * server,
const axutil_env_t * env);
+
+ void(AXIS2_CALL * set_is_application_client_side)(
+ axis2_transport_receiver_t * server,
+ const axutil_env_t * env,
+ axis2_bool_t is_application_client_side);
/**
* @param transport_receiver pointer to transport receiver
@@ -191,6 +196,12 @@
axis2_transport_receiver_is_running(
axis2_transport_receiver_t * transport_receiver,
const axutil_env_t * env);
+
+ AXIS2_EXTERN void AXIS2_CALL
+ axis2_transport_receiver_set_is_application_client_side(
+ axis2_transport_receiver_t * transport_receiver,
+ const axutil_env_t * env,
+ axis2_bool_t is_application_client_side);
/** @} */
Modified: webservices/axis2/trunk/c/src/core/deployment/conf_builder.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/src/core/deployment/conf_builder.c?rev=893151&r1=893150&r2=893151&view=diff
==============================================================================
--- webservices/axis2/trunk/c/src/core/deployment/conf_builder.c (original)
+++ webservices/axis2/trunk/c/src/core/deployment/conf_builder.c Tue Dec 22 12:08:15 2009
@@ -1159,7 +1159,7 @@
axis2_transport_in_desc_free(transport_in, env);
return status;
}
-
+ axis2_transport_receiver_set_is_application_client_side(recv, env, AXIS2_TRUE);
stat = axis2_transport_in_desc_set_recv(transport_in, env, recv);
if(!stat)
Modified: webservices/axis2/trunk/c/src/core/transport/http/common/http_worker.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/src/core/transport/http/common/http_worker.c?rev=893151&r1=893150&r2=893151&view=diff
==============================================================================
--- webservices/axis2/trunk/c/src/core/transport/http/common/http_worker.c (original)
+++ webservices/axis2/trunk/c/src/core/transport/http/common/http_worker.c Tue Dec 22 12:08:15 2009
@@ -41,6 +41,7 @@
{
axis2_conf_ctx_t *conf_ctx;
int svr_port;
+ axis2_bool_t is_application_client_side;
};
static axis2_status_t
@@ -79,6 +80,8 @@
}
http_worker->conf_ctx = conf_ctx;
http_worker->svr_port = 9090; /* default - must set later */
+ http_worker->is_application_client_side = AXIS2_FALSE; /* default is creating for application
+ server side */
return http_worker;
}
@@ -732,6 +735,19 @@
{
if(is_put)
{
+ axutil_property_t *property = NULL;
+ if(http_worker->is_application_client_side)
+ {
+ property = axutil_property_create_with_args(env, AXIS2_SCOPE_REQUEST, AXIS2_TRUE, 0,
+ AXIS2_VALUE_TRUE);
+ }
+ else
+ {
+ property = axutil_property_create_with_args(env, AXIS2_SCOPE_REQUEST, AXIS2_FALSE,
+ 0, AXIS2_VALUE_FALSE);
+ }
+ axis2_msg_ctx_set_property(msg_ctx, env, AXIS2_TRANPORT_IS_APPLICATION_CLIENT_SIDE,
+ property);
status = axis2_http_transport_utils_process_http_put_request(env, msg_ctx,
request_body, out_stream, content_type, content_length, soap_action_str,
url_ext_form);
@@ -739,6 +755,19 @@
}
else
{
+ axutil_property_t *property = NULL;
+ if(http_worker->is_application_client_side)
+ {
+ property = axutil_property_create_with_args(env, AXIS2_SCOPE_REQUEST, AXIS2_TRUE, 0,
+ AXIS2_VALUE_TRUE);
+ }
+ else
+ {
+ property = axutil_property_create_with_args(env, AXIS2_SCOPE_REQUEST, AXIS2_FALSE,
+ 0, AXIS2_VALUE_FALSE);
+ }
+ axis2_msg_ctx_set_property(msg_ctx, env, AXIS2_TRANPORT_IS_APPLICATION_CLIENT_SIDE,
+ property);
status = axis2_http_transport_utils_process_http_post_request(env, msg_ctx,
request_body, out_stream, content_type, content_length, soap_action_str,
url_ext_form);
@@ -2021,3 +2050,13 @@
return response;
}
+AXIS2_EXTERN void AXIS2_CALL
+axis2_http_worker_set_is_application_client_side(
+ axis2_http_worker_t *http_worker,
+ const axutil_env_t *env,
+ axis2_bool_t application_client_side)
+{
+ http_worker->is_application_client_side = application_client_side;
+}
+
+
Modified: webservices/axis2/trunk/c/src/core/transport/http/receiver/http_receiver.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/src/core/transport/http/receiver/http_receiver.c?rev=893151&r1=893150&r2=893151&view=diff
==============================================================================
--- webservices/axis2/trunk/c/src/core/transport/http/receiver/http_receiver.c (original)
+++ webservices/axis2/trunk/c/src/core/transport/http/receiver/http_receiver.c Tue Dec 22 12:08:15 2009
@@ -37,6 +37,7 @@
int port;
axis2_conf_ctx_t *conf_ctx;
axis2_conf_ctx_t *conf_ctx_private;
+ axis2_bool_t is_application_client_side;
} axis2_http_server_impl_t;
#define AXIS2_INTF_TO_IMPL(http_server) \
@@ -78,13 +79,20 @@
const axutil_env_t * env);
static void AXIS2_CALL
+axis2_http_server_set_is_application_client_side(
+ axis2_transport_receiver_t * server,
+ const axutil_env_t * env,
+ axis2_bool_t is_application_client_side);
+
+static void AXIS2_CALL
axis2_http_server_free(
axis2_transport_receiver_t * server,
const axutil_env_t * env);
static const axis2_transport_receiver_ops_t http_transport_receiver_ops_var = {
axis2_http_server_init, axis2_http_server_start, axis2_http_server_get_reply_to_epr,
- axis2_http_server_get_conf_ctx, axis2_http_server_is_running, axis2_http_server_stop,
+ axis2_http_server_get_conf_ctx, axis2_http_server_is_running,
+ axis2_http_server_set_is_application_client_side, axis2_http_server_stop,
axis2_http_server_free };
AXIS2_EXTERN axis2_transport_receiver_t *AXIS2_CALL
@@ -108,6 +116,7 @@
server_impl->conf_ctx = NULL;
server_impl->conf_ctx_private = NULL;
server_impl->port = port;
+ server_impl->is_application_client_side = AXIS2_FALSE;
server_impl->http_server.ops = &http_transport_receiver_ops_var;
@@ -254,7 +263,6 @@
axis2_transport_receiver_t * server,
const axutil_env_t * env)
{
-
axis2_http_server_impl_t *server_impl = NULL;
axis2_http_worker_t *worker = NULL;
@@ -274,6 +282,8 @@
axis2_http_svr_thread_free(server_impl->svr_thread, env);
return AXIS2_FAILURE;
}
+ axis2_http_worker_set_is_application_client_side(worker, env,
+ server_impl->is_application_client_side);
axis2_http_worker_set_svr_port(worker, env, server_impl->port);
AXIS2_LOG_INFO(env->log, "Starting HTTP server thread");
axis2_http_svr_thread_set_worker(server_impl->svr_thread, env, worker);
@@ -344,6 +354,17 @@
return AXIS2_FALSE;
}
+static void AXIS2_CALL
+axis2_http_server_set_is_application_client_side(
+ axis2_transport_receiver_t * server,
+ const axutil_env_t * env,
+ axis2_bool_t is_application_client_side)
+{
+ axis2_http_server_impl_t *server_impl = NULL;
+ server_impl = AXIS2_INTF_TO_IMPL(server);
+ server_impl->is_application_client_side = is_application_client_side;
+}
+
/**
* Following block distinguish the exposed part of the dll.
*/
Modified: webservices/axis2/trunk/c/src/core/transport/http/util/http_transport_utils.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/src/core/transport/http/util/http_transport_utils.c?rev=893151&r1=893150&r2=893151&view=diff
==============================================================================
--- webservices/axis2/trunk/c/src/core/transport/http/util/http_transport_utils.c (original)
+++ webservices/axis2/trunk/c/src/core/transport/http/util/http_transport_utils.c Tue Dec 22 12:08:15 2009
@@ -330,6 +330,11 @@
axutil_property_t *http_error_property = NULL;
axiom_mime_parser_t *mime_parser = NULL;
axis2_bool_t is_svc_callback = AXIS2_FALSE;
+ axutil_property_t *is_client_property = NULL;
+ axis2_bool_t is_application_client_side = AXIS2_FALSE;
+ axis2_char_t *mime_boundary = NULL;
+ axis2_bool_t check_for_fault = AXIS2_FALSE;
+ axis2_bool_t has_fault = AXIS2_FALSE;
AXIS2_PARAM_CHECK(env->error, msg_ctx, AXIS2_FAILURE);
AXIS2_PARAM_CHECK(env->error, in_stream, AXIS2_FAILURE);
@@ -422,7 +427,7 @@
if(strstr(content_type, AXIS2_HTTP_HEADER_ACCEPT_MULTIPART_RELATED))
{
/* get mime boundary */
- axis2_char_t *mime_boundary = axis2_http_transport_utils_get_value_from_content_type(env,
+ mime_boundary = axis2_http_transport_utils_get_value_from_content_type(env,
content_type, AXIS2_HTTP_HEADER_CONTENT_TYPE_MIME_BOUNDARY);
if(mime_boundary)
@@ -771,7 +776,26 @@
if(!is_svc_callback)
{
- if(AXIS2_TRUE == axiom_soap_body_has_fault(soap_body, env))
+ is_client_property = axis2_msg_ctx_get_property(msg_ctx, env,
+ AXIS2_TRANPORT_IS_APPLICATION_CLIENT_SIDE);
+ if(is_client_property)
+ {
+ axis2_char_t *prop_value = NULL;
+ prop_value = axutil_property_get_value(is_client_property, env);
+ if(prop_value && !axutil_strcmp(prop_value , AXIS2_VALUE_TRUE))
+ {
+ is_application_client_side = AXIS2_TRUE;
+ }
+ }
+ if(mime_boundary || is_application_client_side)
+ {
+ check_for_fault = AXIS2_TRUE;
+ }
+ if(check_for_fault)
+ {
+ has_fault = axiom_soap_body_has_fault(soap_body, env);
+ }
+ if(has_fault)
{
status = axis2_engine_receive_fault(engine, env, msg_ctx);
}
@@ -854,6 +878,11 @@
axis2_bool_t do_rest = AXIS2_FALSE;
axis2_bool_t run_as_get = AXIS2_FALSE;
axutil_property_t *http_error_property = NULL;
+ axutil_property_t *is_client_property = NULL;
+ axis2_bool_t is_application_client_side = AXIS2_FALSE;
+ axis2_char_t *mime_boundary = NULL;
+ axis2_bool_t check_for_fault = AXIS2_FALSE;
+ axis2_bool_t has_fault = AXIS2_FALSE;
AXIS2_PARAM_CHECK(env->error, msg_ctx, AXIS2_FAILURE);
AXIS2_PARAM_CHECK(env->error, in_stream, AXIS2_FAILURE);
@@ -918,7 +947,7 @@
if(strstr(content_type, AXIS2_HTTP_HEADER_ACCEPT_MULTIPART_RELATED))
{
/* get mime boundry */
- axis2_char_t *mime_boundary = axis2_http_transport_utils_get_value_from_content_type(env,
+ mime_boundary = axis2_http_transport_utils_get_value_from_content_type(env,
content_type, AXIS2_HTTP_HEADER_CONTENT_TYPE_MIME_BOUNDARY);
if(mime_boundary)
@@ -1009,7 +1038,7 @@
axiom_mime_parser_free(mime_parser, env);
mime_parser = NULL;
}
- AXIS2_FREE(env->allocator, mime_boundary);
+ /*AXIS2_FREE(env->allocator, mime_boundary);*/
}
axis2_msg_ctx_set_to(msg_ctx, env, axis2_endpoint_ref_create(env, request_uri));
@@ -1161,7 +1190,26 @@
if(!soap_body)
return AXIS2_FAILURE;
- if(AXIS2_TRUE == axiom_soap_body_has_fault(soap_body, env))
+ is_client_property = axis2_msg_ctx_get_property(msg_ctx, env,
+ AXIS2_TRANPORT_IS_APPLICATION_CLIENT_SIDE);
+ if(is_client_property)
+ {
+ axis2_char_t *prop_value = NULL;
+ prop_value = axutil_property_get_value(is_client_property, env);
+ if(prop_value && !axutil_strcmp(prop_value , AXIS2_VALUE_TRUE))
+ {
+ is_application_client_side = AXIS2_TRUE;
+ }
+ }
+ if(mime_boundary || is_application_client_side)
+ {
+ check_for_fault = AXIS2_TRUE;
+ }
+ if(check_for_fault)
+ {
+ has_fault = axiom_soap_body_has_fault(soap_body, env);
+ }
+ if(has_fault)
{
status = axis2_engine_receive_fault(engine, env, msg_ctx);
}
@@ -1169,6 +1217,10 @@
{
status = axis2_engine_receive(engine, env, msg_ctx);
}
+ if(mime_boundary)
+ {
+ AXIS2_FREE(env->allocator, mime_boundary);
+ }
if(!axis2_msg_ctx_get_soap_envelope(msg_ctx, env) && AXIS2_FALSE == is_soap11)
{
axiom_soap_envelope_t *def_envelope = axiom_soap_envelope_create_default_soap_envelope(env,
Modified: webservices/axis2/trunk/c/src/core/transport/transport_receiver.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/src/core/transport/transport_receiver.c?rev=893151&r1=893150&r2=893151&view=diff
==============================================================================
--- webservices/axis2/trunk/c/src/core/transport/transport_receiver.c (original)
+++ webservices/axis2/trunk/c/src/core/transport/transport_receiver.c Tue Dec 22 12:08:15 2009
@@ -75,3 +75,13 @@
{
return (transport_receiver)->ops->is_running(transport_receiver, env);
}
+
+AXIS2_EXTERN void AXIS2_CALL
+axis2_transport_receiver_set_is_application_client_side(
+ axis2_transport_receiver_t * transport_receiver,
+ const axutil_env_t * env,
+ axis2_bool_t is_application_client_side)
+{
+ return (transport_receiver)->ops->set_is_application_client_side(transport_receiver, env,
+ is_application_client_side);
+}