Securing Webservices using BASIC Authentication on Weblogic Server.

To secure the Webservice to use Basic Authentication, we just need to use the @RolesAllowed annotation. No change needs to be done in the deployment descriptor.

Here is a sample JWS.

package demo;

import javax.jws.*;


@RolesAllowed ( {
@SecurityRole (role=”Adminstrators”,mapToPrincipals{“weblogic”}),

public class TestBasic {

public void hello(String test) {

Latest Comments

  1. Anonymous January 14, 2010
  2. Anonymous January 14, 2010
  3. Faisal Khan January 14, 2010

Leave a Reply