Author: richard.opalka(a)jboss.com
Date: 2007-10-26 06:32:03 -0400 (Fri, 26 Oct 2007)
New Revision: 4895
Added:
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/RMSequenceImpl.java
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/client_api/
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/client_api/RMException.java
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/client_api/RMProvider.java
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/client_api/RMSequence.java
Removed:
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/RMException.java
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/RMHandlerConstant.java
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/RMProvider.java
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/RMSequence.java
Modified:
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/core/CommonClient.java
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/core/CommonSOAPBinding.java
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/core/jaxws/client/ClientImpl.java
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/core/jaxws/client/ClientProxy.java
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/core/jaxws/spi/ServiceDelegateImpl.java
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/RMClientHandler.java
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/RMConstant.java
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/common/serialization/AbstractSerializable.java
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/common/serialization/AckRequestedSerializer.java
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/common/serialization/CloseSequenceResponseSerializer.java
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/common/serialization/CloseSequenceSerializer.java
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/common/serialization/CreateSequenceResponseSerializer.java
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/common/serialization/CreateSequenceSerializer.java
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/common/serialization/SequenceAcknowledgementSerializer.java
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/common/serialization/SequenceFaultSerializer.java
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/common/serialization/SequenceSerializer.java
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/common/serialization/SerializationHelper.java
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/common/serialization/SerializationRepository.java
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/common/serialization/TerminateSequenceResponseSerializer.java
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/common/serialization/TerminateSequenceSerializer.java
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spec200502/AckRequestedImpl.java
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spec200502/CreateSequenceImpl.java
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spec200502/CreateSequenceResponseImpl.java
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spec200502/SequenceAcknowledgementImpl.java
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spec200502/SequenceFaultImpl.java
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spec200502/SequenceImpl.java
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spec200502/TerminateSequenceImpl.java
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spec200702/AckRequestedImpl.java
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spec200702/CloseSequenceImpl.java
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spec200702/CloseSequenceResponseImpl.java
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spec200702/CreateSequenceImpl.java
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spec200702/CreateSequenceResponseImpl.java
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spec200702/SequenceAcknowledgementImpl.java
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spec200702/SequenceFaultImpl.java
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spec200702/SequenceImpl.java
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spec200702/TerminateSequenceImpl.java
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spec200702/TerminateSequenceResponseImpl.java
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spi/Provider.java
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spi/protocol/Serializable.java
stack/native/branches/ropalka/trunk/src/test/java/org/jboss/test/ws/jaxws/wsrm/emulator/EndpointEmulator.java
stack/native/branches/ropalka/trunk/src/test/java/org/jboss/test/ws/jaxws/wsrm/oneway/OneWayTestCase.java
stack/native/branches/ropalka/trunk/src/test/java/org/jboss/test/ws/jaxws/wsrm/reqres/ReqResTestCase.java
stack/native/branches/ropalka/trunk/src/test/resources/jaxws/wsrm/emulator/resources/echoResponse.xml
Log:
synchronizing local working copy with SVN
Modified:
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/core/CommonClient.java
===================================================================
---
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/core/CommonClient.java 2007-10-26
09:58:38 UTC (rev 4894)
+++
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/core/CommonClient.java 2007-10-26
10:32:03 UTC (rev 4895)
@@ -54,6 +54,7 @@
import org.jboss.ws.core.soap.UnboundHeader;
import org.jboss.ws.core.utils.HolderUtils;
import org.jboss.ws.extensions.addressing.AddressingConstantsImpl;
+import org.jboss.ws.extensions.wsrm.RMConstant;
import org.jboss.ws.metadata.umdm.ClientEndpointMetaData;
import org.jboss.ws.metadata.umdm.EndpointMetaData;
import org.jboss.ws.metadata.umdm.OperationMetaData;
Modified:
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/core/CommonSOAPBinding.java
===================================================================
---
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/core/CommonSOAPBinding.java 2007-10-26
09:58:38 UTC (rev 4894)
+++
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/core/CommonSOAPBinding.java 2007-10-26
10:32:03 UTC (rev 4895)
@@ -75,6 +75,7 @@
import org.jboss.ws.core.soap.attachment.AttachmentPartImpl;
import org.jboss.ws.core.soap.attachment.CIDGenerator;
import org.jboss.ws.core.utils.MimeUtils;
+import org.jboss.ws.extensions.wsrm.RMConstant;
import org.jboss.ws.extensions.wsrm.spi.Provider;
import org.jboss.ws.extensions.xop.XOPContext;
import org.jboss.ws.metadata.umdm.OperationMetaData;
@@ -172,22 +173,18 @@
SOAPElement soapBodyElement = soapBody;
if (style == Style.RPC)
{
- ReliableMessagingMetaData rmMD =
opMetaData.getEndpointMetaData().getConfig().getRMMetaData();
- List<QName> rmQNs = Collections.emptyList();
- if (rmMD != null)
- {
- String rmSpecVersion = rmMD.getProvider().getSpecVersion();
- org.jboss.ws.extensions.wsrm.spi.Constants constants =
Provider.getInstance(rmSpecVersion).getConstants();
- rmQNs = new LinkedList<QName>();
- rmQNs.add(constants.getCreateSequenceQName());
- rmQNs.add(constants.getCloseSequenceQName());
- rmQNs.add(constants.getTerminateSequenceQName());
- }
boolean serialize = true;
- for (QName wsrmQN : rmQNs)
+
+ if (opMetaData.getEndpointMetaData().getConfig().getRMMetaData() != null)
{
- if (wsrmQN.equals(opMetaData.getQName()))
- serialize = false;
+ for (QName wsrmQN : RMConstant.PROTOCOL_OPERATION_QNAMES)
+ {
+ if (wsrmQN.equals(opMetaData.getQName()))
+ {
+ serialize = false;
+ break;
+ }
+ }
}
if (serialize)
Modified:
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/core/jaxws/client/ClientImpl.java
===================================================================
---
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/core/jaxws/client/ClientImpl.java 2007-10-26
09:58:38 UTC (rev 4894)
+++
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/core/jaxws/client/ClientImpl.java 2007-10-26
10:32:03 UTC (rev 4895)
@@ -30,7 +30,6 @@
import java.util.Map;
import java.util.Observable;
import java.util.Set;
-import java.util.concurrent.TimeUnit;
import java.util.concurrent.locks.Lock;
import java.util.concurrent.locks.ReentrantLock;
@@ -64,11 +63,14 @@
import org.jboss.ws.core.jaxws.handler.PortInfoImpl;
import org.jboss.ws.core.jaxws.handler.SOAPMessageContextJAXWS;
import org.jboss.ws.core.soap.MessageContextAssociation;
-import org.jboss.ws.extensions.wsrm.RMException;
-import org.jboss.ws.extensions.wsrm.RMHandlerConstant;
-import org.jboss.ws.extensions.wsrm.RMProvider;
-import org.jboss.ws.extensions.wsrm.RMSequence;
+import org.jboss.ws.extensions.wsrm.RMConstant;
+import org.jboss.ws.extensions.wsrm.RMSequenceImpl;
+import org.jboss.ws.extensions.wsrm.client_api.RMException;
+import org.jboss.ws.extensions.wsrm.client_api.RMProvider;
+import org.jboss.ws.extensions.wsrm.client_api.RMSequence;
import org.jboss.ws.extensions.wsrm.spi.Provider;
+import org.jboss.ws.extensions.wsrm.spi.protocol.CreateSequenceResponse;
+import org.jboss.ws.extensions.wsrm.spi.protocol.Serializable;
import org.jboss.ws.metadata.config.Configurable;
import org.jboss.ws.metadata.config.ConfigurationProvider;
import org.jboss.ws.metadata.umdm.EndpointMetaData;
@@ -95,11 +97,21 @@
private Map<HandlerType, HandlerChainExecutor> executorMap = new
HashMap<HandlerType, HandlerChainExecutor>();
private static HandlerType[] HANDLER_TYPES = new HandlerType[] {HandlerType.PRE,
HandlerType.ENDPOINT, HandlerType.POST};
-
+
// WS-RM locking utility
private final Lock wsrmLock = new ReentrantLock();
// WS-RM sequence associated with the proxy
private RMSequence wsrmSequence;
+
+ public final Lock getWSRMLock()
+ {
+ return this.wsrmLock;
+ }
+
+ public final void setWSRMSequence(RMSequence wsrmSequence)
+ {
+ this.wsrmSequence = wsrmSequence;
+ }
public ClientImpl(EndpointMetaData epMetaData, HandlerResolver handlerResolver)
{
@@ -241,16 +253,37 @@
// Invoked by the proxy invokation handler
public Object invoke(QName opName, Object[] args, Map<String, Object>
resContext) throws RemoteException
{
- // Associate a message context with the current thread
- CommonMessageContext msgContext = new SOAPMessageContextJAXWS();
- MessageContextAssociation.pushMessageContext(msgContext);
+ this.wsrmLock.lock();
- // The contents of the request context are used to initialize the message context
(see section 9.4.1)
- // prior to invoking any handlers (see chapter 9) for the outbound message. Each
property within the
- // request context is copied to the message context with a scope of HANDLER.
- Map<String, Object> reqContext = getBindingProvider().getRequestContext();
- msgContext.putAll(reqContext);
+ try
+ {
+ // Associate a message context with the current thread
+ CommonMessageContext msgContext = new SOAPMessageContextJAXWS();
+ MessageContextAssociation.pushMessageContext(msgContext);
+ // The contents of the request context are used to initialize the message
context (see section 9.4.1)
+ // prior to invoking any handlers (see chapter 9) for the outbound message. Each
property within the
+ // request context is copied to the message context with a scope of HANDLER.
+ Map<String, Object> reqContext =
getBindingProvider().getRequestContext();
+
+ if (this.wsrmSequence != null)
+ {
+ if (RMConstant.PROTOCOL_OPERATION_QNAMES.contains(opName) == false)
+ {
+ Map<String, Object> rmRequestContext = new HashMap<String,
Object>();
+ rmRequestContext.put(RMConstant.OPERATION_TYPE, RMConstant.SEQUENCE);
+ rmRequestContext.put(RMConstant.SEQUENCE_REFERENCE, this.wsrmSequence);
+ reqContext.put(RMConstant.REQUEST_CONTEXT, rmRequestContext);
+ }
+ }
+
+ msgContext.putAll(reqContext);
+ }
+ finally
+ {
+ this.wsrmLock.unlock();
+ }
+
try
{
Object retObj = invoke(opName, args, false);
@@ -272,7 +305,7 @@
finally
{
// Copy the inbound msg properties to the binding's response context
- msgContext = MessageContextAssociation.peekMessageContext();
+ CommonMessageContext msgContext =
MessageContextAssociation.peekMessageContext();
for (String key : msgContext.keySet())
{
Object value = msgContext.get(key);
@@ -442,77 +475,33 @@
///////////////////
// WS-RM support //
///////////////////
- public RMSequence createSequence()
+ public RMSequence createSequence() throws RMException
{
- this.wsrmLock.lock();
+ this.getWSRMLock().lock();
try
{
if ((this.wsrmSequence != null) && (!this.wsrmSequence.isTerminated()))
throw new IllegalStateException("Sequence already registered with proxy
instance");
- Provider rmProvider =
Provider.getInstance("http://docs.oasis-open.org/ws-rx/wsrm/200702&q...;
try
{
- Map<String,Object> responseContext =
getBindingProvider().getResponseContext();
- QName createSequenceQN = rmProvider.getConstants().getCreateSequenceQName();
- Map<String, Object> requestContext =
getBindingProvider().getRequestContext();
- requestContext.put(RMHandlerConstant.HANDLER_COMMAND,
RMHandlerConstant.Operation.CREATE_SEQUENCE);
- Object retVal = invoke(createSequenceQN, new Object[] {}, responseContext);
+ QName createSequenceQN =
Provider.get().getConstants().getCreateSequenceQName();
+ Map<String, Object> rmRequestContext = new HashMap<String,
Object>();
+ rmRequestContext.put(RMConstant.OPERATION_TYPE, RMConstant.CREATE_SEQUENCE);
+ getBindingProvider().getRequestContext().put(RMConstant.REQUEST_CONTEXT,
rmRequestContext);
+ invoke(createSequenceQN, new Object[] {},
getBindingProvider().getResponseContext());
+
+ Map<String, Object> rmResponseContext = (Map<String,
Object>)getBindingProvider().getResponseContext().get(RMConstant.RESPONSE_CONTEXT);
+ String id =
((CreateSequenceResponse)((List<Serializable>)rmResponseContext.get(RMConstant.DATA)).get(0)).getIdentifier();
+ return this.wsrmSequence = new RMSequenceImpl(this, id);
}
- catch (Exception ignore) {
- ignore.printStackTrace(); // TODO: use emulator on server side
+ catch (Exception e) {
+ throw new RMException("Unable to create WSRM sequence", e);
}
-
- // TODO: do not return dummy sequence
- return this.wsrmSequence = new RMSequence()
- {
- private int count = 0;
- private boolean closed = false;
- private boolean terminated = false;
-
- public void close() throws RMException
- {
- this.closed = true;
- }
-
- public void terminate() throws RMException
- {
- this.terminated = true;
- }
-
- public boolean isCompleted()
- {
- return true;
- }
-
- public boolean isCompleted(int timeAmount, TimeUnit timeUnit)
- {
- return true;
- }
-
- public String getId()
- {
- return "DummySequenceId" + count++;
- }
-
- public void setLastMessage()
- {
- }
-
- public boolean isTerminated()
- {
- return this.terminated;
- }
-
- public boolean isClosed()
- {
- return this.closed;
- }
- };
}
finally
{
- this.wsrmLock.unlock();
+ this.getWSRMLock().unlock();
}
}
}
\ No newline at end of file
Modified:
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/core/jaxws/client/ClientProxy.java
===================================================================
---
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/core/jaxws/client/ClientProxy.java 2007-10-26
09:58:38 UTC (rev 4894)
+++
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/core/jaxws/client/ClientProxy.java 2007-10-26
10:32:03 UTC (rev 4895)
@@ -28,6 +28,7 @@
import java.rmi.RemoteException;
import java.util.ArrayList;
import java.util.Arrays;
+import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
@@ -48,7 +49,9 @@
import org.jboss.ws.Constants;
import org.jboss.ws.WSException;
import org.jboss.ws.core.StubExt;
-import org.jboss.ws.extensions.wsrm.RMProvider;
+import org.jboss.ws.extensions.wsrm.RMConstant;
+import org.jboss.ws.extensions.wsrm.client_api.RMProvider;
+import org.jboss.ws.extensions.wsrm.spi.Provider;
import org.jboss.ws.metadata.umdm.EndpointMetaData;
import org.jboss.ws.metadata.umdm.OperationMetaData;
import org.jboss.wsf.common.JavaUtils;
Modified:
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/core/jaxws/spi/ServiceDelegateImpl.java
===================================================================
---
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/core/jaxws/spi/ServiceDelegateImpl.java 2007-10-26
09:58:38 UTC (rev 4894)
+++
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/core/jaxws/spi/ServiceDelegateImpl.java 2007-10-26
10:32:03 UTC (rev 4895)
@@ -56,7 +56,7 @@
import org.jboss.ws.core.jaxws.client.DispatchImpl;
import org.jboss.ws.core.jaxws.client.ServiceObjectFactoryJAXWS;
import org.jboss.ws.core.jaxws.handler.HandlerResolverImpl;
-import org.jboss.ws.extensions.wsrm.RMProvider;
+import org.jboss.ws.extensions.wsrm.client_api.RMProvider;
import org.jboss.ws.metadata.builder.jaxws.JAXWSClientMetaDataBuilder;
import org.jboss.ws.metadata.builder.jaxws.JAXWSMetaDataBuilder;
import org.jboss.ws.metadata.umdm.ClientEndpointMetaData;
Modified:
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/RMClientHandler.java
===================================================================
---
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/RMClientHandler.java 2007-10-26
09:58:38 UTC (rev 4894)
+++
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/RMClientHandler.java 2007-10-26
10:32:03 UTC (rev 4895)
@@ -22,26 +22,31 @@
package org.jboss.ws.extensions.wsrm;
import java.util.Collections;
+import java.util.HashMap;
import java.util.HashSet;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Map;
import java.util.Set;
import javax.xml.namespace.QName;
-import javax.xml.soap.SOAPException;
import javax.xml.soap.SOAPMessage;
-import javax.xml.ws.addressing.AddressingException;
import javax.xml.ws.addressing.JAXWSAConstants;
-import javax.xml.ws.addressing.soap.SOAPAddressingBuilder;
import javax.xml.ws.addressing.soap.SOAPAddressingProperties;
import javax.xml.ws.handler.MessageContext;
import javax.xml.ws.handler.MessageContext.Scope;
import javax.xml.ws.handler.soap.SOAPMessageContext;
import org.jboss.logging.Logger;
+import org.jboss.ws.core.CommonMessageContext;
import org.jboss.ws.core.jaxws.handler.GenericSOAPHandler;
import org.jboss.ws.extensions.wsrm.spi.Constants;
import org.jboss.ws.extensions.wsrm.spi.Provider;
+import org.jboss.ws.extensions.wsrm.spi.protocol.AckRequested;
import org.jboss.ws.extensions.wsrm.spi.protocol.CreateSequence;
import org.jboss.ws.extensions.wsrm.spi.protocol.CreateSequenceResponse;
+import org.jboss.ws.extensions.wsrm.spi.protocol.Sequence;
+import org.jboss.ws.extensions.wsrm.spi.protocol.Serializable;
/**
* TODO: add comment
@@ -56,7 +61,7 @@
private static Logger log = Logger.getLogger(RMClientHandler.class);
private static Set<QName> HEADERS = new HashSet<QName>();
- private static Provider rmProvider =
Provider.getInstance("http://docs.oasis-open.org/ws-rx/wsrm/200702&q...;
+ private static Provider rmProvider = Provider.get();
static
{
@@ -78,18 +83,55 @@
{
if(log.isDebugEnabled()) log.debug("handleOutbound");
- SOAPAddressingProperties addrProps =
(SOAPAddressingProperties)msgContext.get(JAXWSAConstants.CLIENT_ADDRESSING_PROPERTIES_OUTBOUND);
- RMHandlerConstant.Operation operation =
(RMHandlerConstant.Operation)msgContext.get(RMHandlerConstant.HANDLER_COMMAND);
+ CommonMessageContext commonMsgContext = (CommonMessageContext)msgContext;
+ SOAPAddressingProperties addrProps =
(SOAPAddressingProperties)commonMsgContext.get(JAXWSAConstants.CLIENT_ADDRESSING_PROPERTIES_OUTBOUND);
+ Map<String, Object> rmRequestContext = (Map<String,
Object>)commonMsgContext.get(RMConstant.REQUEST_CONTEXT);
+ String operation = (String)rmRequestContext.get(RMConstant.OPERATION_TYPE);
if (addrProps != null)
{
- SOAPMessage soapMessage = ((SOAPMessageContext)msgContext).getMessage();
- if (operation == RMHandlerConstant.Operation.CREATE_SEQUENCE)
+ SOAPMessage soapMessage = ((SOAPMessageContext)commonMsgContext).getMessage();
+ if (RMConstant.CREATE_SEQUENCE.equals(operation))
{
String replyTo = addrProps.getReplyTo().getAddress().getURI().toString();
CreateSequence createSequence =
rmProvider.getMessageFactory().newCreateSequence();
createSequence.setAcksTo(replyTo);
createSequence.serializeTo(soapMessage);
+ List<Serializable> data = new LinkedList<Serializable>();
+ data.add(createSequence);
+ rmRequestContext.put(RMConstant.DATA, data);
+
+ return true;
}
+
+ if (RMConstant.SEQUENCE.equals(operation))
+ {
+ RMSequenceImpl sequenceImpl =
(RMSequenceImpl)rmRequestContext.get(RMConstant.SEQUENCE_REFERENCE);
+ Sequence sequence = rmProvider.getMessageFactory().newSequence();
+ sequence.setIdentifier(sequenceImpl.getId());
+ if (sequenceImpl.isLastMessage())
+ {
+ sequence.setLastMessage();
+ }
+ sequence.setMessageNumber(sequenceImpl.newMessageNumber());
+ sequence.serializeTo(soapMessage);
+
+ List<Serializable> data = new LinkedList<Serializable>();
+ data.add(sequence);
+
+ if (commonMsgContext.getOperationMetaData().isOneWay() == false)
+ {
+ // TODO: ask msgStore if there are other sequences related to the same
+ // endpoint that requires ack and serialize it here
+ AckRequested ackRequested =
rmProvider.getMessageFactory().newAckRequested();
+ ackRequested.setIdentifier(sequenceImpl.getId());
+ ackRequested.setMessageNumber(sequenceImpl.getLastMessageNumber());
+ ackRequested.serializeTo(soapMessage);
+ data.add(ackRequested);
+ }
+ rmRequestContext.put(RMConstant.DATA, data);
+
+ return true;
+ }
}
else
{
@@ -104,12 +146,20 @@
if(log.isDebugEnabled()) log.debug("handleInbound");
SOAPMessage soapMessage = ((SOAPMessageContext)msgContext).getMessage();
- RMHandlerConstant.Operation operation =
(RMHandlerConstant.Operation)msgContext.get(RMHandlerConstant.HANDLER_COMMAND);
- if (operation == RMHandlerConstant.Operation.CREATE_SEQUENCE)
+ // TODO: inspect operation type different way - don't forget on piggy-backing
+ Map<String, Object> rmRequestContext = (Map<String,
Object>)msgContext.get(RMConstant.REQUEST_CONTEXT);
+ String operation = (String)rmRequestContext.get(RMConstant.OPERATION_TYPE);
+ if (RMConstant.CREATE_SEQUENCE.equals(operation))
{
CreateSequenceResponse createSequenceResponse =
rmProvider.getMessageFactory().newCreateSequenceResponse();
createSequenceResponse.deserializeFrom(soapMessage);
- System.out.println("have wsrm identifier: " +
createSequenceResponse.getIdentifier());
+ List<Serializable> data = new LinkedList<Serializable>();
+ data.add(createSequenceResponse);
+ Map<String, Object> rmResponseContext = new HashMap<String,
Object>();
+ rmResponseContext.put(RMConstant.OPERATION_TYPE,
RMConstant.CREATE_SEQUENCE_RESPONSE);
+ rmResponseContext.put(RMConstant.DATA, data);
+ msgContext.put(RMConstant.RESPONSE_CONTEXT, rmResponseContext);
+ msgContext.setScope(RMConstant.RESPONSE_CONTEXT, Scope.APPLICATION);
}
return true;
Modified:
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/RMConstant.java
===================================================================
---
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/RMConstant.java 2007-10-26
09:58:38 UTC (rev 4894)
+++
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/RMConstant.java 2007-10-26
10:32:03 UTC (rev 4895)
@@ -1,17 +1,54 @@
package org.jboss.ws.extensions.wsrm;
-final class RMConstant
+import java.util.Collections;
+import java.util.LinkedList;
+import java.util.List;
+
+import javax.xml.namespace.QName;
+
+import org.jboss.ws.extensions.wsrm.spi.Constants;
+import org.jboss.ws.extensions.wsrm.spi.Provider;
+
+public final class RMConstant
{
private static final String PREFIX = RMConstant.class.getName();
- static final String TARGET_ADDRESS = PREFIX + ".targetAddress";
- static final String ONE_WAY_OPERATION = PREFIX + ".oneWayOperation";
- static final String INVOCATION_CONTEXT = PREFIX + ".invocationContext";
- static final String MARSHALLER = PREFIX + ".marshaller";
- static final String UNMARSHALLER = PREFIX + ".unmarshaller";
- static final String SERIALIZATION_CONTEXT = PREFIX +
".serializationContext";
- static final String REMOTING_INVOCATION_CONTEXT = PREFIX +
".remotingInvocationContext";
- static final String REMOTING_CONFIGURATION_CONTEXT = PREFIX +
".remotingConfigurationContext";
+ public static final String TARGET_ADDRESS = PREFIX + ".targetAddress";
+ public static final String ONE_WAY_OPERATION = PREFIX + ".oneWayOperation";
+ public static final String INVOCATION_CONTEXT = PREFIX +
".invocationContext";
+ public static final String MARSHALLER = PREFIX + ".marshaller";
+ public static final String UNMARSHALLER = PREFIX + ".unmarshaller";
+ public static final String SERIALIZATION_CONTEXT = PREFIX +
".serializationContext";
+ public static final String REMOTING_INVOCATION_CONTEXT = PREFIX +
".remotingInvocationContext";
+ public static final String REMOTING_CONFIGURATION_CONTEXT = PREFIX +
".remotingConfigurationContext";
+ public static final String OPERATION_TYPE = PREFIX + ".operationType";
+ public static final String REQUEST_CONTEXT = PREFIX + ".requestContext";
+ public static final String RESPONSE_CONTEXT = PREFIX + ".responseContext";
+ public static final String SEQUENCE_REFERENCE = PREFIX +
".sequenceReference";
+ // TODO: separate this to enum - START
+ public static final String CREATE_SEQUENCE = PREFIX + ".createSequence";
+ public static final String CREATE_SEQUENCE_RESPONSE = PREFIX +
".createSequenceResponse";
+ public static final String SEQUENCE = PREFIX + ".sequence";
+ // TODO: separate this to enum - END
+ public static final String DATA = PREFIX + ".data";
+ public static final List<QName> PROTOCOL_OPERATION_QNAMES;
+
+ static
+ {
+ LinkedList<QName> temp = new LinkedList<QName>();
+ Constants constants = Provider.get().getConstants();
+ temp.add(constants.getCreateSequenceQName());
+ temp.add(constants.getCreateSequenceResponseQName());
+ temp.add(constants.getSequenceQName());
+ temp.add(constants.getAckRequestedQName());
+ temp.add(constants.getCloseSequenceQName());
+ temp.add(constants.getSequenceAcknowledgementQName());
+ temp.add(constants.getCloseSequenceResponseQName());
+ temp.add(constants.getTerminateSequenceQName());
+ temp.add(constants.getTerminateSequenceResponseQName());
+ PROTOCOL_OPERATION_QNAMES = Collections.unmodifiableList(temp);
+ }
+
private RMConstant()
{
// no instances
Deleted:
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/RMException.java
===================================================================
---
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/RMException.java 2007-10-26
09:58:38 UTC (rev 4894)
+++
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/RMException.java 2007-10-26
10:32:03 UTC (rev 4895)
@@ -1,53 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
- */
-package org.jboss.ws.extensions.wsrm;
-
-import javax.xml.ws.WebServiceException;
-
-/**
- * RM exception heavily used by RM framework
- * @author richard.opalka(a)jboss.com
- */
-public class RMException extends WebServiceException
-{
-
- public RMException()
- {
- super();
- }
-
- public RMException(String message, Throwable cause)
- {
- super(message, cause);
- }
-
- public RMException(String message)
- {
- super(message);
- }
-
- public RMException(Throwable cause)
- {
- super(cause);
- }
-
-}
Deleted:
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/RMHandlerConstant.java
===================================================================
---
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/RMHandlerConstant.java 2007-10-26
09:58:38 UTC (rev 4894)
+++
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/RMHandlerConstant.java 2007-10-26
10:32:03 UTC (rev 4895)
@@ -1,40 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
- */
-package org.jboss.ws.extensions.wsrm;
-
-/**
- * TODO: add comment
- *
- * @author richard.opalka(a)jboss.com
- *
- * @since Oct 23, 2007
- */
-public class RMHandlerConstant
-{
- private static final String PREFIX = RMHandlerConstant.class.getName();
- public static final String HANDLER_COMMAND = PREFIX + ".handlerCommand";
-
- public enum Operation
- {
- CREATE_SEQUENCE, CLOSE_SEQUENCE, TERMINATE_SEQUENCE
- }
-}
Deleted:
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/RMProvider.java
===================================================================
---
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/RMProvider.java 2007-10-26
09:58:38 UTC (rev 4894)
+++
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/RMProvider.java 2007-10-26
10:32:03 UTC (rev 4895)
@@ -1,34 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
- */
-package org.jboss.ws.extensions.wsrm;
-
-/**
- * TODO: add comment
- *
- * @author richard.opalka(a)jboss.com
- *
- * @since Oct 22, 2007
- */
-public interface RMProvider
-{
- RMSequence createSequence();
-}
Deleted:
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/RMSequence.java
===================================================================
---
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/RMSequence.java 2007-10-26
09:58:38 UTC (rev 4894)
+++
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/RMSequence.java 2007-10-26
10:32:03 UTC (rev 4895)
@@ -1,36 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
- */
-package org.jboss.ws.extensions.wsrm;
-
-import java.util.concurrent.TimeUnit;
-
-public interface RMSequence
-{
- void close() throws RMException;
- void terminate() throws RMException;
- String getId() throws RMException;
- void setLastMessage() throws RMException;
- boolean isCompleted() throws RMException;
- boolean isCompleted(int timeAmount, TimeUnit timeUnit) throws RMException;
- boolean isClosed() throws RMException;
- boolean isTerminated() throws RMException;
-}
Added:
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/RMSequenceImpl.java
===================================================================
---
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/RMSequenceImpl.java
(rev 0)
+++
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/RMSequenceImpl.java 2007-10-26
10:32:03 UTC (rev 4895)
@@ -0,0 +1,129 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+package org.jboss.ws.extensions.wsrm;
+
+import java.util.concurrent.TimeUnit;
+import java.util.concurrent.atomic.AtomicLong;
+
+import org.jboss.ws.core.jaxws.client.ClientImpl;
+import org.jboss.ws.extensions.wsrm.client_api.RMException;
+import org.jboss.ws.extensions.wsrm.client_api.RMSequence;
+
+/**
+ * Reliable messaging sequence implementation
+ *
+ * @author richard.opalka(a)jboss.com
+ *
+ * @since Oct 25, 2007
+ */
+public final class RMSequenceImpl implements RMSequence
+{
+ private final String id;
+ private final ClientImpl client;
+ // object states variables
+ private boolean closed = false;
+ private boolean terminated = false;
+ private boolean discarded = false;
+ private boolean lastMessage = false;
+ private AtomicLong messageNo = new AtomicLong();
+
+ public RMSequenceImpl(ClientImpl client, String id)
+ {
+ super();
+ this.client = client;
+ this.id = id;
+ }
+
+ public final void close() throws RMException
+ {
+ this.closed = true;
+ }
+
+ public final long newMessageNumber()
+ {
+ return this.messageNo.incrementAndGet();
+ }
+
+ public final long getLastMessageNumber()
+ {
+ return this.messageNo.get();
+ }
+
+ public final void discard() throws RMException
+ {
+ this.client.getWSRMLock().lock();
+ try
+ {
+ this.client.setWSRMSequence(null);
+ this.discarded = true;
+ }
+ finally
+ {
+ this.client.getWSRMLock().unlock();
+ }
+ }
+
+ public final void terminate() throws RMException
+ {
+ this.terminated = true;
+ }
+
+ public final boolean isCompleted()
+ {
+ return true;
+ }
+
+ public final boolean isCompleted(int timeAmount, TimeUnit timeUnit)
+ {
+ return true;
+ }
+
+ public final String getId()
+ {
+ return id;
+ }
+
+ public final void setLastMessage()
+ {
+ this.lastMessage = true;
+ }
+
+ public final boolean isLastMessage()
+ {
+ return this.lastMessage;
+ }
+
+ public final boolean isTerminated()
+ {
+ return this.terminated;
+ }
+
+ public final boolean isClosed()
+ {
+ return this.closed;
+ }
+
+ public boolean isDiscarded()
+ {
+ return this.discarded;
+ }
+}
Property changes on:
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/RMSequenceImpl.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/client_api/RMException.java
===================================================================
---
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/client_api/RMException.java
(rev 0)
+++
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/client_api/RMException.java 2007-10-26
10:32:03 UTC (rev 4895)
@@ -0,0 +1,53 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+package org.jboss.ws.extensions.wsrm.client_api;
+
+import javax.xml.ws.WebServiceException;
+
+/**
+ * Reliable messaging exception
+ * @author richard.opalka(a)jboss.com
+ */
+public class RMException extends WebServiceException
+{
+
+ public RMException()
+ {
+ super();
+ }
+
+ public RMException(String message, Throwable cause)
+ {
+ super(message, cause);
+ }
+
+ public RMException(String message)
+ {
+ super(message);
+ }
+
+ public RMException(Throwable cause)
+ {
+ super(cause);
+ }
+
+}
Property changes on:
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/client_api/RMException.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/client_api/RMProvider.java
===================================================================
---
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/client_api/RMProvider.java
(rev 0)
+++
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/client_api/RMProvider.java 2007-10-26
10:32:03 UTC (rev 4895)
@@ -0,0 +1,34 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+package org.jboss.ws.extensions.wsrm.client_api;
+
+/**
+ * TODO: add comment
+ *
+ * @author richard.opalka(a)jboss.com
+ *
+ * @since Oct 22, 2007
+ */
+public interface RMProvider
+{
+ RMSequence createSequence() throws RMException;
+}
Property changes on:
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/client_api/RMProvider.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/client_api/RMSequence.java
===================================================================
---
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/client_api/RMSequence.java
(rev 0)
+++
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/client_api/RMSequence.java 2007-10-26
10:32:03 UTC (rev 4895)
@@ -0,0 +1,40 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+package org.jboss.ws.extensions.wsrm.client_api;
+
+import java.util.concurrent.TimeUnit;
+
+public interface RMSequence
+{
+ void close() throws RMException;
+ void discard() throws RMException;
+ void terminate() throws RMException;
+ String getId() throws RMException;
+ void setLastMessage() throws RMException;
+ boolean isCompleted() throws RMException;
+ boolean isCompleted(int timeAmount, TimeUnit timeUnit) throws RMException;
+ boolean isClosed() throws RMException;
+ boolean isLastMessage() throws RMException;
+ long getLastMessageNumber() throws RMException;
+ boolean isDiscarded() throws RMException;
+ boolean isTerminated() throws RMException;
+}
Property changes on:
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/client_api/RMSequence.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Modified:
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/common/serialization/AbstractSerializable.java
===================================================================
---
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/common/serialization/AbstractSerializable.java 2007-10-26
09:58:38 UTC (rev 4894)
+++
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/common/serialization/AbstractSerializable.java 2007-10-26
10:32:03 UTC (rev 4895)
@@ -23,7 +23,7 @@
import javax.xml.soap.SOAPMessage;
-import org.jboss.ws.extensions.wsrm.RMException;
+import org.jboss.ws.extensions.wsrm.client_api.RMException;
import org.jboss.ws.extensions.wsrm.spi.Provider;
import org.jboss.ws.extensions.wsrm.spi.protocol.Serializable;
Modified:
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/common/serialization/AckRequestedSerializer.java
===================================================================
---
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/common/serialization/AckRequestedSerializer.java 2007-10-26
09:58:38 UTC (rev 4894)
+++
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/common/serialization/AckRequestedSerializer.java 2007-10-26
10:32:03 UTC (rev 4895)
@@ -33,7 +33,7 @@
import javax.xml.soap.SOAPHeader;
import javax.xml.soap.SOAPMessage;
-import org.jboss.ws.extensions.wsrm.RMException;
+import org.jboss.ws.extensions.wsrm.client_api.RMException;
import org.jboss.ws.extensions.wsrm.spi.Constants;
import org.jboss.ws.extensions.wsrm.spi.Provider;
import org.jboss.ws.extensions.wsrm.spi.protocol.AckRequested;
Modified:
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/common/serialization/CloseSequenceResponseSerializer.java
===================================================================
---
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/common/serialization/CloseSequenceResponseSerializer.java 2007-10-26
09:58:38 UTC (rev 4894)
+++
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/common/serialization/CloseSequenceResponseSerializer.java 2007-10-26
10:32:03 UTC (rev 4895)
@@ -31,7 +31,7 @@
import javax.xml.soap.SOAPException;
import javax.xml.soap.SOAPMessage;
-import org.jboss.ws.extensions.wsrm.RMException;
+import org.jboss.ws.extensions.wsrm.client_api.RMException;
import org.jboss.ws.extensions.wsrm.spi.Constants;
import org.jboss.ws.extensions.wsrm.spi.Provider;
import org.jboss.ws.extensions.wsrm.spi.protocol.CloseSequenceResponse;
Modified:
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/common/serialization/CloseSequenceSerializer.java
===================================================================
---
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/common/serialization/CloseSequenceSerializer.java 2007-10-26
09:58:38 UTC (rev 4894)
+++
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/common/serialization/CloseSequenceSerializer.java 2007-10-26
10:32:03 UTC (rev 4895)
@@ -33,7 +33,7 @@
import javax.xml.soap.SOAPException;
import javax.xml.soap.SOAPMessage;
-import org.jboss.ws.extensions.wsrm.RMException;
+import org.jboss.ws.extensions.wsrm.client_api.RMException;
import org.jboss.ws.extensions.wsrm.spi.Constants;
import org.jboss.ws.extensions.wsrm.spi.Provider;
import org.jboss.ws.extensions.wsrm.spi.protocol.CloseSequence;
Modified:
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/common/serialization/CreateSequenceResponseSerializer.java
===================================================================
---
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/common/serialization/CreateSequenceResponseSerializer.java 2007-10-26
09:58:38 UTC (rev 4894)
+++
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/common/serialization/CreateSequenceResponseSerializer.java 2007-10-26
10:32:03 UTC (rev 4895)
@@ -34,7 +34,7 @@
import javax.xml.ws.addressing.AddressingBuilder;
import javax.xml.ws.addressing.AddressingConstants;
-import org.jboss.ws.extensions.wsrm.RMException;
+import org.jboss.ws.extensions.wsrm.client_api.RMException;
import org.jboss.ws.extensions.wsrm.spi.Constants;
import org.jboss.ws.extensions.wsrm.spi.Provider;
import org.jboss.ws.extensions.wsrm.spi.protocol.CreateSequenceResponse;
Modified:
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/common/serialization/CreateSequenceSerializer.java
===================================================================
---
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/common/serialization/CreateSequenceSerializer.java 2007-10-26
09:58:38 UTC (rev 4894)
+++
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/common/serialization/CreateSequenceSerializer.java 2007-10-26
10:32:03 UTC (rev 4895)
@@ -34,7 +34,7 @@
import javax.xml.ws.addressing.AddressingBuilder;
import javax.xml.ws.addressing.AddressingConstants;
-import org.jboss.ws.extensions.wsrm.RMException;
+import org.jboss.ws.extensions.wsrm.client_api.RMException;
import org.jboss.ws.extensions.wsrm.spi.Constants;
import org.jboss.ws.extensions.wsrm.spi.Provider;
import org.jboss.ws.extensions.wsrm.spi.protocol.CreateSequence;
Modified:
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/common/serialization/SequenceAcknowledgementSerializer.java
===================================================================
---
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/common/serialization/SequenceAcknowledgementSerializer.java 2007-10-26
09:58:38 UTC (rev 4894)
+++
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/common/serialization/SequenceAcknowledgementSerializer.java 2007-10-26
10:32:03 UTC (rev 4895)
@@ -34,7 +34,7 @@
import javax.xml.soap.SOAPHeader;
import javax.xml.soap.SOAPMessage;
-import org.jboss.ws.extensions.wsrm.RMException;
+import org.jboss.ws.extensions.wsrm.client_api.RMException;
import org.jboss.ws.extensions.wsrm.spi.Constants;
import org.jboss.ws.extensions.wsrm.spi.Provider;
import org.jboss.ws.extensions.wsrm.spi.protocol.SequenceAcknowledgement;
Modified:
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/common/serialization/SequenceFaultSerializer.java
===================================================================
---
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/common/serialization/SequenceFaultSerializer.java 2007-10-26
09:58:38 UTC (rev 4894)
+++
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/common/serialization/SequenceFaultSerializer.java 2007-10-26
10:32:03 UTC (rev 4895)
@@ -24,7 +24,7 @@
import javax.xml.soap.SOAPMessage;
import org.jboss.util.NotImplementedException;
-import org.jboss.ws.extensions.wsrm.RMException;
+import org.jboss.ws.extensions.wsrm.client_api.RMException;
import org.jboss.ws.extensions.wsrm.spi.Provider;
import org.jboss.ws.extensions.wsrm.spi.protocol.Serializable;
Modified:
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/common/serialization/SequenceSerializer.java
===================================================================
---
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/common/serialization/SequenceSerializer.java 2007-10-26
09:58:38 UTC (rev 4894)
+++
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/common/serialization/SequenceSerializer.java 2007-10-26
10:32:03 UTC (rev 4895)
@@ -33,7 +33,7 @@
import javax.xml.soap.SOAPException;
import javax.xml.soap.SOAPMessage;
-import org.jboss.ws.extensions.wsrm.RMException;
+import org.jboss.ws.extensions.wsrm.client_api.RMException;
import org.jboss.ws.extensions.wsrm.spi.Constants;
import org.jboss.ws.extensions.wsrm.spi.Provider;
import org.jboss.ws.extensions.wsrm.spi.protocol.Sequence;
Modified:
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/common/serialization/SerializationHelper.java
===================================================================
---
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/common/serialization/SerializationHelper.java 2007-10-26
09:58:38 UTC (rev 4894)
+++
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/common/serialization/SerializationHelper.java 2007-10-26
10:32:03 UTC (rev 4895)
@@ -27,7 +27,7 @@
import org.w3c.dom.Element;
import org.jboss.wsf.common.DOMUtils;
-import org.jboss.ws.extensions.wsrm.RMException;
+import org.jboss.ws.extensions.wsrm.client_api.RMException;
import javax.xml.namespace.QName;
import javax.xml.soap.SOAPElement;
Modified:
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/common/serialization/SerializationRepository.java
===================================================================
---
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/common/serialization/SerializationRepository.java 2007-10-26
09:58:38 UTC (rev 4894)
+++
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/common/serialization/SerializationRepository.java 2007-10-26
10:32:03 UTC (rev 4895)
@@ -21,7 +21,7 @@
*/
package org.jboss.ws.extensions.wsrm.common.serialization;
-import org.jboss.ws.extensions.wsrm.RMException;
+import org.jboss.ws.extensions.wsrm.client_api.RMException;
import org.jboss.ws.extensions.wsrm.spi.protocol.AckRequested;
import org.jboss.ws.extensions.wsrm.spi.protocol.CloseSequence;
import org.jboss.ws.extensions.wsrm.spi.protocol.CloseSequenceResponse;
Modified:
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/common/serialization/TerminateSequenceResponseSerializer.java
===================================================================
---
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/common/serialization/TerminateSequenceResponseSerializer.java 2007-10-26
09:58:38 UTC (rev 4894)
+++
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/common/serialization/TerminateSequenceResponseSerializer.java 2007-10-26
10:32:03 UTC (rev 4895)
@@ -31,7 +31,7 @@
import javax.xml.soap.SOAPException;
import javax.xml.soap.SOAPMessage;
-import org.jboss.ws.extensions.wsrm.RMException;
+import org.jboss.ws.extensions.wsrm.client_api.RMException;
import org.jboss.ws.extensions.wsrm.spi.Constants;
import org.jboss.ws.extensions.wsrm.spi.Provider;
import org.jboss.ws.extensions.wsrm.spi.protocol.Serializable;
Modified:
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/common/serialization/TerminateSequenceSerializer.java
===================================================================
---
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/common/serialization/TerminateSequenceSerializer.java 2007-10-26
09:58:38 UTC (rev 4894)
+++
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/common/serialization/TerminateSequenceSerializer.java 2007-10-26
10:32:03 UTC (rev 4895)
@@ -33,7 +33,7 @@
import javax.xml.soap.SOAPException;
import javax.xml.soap.SOAPMessage;
-import org.jboss.ws.extensions.wsrm.RMException;
+import org.jboss.ws.extensions.wsrm.client_api.RMException;
import org.jboss.ws.extensions.wsrm.spi.Constants;
import org.jboss.ws.extensions.wsrm.spi.Provider;
import org.jboss.ws.extensions.wsrm.spi.protocol.Serializable;
Modified:
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spec200502/AckRequestedImpl.java
===================================================================
---
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spec200502/AckRequestedImpl.java 2007-10-26
09:58:38 UTC (rev 4894)
+++
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spec200502/AckRequestedImpl.java 2007-10-26
10:32:03 UTC (rev 4895)
@@ -21,7 +21,7 @@
*/
package org.jboss.ws.extensions.wsrm.spec200502;
-import org.jboss.ws.extensions.wsrm.RMException;
+import org.jboss.ws.extensions.wsrm.client_api.RMException;
import org.jboss.ws.extensions.wsrm.common.serialization.AbstractSerializable;
import org.jboss.ws.extensions.wsrm.spi.Provider;
import org.jboss.ws.extensions.wsrm.spi.protocol.AckRequested;
Modified:
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spec200502/CreateSequenceImpl.java
===================================================================
---
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spec200502/CreateSequenceImpl.java 2007-10-26
09:58:38 UTC (rev 4894)
+++
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spec200502/CreateSequenceImpl.java 2007-10-26
10:32:03 UTC (rev 4895)
@@ -21,7 +21,7 @@
*/
package org.jboss.ws.extensions.wsrm.spec200502;
-import org.jboss.ws.extensions.wsrm.RMException;
+import org.jboss.ws.extensions.wsrm.client_api.RMException;
import org.jboss.ws.extensions.wsrm.common.serialization.AbstractSerializable;
import org.jboss.ws.extensions.wsrm.spi.Provider;
import org.jboss.ws.extensions.wsrm.spi.protocol.CreateSequence;
Modified:
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spec200502/CreateSequenceResponseImpl.java
===================================================================
---
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spec200502/CreateSequenceResponseImpl.java 2007-10-26
09:58:38 UTC (rev 4894)
+++
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spec200502/CreateSequenceResponseImpl.java 2007-10-26
10:32:03 UTC (rev 4895)
@@ -21,7 +21,7 @@
*/
package org.jboss.ws.extensions.wsrm.spec200502;
-import org.jboss.ws.extensions.wsrm.RMException;
+import org.jboss.ws.extensions.wsrm.client_api.RMException;
import org.jboss.ws.extensions.wsrm.common.serialization.AbstractSerializable;
import org.jboss.ws.extensions.wsrm.spi.Provider;
import org.jboss.ws.extensions.wsrm.spi.protocol.CreateSequenceResponse;
Modified:
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spec200502/SequenceAcknowledgementImpl.java
===================================================================
---
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spec200502/SequenceAcknowledgementImpl.java 2007-10-26
09:58:38 UTC (rev 4894)
+++
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spec200502/SequenceAcknowledgementImpl.java 2007-10-26
10:32:03 UTC (rev 4895)
@@ -25,7 +25,7 @@
import java.util.LinkedList;
import java.util.Collections;
-import org.jboss.ws.extensions.wsrm.RMException;
+import org.jboss.ws.extensions.wsrm.client_api.RMException;
import org.jboss.ws.extensions.wsrm.common.serialization.AbstractSerializable;
import org.jboss.ws.extensions.wsrm.spi.Provider;
import org.jboss.ws.extensions.wsrm.spi.protocol.SequenceAcknowledgement;
Modified:
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spec200502/SequenceFaultImpl.java
===================================================================
---
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spec200502/SequenceFaultImpl.java 2007-10-26
09:58:38 UTC (rev 4894)
+++
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spec200502/SequenceFaultImpl.java 2007-10-26
10:32:03 UTC (rev 4895)
@@ -21,7 +21,7 @@
*/
package org.jboss.ws.extensions.wsrm.spec200502;
-import org.jboss.ws.extensions.wsrm.RMException;
+import org.jboss.ws.extensions.wsrm.client_api.RMException;
import org.jboss.ws.extensions.wsrm.common.serialization.AbstractSerializable;
import org.jboss.ws.extensions.wsrm.spi.Provider;
import org.jboss.ws.extensions.wsrm.spi.protocol.SequenceFault;
Modified:
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spec200502/SequenceImpl.java
===================================================================
---
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spec200502/SequenceImpl.java 2007-10-26
09:58:38 UTC (rev 4894)
+++
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spec200502/SequenceImpl.java 2007-10-26
10:32:03 UTC (rev 4895)
@@ -21,7 +21,7 @@
*/
package org.jboss.ws.extensions.wsrm.spec200502;
-import org.jboss.ws.extensions.wsrm.RMException;
+import org.jboss.ws.extensions.wsrm.client_api.RMException;
import org.jboss.ws.extensions.wsrm.common.serialization.AbstractSerializable;
import org.jboss.ws.extensions.wsrm.spi.Provider;
import org.jboss.ws.extensions.wsrm.spi.protocol.Sequence;
Modified:
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spec200502/TerminateSequenceImpl.java
===================================================================
---
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spec200502/TerminateSequenceImpl.java 2007-10-26
09:58:38 UTC (rev 4894)
+++
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spec200502/TerminateSequenceImpl.java 2007-10-26
10:32:03 UTC (rev 4895)
@@ -21,7 +21,7 @@
*/
package org.jboss.ws.extensions.wsrm.spec200502;
-import org.jboss.ws.extensions.wsrm.RMException;
+import org.jboss.ws.extensions.wsrm.client_api.RMException;
import org.jboss.ws.extensions.wsrm.common.serialization.AbstractSerializable;
import org.jboss.ws.extensions.wsrm.spi.Provider;
import org.jboss.ws.extensions.wsrm.spi.protocol.TerminateSequence;
Modified:
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spec200702/AckRequestedImpl.java
===================================================================
---
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spec200702/AckRequestedImpl.java 2007-10-26
09:58:38 UTC (rev 4894)
+++
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spec200702/AckRequestedImpl.java 2007-10-26
10:32:03 UTC (rev 4895)
@@ -21,7 +21,7 @@
*/
package org.jboss.ws.extensions.wsrm.spec200702;
-import org.jboss.ws.extensions.wsrm.RMException;
+import org.jboss.ws.extensions.wsrm.client_api.RMException;
import org.jboss.ws.extensions.wsrm.common.serialization.AbstractSerializable;
import org.jboss.ws.extensions.wsrm.spi.Provider;
import org.jboss.ws.extensions.wsrm.spi.protocol.AckRequested;
Modified:
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spec200702/CloseSequenceImpl.java
===================================================================
---
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spec200702/CloseSequenceImpl.java 2007-10-26
09:58:38 UTC (rev 4894)
+++
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spec200702/CloseSequenceImpl.java 2007-10-26
10:32:03 UTC (rev 4895)
@@ -21,7 +21,7 @@
*/
package org.jboss.ws.extensions.wsrm.spec200702;
-import org.jboss.ws.extensions.wsrm.RMException;
+import org.jboss.ws.extensions.wsrm.client_api.RMException;
import org.jboss.ws.extensions.wsrm.common.serialization.AbstractSerializable;
import org.jboss.ws.extensions.wsrm.spi.Provider;
import org.jboss.ws.extensions.wsrm.spi.protocol.CloseSequence;
Modified:
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spec200702/CloseSequenceResponseImpl.java
===================================================================
---
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spec200702/CloseSequenceResponseImpl.java 2007-10-26
09:58:38 UTC (rev 4894)
+++
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spec200702/CloseSequenceResponseImpl.java 2007-10-26
10:32:03 UTC (rev 4895)
@@ -21,7 +21,7 @@
*/
package org.jboss.ws.extensions.wsrm.spec200702;
-import org.jboss.ws.extensions.wsrm.RMException;
+import org.jboss.ws.extensions.wsrm.client_api.RMException;
import org.jboss.ws.extensions.wsrm.common.serialization.AbstractSerializable;
import org.jboss.ws.extensions.wsrm.spi.Provider;
import org.jboss.ws.extensions.wsrm.spi.protocol.CloseSequenceResponse;
Modified:
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spec200702/CreateSequenceImpl.java
===================================================================
---
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spec200702/CreateSequenceImpl.java 2007-10-26
09:58:38 UTC (rev 4894)
+++
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spec200702/CreateSequenceImpl.java 2007-10-26
10:32:03 UTC (rev 4895)
@@ -21,7 +21,7 @@
*/
package org.jboss.ws.extensions.wsrm.spec200702;
-import org.jboss.ws.extensions.wsrm.RMException;
+import org.jboss.ws.extensions.wsrm.client_api.RMException;
import org.jboss.ws.extensions.wsrm.common.serialization.AbstractSerializable;
import org.jboss.ws.extensions.wsrm.spi.Provider;
import org.jboss.ws.extensions.wsrm.spi.protocol.CreateSequence;
Modified:
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spec200702/CreateSequenceResponseImpl.java
===================================================================
---
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spec200702/CreateSequenceResponseImpl.java 2007-10-26
09:58:38 UTC (rev 4894)
+++
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spec200702/CreateSequenceResponseImpl.java 2007-10-26
10:32:03 UTC (rev 4895)
@@ -21,7 +21,7 @@
*/
package org.jboss.ws.extensions.wsrm.spec200702;
-import org.jboss.ws.extensions.wsrm.RMException;
+import org.jboss.ws.extensions.wsrm.client_api.RMException;
import org.jboss.ws.extensions.wsrm.common.serialization.AbstractSerializable;
import org.jboss.ws.extensions.wsrm.spi.Provider;
import org.jboss.ws.extensions.wsrm.spi.protocol.CreateSequenceResponse;
Modified:
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spec200702/SequenceAcknowledgementImpl.java
===================================================================
---
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spec200702/SequenceAcknowledgementImpl.java 2007-10-26
09:58:38 UTC (rev 4894)
+++
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spec200702/SequenceAcknowledgementImpl.java 2007-10-26
10:32:03 UTC (rev 4895)
@@ -25,9 +25,9 @@
import java.util.LinkedList;
import java.util.Collections;
-import org.jboss.ws.extensions.wsrm.RMException;
import org.jboss.ws.extensions.wsrm.spi.Provider;
import org.jboss.ws.extensions.wsrm.spi.protocol.SequenceAcknowledgement;
+import org.jboss.ws.extensions.wsrm.client_api.RMException;
import org.jboss.ws.extensions.wsrm.common.serialization.AbstractSerializable;
/*
Modified:
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spec200702/SequenceFaultImpl.java
===================================================================
---
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spec200702/SequenceFaultImpl.java 2007-10-26
09:58:38 UTC (rev 4894)
+++
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spec200702/SequenceFaultImpl.java 2007-10-26
10:32:03 UTC (rev 4895)
@@ -21,7 +21,7 @@
*/
package org.jboss.ws.extensions.wsrm.spec200702;
-import org.jboss.ws.extensions.wsrm.RMException;
+import org.jboss.ws.extensions.wsrm.client_api.RMException;
import org.jboss.ws.extensions.wsrm.common.serialization.AbstractSerializable;
import org.jboss.ws.extensions.wsrm.spi.Provider;
import org.jboss.ws.extensions.wsrm.spi.protocol.SequenceFault;
Modified:
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spec200702/SequenceImpl.java
===================================================================
---
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spec200702/SequenceImpl.java 2007-10-26
09:58:38 UTC (rev 4894)
+++
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spec200702/SequenceImpl.java 2007-10-26
10:32:03 UTC (rev 4895)
@@ -21,7 +21,7 @@
*/
package org.jboss.ws.extensions.wsrm.spec200702;
-import org.jboss.ws.extensions.wsrm.RMException;
+import org.jboss.ws.extensions.wsrm.client_api.RMException;
import org.jboss.ws.extensions.wsrm.common.serialization.AbstractSerializable;
import org.jboss.ws.extensions.wsrm.spi.Provider;
import org.jboss.ws.extensions.wsrm.spi.protocol.Sequence;
Modified:
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spec200702/TerminateSequenceImpl.java
===================================================================
---
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spec200702/TerminateSequenceImpl.java 2007-10-26
09:58:38 UTC (rev 4894)
+++
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spec200702/TerminateSequenceImpl.java 2007-10-26
10:32:03 UTC (rev 4895)
@@ -21,7 +21,7 @@
*/
package org.jboss.ws.extensions.wsrm.spec200702;
-import org.jboss.ws.extensions.wsrm.RMException;
+import org.jboss.ws.extensions.wsrm.client_api.RMException;
import org.jboss.ws.extensions.wsrm.common.serialization.AbstractSerializable;
import org.jboss.ws.extensions.wsrm.spi.Provider;
import org.jboss.ws.extensions.wsrm.spi.protocol.TerminateSequence;
Modified:
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spec200702/TerminateSequenceResponseImpl.java
===================================================================
---
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spec200702/TerminateSequenceResponseImpl.java 2007-10-26
09:58:38 UTC (rev 4894)
+++
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spec200702/TerminateSequenceResponseImpl.java 2007-10-26
10:32:03 UTC (rev 4895)
@@ -21,7 +21,7 @@
*/
package org.jboss.ws.extensions.wsrm.spec200702;
-import org.jboss.ws.extensions.wsrm.RMException;
+import org.jboss.ws.extensions.wsrm.client_api.RMException;
import org.jboss.ws.extensions.wsrm.common.serialization.AbstractSerializable;
import org.jboss.ws.extensions.wsrm.spi.Provider;
import org.jboss.ws.extensions.wsrm.spi.protocol.TerminateSequenceResponse;
Modified:
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spi/Provider.java
===================================================================
---
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spi/Provider.java 2007-10-26
09:58:38 UTC (rev 4894)
+++
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spi/Provider.java 2007-10-26
10:32:03 UTC (rev 4895)
@@ -86,4 +86,9 @@
return REGISTERED_PROVIDERS.get(wsrmNamespace);
}
+ public static final Provider get()
+ {
+ return org.jboss.ws.extensions.wsrm.spec200702.ProviderImpl.getInstance();
+ }
+
}
Modified:
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spi/protocol/Serializable.java
===================================================================
---
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spi/protocol/Serializable.java 2007-10-26
09:58:38 UTC (rev 4894)
+++
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spi/protocol/Serializable.java 2007-10-26
10:32:03 UTC (rev 4895)
@@ -23,7 +23,7 @@
import javax.xml.soap.SOAPMessage;
-import org.jboss.ws.extensions.wsrm.RMException;
+import org.jboss.ws.extensions.wsrm.client_api.RMException;
/**
* This interface identifies classes that are de/serializable from/to SOAP messages
Modified:
stack/native/branches/ropalka/trunk/src/test/java/org/jboss/test/ws/jaxws/wsrm/emulator/EndpointEmulator.java
===================================================================
---
stack/native/branches/ropalka/trunk/src/test/java/org/jboss/test/ws/jaxws/wsrm/emulator/EndpointEmulator.java 2007-10-26
09:58:38 UTC (rev 4894)
+++
stack/native/branches/ropalka/trunk/src/test/java/org/jboss/test/ws/jaxws/wsrm/emulator/EndpointEmulator.java 2007-10-26
10:32:03 UTC (rev 4895)
@@ -42,6 +42,7 @@
import org.w3c.dom.Document;
import org.w3c.dom.Element;
+import org.w3c.dom.NodeList;
/**
* Endpoint emulator
@@ -53,13 +54,14 @@
public class EndpointEmulator extends HttpServlet
{
private static final String ADDR_NS =
"http://www.w3.org/2005/08/addressing";
+ private static final String WSRM_NS =
"http://docs.oasis-open.org/ws-rx/wsrm/200702";
private static final Map<String, String> wsrmActions = new HashMap<String,
String>();
- private static final String CREATE_SEQUENCE_ACTION =
"http://docs.oasis-open.org/ws-rx/wsrm/200702/CreateSequence";
- private static final String CREATE_SEQUENCE_RESPONSE_ACTION =
"http://docs.oasis-open.org/ws-rx/wsrm/200702/CreateSequenceResponse";
- private static final String CLOSE_SEQUENCE_ACTION =
"http://docs.oasis-open.org/ws-rx/wsrm/200702/CloseSequence";
- private static final String CLOSE_SEQUENCE_RESPONSE_ACTION =
"http://docs.oasis-open.org/ws-rx/wsrm/200702/CloseSequenceResponse";
- private static final String TERMINATE_SEQUENCE_ACTION =
"http://docs.oasis-open.org/ws-rx/wsrm/200702/TerminateSequence";
- private static final String TERMINATE_SEQUENCE_RESPONSE_ACTION =
"http://docs.oasis-open.org/ws-rx/wsrm/200702/TerminateSequenceResponse";
+ private static final String CREATE_SEQUENCE_ACTION = WSRM_NS +
"/CreateSequence";
+ private static final String CREATE_SEQUENCE_RESPONSE_ACTION = WSRM_NS +
"/CreateSequenceResponse";
+ private static final String CLOSE_SEQUENCE_ACTION = WSRM_NS +
"/CloseSequence";
+ private static final String CLOSE_SEQUENCE_RESPONSE_ACTION = WSRM_NS +
"/CloseSequenceResponse";
+ private static final String TERMINATE_SEQUENCE_ACTION = WSRM_NS +
"/TerminateSequence";
+ private static final String TERMINATE_SEQUENCE_RESPONSE_ACTION = WSRM_NS +
"/TerminateSequenceResponse";
private static final Random generator = new Random();
static
@@ -87,7 +89,7 @@
{
resp.setContentType("text/xml");
PrintWriter writer = resp.getWriter();
- Properties properties = getAddressingProperties(getRequestMessage(req));
+ Properties properties = getProperties(getRequestMessage(req));
String response = getResource("WEB-INF/resources/echoResponse.xml");
if (properties.get("addressing.action").equals(CREATE_SEQUENCE_ACTION))
response =
getResource("WEB-INF/resources/createSequenceResponse.xml");
@@ -111,6 +113,9 @@
}
action = wsrmActions.get(action);
}
+ response = replace("${messaging.identifier}",
props.getProperty("messaging.identifier"), response);
+ response = replace("${messaging.upper}",
props.getProperty("messaging.messagenumber"), response);
+ response = replace("${messaging.lower}",
props.getProperty("messaging.messagenumber"), response);
response = replace("${addressing.action}", action, response);
return response;
}
@@ -131,7 +136,7 @@
return result.toString();
}
- private Properties getAddressingProperties(String message) throws IOException
+ private Properties getProperties(String message) throws IOException
{
try
{
@@ -149,6 +154,17 @@
String replyTo = ((Element)document.getElementsByTagNameNS(ADDR_NS,
"ReplyTo").item(0))
.getElementsByTagNameNS(ADDR_NS,
"Address").item(0).getTextContent().trim();
retVal.put("addressing.replyto", replyTo);
+ NodeList sequence = document.getElementsByTagNameNS(WSRM_NS,
"Sequence");
+ if (sequence != null && sequence.getLength() != 0)
+ {
+ String sequenceId = ((Element)sequence.item(0))
+ .getElementsByTagNameNS(WSRM_NS,
"Identifier").item(0).getTextContent().trim();
+ retVal.put("messaging.identifier", replyTo);
+ String messageNumber = ((Element)sequence.item(0))
+ .getElementsByTagNameNS(WSRM_NS,
"MessageNumber").item(0).getTextContent().trim();
+ retVal.put("messaging.messagenumber", messageNumber);
+ }
+
System.out.println("Properties from message: " + retVal);
return retVal;
}
Modified:
stack/native/branches/ropalka/trunk/src/test/java/org/jboss/test/ws/jaxws/wsrm/oneway/OneWayTestCase.java
===================================================================
---
stack/native/branches/ropalka/trunk/src/test/java/org/jboss/test/ws/jaxws/wsrm/oneway/OneWayTestCase.java 2007-10-26
09:58:38 UTC (rev 4894)
+++
stack/native/branches/ropalka/trunk/src/test/java/org/jboss/test/ws/jaxws/wsrm/oneway/OneWayTestCase.java 2007-10-26
10:32:03 UTC (rev 4895)
@@ -29,8 +29,8 @@
import junit.framework.Test;
-import org.jboss.ws.extensions.wsrm.RMProvider;
-import org.jboss.ws.extensions.wsrm.RMSequence;
+import org.jboss.ws.extensions.wsrm.client_api.RMProvider;
+import org.jboss.ws.extensions.wsrm.client_api.RMSequence;
import org.jboss.wsf.test.JBossWSTest;
import org.jboss.wsf.test.JBossWSTestSetup;
import org.jboss.test.ws.jaxws.wsrm.OneWayServiceIface;
Modified:
stack/native/branches/ropalka/trunk/src/test/java/org/jboss/test/ws/jaxws/wsrm/reqres/ReqResTestCase.java
===================================================================
---
stack/native/branches/ropalka/trunk/src/test/java/org/jboss/test/ws/jaxws/wsrm/reqres/ReqResTestCase.java 2007-10-26
09:58:38 UTC (rev 4894)
+++
stack/native/branches/ropalka/trunk/src/test/java/org/jboss/test/ws/jaxws/wsrm/reqres/ReqResTestCase.java 2007-10-26
10:32:03 UTC (rev 4895)
@@ -44,8 +44,8 @@
import org.jboss.test.ws.jaxws.wsrm.ReqResServiceIface;
import org.jboss.ws.extensions.addressing.AddressingClientUtil;
-import org.jboss.ws.extensions.wsrm.RMSequence;
-import org.jboss.ws.extensions.wsrm.RMProvider;
+import org.jboss.ws.extensions.wsrm.client_api.RMProvider;
+import org.jboss.ws.extensions.wsrm.client_api.RMSequence;
/**
* Reliable JBoss WebService client invoking req/res methods
@@ -183,6 +183,7 @@
setAddressingProperties("http://useless/action");
invokeWebServiceMethod(invocationType);
if (!sequence.isCompleted(1000, TimeUnit.MILLISECONDS)) {
+ sequence.discard();
fail("Sequence not completed within specified time amount");
} else {
sequence.terminate();
Modified:
stack/native/branches/ropalka/trunk/src/test/resources/jaxws/wsrm/emulator/resources/echoResponse.xml
===================================================================
---
stack/native/branches/ropalka/trunk/src/test/resources/jaxws/wsrm/emulator/resources/echoResponse.xml 2007-10-26
09:58:38 UTC (rev 4894)
+++
stack/native/branches/ropalka/trunk/src/test/resources/jaxws/wsrm/emulator/resources/echoResponse.xml 2007-10-26
10:32:03 UTC (rev 4895)
@@ -6,6 +6,10 @@
<wsa:To>${addressing.to}</wsa:To>
<wsa:RelatesTo>${addressing.relatesto}</wsa:RelatesTo>
<wsa:Action>${addressing.action}</wsa:Action>
+ <wsrm:SequenceAcknowledgement>
+ <wsrm:Identifier>${messaging.identifier}</wsrm:Identifier>
+ <wsrm:AcknowledgementRange Upper='${messaging.upper}'
Lower='${messaging.lower}'/>
+ </wsrm:SequenceAcknowledgement>
</env:Header>
<env:Body
xmlns:env='http://schemas.xmlsoap.org/soap/envelope/'>
<ns1:echoResponse xmlns:ns1='http://org.jboss.ws/jaxws/wsrm'>