WebSphere Application Server supports the use of the Java Message
Service (JMS) API to transport Web services requests, as an alternative to
using HTTP.
Before you begin
The application server supports use of the Java Message Service (JMS)
API to transport Web services requests, as an alternative to HTTP transport.
Read about using the Java Message Service (JMS) to transport Web services
requests to learn more about how Web service clients and servers can communicate
through JMS queues and topics instead of through HTTP connections.
About this task
newfeat Supported configurations: The Feature Pack for Web Services does not support
Java Message Service (JMS) transports or enterprise beans. This product only
supports an HTTP transport and hosting JavaBeans endpoints within the Web
container for JAX-WS Web services applications. To develop enterprise beans
hosted as Web services, you must use the JAX-RPC programming model. This product
does allow JAX-WS clients to issue requests from any of the Java Platform,
Enterprise Edition (Java EE) containers along with the client Java 2 Standard
Edition (J2SE) environment.sptcfg
Configuring
a service endpoint is necessary to connect Web service clients to any Web
services among the components being assembled or to any external Web services.
You can configure the endpoint URL information for JMS during application
installation
In this task, enter the JMS endpoint URL prefix to use
for each Web service-enabled Enterprise JavaBeans (EJB) Java archive (JAR)
file that belong to the application. The JMS endpoint URLs are included in
the Web Service Description Language (WSDL) files published for clients to
use.
You can specify HTTP URL prefixes for Web services that are accessed
through HTTP by using the Provide HTTP endpoint URL information panel in the
administrative console. These prefixes are used to form complete endpoint
addresses that are included in WSDL files when published.
You can specify
JMS URL prefixes by using the Provide JMS and EJB endpoint URL information
panel in the administrative console during or after application installation.
To
configure JMS URL prefixes:
Procedure
- Open the administrative console.
- Click Applications > Enterprise Applications > application_instance > Provide
JMS and EJB endpoint URL information.
- Locate the list of Web services modules that are accessible through
JMS transport.
- Type the JMS URL fragment in the URL fragment field.
Enter a URL fragment that is a prefix to the initial URL part that is
obtained by examining the deployment information of the Web service. See the
usage scenario following this task for more information.
The value that
you enter is used to define the location attribute of the port soap:address
element within the WSDL file that is published using the application_name_ExtendedWSDLFiles.zip or
the application_name_WSDLFiles.zip file on the Publish WSDL
zip files panel.
Results
You have a Web service that is accessible through the JMS transport
and configured with JMS bindings.
Example
Suppose an application called StockQuoteService contains an EJB
JAR file that is named StockQuoteEJB, which contains one or more Web services
that are accessible through the JMS transport. In
Using the Java Message Service to transport Web services requests you
defined a queue with the Java Naming and Directory Interface (JNDI) name of
jms/StockQuote_Q,
and a connection factory with the JNDI name of
jms/StockQuote_CF,
for your application. In this example, you specify the following string
as the JMS URL prefix within the Provide JMS and EJB endpoint URL information
panel:
jms:/queue?destination=jms/StockQuote_Q&connectionFactory=jms/StockQuote_CF
The
WSDL publisher uses this partial URL string to produce the actual JMS URL
for each port component that is defined in the module. The
targetService=<port_name> string
is added to the end of the JMS URL, for example:
jms:/queue?destination=jms/StockQuote_Q&connectionFactory=jms/StockQuote_CF&targetService=getQuote
The published WSDL file is used by clients to invoke the Web service.
What to do next
Publish the WSDL files to make the deployed Web services application
available to clients.