For three days i have been surfing and searching over the internet but cant find any use full tutorial.
The main problem is:
I have a soap web service. The main thing of the web service will be that you will have to register a user to it to get the exact data.
We have user1 that has access to doc1, doc3 and doc 7. So user will give the userName and password to the client and the client will send the login data to the webservice. The web service would check if the login data is ok ( this web service will be handling permissions ) and send the confirmation status. So now the client request the documents and the service returns him only the documents he has access to.
The main problem is i don't know exactly what to search for. We have a soap web service in php and to use it over the soapUI you had to add you userName and password. I dont know how to request this data in a java web service.
In the link i give you an example how my webapp looks like.
App1 It is an application ready to be built and an already built app
I'm using WebSphere for my web applications.
To build an web application I use Maven.
All my applications are in Java and i am currently using JDK6_11
If any other information is needed just say it and i will give it.
For any help would be grate full.
Thank you very much.
If you are using standard JavaEE security, then you could retrieve the principal (available both in EJB and servlet endpoints) and then retrieve the name from the principal.
Using this name, you can then determine which document to return to the client.
This kind of thing is the realm of the WS-Security standard, which specifies username/password authentication, amongst other things. All major Java SOAP frameworks (like Axis 2, Metro and JBossWS) support it. Consult the documentation of whichever one you're using for details on how to use it.
Joined: Dec 16, 2009
I've been watching trough all these things but the problem is i want to find a good example that works but didn't find anything. Maybe the problem is that i am searching wrong. Thank you for all the replies
subject: Request Username and Password before any function of webService is called