Best,
Daniel
Martin Gainty wrote:
Daniel- the suggestion gets the request from SOAPContext via HttpServletRequest hsr = req.getProperty(Constants.BAG_HTTPSERVLETREQUEST);
you can then get ALL of the HTTP Variable parameters that the Request has
access to via
hsr.getQueryString() OR
hsr.getHost()
to see all the HTTP Variables you have access to take a look at
http://java.sun.com/j2ee/sdk_1.3/techdocs/api/javax/servlet/http/HttpServletRequest.html
Regards,
-Martin
----- Original Message ----- From: "Daniel Zhang" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, May 26, 2004 9:27 AM
Subject: Re: SOAP method to get server/ip of incoming message source
to access the HttpServletRequest, on which the getRemoteAddr orThank you Scott! That's what I want. We are using messaging API. Actually I am looking at the SOAPContext class, but I didn't find method to getRemoteAddr/getRemoteHost directly and I don't the trick to use getProperty(Constants.BAG_HTTPSERVLETREQUEST).
Daniel
Scott Nichol wrote:
You will need to access the SOAPContext for the request. This allows you
getRemoteHost method will give you what you need.
you get the SOAPContext for the request passed into your service method.Does your service use the RPC or messaging API? For the messaging API,
For the RPC API, you need to use a trick: add SOAPContext as the first
parameter to your method. For example, if your method is
parameter Constants.BAG_HTTPSERVLETREQUEST, i.e.String foo(String bar, int baz)
change it to
String foo(SOAPContext req, String bar, int baz)
Now that you have the SOAPContext, use the getProperty method with the
req.getProperty(Constants.BAG_HTTPSERVLETREQUEST);HttpServletRequest hsr =
(http://ws.apache.org/soap/docs/guide/migration.html).This is documented in the User Guide
Scott Nichol
Do not send e-mail directly to this e-mail address,
because it is filtered to accept only mail from
specific mail lists.
----- Original Message ----- From: "Daniel Zhang" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, May 25, 2004 2:30 PM
Subject: SOAP method to get server/ip of incoming message source
Hi, All:
In SOAP package, is there any method could retrieve servername/IP of incoming source? I need a method sitting on the server side to tell the client servername or IP.
Thanks,
Daniel
