How to enable dynamic invocation of an endpoint with a
wired Web Service data binding import, using SMO.
Introduction
You can invoke services by
using endpoints that are different to those specified in the import.
For Web Service bindings, a dynamic endpoint can be specified using
a URL that conforms to the web services URI standard.
Figure 1. Illustration of endpoint override by dynamic invocation using
SMO, with wired import
You create a mediation module that includes the dynamic
endpoint, by performing tasks in WebSphere® Integration Developer.
Creating a dynamic invocation with a Web Service endpoint
To
create a mediation module that includes the dynamic endpoint, perform
the following tasks:
- Create Mediation Module 1, containing an Export, a mediation flow
component, and a Web Service Import. The export is of any type.
- Connect the Mediation Module import to static SvcProvider 1.
- Create SvcProvider 2.
- Check that SvcProvider 1 and SvcProvider 2 have the same port
type.
- Check that the callout node has dynamic endpoint invocation override
enabled.
- Deploy the modules to the server.
Using dynamic invocation
Dynamic invocation
takes place when the export is invoked with a message containing routing
criteria that resolve to SvcProvider 2. The mediation flow component
identifies the routing criteria in the message. The mediation flow
component uses the Message Element Setter primitive to set the new
target address in the SMO, using the incoming message content and
routing criteria. Alternatively, the mediation flow component might
use the Business Object Map or XSL Transformation primitives to set
the new target address. The callout uses information from the SMO
to invoke SvcProvider 2. Any response is returned by the response
flow to the caller of export.
A one-way invocation message
works the same way as a two-way message, except that no response message
is returned.
A runtime exception occurs when one of three conditions
is true:
- The endpoint specified does not exist.
- The URL format and the import binding type are not compatible.
- The URI has invalid syntax.
The exception is thrown by the import, and returned in the response
flow.