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.*;
import weblogic.jws.security.RolesAllowed;
import weblogic.jws.security.SecurityRole;
@RolesAllowed ( {
@SecurityRole (role=”Adminstrators”,mapToPrincipals{“weblogic”}),
}
)
@WebService
public class TestBasic {
@WebMethod
public void hello(String test) {
System.out.println(“print”+test);
}
}
How to do the same thing in JAXWS
Where is the Client for ..your WebService ?
My Fried Joy has explained it in one of the forum replies I guess…http://forums.oracle.com/forums/thread.jspa?threadID=1007835&tstart=0