Show Table of Contents
3.2.4. Web Services Changes
3.2.4.1. Web Services Changes
JBoss EAP 6 includes support for deploying JAX-WS Web Service endpoints. This support is provided by JBossWS. For more information about Web Services, refer to the chapter entitled JAX-WS Web Services in the Development Guide for JBoss EAP 6 on https://access.redhat.com/site/documentation/JBoss_Enterprise_Application_Platform/.
JBossWS 4 includes the following changes that may impact your migration.
- JBossWS API Changes
- SPI and Common components were refactored in JBossWS 4. The following table lists API and packaging changes may affect your application migration.
Table 3.7. JBossWS API Changes
Old JAR Old Package New JAR New Package JBossWS SPI org.jboss.wsf.spi.annotation.* JBossWS API org.jboss.ws.api.annotation.* JBossWS SPI org.jboss.wsf.spi.binding.* JBossWS API org.jboss.ws.api.binding.* JBossWS SPI org.jboss.wsf.spi.management.recording.* JBossWS API org.jboss.ws.api.monitoring.* JBossWS SPI org.jboss.wsf.spi.tools.* JBossWS API org.jboss.ws.api.tools.* JBossWS SPI org.jboss.wsf.spi.tools.ant.* JBossWS API org.jboss.ws.tools.ant.* JBossWS SPI org.jboss.wsf.spi.tools.cmd.* JBossWS API org.jboss.ws.tools.cmd.* JBossWS SPI org.jboss.wsf.spi.util.ServiceLoader JBossWS API org.jboss.ws.api.util.ServiceLoader JBossWS Common org.jboss.wsf.common.* JBossWS API org.jboss.ws.common.* JBossWS Common org.jboss.wsf.common.handler.* JBossWS API org.jboss.ws.api.handler.* JBossWS Common org.jboss.wsf.common.addressing.* JBossWS API org.jboss.ws.api.addressing.* JBossWS Common org.jboss.wsf.common.DOMUtils JBossWS API org.jboss.ws.api.util.DOMUtils JBossWS Native org.jboss.ws.annotation.EndpointConfig JBossWS API org.jboss.ws.api.annotation.EndpointConfig - @WebContext Annotation
- In JBossWS 3.4.x, this annotation was packaged as
org.jboss.wsf.spi.annotation.WebContextin the JBossWS SPI JAR. In JBossWS 4.0, this annotation was moved toorg.jboss.ws.api.annotation.WebContextin the JBossWS API JAR. If your application includes the obsolete dependency, you must replace the imports and dependencies in your application source code and compile it against the new JBossWS API JAR.There is also a change to an attribute that is not backward compatible. TheString[] virtualHostsattribute has been changed toString virtualHost. In JBoss EAP 6, you can specify only one virtual host per deployment. If multiple webservices use the@WebContextannotation, the virtualHost value must be identical for all endpoints defined in the deployment archive. - Endpoint Configuration
- JBossWS 4.0 provides integration of the JBoss Web Services stack with most of the Apache CXF modules. The integration layer allows the use of standard webservices APIs, including JAX-WS. It also allows the use of Apache CFX advanced features on top of the JBoss EAP 6 container without requiring complex configuration or setup.The
webservicesubsystem in the domain configuration of JBoss EAP 6 includes predefined endpoint configurations. You can also define your own additional endpoint configurations. The@org.jboss.ws.api.annotation.EndpointConfigannotation is used to reference a given endpoint configuration.For more information on how to configure webservice endpoints in the JBoss server, refer to the chapter entitled JAX-WS Web Services in the Development Guide for JBoss EAP 6 on https://access.redhat.com/site/documentation/JBoss_Enterprise_Application_Platform/. - jboss-webservices.xml Deployment Descriptor
- JBossWS 4.0 introduces a new deployment descriptor to configure web services. The
jboss-webservices.xmlfile provides additional information for the given deployment and partially replaces the obsoletejboss.xmlfile.For EJB webservice deployments, the expected location of thejboss-webservices.xmldescriptor file is in theMETA-INF/directory. For POJO and EJB webservice endpoints bundled in WAR file, the expected location of thejboss-webservices.xmlfile is in theWEB-INF/directory.The following is an example of ajboss-webservices.xmldescriptor file and a table describing the elements.<webservices> <context-root>foo<context-root> <config-name>Standard WSSecurity Endpoint</config-name> <config-file>META-INF/custom.xml</config-file> <property> <name>prop.name</name> <value>prop.value</value> </property> <port-component> <ejb-name>TestService</ejb-name> <port-component-name>TestServicePort</port-component-name> <port-component-uri>/*</port-component-uri> <auth-method>BASIC</auth-method> <transport-guarantee>NONE</transport-guarantee> <secure-wsdl-access>true</secure-wsdl-access> </port-component> <webservice-description> <webservice-description-name>TestService</webservice-description-name> <wsdl-publish-location>file:///bar/foo.wsdl</wsdl-publish-location> </webservice-description> </webservices>Table 3.8. jboss-webservice.xml File Element Description
Element Name Description context-rootUsed to customize the context root of the webservices deployment.config-nameconfig-fileUsed to associate an endpoint deployment with a given endpoint configuration. Endpoint configurations are specified in the referenced configuration file or in thewebservicessubsystem of the domain configuration.propertyUsed to set up simple property name value pairs to configure the webservice stack behavior.port-componentUsed to customize the EJB endpoint target URI or to configure security related properties.webservice-descriptionUsed to customize or override the webservice WSDL published location.

Where did the comment section go?
Red Hat's documentation publication system recently went through an upgrade to enable speedier, more mobile-friendly content. We decided to re-evaluate our commenting platform to ensure that it meets your expectations and serves as an optimal feedback mechanism. During this redesign, we invite your input on providing feedback on Red Hat documentation via the discussion platform.