Overview

In this section:

The service adapter provides a facility where multiple commands can be submitted in a single XML request document. The XML response document will return a response for individual commands, as well as provide correlation for the command that is invoked.

The commands can be any combination of simple or composite commands.

All commands are represented by a top level command element, which has the following attributes:

Additionally, the command element can contain several child elements, which represent parameters allowed by the particular command.

The child element names are mapped to command parameter names. The child element values are used to set command parameter values.


Top of page

x
Composite Commands

Composite commands are always submitted as single level nested commands under a parent process composite command.

The following is an example of a composite command (COPY) that is being sent through an XML request document:

<?xml version="1.0" encoding="UTF-8"?>
  <CDServiceRequest>
    <command name="PROCESS" action="submit" type="composite">
      <label>MYPROC</label>
      <snode>MYCDSERVER</snode>
      <command name="COPY" type="composite">
         <label>MYCPY</label>
         <snode>MYCDSERVER</snode>
         <direction>SEND</direction>
         <source>c:\downloads\iWay_brochure.pdf</source>
         <destination>myout.pdf</destination>
         <disposition>NEW</disposition>
         <ckpt></ckpt>
         <compress></compress>
         <srcsysopts></srcsysopts>
         <destsysopts></destsysopts>
      </command>
      <command name="RUNTASK" type="composite">
         <label>MYTSK</label>
         <submitto>SNODE</submitto>
         <program>Windows</program>
      </command>
   </command>
</CDServiceRequest>

This command request submits a process called MYPROC to a Connect:Direct system with two commands (operations) as part of the process:

The following is an example of a composite command (SUBMIT) that is being sent through an XML request document:

<CDServiceRequest>
  <command name="PROCESS" action="submit" type="composite">
      <label>MYPROC</label>
      <snode>MYCDSERVER</snode>
      <wait>UNLIMITED</wait>
      <command name="SUBMIT" type="composite">
         <label>MYSUB</label>
         <file>C:\ConnectDirect\procs\Process4.cdp</file>
      </command>
  </command>
</CDServiceRequest>

Top of page

x
Simple Commands

As the name indicates, a simple command is an API command that does not have any nested children. All Connect:Direct API commands can be submitted as simple commands.

The following is an example of a simple command (SELECT) that is being sent through an XML request document:

<?xml version="1.0" encoding="UTF-8"?>
<CDServiceRequest>
    <command name="statistics" action="select" type="simple">
          <limit>1</limit>
    </command>
    <command name="process" action="select" type="simple"/>
    <command name="tracing" action="select" type="simple"/>
</CDServiceRequest>

This command request invokes the following commands on the Connect:Direct server:

The commands have various attributes that can be omitted, for example:

Although the current runtime implementation allows you to submit any API command, refer to the Connect:Direct API documentation to check the names of command parameters for any API command. Use the names as child elements for the required command element. The names will be used to build request schemas for the same.


iWay Software