Interfacce connettore Cast Iron
I connettori Cast Iron utilizzano thre interfacce standard che si implementano come orchestrazioni: TestConnection, ListObjects e DescribeObjects.
I template di orchestrazione per le interfacce TestConnection, ListObjects e DescribeObjects vengono creati automaticamente mediante la procedura guidata durante la fase Aggiungi attività. È necessario completare le orchestrazioni in base ai singoli requisiti del connettore. Questa sezione introduce alle interfacce TestConnection, ListObjects e DescribeObjects. In Completamento delle orchestrazioni dell'interfaccia connettore, si completa un'orchestrazione per ognuna di esse.
TestConnection
L'interfaccia TestConnection riflette i valori aggiunti alla finestra Informazioni sulla connessione e viene utilizzata dal connettore per stabilire una connessione endpoint. Una volta eseguita la connessione, lo stato della connessione viene restituito come un operatore booleano.
ListObjects
<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
<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>
Rilevamento schema dinamico
< 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 >
Ad esempio, per sostituire complexType tradingPartner nello schema precedente, impostare le informazioni per rilevare lo schema e sostituirlo in modo dinamico come mostrato nel seguente esempio:
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]
