[jboss-user] [JBossWS] - Re: getting ip address from webservice

RomeuFigueira do-not-reply at jboss.com
Tue Oct 31 07:04:01 EST 2006


What if one doesn't have that property listed (remoteaddr?)

public boolean handleRequest(MessageContext messageContext)
  | 	{
  | 		String IP = (String) messageContext.getProperty("remoteaddr");
  | 		
  | 		System.out.println("Remote IP: " + IP);
  | 
  | 		Iterator propertyNames = messageContext.getPropertyNames(  );
  | 		while ( propertyNames.hasNext(  ) )
  | 		{
  | 			String keyName = (String) propertyNames.next(  );
  | 			System.out.println("Key: " + keyName + " Val: " + messageContext.getProperty( keyName ).toString() );
  | 		}
  | ....
  | continues
  | ....
  | 

The first one gives me null, and listing the properties shows no "remoteaddr".


  | 2006-10-31 11:57:34,784 INFO  [STDOUT] Remote IP: null
  | 2006-10-31 11:57:34,784 INFO  [STDOUT] Key: javax.xml.ws.servlet.request Val:org.apache.catalina.connector.RequestFacade at 12e2fba
  | 2006-10-31 11:57:34,784 INFO  [STDOUT] Key: javax.xml.ws.servlet.context Val:org.jboss.ws.server.ServletEndpointContextImpl at 11fc6b2
  | 2006-10-31 11:57:34,784 INFO  [STDOUT] Key: javax.xml.ws.servlet.response Val:org.apache.catalina.connector.ResponseFacade at 31c43f
  | 2006-10-31 11:57:34,784 INFO  [STDOUT] Key: javax.xml.ws.servlet.session Val:org.apache.catalina.session.StandardSessionFacade at 12dd1b8
  | 

Is there anything more to configure or am I missing something else in my calls?

Soft: Jboss AS 4.0.5, JBossWS 1.0.3 GA, Server Windows and HP-UX

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3982034#3982034

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3982034



More information about the jboss-user mailing list