7 Replies Latest reply: Aug 10, 2012 7:54 AM by 933515 RSS

    Https BASIC auth on EJB exposed as WebService

    933515
      Hi.

      We try implementation of EJB exposed as WebService using JAX-WS - Weblogic 12c.


      Simple code:

      import javax.ejb.Stateless;
      import javax.jws.WebMethod;
      import javax.jws.WebService;
      import weblogic.jws.Policy;

      @Policy(uri="policy:Wssp1.2-2007-Https-BasicAuth.xml")
      @Stateless(name = "XxxService")
      @WebService(name="XxxService", serviceName="XxxService")
      public class XxxServiceBean {

      /**
      * Default constructor.
      */
      public XxxServiceBean() {
      }

      @WebMethod
      public String Hello(String name)
      {
           return "Hello " + name + "!";
      }
      }

      The problem is, that if I'm trying call this via SOAP UI with weblogic username/pwd I'm getting this response:

      <env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/">
      <env:Body>
      <env:Fault>
      <faultcode>env:Server</faultcode>
      <faultstring>Unknown exception, internal system processing error.</faultstring>
      </env:Fault>
      </env:Body>
      </env:Envelope>

      In the WLS log is no exception.

      If I'm calling it without username/pwd, I'm getting HTTP 200 OK response (!!) and no soap envelope.

      I don't know where to look (some log or settings?) what is wrong.

      Can anybody help please?

      I was following for example this step-by-step guid too:
      Securing JAX-WS Webservice built fom EJB with HTTPS + Basic Authentication

      Thanks.

      Richard