hi,
I did some testing with the Sandesha2 RM 1.1 support.
My client is a simple axis2 service client which looks like this
serviceClient.getOptions().setProperty(SandeshaClientConstants.OFFERED_SEQUENCE_ID,
UUIDGenerator.getUUID());
serviceClient.getOptions().setProperty(SandeshaClientConstants.RM_SPEC_VERSION,
Sandesha2Constants.SPEC_VERSIONS.v1_1);
serviceClient.getOptions().setProperty(SandeshaClientConstants.LAST_MESSAGE,
Constants.VALUE_TRUE);
String sequenceKey = UUIDGenerator.getUUID();
serviceClient.getOptions().setProperty(SandeshaClientConstants.SEQUENCE_KEY,
sequenceKey);
OMElement omElement =
serviceClient.sendReceive(getTestOMElement("testElement"));
System.out.println("OM Element ==> " + omElement.toString());
SandeshaClient.terminateSequence(serviceClient, sequenceKey);
For this test Everything worked fine. Then I went through the messages being
passed and I saw a LastMsgNumber part with
the terminate sequence message.
<soapenv:Body>
<wsrm:TerminateSequence xmlns:wsrm="
http://docs.oasis-open.org/ws-rx/wsrm/200702">
<wsrm:Identifier>urn:uuid:FF278F0C46A5F1FDAD1237880205767</wsrm:Identifier>
<wsrm:LastMsgNumber>1</wsrm:LastMsgNumber>
</wsrm:TerminateSequence>
</soapenv:Body>
RM 1.1 spec does not use the LastMessage concept. Therefore IMHO this is a
wrong Terminate Message.
Further I saw this method in the TerminateSequence.java
public static boolean isLastMsgNumberRequired(String namespaceName){
if (Sandesha2Constants.SPEC_2007_02.NS_URI.equals(namespaceName))
return true;
return false;
}
I think this should be in other way around. Even in the RM 1.0 a last
message part should not be send in a terminate sequence message.
Any thoughts?
thanks,
Amila.
--
Amila Suriarachchi
WSO2 Inc.
blog: http://amilachinthaka.blogspot.com/