javax.jws.security
Annotation Type SecurityRoles


@Retention(value=RUNTIME)
@Target(value={TYPE,METHOD})
public @interface SecurityRoles

Defines the roles that are allowed to access the operations on the service. Roles may be applied at either the service (class) level or at the level of an individual method. The hosting container is responsible for ensuring that the security settings of the service are honored.


Optional Element Summary
 String[] rolesAllowed
          Specifies a list of roles permitted to access the Web Service.
 String[] rolesReferenced
          Specifies a list of roles referenced by the Web Service.
 

rolesAllowed

public abstract String[] rolesAllowed
Specifies a list of roles permitted to access the Web Service. If the @SecurityRoles annotation is applied at the class level, then the roles listed may call any method on the Web Service. If the @SecurityRoles annotation is applied at the method level, then the roles expand the list of roles allowed to access that operation. This annotation is the equivalent of the <method-permission> entry in ejb-jar.xml

Default:
{}

rolesReferenced

public abstract String[] rolesReferenced
Specifies a list of roles referenced by the Web Service. The Web Service may access other resources using the credentials of the roles listed. This annotation is the equivalent of the <security-role-ref> entry in ejb-jar.xml

Default:
{}