- This topic has 2 replies, 2 voices, and was last updated 15 years, 4 months ago by nazareno7.
-
AuthorPosts
-
nazareno7MemberGreetings:
I’m new to MyEclipse and web services programming. All day I have been trying to find an easy to follow example on how to implement security to a web service (JAX-WS using WSS – username and password in the SOAP header). Can this be done with MyEclipse (preferably using a wizard and/or the libraries that my eclipse uses). Do the solutions available automatically generates the WSDL with the necessary annotations to announce that WSS security is required? If a tutorial or example is not available can someone provide a code example that is compatible with MyEclipse? Thank you very much.
Brian FernandesModeratornazareno,
I’m afraid we do not have any wizards for security. However, please see this question – “How do I do basic authentication in JAX-WS?” in the JAX-WS FAQ here:
https://jax-ws.dev.java.net/faq/index.html#authHope this helps.
nazareno7MemberThanks Brian for your response and for the link. I read the link but did not implement the solution because it is intended for a client environment. In my case what I’m trying to do is authentication at the server (Web Service Level). I have seen various examples in the web but have not found a solution. I’m starting to think that maybe my problem is that I’m using the Create New Web Service wizard. This is because it generates a Delegate and the class I create does not have the @WebService directive (because of this I can’t access the context from my class – one solution I found involves reading the SOAP headers from the contex). At this point my questions are: Is there an example on how to create a Web Service using authentication (WSS {best solution} or at SOAP header level) in a server environment when creating a Web Service Project using the JAX-WS framework? If I create the web service manually (creating a class with the @WebService) is there is a way to create the WSDL automatically (if possible with the necessary entries to announce that authentication is necessary). If I have to create the web services manually, what files do I have to modify (config files) in order to publish the web service? Should I create a Web Project (instead of a Web Service Project) to create the Web Services manually (what is the best practice)? What should be the best practice in my case (want to create a Web Service with authentication) should I use the Create Web Service wizard or should I do all the process manually? Is there a tutorial on how to do this? My experience with MyEclipse have been great, the only thing I’m struggling is with the implementation of the security. Again thank you very much for your response, you have been very kind. Thank you.
-
AuthorPosts