SideNav > Documentation > Configuration of Corba Binding

Configuring a CORBA Binding

CORBA bindings are described using a variety of WSDL extensibility elements within the WSDL binding element. In most cases, the CORBA binding description is generated automatically using the wsdltoidl & idltowsdl tools. Usually, it is unnecessary to modify generated CORBA bindings.

Namespace

The WSDL extensions used to describe CORBA data mappings and CORBA transport details are conventionally prefixed by the namespace prefix, corba.(xmlns:corba="http://schemas.apache.org/yoko/bindings/corba")

corba:binding element

The corba:binding element indicates that the binding is a CORBA binding. This element has one required attribute: repositoryID. repositoryID specifies the full type ID of the interface. The type ID is embedded in the object's IOR and therefore must conform to the IDs that are generated from an IDL compiler. These are of the form:

IDL:module/interface:1.0

The corba:binding element also has an optional attribute, bases, that specifies that the interface being bound inherits from another interface. The value for bases is the type ID of the interface from which the bound interface inherits. For example, the following IDL:

//IDL
interface vehicle{};
interface car : vehicle{};

would produce the following corba:binding:

<corba:binding repositoryID="IDL:car:1.0"
bases="IDL:vehicle:1.0"/>

corba:operation element

The corba:operation element is an wsdl extensibility element of <operation> and describes the parts of the operation's messages. <corba:operation> takes a single attribute, name, which duplicates the name given in <operation>.

corba:param element

The corba:param element is a member of <corba:operation>. Each <part> of the input and output messages specified in the logical operation, except for the part representing the return value of the operation, must have a corresponding <corba:param>. The parameter order defined in the binding must match the order specified in the IDL definition of the operation. <corba:param> has the following required attributes:

modeSpecifies the direction of the parameter. The values directly correspond to the IDL directions: in, inout, out. Parameters set to in must be included in the input message of the logical operation. Parameters set to out must be included in the output message of the logical operation. Parameters set to inout must appear in both the input and output messages of the logical operation.
idltypeSpecifies the IDL type of the parameter. The type names are prefaced with corba: for primitive IDL types, and corbatm: for complex data types, which are mapped out in the corba:typeMapping portion of the contract.
nameSpecifies the name of the parameter as given in the logical portion of the contract.
corba:return element

The corba:return element is a member of <corba:operation> and specifies the return type, if any, of the operation. It only has two attributes:

nameSpecifies the name of the parameter as given in the logical portion of the contract.
idltypeSpecifies the IDL type of the parameter. The type names are prefaced with corba: for primitive IDL types and corbatm: for complex data types which are mapped out in the corba:typeMapping portion of the contract.
corba:raises element

The corba:raises element is a member of <corba:operation> and describes any exceptions the operation can raise. The exceptions are defined as fault messages in the logical definition of the operation. Each fault message must have a corresponding corba:raises element. The corba:raises element has one required attribute, exception, which specifies the type of data returned in the exception.

In addition to operations specified in <corba:operation> tags, within the <operation> block, each <operation> in the binding must also specify empty input and output elements as required by the WSDL specification. The CORBA binding specification, however, does not use them.

For each fault message defined in the logical description of the operation, a corresponding fault element must be provided in the <operation>, as required by the WSDL specification. The name attribute of the fault element specifies the name of the schema type representing the data passed in the fault message.

Example

A logical interface for a system to retrieve bank account information might look similar to Bank Port Type.

Bank port type:

<wsdl:message name="createAccount">
<wsdl:part name="inparameter" element="tns:createAccount"/>
</wsdl:message>
<wsdl:message name="createAccountResponse">
<wsdl:part name="outparameter" element="tns:createAccountResponse"/>
</wsdl:message>
<wsdl:message name="getAccount">
<wsdl:part name="inparameter" element="tns:getAccount"/>
</wsdl:message>
<wsdl:message name="AccountAlreadyExistsException">
<wsdl:part name="exception" element="tns:AccountAlreadyExistsException"/>
</wsdl:message>
<wsdl:message name="AccountNotFoundException">
<wsdl:part name="exception" element="tns:AccountNotFoundException"/>
</wsdl:message>
<wsdl:message name="getAccountResponse">
<wsdl:part name="outparameter" element="tns:getAccountResponse"/>
</wsdl:message>
<wsdl:portType name="Bank">
<wsdl:operation name="getAccount">
<wsdl:input name="getAccountRequest" message="tns:getAccount"/>
<wsdl:output name="getAccountResponse" message="tns:getAccountResponse"/>
<wsdl:fault name="AccountNotFoundException" message="tns:AccountNotFoundException"/>
</wsdl:operation>
<wsdl:operation name="createAccount">
<wsdl:input name="createAccountRequest" message="tns:createAccount"/>
<wsdl:output name="createAccountResponse" message="tns:createAccountResponse"/>
<wsdl:fault name="AccountAlreadyExistsException" message="tns:AccountAlreadyExistsException"/>
</wsdl:operation>
</wsdl:portType>

The CORBA binding for Bank is shown below.

Bank CORBA Binding:

<wsdl:binding name="BankCORBABinding" type="tns:Bank">
<corba:binding repositoryID="IDL:yoko/Bank:1.0" />
<wsdl:operation name="getAccount">
<corba:operation name="getAccount">
<corba:param mode="in" name="name" idltype="corba:string" />
<corba:return xmlns="http://schemas.apache.org/yoko/idl/bank/typemap" name="return" idltype="Account" />
<corba:raises xmlns="http://schemas.apache.org/yoko/idl/bank/typemap" exception="AccountNotFoundException" />
</corba:operation>
<wsdl:input name="getAccountRequest">
</wsdl:input>
<wsdl:output name="getAccountResponse">
</wsdl:output>
<wsdl:fault name="AccountNotFoundException">
</wsdl:fault>
</wsdl:operation>
<wsdl:operation name="createAccount">
<corba:operation name="createAccount">
<corba:param mode="in" name="name" idltype="corba:string" />
<corba:param xmlns="http://schemas.apache.org/yoko/idl/bank/typemap" mode="out" name="account" idltype="Account" />
<corba:return name="return" idltype="corba:boolean" />
<corba:raises xmlns="http://schemas.apache.org/yoko/idl/bank/typemap" exception="AccountAlreadyExistsException" />
</corba:operation>
<wsdl:input name="createAccountRequest">
</wsdl:input>
<wsdl:output name="createAccountResponse">
</wsdl:output>
<wsdl:fault name="AccountAlreadyExistsException">
</wsdl:fault>
</wsdl:operation>
</wsdl:binding>