How to enable dynamic invocation of an endpoint with an
unwired EIS data binding import, using SMO.
Introduction
You can invoke services by
using endpoints that are different to those specified in the import.
For EIS bindings you can specify a dynamic endpoint using a URI that
represents the JNDI name of a Connection Factory.
Figure 1. Illustration of endpoint override by dynamic invocation
using SMO, with an unwired import
You create a mediation module that includes the dynamic
endpoint by performing tasks in WebSphere® Integration Developer.
Representing the JCA endpoint
JCA URIs have
the form:

>>-scheme--:--jca-variant--:--jndiName-------------------------><
- scheme
- The scheme for JCA URI is always jca.
- jca-variant
- The jca-variant provides more information about the JCA connection,
and is always jndi.
- jca-connectionFactory
- This identifies the JCA Connection Factory providing the dynamic
target address for a message. Parameters can be added to help specify
the target address returned by the Connection Factory.
An example of a valid JCA URI would be:
jca:jndi:SAPConn
This
URI tells the EIS Import handler to look for a Connection Factory
defined in JNDI as SAPConn.
The EIS binding
uses the Connection Factory to obtain the target address of the dynamic
endpoint. If a target address is found, the message is sent there.
If no target address is found, the message is sent to the original
endpoint.
Creating a dynamic invocation with a JCA endpoint
To
create a mediation module that includes the dynamic endpoint, perform
the following tasks:
- Create the Mediation Module, containing an Export, a mediation
flow component, and an EIS JDBC 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 Import is configured to route messages to SvcProvider
1.
- 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 a
target import, and routing criteria that resolve to SvcProvider 2.
The mediation flow component extracts the endpoint and target import
from the message, and puts it into the SMO, using the Message Element
Setter primitive. 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 any one of three conditions is true:
- The target address/import/binding information is missing or incorrect.
- The target import specified does not exist.
- SvcProvider 2 is not available.
A runtime exception thrown by the import is returned in the
response flow.