Standard RPC Operation

A standard RPC operation is the standard request and reply object schema predefined by TIBCO ActiveMatrix Adapter for Database (TIBCO Business Studio). This schema can be used to describe the input and output of any database request so that Request-Response Service can process database operations on any table or execute any stored procedure.

The following figure shows the configuration of the standard RPC mode:

The repository contains descriptions of the classes and operations provided for MOperation support. The SQL_OPS class describes the operations that the adapter configuration, acting as an RPC server, can handle.

The structure of the server object is:
<servers>
      <rvCmRpcServer
        name = "agentNamereqreprvcmRPCServer"
        session = "agentNamepubreqreprvcmRvCmSession"
        subject = "ADB.SDK.OPERATION"
        classRef = "SQL_OPS"
      />
</servers>

Two types of operations are supported, SQL_EXECUTE and SQL_BATCHEXECUTE. The SQL_EXECUTE operation takes a single SQL statement and processes it. The SQL_BATCHEXECUTE operation takes a sequence of SQL statements and processes them. The other classes, such as SQL_STATEMENT, SQL_BIND, and SQL_RETURN, describe metadata for the input and output parameters to the operations.

  • Use the SQL_BATCHEXECUTE operation to send one or more SQL statements in a request.
  • The SQL_BATCHRETRUN operation is the return class.
  • If an error occurs while a statement is processed, the adapter returns the error immediately without processing the remaining statements.
  • On Oracle databases only, all statements are executed within the same transaction.
Note: On a Sybase database, do not use the SQL_BATCHEXECUTE operation to process the ddl statements. If you have to process the ddl statements, you must set the ddl in tran parameter to true in the database.
SQL_OPS Class
<class 
  name = "SQL_OPS">
  <operation
  name = "SQL_EXECUTE"
  returnClass = "SQL_RETURN">
  <parameter name = "STATEMENT" classRef = "SQL_STATEMENT"
   direction = "in"> </parameter>
 </operation>
 <operation
 name = "SQL_BATCHEXECUTE"
 returnClass = "SQL_BATCHRETURN">
 <parameter name = "STATEMENTS" classRef =
  "sequence[SQL_STATEMENT]"
   direction = "in" />
 </operation>
</class>
SQL_RESULTSET Class
<class name = "SQL_RESULTSET">
  <attribute name = "HEADER" class = "sequence[string]">
  </attribute>
  <attribute name = "ROWVALUES" class = "sequence[SQL_ROW]">
  </attribute>
  <attribute name = "OUTBINDS" class = "sequence[SQL_BIND]">
  </attribute>
</class>
SQL_ROW Class
<class name = "SQL_ROW">
  <attribute name = "ROW" class = "sequence[any]">
  </attribute>
 </class>
SQL_RETURN Class
<object name="SQL_RETURN" lastModified="1046487158293" id="202">
  <assoc name="attribute">
    <string name="name" value="STATUS"/>
    <ref name="attributeType" value="/tibco/public/scalar/ae/string"/>
    <string name="isKey" value="false"/>
    <string name="isReadable" value="true"/>
    <string name="isWriteable" value="true"/>
  </assoc>
  <assoc name="attribute">
    <string name="name" value="SQL"/>
    <ref name="attributeType" value="/tibco/public/scalar/ae/string"/>
    <string name="isKey" value="false"/>
    <string name="isReadable" value="true"/>
    <string name="isWriteable" value="true"/>
  </assoc>
  <assoc name="attribute">
    <string name="name" value="ERROR_DESC"/>
    <ref name="attributeType" value="/tibco/public/scalar/ae/string"/>
    <string name="isKey" value="false"/>
    <string name="isReadable" value="true"/>
    <string name="isWriteable" value="true"/>
  </assoc>
  <assoc name="attribute">
    <string name="name" value="CLOSURE"/>
    <ref name="attributeType" value="/tibco/public/scalar/ae/any"/>
    <string name="isKey" value="false"/>
    <string name="isReadable" value="true"/>
    <string name="isWriteable" value="true"/>
  </assoc>
  <assoc name="attribute">
    <string name="name" value="RETURN VALUE"/>
    <ref name="attributeType"
value="/tibco/public/class/ae/ADB/adbmetadata/SQL_RETURNVALUE"/>
    <string name="isKey" value="false"/>
    <string name="isReadable" value="true"/>
    <string name="isWriteable" value="true"/>
  </assoc>
    <string name="family" value="ae"/>
    <string name="objectType" value="class"/>
</object>
SQL_RETURNVALUE Class
<object name="SQL_RETURNVALUE" lastModified="1046487158293" id="204">
  <assoc name="attribute">
    <string name="name" value="OUTBINDS"/>
    <ref name="attributeType"
value="/tibco/public/sequence/ae/class/ae/ADB/adbmetadata/sequence[SQL_BIND]"/>
    <string name="isKey" value="false"/>
    <string name="isReadable" value="true"/>
    <string name="isWriteable" value="true"/>
</assoc>
<assoc name="attribute">
    <string name="name" value="RESULTSETS"/>
    <ref name="attributeType"
value="/tibco/public/sequence/ae/class/ae/ADB/adbmetadata/sequence[SQL_RESULTSET]"/
>
    <string name="isKey" value="false"/>
    <string name="isReadable" value="true"/>
    <string name="isWriteable" value="true"/>
</assoc>
    <string name="family" value="ae"/>
    <string name="objectType" value="class"/>
</object>
SQL_ BATCHRETURN Class
<class name = "SQL_BATCHRETURN">
  <attribute name = "STATUS" class = "string">
  </attribute>
  <attribute name = "RESULTSETS" class = "sequence[SQL_RESULTSET]">
  </attribute>
  <attribute name = "SQL" class = "string">
  </attribute>
  <attribute name = "ERROR_DESC" class = "string">
  </attribute>
  <attribute name = "CLOSURE" class = "any"
  </attribute>
</class>
SQL_BIND Class
<class name = "SQL_BIND">
  <attribute name = "POSITION" class = "i4">
  </attribute>
  <attribute name = "TYPE" class = "string">
  </attribute>
  <attribute name = "DATA" class = "any">
  </attribute>
  <attribute name = "NAME" class = "string">
  </attribute>
</class>
SQL_STATEMENT Class
<class name = "SQL_STATEMENT">
  <attribute name = "SQL_STRING" class = "string">
  </attribute>
  <attribute name = "BINDS" class = "sequence[SQL_BIND]">
  </attribute>
  <attribute name = "CLOSURE" class = "any"
  </attribute>
  <attribute name = "MAXROWS" class = "i4">
  </attribute>
</class>