In this blog I will be explaining the basic structure and components involved in composite.xml which as you all know is the master configuration file of a composite application. This file uses an XML-based format called the Service Component Definition Language to describe the components and specify how they relate to one another. As you know in an increasingly SO world the interaction between components should be modeled as services, cleanly separating the implementation technology from the function that’s provided.
There are some terminologies that you need to be familiar when it comes to using the SCA model in SOA 11g.
The fundamental elements of a SCA SCDL are:
SCA defines a basic atom as a component. The implementation of each component can be done using any technology. Implementation.<tech> tag inside the <component> tag will specify the component used to implement that component. It can be BPEL, Mediator, Human Workflow, Java class, Business Rules or any other supported technology.
Components can be combined into larger structures called composites. The composite.xml is used as the configuration file to define the composite application. It is defined using the SCDL language. (Service Component Definition Language)
Whenever a component needs the services of other components it uses references. Each reference defines an interface containing operations that the component needs to invoke
Bindings specify how that communication happens. There can be multiple bindings, and the binding to be used will be determined at runtime.
A reference is connected to a service using a wire. A wire is an abstract representation of the relationship between a reference and some service that meets the needs of that reference.
A composite can also expose one or more services. These services are actually implemented by components within the composite.
Code Snippet :: composite.xml
<composite name="MyExample" .>
<implementation.mediator src="RouteRequest.mplan" />
<implementation.workflow src="ManualApproval.task" />
<implementation.decision src="ManualApprovalRule.decs" />
<reference name="FileWrite" ui:wsdlLocation="FileWrite.wsdl">
<interface.wsdl interface="http://geo.com/FileWrite#wsdl.interface(Write_ptt)" />
<binding.jca config="FileWrite_file.jca" />
<reference name="getStatus" ui:wsdlLocation="http://<host>:port/soa-infra/services/default/CCValidation!1.0/GetStatus.wsdl">
<interface.wsdl interface="http://geo.com/GetStatus#wsdl.interface(execute_ptt)" />
<binding.ws port="http://geo.com/GetStatus#wsdl.endpoint(GetStatusByCC/execute_pt)" location="http://host:port/soa-infra/services/default/CCValidation!1.0/GetStatus?WSDL" />
<service name=“ HelloWorld” ui:wsdlLocation="HelloWorld.wsdl">
The SCDL configuration file’s implementation element tells the runtime both what kinds of containers it needs for a particular composite and where to find the implementations of the components in that composite .The SCA runtime provides all bindings, allowing components created using any technology to use any available binding. Hope this helps J