After you develop an Service Component Architecture (SCA)
component, you can use bindings to specify how SCA services and references
enable the component to communicate with other applications.
About this task
Services and references enable a component to communicate
with other applications. By design, however, the SCA services and
references say nothing about how this communication occurs. Bindings
are used to determine how a component communicates with the world
outside its domain. SCA services use bindings to describe the access
mechanism that clients must use to call the service. SCA references
use bindings to describe the access mechanism that is used to call
a service. Depending on what the SCA component is communicating with,
a component might or might not have explicitly specified bindings.
The
Feature Pack for SCA supports the following binding types:
- SCA binding
The SCA binding is also referred to as the default
binding. It is the binding that is used when no other binding is specified
for configuration of a component reference or service. It is the natural
binding to use when your SCA client invokes an SCA service in the
same domain.
Components
communicating within the same domain only need to explicitly configure
a default binding on a service or reference when there is at least
one non-default binding, such as the SCA Web service binding or the
SCA EJB binding, that is also configured.
- Web service binding
The SCA Web service binding applies to the
services and references of components. The Web service binding is
designed for SOAP-based Web Services-Interoperability (WS-I) compliant
Web services. This binding defines the manner in which a service is
made available as a Web service, and in which a reference can invoke
or access a Web service. The Web service binding enables SCA applications
to expose SCA services as Web services to external clients that might
or might not be implemented as an SCA component. This binding is a
Web Services Description Language (WSDL)-based binding which means
that the Web service binding either references an existing WSDL binding
or enables you to specify enough information to generate a WSDL file.
When an existing WSDL binding is not referenced, you can generate
a WSDL binding. You can further customize a SCA Web service binding
using SCA policy sets.
Web services technology plays an important
role in most SOA solutions relevant today, including SCA. The SCA
Web service binding type enables SCA applications to expose services
as Web services to external clients as well as enabling SCA components
access to external Web services. External clients that access SCA
services exposed as Web services may or may not be implemented as
an SCA component. You can use the Web service binding element <binding.ws> within
either a component service or a component reference definition. When
the Web service binding is used with a component service, this binding
type enables clients to access a service offered by a particular component
as a Web service. When the Web service binding is used with a component
reference, components in an SCA component can consume an external
Web service and access as if it was any other SCA component. Only
WSDL Version 1.1 is supported.
- EJB binding
EJB session beans are a common technology used to
implement business services. The ability to integrate SCA with services
based on session beans is useful because it preserves the investment
incurred during the creation of those business services, while enabling
the enterprise to embrace the newer SCA technology in incremental
steps. The simplest form of integration is to simply enable SCA components
to invoke session beans as SCA services. There is also a need to expose
services such that they are consumable by programmers skilled in the
EJB programming model. This enables existing session bean assets to
be enhanced to exploit newly deployed SCA services without the EJB
programmers having to learn a new programming model.
The SCA
EJB binding enables SCA to integrate with existing Java EE applications.
It exposes SCA services as stateless session beans to external clients.
The binding element <binding.ejb> is used within
a component service or component reference definition. Support is
provided for the EJB binding when using both 2.x and 3.0 EJB styles
for both the SCA service and reference.
Procedure
- Select a binding type to use for an SCA component.
- Use the SCA default binding when you want to invoke an SCA service
from an SCA client.
- Use the SCA Web service binding to specify that an SCA service
is made available as a Web service or an SCA reference can invoke
a Web service.
- Use the SCA EJB binding to integrate SCA with services based on
session beans.
- Configure the selected binding and use it in an SCA component
or application.
Results
SCA components can use the configured bindings to communicate
with other SCA services and references.
What to do next
Deploy the SCA component or application.