Chapter 23. Web Services
Seam integrates with JBossWS (JWS) to allow standard Java EE web services to take full advantage of Seam's contextual framework, including conversational web service support. This chapter guides you through web service configuration for a Seam environment.
23.1. Configuration and Packaging
For Seam to create contexts for web service requests, it must first have access to those requests.
org.jboss.seam.webservice.SOAPRequestHandler
is a SOAPHandler
implementation that manages the Seam component life cycle during the scope of a web service request.
standard-jaxws-endpoint-config.xml
(a configuration file) should be placed in the META-INF
directory of the JAR
file that contains the web service classes. This file contains the following SOAP handler configuration:
<jaxws-config xmlns="urn:jboss:jaxws-config:2.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:javaee="http://java.sun.com/xml/ns/javaee" xsi:schemaLocation= "urn:jboss:jaxws-config:2.0 jaxws-config_2_0.xsd"> <endpoint-config> <config-name>Seam WebService Endpoint</config-name> <pre-handler-chains> <javaee:handler-chain> <javaee:protocol-bindings> ##SOAP11_HTTP </javaee:protocol-bindings> <javaee:handler> <javaee:handler-name> SOAP Request Handler </javaee:handler-name> <javaee:handler-class> org.jboss.seam.webservice.SOAPRequestHandler </javaee:handler-class> </javaee:handler> </javaee:handler-chain> </pre-handler-chains> </endpoint-config> </jaxws-config>