Java Reference
In-Depth Information
client.doSomething();
What about EJB-based web services? The configuration is slightly different; since
the security domain is not specified into web descriptors, we have to provide it by
means of annotations:
@Stateless
@WebService(targetNamespace =
"http://www.packtpub.com/", serviceName =
"TicketWebService")
@WebContext(authMethod = "BASIC",
secureWSDLAccess = false)
@SecurityDomain(value = "mysqldomain")
public class TicketSOAPService implements
TicketSOAPServiceItf, Serializable {
. . . .
}
As you can see, the
@org.jboss.ws.api.annotation.Webcontext
annota-
tion basically reflects the same configuration options as that of POJO-based web
services, with BASIC authentication and unrestricted WSDL access.
The
@org.jboss.ejb3.annotation.SecurityDomain
annotation should be
familiar to you since we have introduced it to illustrate how to secure an EJB. As you
can see, it's a replacement for the information contained in the
jboss-web.xml
file,
except that the security domain is referenced directly by
mysqldomain
(instead of
java:/jaas/mysqldomain
).