-----Original Message-----
From: Beyer,Nathan [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, October 09, 2002 10:59 AM
To: '[EMAIL PROTECTED]'
Subject: RE: How to get hostname and port of serviceThis is a bit of a guess, but I think you can do the following to get the ServletRequest from the MessageContext -HttpServletRequest request = (HttpServletRequest)mc.getProperty(HTTPConstants.MC_HTTP_SERVLETREQUEST);Then call the getServerName and getServerPort methods, which should allow you to construct the information you're looking for.
-----Original Message-----
From: Peake, Chris [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, October 09, 2002 10:53 AM
To: [EMAIL PROTECTED]
Subject: How to get hostname and port of serviceKinda of a crazy question but I don't seem to see the mechanism to do the following.
I am wanting to return the hostname and port from where my service is being called.Yes, I know that the client must know this to make the call.
And that WSDL will show this.But suppose a 'helloworld' service just wants to surface this information for some valid reason.
I cannot find a way to get my hands on the http:\\locahost:8080 information.
I've looked at the static methods:
Session s = org.apache.axis.MessageContext.getCurrentContext().getSession();
and
Message m = org.apache.axis.MessageContext.getCurrentContext().getCurrentMessage();Still don't see the way to the info I need.
Basically, the hostname from request: hostname
and the portnumber from request: port.thanks for any help.
Chris
CONFIDENTIALITY NOTICE This message and any included attachments are from Cerner Corporation and are intended only for the addressee. The information contained in this message is confidential and may constitute inside or non-public information under international, federal, or state securities laws. Unauthorized forwarding, printing, copying, distribution, or use of such information is strictly prohibited and may be unlawful. If you are not the addressee, please promptly delete this message and notify the sender of the delivery error by e-mail or you may call Cerner's corporate offices in Kansas City, Missouri, U.S.A at (+1) (816)221-1024. ----------------------------------------- -
Title: How to get hostname and port of service
It was
a 'great' guess too.
That
did it.
thanks,
chris
- How to get hostname and port of service Peake, Chris
- RE: How to get hostname and port of service Beyer,Nathan
- Peake, Chris
