An export lets you make services in an integration module
available to external clients, and an import makes it possible for
your SCA components in an integration module to call external services.
The binding associated with the export or import specifies the
relationship between protocol messages and business objects. It also
specifies the way that operations and faults are selected.
Flow of information through an export
An
export receives a request, which is intended for the component to
which the export is wired, over a specific
transport determined by the associated binding (for example, HTTP).Figure 1. Flow of a request through the export to a
component
When the export receives the request, the following sequence
of events occurs:
- For WebSphere® MQ bindings
only, the header data binding transforms the protocol header into
a header data object.
- The function selector determines the native method name from the
protocol message. The native method name is mapped by the export
configuration to the name of an operation on the interface of the
export.
- The request data handler or data binding on the method transforms
the request to a request business object.
- The export invokes the component method with the request business
object.
- The HTTP export binding, the Web service export binding, and the EJB export binding invoke the SCA component
synchronously.
- The JMS, Generic JMS, MQ JMS, and WebSphere MQ export bindings invoke the
SCA component asynchronously.
Note that an export can propagate the headers and user
properties it receives over the protocol, if context propagation
is enabled. Components that are wired to the export can then
access these headers and user properties. See the "Propagation" topic
in the WebSphere Integration
Developer information center for more information.
If this
is a two-way operation, the component returns a response.
Figure 2. Flow of a response back through the export
The following sequence of steps occurs:
- If a normal response message is received by the export binding,
the response data handler or data binding on the method transforms
the business object to a response.
If the response is a fault,
the fault data handler or data binding on the method transforms the
fault to a fault response.
For HTTP export bindings only, if
the response is a runtime exception, the runtime exception data handler,
if configured, is called.
- For WebSphere MQ bindings
only, the header data binding transforms the header data objects into
protocol headers.
- The export sends the service response over the transport.
Flow of information through an import
Components
send requests to services outside the module using an import. The
request is sent, over a specific transport determined by the associated
binding.Figure 3. Flow from a component through
the import to a service
The component invokes the import with a request business
object.
Note: - The HTTP import binding, the Web service import binding,
and the EJB import binding should be invoked synchronously by the
calling component.
- The JMS, Generic JMS, MQ JMS, and WebSphere MQ import binding should be invoked
asynchronously.
After the component invokes the import, the following
sequence of events occurs:
- The request data handler or data binding on the method transforms
the request business object into a protocol request message.
- For WebSphere MQ bindings
only, the header data binding on the method sets the header business
object in the protocol header.
- The import invokes the service with the service request over the
transport.
If this is a two-way operation, the service returns a
response, and the following sequence of steps occurs:
Figure 4. Flow of a response back through the import
- For WebSphere MQ bindings
only, the header data binding transforms the protocol header into
a header data object.
- A determination is made about whether the response is a fault.
- If the response is a fault, the fault selector inspects the fault
to determine which WSDL fault it maps to. The fault data handler on
the method then transforms the fault to a fault response.
- If the response is a runtime exception, the runtime exception
data handler, if configured, is called.
- The response data handler or binding on the method transforms
the response to a response business object.
- The import returns the response business object to the component.