In this section: |
The sample shows a conversational transaction for the IMS verification sample for customer information. The IMS transaction, known as IVTCV, is supplied with the IMS product. The sample adds a customer segment in the first message and then ends the request with the second message.
The conversational transaction must be configured in using both iWay Explorer and Service Manager. With iWay Explorer you can design transaction information, creating one transaction for each potential segment of a conversation. You can then use Service Manager to create one listener for each transaction. For more information on using Service Manager, see the iWay Service Manager's User's Guide.
Each message in the conversation is processed by the same IVTCV application. In this sample, two transactions are designed in iWay Explorer and unique request and response schemas are generated for each transaction. In Service Manager, a listener is configured for each transaction.
One listener processes each message segment for a total of two listeners. The listeners must be connected in a local transaction. The IMS resources are not part of the local transaction. However, the local transaction allows the listeners to maintain a state required for a conversational transaction with the IMS application.
Create a transaction in iWay Explorer for the first part of the conversation. This transaction is used to add a customer to the IMS customer database.
The following files represent the request documents, associated schemas, and .cpy files configured for the first part of the conversation.
Create a transaction in iWay Explorer for the second part of the conversation. This part of the conversation ends the customer information conversation with IMS. The message sent to the IMS customer application is simply an action of "END".
The following files represent the request documents, associated schemas, and .cpy files configured for the second part of the conversation.
The following schemas and XML instance documents illustrate the segment requests and segment responses referenced above.
For examples of the .cpy files, see Ivtcv_add.cpy, Ivtcv_end.cpy, and Ivtcv_response.cpy.
The following is an example of the segment one request schema:
<?xml version="1.0" encoding="UTF-8" ?> - <!-- Generated by the iBSE 2005-05-02T19:16:28Z --> - <xsd:schema xml:lang="en" xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="urn:iwaysoftware:IMS/Transactions/Segment1_Request" attributeFormDefault="unqualified" elementFormDefault="qualified"> - <xsd:element name="IMS"> - <xsd:complexType> - <xsd:all> - <xsd:element name="Transaction"> - <xsd:complexType> - <xsd:sequence> - <xsd:element name="Segment" maxOccurs="unbounded"> - <xsd:complexType> - <xsd:sequence> - <xsd:element minOccurs="1" name="INPUT-MSG" maxOccurs="1"> - <xsd:complexType> - <xsd:sequence> - <xsd:element minOccurs="1" name="IN-FILL" maxOccurs="1"> - <xsd:simpleType> - <xsd:restriction base="xsd:string"> <xsd:length value="4" /> </xsd:restriction> </xsd:simpleType> </xsd:element> - <xsd:element minOccurs="0" name="IN-COMMAND" maxOccurs="1"> - <xsd:simpleType> - <xsd:restriction base="xsd:string"> <xsd:length value="8" /> </xsd:restriction> </xsd:simpleType> </xsd:element> - <xsd:element minOccurs="0" name="TEMP-COMMAND" maxOccurs="1"> - <xsd:complexType> - <xsd:sequence> - <xsd:element minOccurs="1" name="TEMP-IOCMD" maxOccurs="1"> - <xsd:simpleType> - <xsd:restriction base="xsd:string"> <xsd:length value="3" /> </xsd:restriction> </xsd:simpleType> </xsd:element>
- <xsd:element minOccurs="1" name="TEMP-FILLER" maxOccurs="1"> - <xsd:simpleType> - <xsd:restriction base="xsd:string"> <xsd:length value="5" /> </xsd:restriction>
</xsd:simpleType> </xsd:element> </xsd:sequence> </xsd:complexType> </xsd:element> - <xsd:element minOccurs="1" name="IN-LAST-NAME" maxOccurs="1"> - <xsd:simpleType> - <xsd:restriction base="xsd:string"> <xsd:length value="10" /> </xsd:restriction> </xsd:simpleType> </xsd:element> - <xsd:element minOccurs="1" name="IN-FIRST-NAME" maxOccurs="1"> - <xsd:simpleType> - <xsd:restriction base="xsd:string"> <xsd:length value="10" /> </xsd:restriction> </xsd:simpleType> </xsd:element> - <xsd:element minOccurs="1" name="IN-EXTENSION" maxOccurs="1"> - <xsd:simpleType> - <xsd:restriction base="xsd:string"> <xsd:length value="10" /> </xsd:restriction> </xsd:simpleType> </xsd:element> - <xsd:element minOccurs="1" name="IN-ZIP-CODE" maxOccurs="1"> - <xsd:simpleType> - <xsd:restriction base="xsd:string"> <xsd:length value="7" /> </xsd:restriction> </xsd:simpleType> </xsd:element> </xsd:sequence> </xsd:complexType> </xsd:element> </xsd:sequence> </xsd:complexType> </xsd:element> </xsd:sequence> <xsd:attribute type="xsd:string" use="required" fixed="IMS/ Transactions/Segment1" name="location" /> </xsd:complexType> </xsd:element> </xsd:all> </xsd:complexType> </xsd:element> </xsd:schema>
The following is an example of a segment one XML request document:
<?xml version="1.0" encoding="UTF-8" ?> - <IMS> - <Transaction location="IMS/Transactions/Segment1"> - <Segment> - <INPUT-MSG> <IN-FILL /> - <TEMP-COMMAND> <TEMP-IOCMD>ADD</TEMP-IOCMD> <TEMP-FILLER /> </TEMP-COMMAND> <IN-LAST-NAME>Doe</IN-LAST-NAME> <IN-FIRST-NAME>John</IN-FIRST-NAME> <IN-EXTENSION>1111111111</IN-EXTENSION> <IN-ZIP-CODE>2222222</IN-ZIP-CODE> </INPUT-MSG> </Segment> </Transaction> </IMS>
The following is an example of the segment one response schema:
<?xml version="1.0" encoding="UTF-8" ?> - <!-- Generated by the iBSE 2005-05-02T19:16:28Z --> - <xsd:schema xml:lang="en" xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="urn:iwaysoftware:IMS/Transactions/Segment1_Response" attributeFormDefault="unqualified" elementFormDefault="qualified"> - <xsd:element name="IMS"> - <xsd:complexType> - <xsd:all> - <xsd:element name="Transaction"> - <xsd:complexType> - <xsd:sequence> - <xsd:element name="Segment" maxOccurs="unbounded"> - <xsd:complexType> - <xsd:sequence> - <xsd:element minOccurs="1" name="INPUT-MSG" maxOccurs="1"> - <xsd:complexType> - <xsd:sequence> - <xsd:element minOccurs="1" name="IN-FILL" maxOccurs="1"> - <xsd:simpleType> - <xsd:restriction base="xsd:string"> <xsd:length value="4" /> </xsd:restriction> </xsd:simpleType> </xsd:element> - <xsd:element minOccurs="0" name="IN-COMMAND" maxOccurs="1"> - <xsd:simpleType> - <xsd:restriction base="xsd:string"> <xsd:length value="8" /> </xsd:restriction> </xsd:simpleType> </xsd:element> - <xsd:element minOccurs="0" name="TEMP-COMMAND" maxOccurs="1"> - <xsd:complexType> - <xsd:sequence> - <xsd:element minOccurs="1" name="TEMP-IOCMD" maxOccurs="1"> - <xsd:simpleType> - <xsd:restriction base="xsd:string"> <xsd:length value="3" /> </xsd:restriction> </xsd:simpleType> </xsd:element> - <xsd:element minOccurs="1" name="TEMP-FILLER" maxOccurs="1"> - <xsd:simpleType>
- <xsd:restriction base="xsd:string"> <xsd:length value="5" /> </xsd:restriction> </xsd:simpleType> </xsd:element> </xsd:sequence> </xsd:complexType> </xsd:element> - <xsd:element minOccurs="1" name="IN-LAST-NAME" maxOccurs="1"> - <xsd:simpleType> - <xsd:restriction base="xsd:string"> <xsd:length value="10" /> </xsd:restriction> </xsd:simpleType> </xsd:element> - <xsd:element minOccurs="1" name="IN-FIRST-NAME" maxOccurs="1"> - <xsd:simpleType> - <xsd:restriction base="xsd:string"> <xsd:length value="10" /> </xsd:restriction> </xsd:simpleType> </xsd:element> - <xsd:element minOccurs="1" name="IN-EXTENSION" maxOccurs="1"> - <xsd:simpleType> - <xsd:restriction base="xsd:string"> <xsd:length value="10" /> </xsd:restriction> </xsd:simpleType> </xsd:element> - <xsd:element minOccurs="1" name="IN-ZIP-CODE" maxOccurs="1"> - <xsd:simpleType> - <xsd:restriction base="xsd:string"> <xsd:length value="7" /> </xsd:restriction> </xsd:simpleType> </xsd:element> </xsd:sequence> </xsd:complexType> </xsd:element> </xsd:sequence> </xsd:complexType> </xsd:element> </xsd:sequence> </xsd:complexType> </xsd:element> </xsd:all> </xsd:complexType> </xsd:element> </xsd:schema>
The following is an example of the segment one XML response document:
<?xml version="1.0" encoding="UTF-8" ?> - <IMS xmlns="uri:iwaysoftware:IMS/Transactions/Segment1_Response"> - <Transaction> - <Segment> - <RESPONSE-MSG> <FILLER1>ENTRY WAS ADDED ADD Doe John 111111111122</FILLER1> </RESPONSE-MSG> </Segment> </Transaction> </IMS>
The following is an example of the segment two request schema:
<?xml version="1.0" encoding="UTF-8" ?> - <!-- Generated by the iBSE 2005-05-02T19:24:45Z --> - <xsd:schema xml:lang="en" xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="urn:iwaysoftware:IMS/Transactions/Segment2_Request" attributeFormDefault="unqualified" elementFormDefault="qualified"> - <xsd:element name="IMS"> - <xsd:complexType> - <xsd:all> - <xsd:element name="Transaction"> - <xsd:complexType> - <xsd:sequence> - <xsd:element name="Segment" maxOccurs="unbounded"> - <xsd:complexType> - <xsd:sequence> - <xsd:element minOccurs="1" name="INPUT-MSG" maxOccurs="1"> - <xsd:complexType> - <xsd:sequence> - <xsd:element minOccurs="1" name="IN-FILL" maxOccurs="1"> - <xsd:simpleType> - <xsd:restriction base="xsd:string"> <xsd:length value="4" /> </xsd:restriction> </xsd:simpleType> </xsd:element> - <xsd:element minOccurs="0" name="IN-COMMAND" maxOccurs="1"> - <xsd:simpleType> - <xsd:restriction base="xsd:string"> <xsd:length value="8" /> </xsd:restriction> </xsd:simpleType> </xsd:element> - <xsd:element minOccurs="0" name="TEMP-COMMAND" maxOccurs="1"> - <xsd:complexType> - <xsd:sequence> - <xsd:element minOccurs="1" name="TEMP-IOCMD" maxOccurs="1"> - <xsd:simpleType> - <xsd:restriction base="xsd:string"> <xsd:length value="3" /> </xsd:restriction> </xsd:simpleType> </xsd:element> - <xsd:element minOccurs="1" name="TEMP-FILLER" maxOccurs="1">
- <xsd:simpleType> - <xsd:restriction base="xsd:string"> <xsd:length value="5" /> </xsd:restriction> </xsd:simpleType> </xsd:element> </xsd:sequence> </xsd:complexType> </xsd:element> - <xsd:element minOccurs="1" name="IN-LAST-NAME" maxOccurs="1"> - <xsd:simpleType> - <xsd:restriction base="xsd:string"> <xsd:length value="10" /> </xsd:restriction> </xsd:simpleType> </xsd:element> - <xsd:element minOccurs="1" name="IN-FIRST-NAME" maxOccurs="1"> - <xsd:simpleType> - <xsd:restriction base="xsd:string"> <xsd:length value="10" /> </xsd:restriction> </xsd:simpleType> </xsd:element> - <xsd:element minOccurs="1" name="IN-EXTENSION" maxOccurs="1"> - <xsd:simpleType> - <xsd:restriction base="xsd:string"> <xsd:length value="10" /> </xsd:restriction> </xsd:simpleType> </xsd:element> - <xsd:element minOccurs="1" name="IN-ZIP-CODE" maxOccurs="1"> - <xsd:simpleType> - <xsd:restriction base="xsd:string"> <xsd:length value="7" /> </xsd:restriction> </xsd:simpleType> </xsd:element> </xsd:sequence> </xsd:complexType> </xsd:element> </xsd:sequence> </xsd:complexType> </xsd:element> </xsd:sequence> <xsd:attribute type="xsd:string" use="required" fixed="IMS/ Transactions/Segment2" name="location" /> </xsd:complexType> </xsd:element> </xsd:all> </xsd:complexType> </xsd:element> </xsd:schema>
The following is an example of the segment two XML request document:
<?xml version="1.0" encoding="UTF-8" ?> - <IMS> - <Transaction location="IMS/Transactions/Segment2"> - <Segment> - <INPUT-MSG> <IN-FILL /> - <IN-COMMAND> <TEMP-IOCMD>END</TEMP-IOCMD> <TEMP-FILLER /> </IN-COMMAND> </INPUT-MSG> </Segment> </Transaction> </IMS>
The following is an example of the segment two response schema:
<?xml version="1.0" encoding="UTF-8" ?> - <!-- Generated by the iBSE 2005-05-02T19:24:45Z --> - <xsd:schema xml:lang="en" xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="urn:iwaysoftware:IMS/Transactions/Segment2_Response" attributeFormDefault="unqualified" elementFormDefault="qualified"> - <xsd:element name="IMS"> - <xsd:complexType> - <xsd:all> - <xsd:element name="Transaction"> - <xsd:complexType> - <xsd:sequence> - <xsd:element name="Segment" maxOccurs="unbounded"> - <xsd:complexType> - <xsd:sequence> - <xsd:element minOccurs="1" name="INPUT-MSG" maxOccurs="1"> - <xsd:complexType> - <xsd:sequence> - <xsd:element minOccurs="1" name="IN-FILL" maxOccurs="1"> - <xsd:simpleType> - <xsd:restriction base="xsd:string"> <xsd:length value="4" /> </xsd:restriction> </xsd:simpleType> </xsd:element> - <xsd:element minOccurs="0" name="IN-COMMAND" maxOccurs="1"> - <xsd:simpleType> - <xsd:restriction base="xsd:string"> <xsd:length value="8" /> </xsd:restriction> </xsd:simpleType> </xsd:element> - <xsd:element minOccurs="0" name="TEMP-COMMAND" maxOccurs="1"> - <xsd:complexType> - <xsd:sequence> - <xsd:element minOccurs="1" name="TEMP-IOCMD" maxOccurs="1"> - <xsd:simpleType> - <xsd:restriction base="xsd:string"> <xsd:length value="3" /> </xsd:restriction> </xsd:simpleType> </xsd:element> - <xsd:element minOccurs="1" name="TEMP-FILLER" maxOccurs="1">
- <xsd:simpleType> - <xsd:restriction base="xsd:string"> <xsd:length value="5" /> </xsd:restriction> </xsd:simpleType> </xsd:element> </xsd:sequence> </xsd:complexType> </xsd:element> - <xsd:element minOccurs="1" name="IN-LAST-NAME" maxOccurs="1"> - <xsd:simpleType> - <xsd:restriction base="xsd:string"> <xsd:length value="10" /> </xsd:restriction> </xsd:simpleType> </xsd:element> - <xsd:element minOccurs="1" name="IN-FIRST-NAME" maxOccurs="1"> - <xsd:simpleType> - <xsd:restriction base="xsd:string"> <xsd:length value="10" /> </xsd:restriction> </xsd:simpleType> </xsd:element> - <xsd:element minOccurs="1" name="IN-EXTENSION" maxOccurs="1"> - <xsd:simpleType> - <xsd:restriction base="xsd:string"> <xsd:length value="10" /> </xsd:restriction> </xsd:simpleType> </xsd:element> - <xsd:element minOccurs="1" name="IN-ZIP-CODE" maxOccurs="1"> - <xsd:simpleType> - <xsd:restriction base="xsd:string"> <xsd:length value="7" /> </xsd:restriction> </xsd:simpleType> </xsd:element> </xsd:sequence> </xsd:complexType> </xsd:element> </xsd:sequence> </xsd:complexType> </xsd:element> </xsd:sequence> </xsd:complexType> </xsd:element> </xsd:all> </xsd:complexType> </xsd:element> </xsd:schema>
The following is an example of the segment two XML response document:
<?xml version="1.0" encoding="UTF-8" ?> - <IMS xmlns="uri:iwaysoftware:IMS/Transactions/Segment2_Response"> - <Transaction> - <Segment> - <RESPONSE-MSG> <FILLER1>CONVERSATION HAS ENDED</FILLER1> </RESPONSE-MSG> </Segment> </Transaction> </IMS>
The following is an example of an ivtcv_add.cpy file:
01 INPUT-MSG. 02 IN-FILL PICTURE X(4). 02 IN-COMMAND PICTURE X(8). 02 TEMP-COMMAND REDEFINES IN-COMMAND. 04 TEMP-IOCMD PIC X(3). 04 TEMP-FILLER PIC X(5). 02 IN-LAST-NAME PICTURE X(10). 02 IN-FIRST-NAME PICTURE X(10). 02 IN-EXTENSION PICTURE X(10). 02 IN-ZIP-CODE PICTURE X(7).
The following is an example of an ivtcv_end.cpy file:
01 INPUT-MSG. 02 IN-FILL PICTURE X(4). 02 IN-COMMAND. 04 TEMP-IOCMD PIC X(3). 04 TEMP-FILLER PIC X(5).
iWay Software |