Re: obtaining consumer IP
Great! Thanks for your advice as well. What I am doing now is purely academic, so it doesn't have to pass the "real-world" test :-) Rob On 4/26/05, Tim K. (Gmane) <[EMAIL PROTECTED]> wrote: > From the MessageContext you can get the HttpServletRequest and from > that the IP: > > HttpServletRequest req = (HttpServletRequest) > msgContext.getProperty(org.apache.axis.transport.http.HTTPConstants.MC_HTTP_SERVLETREQUEST); > > String ip = req.getRemoteAddr(); > > However, keep in mind that the IP address may be misleading if the > client is going through a proxy or you have a load balancer in front of > your server or a caching server, etc. I know in a real production system > you will most likely get a local IP address. Also, if you want to do > security based on the IP address, keep in mind that IP addresses can be > easily spoofed. For this reason I find relying on the IP address to be a > bad plan. > > Tim > > > Robert Gombotz wrote: > > >Hi! > > > > > >I would need to obtain the IP address of clients/consumers that make > >calls to my Web services, preferably using a SOAP handler. > >So far, I have not found a way of achieving this. The MessageContext > >seems to be the only data I have in a handler, and from what I > >understand it does not contain the client's IP. > > > >Any hints and ideas are greatly appreciated. > > > > > >Rob > > > > > > > >
obtaining consumer IP
Hi! I would need to obtain the IP address of clients/consumers that make calls to my Web services, preferably using a SOAP handler. So far, I have not found a way of achieving this. The MessageContext seems to be the only data I have in a handler, and from what I understand it does not contain the client's IP. Any hints and ideas are greatly appreciated. Rob
Re: tomcat, directories
Classes usually go in axis/WEB-INF/classes directory. be sure to keep your classes in a directory strcuture according to the package names, so com/yourbiz/util/YourClass would go in a dircetory axis/WEB-INF/classes/com/yourbiz/util/ hope I read your question right :-) On 4/22/05, Dave Overbeck <[EMAIL PROTECTED]> wrote: > Hello! > > I am desperately trying to get a simple application to run which has two > modules, a utility and a web service for it. Suppose I have a utility > com/mybiz/util/ut which is called by com/mybiz/myapp/ws. > > -Where does the utility class file go? In Tomcat? In Axis? I have tried > all sorts of combinations but the utility is not found. > > -What if I want to create a simpler case in the default package? I've > read that a .jws can't use packages, but can it call another module? > Where would this module go? > > Thanks for any details, > Dave > >
Re: How to pass information between handlers and services.
as far as I know there is no way for a handler to talk to a WS directly. but you can get the message inside your WS implementation: in your WS you can get the soap message using org.apache.axis.MessageContext.getCurrentContext() which gives you an object of type MessageContext. that you can use just like in your handlers, so just retrieve any info fram the message you want. hope I could be of help. Rob On 4/21/05, Mik Goodhelp <[EMAIL PROTECTED]> wrote: > I am trying to implement an application that does the following. > Assume we have a client : > > startSomething(XMLFLAG) > call.invoke(EndpointReference_1) > call.invoke(EndpointReference_2) > call.invoke(EndpointReference_3) > > An Handler has to intercept the different calls and put the XMLFLAG in > the SOAPHeader of all the calls. > > On the Provider side an Handler has to intercept the call, get the > XMLFLAG from the SOAPHeader and pass it to the provider service. > > In simple words there is a way to directly pass information between > Client-Services and Client-Handlers and between Provider-Handlers and > Provider-Services > ??? > Thanks in advance. >
Re: Handler to webservice bridge.
Hi. just posted a question of the same kind and got a response. in your WS you can get the soap message using org.apache.axis.MessageContext.getCurrentContext() which gives you an object of type MessageContext. that you can use just like in your handlers, so just retrieve user and pwd again in the WS implementation. hope that helps. Rob On Thu, 17 Mar 2005 17:58:43 -0500, Timour Mouratov <[EMAIL PROTECTED]> wrote: > Hello, > > Each SOAP request that comes to my web service contains user > credentials (name and password) within SOAP header. I'm using it to > authenticate a request and after user is authenticated I drop the > header. Now web service itself needs these parameters (user name and > password) for it is own business logic but I don't want to > expose/introduce them in WSDL. > > Is there a possibility to pass simple objects from handler to service > within the same request/response flaw ? > > Thanks in advance. >
SOAP message content in the service implementation
Hi. This is more of a general question I am afraid. I would need to have access to some parts of my SOAP message in the service implementation. More precise, I am sending some info to a WS A in SOAP headers. This service A in turn makes a call to another WS B( in doing so WS A is acting as a client/consumer). Now I would like to include the information, which WS A received in the form of SOAP headers, to the message that WS A sends to WS B. I am aware of handlers being able to process messages, but is it possible to get a hold of the message inside the WS implementation? I am pretty sure that it is not possible with Axis. After all, the implementation of the WS would only be working when used as a WS. So if I am right and it is not possible, does anybody know of other SOAP enabled application servers that allow you to do something like that? Or any hints as to how I could alter the Axis code so that it migh be possible (I know, that would be a mission and and half, anyway.) Thanks in advance Rob
Users and roles
Hi I have had a look at the server-config.wsdd and noticed that some of the existing WS in axis define allowedRoles in their config file entries. I assume that the user names which are the value of the "allowedRoles" parameters in server-config.wsdd correspond to users in /axis/WEB-INF/users.lst. My question now is how to use this apparent security mechanism in Axis. How do I authenticate myself as a certain user when consuming a WS deployed in Axis? Or is that not the way users.lst and "allowedRoles" is supposed to be used? Thanks in advance! Rob