3 Replies Latest reply on May 22, 2013 7:59 AM by Nicklas Karlsson

    how to implement jaas with jboss web service?

    Joseph Hwang Novice

      This is my BASIC web authentication with Java web service.


      ==== IHelloPort.java


      public interface IHelloPort {




        public String sayHello(@WebParam String name);



      ==== HelloBean.java

      public class HelloBean implements IHelloPort {

      public String sayHello(@WebParam String name) {
        // TODO Auto-generated method stub
        return "Hello " + name;



      ===== web.xml




















      ====== index.jsp

      <meta http-equiv="Content-Type" content="text/html; charset=EUC-KR">

      <title>Insert title here</title>




      HelloBeanService service = new HelloBeanService();

      IHelloPort port = service.getHelloBeanPort();

      out.println(port.sayHello("joseph")); // throws Exception!!





      BASIC web login-config is successful when calling index.jsp file. But Invoking web service port throws Exception.


      Caused by: org.apache.cxf.transport.http.HTTPException: HTTP response '401: Unauthorized' when communicating with http://localhost:8080/SecurityTestWS/HelloBean


      With googling I found I had to put username and pssword into web service client. But I don't know how to do.

      Pls, inform me of any doc. or reference site. Thanks in advanced.