0 Replies Latest reply on Aug 27, 2009 6:57 PM by Liam Anderson

    Seam Identity through SOAP Web Services

    Liam Anderson Newbie

        I was wondering if anyone can help me. I am currently trying to create web services that tie into my seam set-up using the Java-WS framework. I am currently just trying to create a test ws service but I have run into an issue. When I login a user it works correctly but if I do another web service call after that the user has been logged out.

      Here is my code:-

      import javax.annotation.Resource;
      import javax.ejb.Stateless;
      import javax.jws.WebMethod;
      import javax.jws.WebService;
      import javax.xml.ws.BindingProvider;
      import javax.xml.ws.WebServiceContext;
      import org.jboss.seam.Component;
      import org.jboss.seam.annotations.Name;
      import org.jboss.seam.security.Identity;
      import org.jboss.wsf.spi.annotation.WebContext;
      import uk.co.kraya.quark.admin.usermanagement.AdminUserHome;
      import uk.co.kraya.quark.domain.AdminUser;
      @WebService(name = "AgentTestServiceWS", serviceName = "AgentTestService")
      public class TestWS implements TestWSRemote {
              WebServiceContext wsCtxt;
              public String testMethod() {
                    return Identity.instance().isLoggedIn() ? "success" : "fail";
              public String getMyInfo()
                              return Identity.instance().getCredentials().getUsername();
                      return "None";
               private AdminUserHome getAuctionAction()
                    // Get seam component named "auctionAction" from context
                    return (AdminUserHome) Component.getInstance(AdminUserHome.class, true);

      Thanks in advance