permaculture playing cards*
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

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
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]
Similar Threads
problem to send file
problem when using SoapConnection method call()
Weblogic security - ajax web service
JAX-WS - please help convert proxy to BindingProvider for HTTP auth
Webservice over WAS: Help with ClassCastException... incompatible with javax.xml.bind.JAXBElement