Author: richard.opalka(a)jboss.com
Date: 2008-02-29 12:37:42 -0500 (Fri, 29 Feb 2008)
New Revision: 5871
Modified:
stack/native/trunk/src/main/java/org/jboss/ws/core/MessageTrace.java
stack/native/trunk/src/main/java/org/jboss/ws/core/jaxws/client/ClientImpl.java
stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/jaxws/RMHandlerHelper.java
stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/server/RMInvocationHandler.java
stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/server/RMServerSequence.java
Log:
fixing message no. inconsistency
Modified: stack/native/trunk/src/main/java/org/jboss/ws/core/MessageTrace.java
===================================================================
--- stack/native/trunk/src/main/java/org/jboss/ws/core/MessageTrace.java 2008-02-29
16:35:57 UTC (rev 5870)
+++ stack/native/trunk/src/main/java/org/jboss/ws/core/MessageTrace.java 2008-02-29
17:37:42 UTC (rev 5871)
@@ -85,6 +85,12 @@
String xmlString = DOMWriter.printNode(root, true);
msgLog.trace(messagePrefix + "\n" + xmlString);
}
+ else if (message instanceof String)
+ {
+ Element root = new XMLFragment(new StreamSource(new
ByteArrayInputStream(((String)message).getBytes()))).toElement();
+ String xmlString = DOMWriter.printNode(root, true);
+ msgLog.trace(messagePrefix + "\n" + xmlString);
+ }
else
{
msgLog.warn("Unsupported message type: " + message);
Modified: stack/native/trunk/src/main/java/org/jboss/ws/core/jaxws/client/ClientImpl.java
===================================================================
---
stack/native/trunk/src/main/java/org/jboss/ws/core/jaxws/client/ClientImpl.java 2008-02-29
16:35:57 UTC (rev 5870)
+++
stack/native/trunk/src/main/java/org/jboss/ws/core/jaxws/client/ClientImpl.java 2008-02-29
17:37:42 UTC (rev 5871)
@@ -281,6 +281,7 @@
}
Map<String, Object> rmRequestContext = new HashMap<String,
Object>();
List<QName> outMsgs = new LinkedList<QName>();
+ wsrmSequence.newMessageNumber();
outMsgs.add(RMProvider.get().getConstants().getSequenceQName());
outMsgs.add(RMProvider.get().getConstants().getAckRequestedQName());
if (wsrmSequence.isAckRequested())
Modified:
stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/jaxws/RMHandlerHelper.java
===================================================================
---
stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/jaxws/RMHandlerHelper.java 2008-02-29
16:35:57 UTC (rev 5870)
+++
stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/jaxws/RMHandlerHelper.java 2008-02-29
17:37:42 UTC (rev 5871)
@@ -262,7 +262,7 @@
// construct Sequence object
org.jboss.ws.extensions.wsrm.spi.protocol.RMSequence sequence =
rmFactory.newSequence();
sequence.setIdentifier(seq.getOutboundId());
- sequence.setMessageNumber(seq.newMessageNumber());
+ sequence.setMessageNumber(seq.getLastMessageNumber());
return sequence;
}
Modified:
stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/server/RMInvocationHandler.java
===================================================================
---
stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/server/RMInvocationHandler.java 2008-02-29
16:35:57 UTC (rev 5870)
+++
stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/server/RMInvocationHandler.java 2008-02-29
17:37:42 UTC (rev 5871)
@@ -217,8 +217,7 @@
throw getUnknownSequenceFault(seqIdentifier);
}
- RMStore.serialize(dataDir, sequence); // TODO: serialization of terminated
sequence results in no file
- //sequences.remove(sequence);
+ RMStore.serialize(dataDir, sequence);
if (RMProvider.get().getMessageFactory().newTerminateSequenceResponse() !=
null)
{
protocolMessages.add(rmConstants.getTerminateSequenceResponseQName());
@@ -257,6 +256,14 @@
boolean retTypeIsVoid = inv.getJavaMethod().getReturnType().equals(Void.class)
|| inv.getJavaMethod().getReturnType().equals(Void.TYPE);
if (false == retTypeIsVoid)
{
+ try
+ {
+ sequence.newMessageNumber();
+ }
+ finally
+ {
+ RMStore.serialize(dataDir, sequence);
+ }
protocolMessages.add(rmConstants.getSequenceQName());
protocolMessages.add(rmConstants.getAckRequestedQName());
}
Modified:
stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/server/RMServerSequence.java
===================================================================
---
stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/server/RMServerSequence.java 2008-02-29
16:35:57 UTC (rev 5870)
+++
stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/server/RMServerSequence.java 2008-02-29
17:37:42 UTC (rev 5871)
@@ -169,6 +169,7 @@
{
if (this.messageNumber == Long.MAX_VALUE)
{
+ this.terminate();
Map<String, Object> detailsMap = new HashMap<String, Object>(3);
detailsMap.put(RMFaultConstant.IDENTIFIER, this.outboundId);
detailsMap.put(RMFaultConstant.MAX_MESSAGE_NUMBER, this.messageNumber);
Show replies by date