summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGravatar damitha2010-03-01 23:37:44 +0000
committerGravatar damitha2010-03-01 23:37:44 +0000
commite8bb48290b6691b081df51f65fa0b5c334dab023 (patch)
tree9da6dcce209503ea8ed48ff9c53bd2812b66c2dc /src
parentfe48b5ffcaf0547c58bd8088f1fc7d9178fe5fac (diff)
downloadaxis2c-e8bb48290b6691b081df51f65fa0b5c334dab023.tar.gz
axis2c-e8bb48290b6691b081df51f65fa0b5c334dab023.tar.bz2
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
Diffstat (limited to 'src')
-rw-r--r--src/core/transport/http/receiver/http_receiver.c16
1 files changed, 13 insertions, 3 deletions
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.",