|
Topics: |
As a reference, this section provides sample XML request and response schemas for Connect:Direct composite and simple commands.
The following is a sample XML request and response schema for the composite Submit command.
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema targetNamespace="urn:iwaysoftware:adapter:iwconnectdirect:composite:submit"
xmlns:tns="urn:iwaysoftware:adapter:iwconnectdirect:composite:submit"
xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified"
attributeFormDefault="unqualified">
<xs:complexType name="command">
<xs:sequence>
<xs:element name="label" type="xs:string"/>
<xs:element name="snode">
<xs:simpleType>
<xs:restriction base="xs:string"/>
</xs:simpleType>
</xs:element>
<xs:element name="class" type="xs:string" minOccurs="0"/>
<xs:element name="prty" type="xs:string" minOccurs="0"/>
<xs:element name="startt" minOccurs="0">
<xs:simpleType>
<xs:restriction base="xs:string"/>
</xs:simpleType>
</xs:element>
<xs:element name="retain" minOccurs="0">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="No"/>
<xs:enumeration value="Yes"/>
<xs:enumeration value="Initial"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="hold" minOccurs="0">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="No"/>
<xs:enumeration value="Yes"/>
<xs:enumeration value="Call"/>
</xs:restriction>
</xs:simpleType>
</xs:element> <xs:element name="crc" minOccurs="0">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="OFF"/>
<xs:enumeration value="ON"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="file" type="xs:string"/>
</xs:sequence>
<xs:attribute name="name" type="xs:string" use="required" fixed="SUBMIT"/>
<xs:attribute name="action" type="xs:string" use="optional"/>
<xs:attribute name="type" type="xs:string" use="required" fixed="composite"/>
</xs:complexType>
<xs:element name="command" type="tns:command"/>
</xs:schema>The following is a sample XML request and response schema for the composite Copy command.
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema targetNamespace="urn:iwaysoftware:adapter:iwconnectdirect:composite:copy"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:tns="urn:iwaysoftware:adapter:iwconnectdirect:composite:copy"
elementFormDefault="qualified" attributeFormDefault="unqualified">
<xs:complexType name="command">
<xs:sequence>
<xs:element name="label" type="xs:string"/>
<xs:element name="direction">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="SEND"/>
<xs:enumeration value="RECEIVE"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="source" type="xs:string"/>
<xs:element name="destination" type="xs:string"/>
<xs:element name="disposition" minOccurs="0">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="NEW"/> <xs:enumeration value="RPL"/>
<xs:enumeration value="MOD"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="ckpt" minOccurs="0">
<xs:simpleType>
<xs:restriction base="xs:string"/>
</xs:simpleType>
</xs:element>
<xs:element name="compress" minOccurs="0">
<xs:simpleType>
<xs:restriction base="xs:string"/>
</xs:simpleType>
</xs:element>
<xs:element name="srcsysopts" minOccurs="0">
<xs:simpleType>
<xs:restriction base="xs:string"/>
</xs:simpleType>
</xs:element>
<xs:element name="destsysopts" minOccurs="0">
<xs:simpleType>
<xs:restriction base="xs:string"/>
</xs:simpleType>
</xs:element>
<xs:element name="dcb" minOccurs="0">
<xs:simpleType>
<xs:restriction base="xs:string"/>
</xs:simpleType>
</xs:element>
<xs:element name="SRCSYSOPTS" minOccurs="0">
<xs:simpleType>
<xs:restriction base="xs:string"/>
</xs:simpleType>
</xs:element>
<xs:element name="DESTSYSOPTS" minOccurs="0">
<xs:simpleType>
<xs:restriction base="xs:string"/>
</xs:simpleType>
</xs:element>
<xs:element name="DCB" minOccurs="0">
<xs:simpleType>
<xs:restriction base="xs:string"/>
</xs:simpleType>
</xs:element>
<xs:element name="COMPRESS" minOccurs="0">
<xs:simpleType>
<xs:restriction base="xs:string"/> </xs:simpleType>
</xs:element>
<xs:element name="DISPOSITION" minOccurs="0">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="NEW"/>
<xs:enumeration value="RPL"/>
<xs:enumeration value="MOD"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
</xs:sequence>
<xs:attribute name="name" type="xs:string" use="required" fixed="COPY"/>
<xs:attribute name="action" type="xs:string" use="optional"/>
<xs:attribute name="type" type="xs:string" use="required" fixed="composite"/>
</xs:complexType>
<xs:element name="command" type="tns:command"/>
</xs:schema>Note: Composite commands must be wrapped with a parent process command, as shown in the following schema, when the request is submitted to the adapter.
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:nscopy="urn:iwaysoftware:adapter:iwconnectdirect:composite:copy"
xmlns:nssubmit="urn:iwaysoftware:adapter:iwconnectdirect:composite:submit"
xmlns:nsruntask="urn:iwaysoftware:adapter:iwconnectdirect:composite:runtask"
xmlns:nsrunjob="urn:iwaysoftware:adapter:iwconnectdirect:composite:runjob"
xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified"
attributeFormDefault="unqualified">
<xs:import namespace="urn:iwaysoftware:adapter:iwconnectdirect:composite:copy"
schemaLocation="composite_copy.xsd"/>
<xs:import namespace="urn:iwaysoftware:adapter:iwconnectdirect:composite:submit"
schemaLocation="composite_submit.xsd"/>
<xs:import namespace="urn:iwaysoftware:adapter:iwconnectdirect:composite:runtask"
schemaLocation="composite_runtask.xsd"/> <xs:import namespace="urn:iwaysoftware:adapter:iwconnectdirect:composite:runjob"
schemaLocation="composite_runjob.xsd"/>
<xs:element name="command" type="commandType">
<xs:annotation>
<xs:documentation>Comment describing your root element</xs:documentation>
</xs:annotation>
</xs:element>
<xs:complexType name="commandType">
<xs:sequence>
<xs:element name="label" type="xs:string"/>
<xs:element name="snode">
<xs:simpleType>
<xs:restriction base="xs:string"/>
</xs:simpleType>
</xs:element>
<xs:element name="wait" type="xs:string" minOccurs="0"/>
<xs:element name="class" type="xs:string" minOccurs="0"/>
<xs:element name="prty" type="xs:string" minOccurs="0"/>
<xs:element name="startt" minOccurs="0">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="NEW"/>
<xs:enumeration value="RPL"/>
<xs:enumeration value="MOD"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="retain" minOccurs="0">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="No"/>
<xs:enumeration value="Yes"/>
<xs:enumeration value="Initial"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="hold" minOccurs="0">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="No"/>
<xs:enumeration value="Yes"/>
<xs:enumeration value="Call"/>
</xs:restriction>
</xs:simpleType>
</xs:element> <xs:element name="crc" minOccurs="0">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="OFF"/>
<xs:enumeration value="ON"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element ref="nscopy:command" minOccurs="0" maxOccurs="unbounded"/>
<xs:element ref="nssubmit:command" minOccurs="0" maxOccurs="unbounded"/>
<xs:element ref="nsrunjob:command" minOccurs="0" maxOccurs="unbounded"/>
<xs:element ref="nsruntask:command" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
<xs:attribute name="name" type="xs:string" use="required" fixed="PROCESS"/>
<xs:attribute name="action" type="xs:string" use="optional"/>
<xs:attribute name="type" type="xs:string" use="required" fixed="composite"/>
</xs:complexType>
<xs:element name="CDServiceRequest">
<xs:complexType>
<xs:sequence>
<xs:element ref="command"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>The following is a sample XML request schema for the simple statistics Select command.
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema targetNamespace="urn:iwaysoftware:adapter:iwconnectdirect:statistics:select"
xmlns:tns="urn:iwaysoftware:adapter:iwconnectdirect:statistics:select"
xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified"
attributeFormDefault="unqualified">
<xs:element name="command" type="tns:commandType">
<xs:annotation>
<xs:documentation>Comment describing your root element</xs:documentation>
</xs:annotation>
</xs:element>
<xs:complexType name="commandType">
<xs:sequence>
<xs:element name="limit" type="xs:string" minOccurs="0"/>
<xs:element name="pname" type="xs:string" minOccurs="0"/>
<xs:element name="pnumber" type="xs:string" minOccurs="0"/>
<xs:element name="reccat" type="xs:string" minOccurs="0"/>
<xs:element name="recids" type="xs:string" minOccurs="0"/>
<xs:element name="snode" type="xs:string" minOccurs="0"/>
<xs:element name="startt" type="xs:string" minOccurs="0"/>
<xs:element name="stopt" type="xs:string" minOccurs="0"/>
<xs:element name="submitter" type="xs:string" minOccurs="0"/>
<xs:element name="sfile" type="xs:string" minOccurs="0"/>
<xs:element name="dfile" type="xs:string" minOccurs="0"/>
</xs:sequence>
<xs:attribute name="name" type="xs:string" use="required" fixed="statistics"/>
<xs:attribute name="action" type="xs:string" use="required" fixed="select"/>
<xs:attribute name="type" type="xs:string" use="required" fixed="simple"/>
</xs:complexType>
<xs:element name="CDServiceRequest">
<xs:complexType>
<xs:sequence>
<xs:element ref="tns:command" maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>The following is a sample XML response schema for the simple statistics Select command.
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema targetNamespace="urn:iwaysoftware:adapter:iwconnectdirect:statistics:response"
xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
<xs:element name="CDServiceResponse">
<xs:complexType>
<xs:sequence>
<xs:element name="CDCommand">
<xs:complexType>
<xs:sequence>
<xs:element name="CDCommandScript" type="xs:string"/>
<xs:element name="CDServiceResponseDetail">
<xs:complexType>
<xs:sequence>
<xs:element name="LogDateTime" type="xs:string"/>
<xs:element name="RecordCategory" type="xs:string"/>
<xs:element name="RecordID" type="xs:string"/>
<xs:element name="CondCode" type="xs:boolean"/>
<xs:element name="Feedback" type="xs:string"/>
<xs:element name="MsgID" type="xs:string"/>
<xs:element name="MsgShortText" type="xs:string"/>
<xs:element name="ProcName" type="xs:string"/>
<xs:element name="ProcNumber" type="xs:boolean"/>
<xs:element name="SubmitNode" type="xs:string"/>
<xs:element name="Submitter" type="xs:string"/>
<xs:element name="SubmitterNode" type="xs:string"/>
<xs:element name="StepName" type="xs:string"/>
<xs:element name="PNode" type="xs:string"/>
<xs:element name="SNode" type="xs:string"/>
<xs:element name="Retain" type="xs:string"/>
<xs:element name="Class" type="xs:string"/>
<xs:element name="Priority" type="xs:string"/>
<xs:element name="ExecPriority" type="xs:string"/>
<xs:element name="StdCompression" type="xs:string"/>
<xs:element name="ExtCompression" type="xs:string"/>
<xs:element name="Checkpoint" type="xs:string"/>
<xs:element name="LinkFail" type="xs:string"/>
<xs:element name="Translation" type="xs:string"/> <xs:element name="SubDateTime" type="xs:string"/>
<xs:element name="SchDateTime" type="xs:string"/>
<xs:element name="LocalNode" type="xs:string"/>
<xs:element name="FromNode" type="xs:string"/>
<xs:element name="Queue" type="xs:string"/>
<xs:element name="Restart" type="xs:string"/>
<xs:element name="Status" type="xs:string"/>
<xs:element name="Function" type="xs:string"/>
<xs:element name="PNodePlexclass" type="xs:string"/>
<xs:element name="SNodePlexclass" type="xs:string"/>
<xs:element name="Debug" type="xs:string"/>
<xs:element name="SrcFile" type="xs:string"/>
<xs:element name="SrcDisp1" type="xs:string"/>
<xs:element name="SrcDisp2" type="xs:string"/>
<xs:element name="SrcDisp3" type="xs:string"/>
<xs:element name="DestFile" type="xs:string"/>
<xs:element name="DestDisp1" type="xs:string"/>
<xs:element name="DestDisp2" type="xs:string"/>
<xs:element name="DestDisp3" type="xs:string"/>
<xs:element name="MemberName" type="xs:string"/>
<xs:element name="SourceMemberName" type="xs:string"/>
<xs:element name="TargetMemberName" type="xs:string"/>
<xs:element name="AliasMemberName" type="xs:string"/>
<xs:element name="Sysopts" type="xs:string"/>
<xs:element name="BytesRead" type="xs:string"/>
<xs:element name="RecordsRead" type="xs:string"/>
<xs:element name="BytesSent" type="xs:string"/>
<xs:element name="RUsSent" type="xs:string"/>
<xs:element name="BytesWritten" type="xs:string"/>
<xs:element name="RecordsWritten" type="xs:string"/>
<xs:element name="BytesReceived" type="xs:string"/>
<xs:element name="RUsReceived" type="xs:string"/>
<xs:element name="RUSize" type="xs:string"/>
<xs:element name="LocalCondCode" type="xs:string"/>
<xs:element name="LocalMsgID" type="xs:string"/>
<xs:element name="OtherCondCode" type="xs:string"/>
<xs:element name="OtherMsgID" type="xs:string"/>
<xs:element name="PNodeAcctInfo" type="xs:string"/>
<xs:element name="SNodeAcctInfo" type="xs:string"/>
<xs:element name="Hold" type="xs:string"/> <xs:element name="SecureEnabled" type="xs:string"/>
<xs:element name="PNodeEncAlgList" type="xs:string"/>
<xs:element name="PNodeEncData" type="xs:string"/>
<xs:element name="SNodeEncAlgList" type="xs:string"/>
<xs:element name="SNodeEncData" type="xs:string"/>
<xs:element name="CBEncAlg" type="xs:string"/>
<xs:element name="MergeEA" type="xs:string"/>
<xs:element name="PNodeSign" type="xs:string"/>
<xs:element name="SNodeSign" type="xs:string"/>
<xs:element name="MergeSign" type="xs:string"/>
<xs:element name="CurSignVerified" type="xs:string"/>
<xs:element name="PrevSignVerified" type="xs:string"/>
<xs:element name="ServerName" type="xs:string"/>
<xs:element name="StartDateTime" type="xs:string"/>
<xs:element name="StopDateTime" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>Note: The Statistics command must be enclosed within a parent CDServiceRequest node.