Business services: Generating bindings for imports and exports

Bindings determine how an import or export interacts with clients outside the module where the import or export resides, allowing the module to interact with the outside world.

Bindings for imports and exports have different purposes. An export binding describes how that export (or service) will be published or made available to clients outside the module. The kind of binding determines what kind of client is supported; for example, a Web service binding makes the service available to any Web-based client, while an SCA binding makes it available to other SCA modules.

Import bindings tell the SCA run time processes how to access an external service. For example, if I publish a service with an SCA export binding, an import with a JMS binding will not be able to successfully call it.

Here are some notes on bindings for imports and exports:

  • The import binding does not have to be defined at development time; it can be defined at deployment time.
  • For an import that is generated from an export, Web service, or EJB, the binding type of the import will be specified for you.
  • If you are creating the import using the palette, you will have to specify a binding type for the external service technology in order to test it.
  • An SCA (Service Components Architecture) binding on an import specifies an SCA-bound export in another module. That export can be connected to either a component or import. As a result, the SCA import binding requires only two pieces of information: the name of the export it is calling and the module containing that export. The export must also have an SCA export binding. If the export has any export binding other than SCA, you cannot import it in another module with the SCA import binding. You must import it with the corresponding import binding type.
  • When you use the Generate Export action from the menu of a component, you need to select the binding so that the binding is generated when the export is created.
  • Creating an export specifies that a component or import is being externalized for use outside the module. The main reason for specifying the SCA binding type on the export is that it allows for the most efficient cross-module calls of the exported entity. If, for example, you were to specify the Web service export binding, the component/import would be invoked across the Web instead of via something approximating a direct call. A reason to not use the SCA export binding would be to allow clients outside of the SCA programming model to invoke the exported component or import. Note that you can create more than one export for a component or import, so you could effectively export the component or import with more than one binding if you specify a different binding type on each of the exports. You could even choose to export one set of interfaces with one binding type and another set of interfaces with another binding type. Because the SCA bindings are easy to use (for example, the SCA export binding requires no binding information), you might choose to use them for prototyping work, and replace or augment them as the prototype later evolves.
  • If an export in a module assembly does not have any binding, when deployed, SCA binding is assumed.
  • Once the binding has been generated for an import or export, you can use the Remove Binding action to remove the binding, or the Replace Binding action to replace the binding.
  • The import and export have different icons to indicate the type of binding. The following image shows an import and an export with no bindings:

    An import and an export with no bindings

  • Imports and exports have Binding properties that can be modified in the Properties view. Select the import or export in the assembly diagram to see its properties in the Properties view.
  • For additional EIS and JMS bindings information, see

When you use the palette to create imports and exports, you can generate the binding, as follows:

  1. If there is no interface defined on the import or export, add the interface first. See related tasks for instructions on adding the interface.
  2. Right-click on the import or export and select Generate Binding and the type of binding.
The binding will be generated for the import or export and its icon will change to indicate the type of binding that it has. To change the binding for an export or import, you can use Replace Binding or Remove Binding actions.
Related concepts
Approaches to assembling a mediation module
EIS imports and exports
Business services: Top-down development
Business services: Bottom-up development
Business services: Meet-in-the-middle development
Business services: Components and modules
Related tasks
Business services: Adding an interface
Mediation services: Creating an import
Mediation services: Creating an export
Creating a top-down JMS import binding
Modifying a bottom-up EIS import binding
Business services: Creating an import
Business services: Creating an export

Feedback
(C) Copyright IBM Corporation 2005, 2006. All Rights Reserved.