Hi Jaikiran! I hope you will help me.
I have problems with security in EJB marked as Webservice.
@Stateless
@WebService(targetNamespace="ws.test.com", serviceName="TestWebService")
@org.jboss.ejb3.annotation.SecurityDomain("test-domain")
@RolesAllowed("test")
@WebContext(urlPattern="/TestWebService",
secureWSDLAccess=false,
authMethod="BASIC",
transportGuarantee="CONFIDENTIAL")
public class TestWebServiceBean {
...
I have also configured security domain in standalone.xml.
But it looks like basic auth isn't working, and finaly i got exception because authentication wasn't performed.
Caused by: javax.ejb.EJBAccessException: JBAS014502: Invocation on method: public com.test..OutputCustomerValueArrayHolder com.test.TestWebServiceBean.findAllCustomers() throws com.test.exceptions.InternalException of bean: TestWebServiceBean is not allowed
What is going on?
@WebContext annotation didn't work. it was because of incorrect import org.jboss.wsf.spi.annotation.WebContext;