committed the correction.
2014-05-14 12:01 GMT+02:00 Aki Yoshida <[email protected]>: > Hi Dennis, > after playing around the modified code that omits this handling, I > discovered that that special handling is needed for RM 1.0. because RM > 1.0. has a pseudo CloseSequence behavior using its lastMessage action. > I'll run some more tests with the corrected modification and submit > this change if everything is fine. > > regards, aki > > 2014-05-14 3:53 GMT+02:00 Dennis Sosnoski <[email protected]>: >> Hi Aki, >> >> We definitely don't want that Sequence header on the CloseSequence message. >> That code has been in place since I split the interceptors, so it's probably >> just a mistake from when I was doing the split. I'll take out the added >> clause on the if. >> >> Thanks for catching this, Aki! >> >> - Dennis >> >> >> On 05/14/2014 08:24 AM, Aki Yoshida wrote: >>> >>> Hi Dennis, >>> I noticed CloseSequence is sent out when the RM 1.1 endpoint is >>> shutdown for 3.0.0-SNAPSHOT. >>> >>> But it seems that this CloseSequence message is incorrectly generated, >>> including the Sequence header. >>> >>> The message looks like when the endpoint is shutdown after sending two >>> messages (see the Sequence header). >>> >>> <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> >>> <soap:Header> >>> <Action >>> xmlns="http://www.w3.org/2005/08/addressing">http://docs.oasis-open.org/ws-rx/wsrm/200702/CloseSequence</Action> >>> <MessageID >>> xmlns="http://www.w3.org/2005/08/addressing">urn:uuid:93e26fdb-cbe2-4204-ac8e-39ca3ad385a6</MessageID> >>> <To >>> xmlns="http://www.w3.org/2005/08/addressing">http://localhost:9000/SoapContext/GreeterPort</To> >>> <ReplyTo xmlns="http://www.w3.org/2005/08/addressing"> >>> <Address>http://www.w3.org/2005/08/addressing/anonymous</Address> >>> </ReplyTo> >>> <wsrm:Sequence soap:mustUnderstand="1" >>> xmlns:ns2="http://www.w3.org/2005/08/addressing" >>> xmlns:wsrm="http://docs.oasis-open.org/ws-rx/wsrm/200702"> >>> >>> <wsrm:Identifier>urn:uuid:9cbc8993-cdb7-4718-bec7-63d70889c142</wsrm:Identifier> >>> <wsrm:MessageNumber>3</wsrm:MessageNumber> >>> </wsrm:Sequence> >>> </soap:Header> >>> <soap:Body> >>> <CloseSequence >>> xmlns="http://docs.oasis-open.org/ws-rx/wsrm/200702" >>> xmlns:ns2="http://www.w3.org/2005/08/addressing"> >>> >>> <Identifier>urn:uuid:9cbc8993-cdb7-4718-bec7-63d70889c142</Identifier> >>> <LastMsgNumber>2</LastMsgNumber> >>> </CloseSequence> >>> </soap:Body> >>> </soap:Envelope> >>> >>> It looks like RMCaptureOutInterceptor is doing this special handling >>> for the CloseSequence action to include the sequence in its current RM >>> context properties. >>> >>> 114 boolean isApplicationMessage = >>> !RMContextUtils.isRMProtocolMessage(action); >>> 115 boolean isPartialResponse = >>> MessageUtils.isPartialResponse(msg); >>> 116 RMConstants constants = protocol.getConstants(); >>> 117 boolean isLastMessage = >>> constants.getCloseSequenceAction().equals(action); >>> 118 >>> ... >>> 145 if ((isApplicationMessage || (isLastMessage && >>> invocationContext != null)) && !isPartialResponse) { >>> 146 if (LOG.isLoggable(Level.FINE)) { >>> 147 LOG.fine("inbound sequence: " + (null == inSeqId >>> ? "null" : inSeqId.getValue())); >>> 148 } >>> … >>> 178 } >>> >>> I am not sure why this special handling is needed. Not handling the >>> CloseSequence message this way (e.g., attach the sequence to the >>> context only for the app messages), I can see the following >>> CloseSequence message is instead sent out. >>> >>> <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> >>> <soap:Header> >>> <Action >>> xmlns="http://www.w3.org/2005/08/addressing">http://docs.oasis-open.org/ws-rx/wsrm/200702/CloseSequence</Action> >>> <MessageID >>> xmlns="http://www.w3.org/2005/08/addressing">urn:uuid:8c0f3805-934d-4f8a-862d-e8475d67d11b</MessageID> >>> <To >>> xmlns="http://www.w3.org/2005/08/addressing">http://localhost:9000/SoapContext/GreeterPort</To> >>> <ReplyTo xmlns="http://www.w3.org/2005/08/addressing"> >>> <Address>http://www.w3.org/2005/08/addressing/anonymous</Address> >>> </ReplyTo> >>> </soap:Header> >>> <soap:Body> >>> <CloseSequence >>> xmlns="http://docs.oasis-open.org/ws-rx/wsrm/200702" >>> xmlns:ns2="http://www.w3.org/2005/08/addressing"> >>> >>> <Identifier>urn:uuid:ce1619a6-a0b9-4d9b-901e-594c54e4a220</Identifier> >>> <LastMsgNumber>2</LastMsgNumber> >>> </CloseSequence> >>> </soap:Body> >>> </soap:Envelope> >>> >>> and this looks to be correct. Maybe there was a reason for the above >>> code and you could comment on this? >>> >>> thanks. >>> regards, aki >>> >>
