2 Replies Latest reply on Apr 9, 2008 12:54 AM by Thomas Diesler

    Basic Authentication

    James Moring Newbie

      I have a custom login module that works just fine on non-web service applications. However on web service (EJB endpoint) it is called just fine but the callback handler for the user name always returns null. I have tried annotations (@SecurityDomain, @WebContext) and I have tried using a jboss.xml but nothing seems to work.

      I have verified that the .NET 2.0 and/or .NET 3.5 client is sending the Authorization http header.

      What is the secret here!!!!


      package com.xxxxxxxx.ws.autopilot;

      import javax.annotation.security.*;
      import javax.ejb.*;
      import javax.jws.*;
      import javax.jws.soap.*;
      import org.jboss.annotation.security.*;
      import org.jboss.ws.annotation.*;

      @Stateless
      @SecurityDomain(value="MyLoginModule")
      @WebService
      (
      name="Autopilot",
      targetNamespace = "http://opas.xxxxxxxxx.net/Xxxxxxxxxxxx",
      serviceName = "AutopilotService"
      )
      @RolesAllowed("Everyone")
      @SOAPBinding(parameterStyle = SOAPBinding.ParameterStyle.BARE)
      @WebContext(contextRoot="/Autopilot", urlPattern="/*", authMethod="BASIC", transportGuarantee="NONE", secureWSDLAccess=false)
      public class Autopilot
      {

      @WebMethod
      @PermitAll
      public String ping( String Value )
      {
      return Value.toUpperCase();
      }


      }