Hi, i have a question about the message context. Java WS Core fetches the host address from the request socket (socket.getInetAddress().getHostAddress()) and adds it as a property to the message context. The web service fetches the remote address from the message context.
I have implemented a handler class to catch the request message: ... import org.globus.wsrf.ResourceContext; import org.apache.axis.Constants; ... ResourceContext ctx = ResourceContext.getResourceContext(); String remoteAddress = (String) ctx.getProperty(Constants.MC_REMOTE_ADDR)); So i want to insert a new remote address: ctx.setProperty(Constants.MC_REMOTE_ADDR, "192.168.33.1"); but in the web service the following method display the remote address 127.0.1.1: String remoteAddress = (String) ctx.getProperty(org.apache.axis.Constants.MC_REMOTE_ADDR); System.out.println(remoteAddress); Can someone please correct how to set a property in the message context. thanks a lot saber Saber Dridi Universität Siegen Tel.: 01634679447 ________________________________________ Von: [email protected] [[email protected]] im Auftrag von Martin Feller [[email protected]] Gesendet: Montag, 5. Januar 2009 23:14 An: [email protected] Betreff: Re: [gt-user] anonymizing web service Dridi, Saber wrote: > Hi, > > Thank you Martin for your reply. Anonymizing a job submission in Grid > Computing is the subject of my > master thesis at the university of siegen in Germany. My requirement is to > send a job from a client > anonym to a web service. So that this web service dont became the real > identity of the client. > My adviser had me recommended to implement an anonymizing web service. The > client send the job to > this web service which fetch the identity of the client from the job, save it > in a resource and change > it and send the job with the new client Identity to the server. Finally on > the back way the server send > the job response to the anonymizing web service which insert the real client > identiy to the job > response and send it to the client. I'm still not sure if this approach is a good idea. An important aspect of job management in Grid-Computing is auditing and accounting to be able to e.g. enable fair share of compute resources amongst users, charge for usage, identify abuse of resources. It's not so much about completely anonymous usage afaict, and i'm not sure if this is a desired use-case. However, > > Can someone help me if this incident realizable is Yes, i think so, as your service acts like a regular client. Maybe a look at some client-code helps: export CVSROOT=:pserver:[email protected]:/home/globdev/CVS/globus-packages cvs co ws-gram check ws-gram/client/java/source/src/org/globus/exec/client/GramJob.java and ws-gram/client/java/source/src/org/globus/exec/client/GlobusRun.java and for a more elaborate client: ws-gram/service/java/test/throughput/ If you don't know how to figure out hostnames and ports of the client while making a call anonymous: pass them as arguments in the calls to your service as i mentioned earlier. The meta-scheduler Gridway might also be worth looking at. > > and how can i make this? :-) It's your master's thesis, isn't it? Good luck! Martin > > thank you > > > > Saber Dridi > Universität Siegen > Tel.: 01634679447 > ________________________________________ > Von: Martin Feller [[email protected]] > Gesendet: Montag, 5. Januar 2009 18:37 > An: Dridi, Saber; [email protected] > Betreff: Re: [gt-user] anonymizing web service > > Can you explain a bit more why you want to do this? > > Wouldn't it be easier to have a web portal or so that submits jobs to > gram on behalf of users, maybe using a community-credential for > authorization and authentication if you want to "hide" the real identity > of the user, instead of having a proxy-service? > > Martin > > Dridi, Saber wrote: >> Hi, >> >> Summary i want to send a job from a client to the server without that this >> server konws the real identity of the caller. So that a job request >> will be submittet anonym between the client and the web service >> >> >> >> i put the following code in the web service that i have implemented to fetch >> the ip address of the client from the message context: >> >> ... >> import org.globus.wsrf.ResourceContext; >> import org.apache.axis.Constants; >> ... >> >> ResourceContext ctx = ResourceContext.getResourceContext(); >> String remoteAddress = (String) >> ctx.getProperty(org.apache.axis.Constants.MC_REMOTE_ADDR); >> >> Java WS Core fetches the host address from the request socket >> (socket.getInetAddress().getHostAddress()) and adds it as a property to >> the message context. The web service fetches the remote address from the >> message context. >> >> Than i have changed the ip address: >> ctx.setProperty(org.apache.axis.Constants.MC_REMOTE_ADDR, "192.168.33.1"); >> >> But in this case the ip address was changed only in the message context >> because: >> >> InetAddress callerId = InetAddress.getByName(host); >> String ip = callerId.getHostAddress(); >> System.out.println(ip); >> >> gives me the local ip address 127.0.1.1 >> >> >> Can someone how can i implement an anonymizing web service? >> >> thanks a lot >> >>
