jaxws ejb3 endpoint http basic auth RolesAllowed in deployment descriptor

Latest response

JBoss EAP 6.3.0.GA (AS 7.4.0.Final-redhat-19)
JDK 1.7.0_75
RHEL 6.6

I have created a web service with ejb3 endpoint and packaged and deployed as ejb jar
https://github.com/sgurjar/jbossws.ejb3

I needed to set up http basic auth for the webservice http call. I could add jboss-webservices.xml
https://github.com/sgurjar/jbossws.ejb3/blob/master/src/main/resources/META-INF/jboss-webservices.xml

<webservices xmlns="http://www.jboss.com/xml/ns/javaee">
  <context-root>hr</context-root>
  <port-component>
    <ejb-name>HrServiceBean</ejb-name>
    <port-component-name>HumanResourcePort</port-component-name>
    <port-component-uri>/*</port-component-uri>
    <auth-method>BASIC</auth-method>
    <transport-guarantee>NONE</transport-guarantee>
    <secure-wsdl-access>false</secure-wsdl-access>
  </port-component>
</webservices>

But I couldn't find a way to configure security role in deployment descriptor, I used javax.annotation.security.RolesAllowed annotation and it worked. However, I want to do it in the deployment descriptor. Is there a way to do this in the deployment descriptor.

Thanks

Responses