Hi, I have the following ejb with webservice and security metadata.
Now I have some security problems (http 401 error) when a try to access to wsdl from the client.
Is there a way to access to wsdl from the client? or
Is there a way to disable security to wsdl URL (disable security for GET)?
EJB code:
@SecurityDomain("JBossWS")
@javax.jws.soap.SOAPBinding(style = javax.jws.soap.SOAPBinding.Style.RPC)
@javax.jws.WebService(name = "SampleService", serviceName = "SampleService")
@PortComponent(authMethod="BASIC", transportGuarantee="NONE")
@Stateless
@Remote(SampleService.class)
public class SampleServiceBean implements SampleService {
@javax.jws.WebMethod()
@RolesAllowed({"AdminUser"})
public Long add(Long firstNumber, Long secondNumber) {
return firstNumber + secondNumber;
}
}
URL url = new URL("http://localhost:8080/sample-ejb-session/SampleServiceBean?wsdl");
QName qname = new QName("http://test.org/jaws", "SampleService");
ServiceFactory factory = ServiceFactory.newInstance();
Service service = factory.createService(url, qname);