Author: richard.opalka(a)jboss.com
Date: 2008-05-15 09:59:34 -0400 (Thu, 15 May 2008)
New Revision: 7044
Modified:
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxws/client/ClientImpl.java
Log:
always pop message context
Modified:
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxws/client/ClientImpl.java
===================================================================
---
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxws/client/ClientImpl.java 2008-05-15
11:52:25 UTC (rev 7043)
+++
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxws/client/ClientImpl.java 2008-05-15
13:59:34 UTC (rev 7044)
@@ -318,43 +318,50 @@
finally
{
msgContext = MessageContextAssociation.peekMessageContext();
- if (this.wsrmSequence != null)
+
+ try
{
- if (RMConstant.PROTOCOL_OPERATION_QNAMES.contains(opName) == false)
- {
- Map<String, Object> wsrmResCtx = (Map<String, Object>)
msgContext.get(RMConstant.RESPONSE_CONTEXT);
- if (wsrmResCtx != null)
- {
- RMConstants wsrmConstants = RMProvider.get().getConstants();
- Map<QName, RMSerializable> mapping = (Map<QName,
RMSerializable>)wsrmResCtx.get(RMConstant.PROTOCOL_MESSAGES_MAPPING);
- QName seq = wsrmConstants.getSequenceQName();
- if (mapping.keySet().contains(seq))
- {
- RMHelper.handleSequenceHeader((RMSequence)mapping.get(seq),
this.wsrmSequence);
- }
- QName seqAck = wsrmConstants.getSequenceAcknowledgementQName();
- if (mapping.keySet().contains(seqAck))
- {
-
RMHelper.handleSequenceAcknowledgementHeader((RMSequenceAcknowledgement)mapping.get(seqAck),
this.wsrmSequence);
- }
- QName ackReq = wsrmConstants.getAckRequestedQName();
- if (mapping.keySet().contains(ackReq))
- {
-
RMHelper.handleAckRequestedHeader((RMAckRequested)mapping.get(ackReq),
this.wsrmSequence);
- }
- }
- }
+ if (this.wsrmSequence != null)
+ {
+ if (RMConstant.PROTOCOL_OPERATION_QNAMES.contains(opName) == false)
+ {
+ Map<String, Object> wsrmResCtx = (Map<String, Object>)
msgContext.get(RMConstant.RESPONSE_CONTEXT);
+ if (wsrmResCtx != null)
+ {
+ RMConstants wsrmConstants = RMProvider.get().getConstants();
+ Map<QName, RMSerializable> mapping = (Map<QName,
RMSerializable>)wsrmResCtx.get(RMConstant.PROTOCOL_MESSAGES_MAPPING);
+ QName seq = wsrmConstants.getSequenceQName();
+ if (mapping.keySet().contains(seq))
+ {
+ RMHelper.handleSequenceHeader((RMSequence)mapping.get(seq),
this.wsrmSequence);
+ }
+ QName seqAck = wsrmConstants.getSequenceAcknowledgementQName();
+ if (mapping.keySet().contains(seqAck))
+ {
+
RMHelper.handleSequenceAcknowledgementHeader((RMSequenceAcknowledgement)mapping.get(seqAck),
this.wsrmSequence);
+ }
+ QName ackReq = wsrmConstants.getAckRequestedQName();
+ if (mapping.keySet().contains(ackReq))
+ {
+ RMHelper.handleAckRequestedHeader((RMAckRequested)mapping.get(ackReq),
this.wsrmSequence);
+ }
+ }
+ }
+ }
+
+ // Copy the inbound msg properties to the binding's response context
+ for (String key : msgContext.keySet())
+ {
+ Object value = msgContext.get(key);
+ resContext.put(key, value);
+ }
+
}
-
- // Copy the inbound msg properties to the binding's response context
- for (String key : msgContext.keySet())
+ finally
{
- Object value = msgContext.get(key);
- resContext.put(key, value);
+ // Reset the message context association
+ MessageContextAssociation.popMessageContext();
}
-
- // Reset the message context association
- MessageContextAssociation.popMessageContext();
}
}
Show replies by date