File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes EJB and other Java EE Technologies and the fly likes Basic Authentication on a Web Service [WebSphere 7 for developer] Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "Basic Authentication on a Web Service [WebSphere 7 for developer]" Watch "Basic Authentication on a Web Service [WebSphere 7 for developer]" New topic

Basic Authentication on a Web Service [WebSphere 7 for developer]

Cyrill Rohr

Joined: Oct 02, 2009
Posts: 1
Hi All,
I have a problem to active/configure the basic authentication on a web service with WebSphere 7. I explain me:

I have created a test web service very standard with the web service interface:
and the web service endpoint:
You can see I want that only users in group AXS_AA could access my method getParameter.
Next I have create the ejb-jar.xml:
and the application.xml contains the security-roles.
You can see it is a very simple and standard web service nothing are special, etc..

Ok, next I have compiled classes and created the EAR file. After that I have used the tool endptenabler myEAR.ear to create the http_router for acceding the wsdl url. I don't have modify any descriptors created by this tool.
Finally I have deployed the EAR in WebSphere 7. All thing was running and I can access the wsdl url of the web service.

Then to active the security I have check the checkbox Enable application security of the Global Security with the administration console of Websphere and I have mapped an user to the group AXS_AA for my application.

Now is the problem:
I have created a very simple web service client with NetBeans:
You can see, first I access the web service and then I want to add to the requestContext the credential (username and password) to authenticate to the webservice but the authentication doesn't work and I become the following error:

Now I want to know how I can active/configure the basic authentication and send my credential to be able to access the web service method.
Just for information all thing I have done work correctly with JBoss, Sun Glassfish and Oracle WebLogic but I cannot find what I must to do for WebSphere.

Thanks in advance.
I agree. Here's the link:
subject: Basic Authentication on a Web Service [WebSphere 7 for developer]
It's not a secret anymore!