Cast Iron connector interfaces

Cast Iron connectors use three standard interfaces that you implement as orchestrations: TestConnection, ListObjects and DescribeObjects.

Orchestration templates for the TestConnection, ListObjects and DescribeObjects interfaces are automatically created by the Wizard during the Add Activities phase. You must complete the orchestrations based on your individual connector requirements. This section introduces the TestConnection, ListObjects and DescribeObjects interfaces. In Completing the connector interface orchestrations, you complete an orchestration for each.

TestConnection

The TestConnection interface reflects the values you added to the Connection Information window and is used by your connector to establish an endpoint connection. After a connection is made, the connection status is returned as a boolean operator.

ListObjects

The ListObjects interface reflects the values you added to the Add Activities window and returns a list of all objects supported by a specific connector activity. For example a Salesforce create operation might support such objects as Account, Customer, Contact, Opportunity and User, among others. The return list should correspond to a ListObjects Reply Activity schema. Below is an example of a ListObjects response in XML format:
<ListObjectsResponse
xmlns="http://www.approuter.com/schemas/cdk/api/">
<objectType
label="Customer"
xmlns="http://www.approuter.com/schemas/cdk/api/">Account</objectType>
<objectType
label="Account Object"
xmlns="http://www.approuter.com/schemas/cdk/api/">Customer</objectType>
<objectType
label="Customer details"
xmlns="http://www.approuter.com/schemas/cdk/api/">Contact</objectType>
<objectType
label="Opportunity details"
xmlns="http://www.approuter.com/schemas/cdk/api/">Opportunity</objectType>
<objectType
label="User details"
xmlns="http://www.approuter.com/schemas/cdk/api/">User</objectType>
</ListObjectsResponse>

DescribeObjects

The DescribeObjects interface provides the input and output that enables your users to successfully work with an object exposed through a connector activity. For example if a Salesforce create operation is selected, the input schema is discovered dynamically based on an object selected from ListObjects. Here is an example of a response returned by DescribeObjects:
<DescribeObjectResponse baseType="sObject" 
  baseTypeNS="urn:sobject.partner.soap.sforce.com" 
	name="create" typeNS="http://example.com/stockquote" 
	xmlns="http://www.approuter.com/schemas/cdk/api/"
	xmlns:con="http://www.approuter.com/schemas/cdk/config/" 
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
	<object label="createInput" maxCount="1" minCount="1" name="createInput"
		used="true">
		<con:field configurable="true" label="ObjectName" maxCount="1"
			minCount="1" name="ObjectName" used="true">
			<con:type>string</con:type>
		</con:field>
		<con:field configurable="true" label="FirstName" maxCount="1"
			minCount="1" name="FirstName" used="true">
			<con:type>string</con:type>
		</con:field>
		<con:field configurable="true" label="LastName" maxCount="1"
			minCount="1" name="LastName" used="true">
			<con:type>string</con:type>
		</con:field>
		<con:field configurable="true" label="Phone" maxCount="1"
			minCount="1" name="Phone" used="true">
			<con:type>string</con:type>
		</con:field>
	</object>
	<responseObject label="createOutput" maxCount="1"
		minCount="1" name="createOutput" used="true">
		<con:field configurable="true" label="Id" maxCount="1"
			minCount="1" name="Id" used="true">
			<con:type>string</con:type>
		</con:field>
		<con:field configurable="true" label="ObjectName" maxCount="1"
			minCount="1" name="ObjectName" used="true">
			<con:type>string</con:type>
		</con:field>
		<con:field configurable="true" label="Status" maxCount="1"
			minCount="1" name="Status" used="true">
			<con:type>string</con:type>
		</con:field>
	</responseObject>
</DescribeObjectResponse> 

Dynamic schema discovery

The DescribeObjects schema discovery feature lets you dynamically discover a schema at runtime. The schema is imported into your orchestration when any connector activity uses a schema element as input or output. If previously imported schemas need to be discovered using complexType QName and substituted dynamically as input or output activities, set the attributes in DescribeObject response as shown in the following schema:
< xsd:schema   targetNamespace = " urn.sample.stock
 " xmlns:xsd = "http://www.w3.org/2001/XMLSchema" >
 < xsd:element   name = "TradePriceRequest" >
 < xsd:complexType >
 < xsd:all >
 < xsd:element   name = "tickerSymbol"   type = "xsd:string"   />
 </ xsd:all >
 </ xsd:complexType >
 </ xsd:element >
 < xsd:complexType   name = "ciObject" ></ xsd:complexType >
 < xsd:complexType   name = " tradingPartner " >
 < xsd:sequence >
 < xsd:element   name = "partnerName"   type = "xsd:string"   />
 </ xsd:sequence >
 </ xsd:complexType >  

For example, to substitute the complexType tradingPartner in the preceding schema, set the information to discover the schema and substitute it dynamically as shown in the following example:

DescribeObject Response value to 
@name   -> tradingPartner [complexType name to be discovered]
@typeNS  ->  url.sample.stock [complexType namespace ]
@baseType -> http://www.approuter.com/schemas/cdk/api/    [CDK default]
@baseType -> cObject [CDK default]
Example of describe objects menu



Feedback | Notices


Timestamp icon Last updated: Thursday, 2 June 2016


http://pic.dhe.ibm.com/infocenter/wci/v7r0m0/topic/com.ibm.wci.cdk.doc/cdk_connectorinterfaces.html