Chapter 10. Web services scenario 331
return true;
10.6.3 Extending the mediations
The techniques in this simple example illustrate how to manipulate messages in
a mediation. The code as written will work if you only expect two responses.
You can extend this example to manage more than two responses by adding a
queue to contain control data that indicates how many messages were sent out.
This information is used by the aggregator to know how many responses to
expect. For an example of this, see the broker scenario in Patterns: SOA with an
Enterprise Service Bus in WebSphere Application Server V6, SG24-6494.
Another element to consider is how long to wait for a response from each
service. This example waits indefinitely, but it would be reasonable include code
that handles a situation where not all responses are received within a time limit.
10.7 Runtime guidelines for Web services
This section describes how to configure the service integration bus for Web
services. We first look at the Web services support provided in WebSphere
Application Server. We then go into specific configuration tasks required to run
the sample application.
10.7.1 Web services support in WebSphere Application Server V6
WebSphere Application Server can act as both a Web service provider and as a
requester. As a provider, it hosts Web services that are published for use by
clients. As a requester, it hosts applications that invoke Web services from other
locations. WebSphere Application Server supports SOAP-based Web service
hosting and invocation.
WebSphere Application Server V6 provides J2EE 1.4 support, including Web
services 1.1.
򐂰 JAX-RPC v1.0 for J2EE 1.3, v1.1 for J2EE 1.4
򐂰 JSR 109 (Web services for J2EE)
332 Patterns: Implementing Self-Service in an SOA Environment
򐂰 WS-I Basic Profile 1.1.2 support
򐂰 WS-I Simple SOAP Binding Profile 1.0.3
򐂰 WS-I Attachments Profile 1.0
򐂰 SAAJ 1.2
򐂰 UDDI V2 and V3
򐂰 WS-TX (transactions)
򐂰 SOAP 1.1
򐂰 WSDL 1.1 for Web services
򐂰 WSIL 1.0 for Web services
򐂰 OASIS Web Services Security: SOAP Message Security 1.0 (WS-Security
򐂰 OASIS Web Services Security: UsernameToken Profile 1.0
򐂰 OASIS Web Services Security X.509 Certificate Token Profile
WebSphere Application Server also provides an integrated private UDDI V3
registry and in the Network Deployment package, integrated Web Services
Gateway function.
Web services and the service integration bus
Also new, is the ability to use the service integration bus as an intermediary
between service requestors and service providers, allowing control over the flow,
routing, and transformation of messages through mediations and JAX-RPC
handlers. The bus provides a flexible way to expose and call services located in
an intranet from the Internet (and vice versa), while also providing mechanisms
for protocol switching and security.
The use of Web services with the bus is an evolution of the Web Services
Gateway provided in WebSphere Application Server V5. Whereas the Web
Services Gateway was a stand-alone application in V5, the bus is more tightly
integrated into the application server, enabling users to take advantage of
WebSphere Application Server administration and scalability options, and also
build on top of the asynchronous messaging features provided by WebSphere
Application Server.
The bus enables users to specify a level of indirection between service
requestors and providers by exposing existing services at new destinations. It
also provides options for managing these services through
mediations, which
can access and manipulate incoming and outgoing message content, or even
route the message to a different service. Support for JAX-RPC handlers is also
included in the bus, as is Web services gateway functionality.
While all WebSphere Application Server packages can use the bus as a
destination point for Web services, the Web Services Gateway function is only
available in the Network Deployment package.

Get Patterns: Implementing Self-Service in an SOA Environment now with the O’Reilly learning platform.

O’Reilly members experience live online training, plus books, videos, and digital content from nearly 200 publishers.