[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: edits for GetMessage() op
Mike:
Some proposed additions in the section below (in bold). Please update if not correct.
Should the Filter of a GetMessage() op produce a "Result" element containing the resulting node-set?
Jacques
Semantics of the GetMessage operation
A fundamental aspect of the GetMessage operation is its behavior and effect over the Message Store.
The Message Store is an XML document object that contains an XML representation of all synchronous and asynchronously received ebXML messages for a Test Case. The received messages for a particular Test Case MUST persist in the Message Store for the life of the Test Case. Messages in the Message Store MAY contain all MIME, SOAP and ebXML or other types of message content, represented as an XML document. The particular XML representation of a message in the Message Store is based upon an a "best practice" schema for representing a particular message type. If the messages being stored are ebXML messages using HTTP transport and a SOAP envelope, the XML format of the Message Store document MUST validate against the ebXMLMessageStore.xsd schema in appendix D.
The GetMessage Filter sub-operation queries the Message Store document object, and retrieves (by default) the XML content that satisfies the XPath expression specified in its Filter child element. As the MessageStore is updated every time a new message comes in, a GetMessage() operation will automatically execute as often as needed, until either (1) its Filter selects and returns a non-empty node-set, or (2) the timeout (stepDuration) expires.
A TestPreCondition and/orTestAssertion sub-operation ( which also contain a single XPath query) query the resulting node-list generated by a GetMessage Filter operation.
NOTES:
All the message items available for querying, are children of the MessageStore element. The Xpath expression in the Filter will typically select all the /MessageStore/Message elements that satisfy the filter, and these will be consolidated as children of a Result element, available for further querying, e.g. by the TestAssertion operation.
The messages that have been selected by a GetMessage() operation are normally "invisible" to future Getmessage() operations in the same test case, unless the "mask" attribute is set to "false" (default is "true"). A GetMessage() operation will execute over all messages in the message store for this test case, except those messages that have been masked by a previous GetMessage() operation.
Examples of use:
If one wants to verify that within 300 seconds, exactly 5 messages with MessageId="123" have been received, then the test case should first wait 300 sec before executing GetMessage(). This is done with a "Sleep" operation. The Sleep step must be followed by a GetMessage() step with a Filter selecting any message with MessageId="123", and a stepDuration of a few seconds at most. The TestAssertion Xpath expression will finally verify that the resulting node-set contains 5 message elements.
If one wants to verify that within 300 seconds, at least one messages with DocumentType="PurchaseOrder" has been received, then it is sufficient to use a GetMessage() test step with a stepDuration of 300 sec, and a Filter selecting DocumentType=" PurchaseOrder". This would succeed as soon as a PurchaseOrder message is received.
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]