From e8bb48290b6691b081df51f65fa0b5c334dab023 Mon Sep 17 00:00:00 2001 From: damitha Date: Mon, 1 Mar 2010 23:37:44 +0000 Subject: Add modification to axis2_http_server_get_epr_for_service so that if service name is not passed it will just return the server name with ip git-svn-id: http://svn.apache.org/repos/asf/axis/axis2/c/core/trunk@917798 13f79535-47bb-0310-9956-ffa450edef68 --- src/core/transport/http/receiver/http_receiver.c | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) (limited to 'src/core/transport/http') diff --git a/src/core/transport/http/receiver/http_receiver.c b/src/core/transport/http/receiver/http_receiver.c index c8517b0..5c071e5 100644 --- a/src/core/transport/http/receiver/http_receiver.c +++ b/src/core/transport/http/receiver/http_receiver.c @@ -400,6 +400,10 @@ axis2_http_server_get_reply_to_epr( return epr; } +/** + * If service name is set then this will return epr path for service. Otherwise it will return + * server name + */ static axis2_endpoint_ref_t *AXIS2_CALL axis2_http_server_get_epr_for_service( axis2_transport_receiver_t * server, @@ -418,12 +422,18 @@ axis2_http_server_get_epr_for_service( { host_address = AXIS2_DEFAULT_HOST_ADDRESS; /* TODO : get from axis2.xml */ } - svc_path = axutil_stracat(env, AXIS2_DEFAULT_SVC_PATH, svc_name); + if(svc_name) + { + svc_path = axutil_stracat(env, AXIS2_DEFAULT_SVC_PATH, svc_name); + } url = axutil_url_create(env, AXIS2_HTTP_PROTOCOL, host_address, AXIS2_INTF_TO_IMPL(server)->port, svc_path); - - AXIS2_FREE(env->allocator, svc_path); + + if(svc_path) + { + AXIS2_FREE(env->allocator, svc_path); + } if(!url) { AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Cannot create reply to epr for service %s.", -- cgit v1.1-32-gdbae