Author: richard.opalka(a)jboss.com
Date: 2007-12-14 08:08:04 -0500 (Fri, 14 Dec 2007)
New Revision: 5314
Added:
stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/RMAddressingConstants.java
stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/RMSequenceExt.java
Removed:
stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/RMSequenceIface.java
Modified:
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/RMClientSequence.java
stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/RMConstant.java
stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/common/RMHelper.java
stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/jaxws/RMClientHandler.java
stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/jaxws/RMHandlerAbstractBase.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/jaxws/RMServerHandler.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
stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/wsrm/oneway/RMAbstractOneWayTest.java
stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/wsrm/reqres/RMAbstractReqResTest.java
Log:
refactoring
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 2007-12-14
12:09:11 UTC (rev 5313)
+++
stack/native/trunk/src/main/java/org/jboss/ws/core/jaxws/client/ClientImpl.java 2007-12-14
13:08:04 UTC (rev 5314)
@@ -66,6 +66,7 @@
import org.jboss.ws.core.jaxws.handler.SOAPMessageContextJAXWS;
import org.jboss.ws.core.soap.MessageContextAssociation;
import org.jboss.ws.extensions.addressing.AddressingClientUtil;
+import org.jboss.ws.extensions.wsrm.RMAddressingConstants;
import org.jboss.ws.extensions.wsrm.RMConstant;
import org.jboss.ws.extensions.wsrm.RMClientSequence;
import org.jboss.ws.extensions.wsrm.api.RMException;
@@ -515,7 +516,7 @@
// set up addressing data
RMClientSequence candidateSequence = new RMClientSequence(addressableClient,
getEndpointMetaData().getConfig().getRMMetaData());
String address = getEndpointMetaData().getEndpointAddress();
- String action = RMConstant.CREATE_SEQUENCE_WSA_ACTION;
+ String action = RMAddressingConstants.CREATE_SEQUENCE_WSA_ACTION;
AddressingProperties addressingProps = null;
if (addressableClient)
{
Added:
stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/RMAddressingConstants.java
===================================================================
---
stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/RMAddressingConstants.java
(rev 0)
+++
stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/RMAddressingConstants.java 2007-12-14
13:08:04 UTC (rev 5314)
@@ -0,0 +1,64 @@
+/*
+ * 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.addressing.AddressingBuilder;
+
+import org.jboss.ws.extensions.wsrm.spi.RMProvider;
+
+/**
+ * Addressing constants related to WS-RM protocol
+ *
+ * @author richard.opalka(a)jboss.com
+ *
+ * @since Dec 14, 2007
+ */
+public final class RMAddressingConstants
+{
+
+ private RMAddressingConstants()
+ {
+ // instances not allowed
+ }
+
+ public static final String CREATE_SEQUENCE_WSA_ACTION;
+ public static final String CREATE_SEQUENCE_RESPONSE_WSA_ACTION;
+ public static final String CLOSE_SEQUENCE_WSA_ACTION;
+ public static final String CLOSE_SEQUENCE_RESPONSE_WSA_ACTION;
+ public static final String SEQUENCE_ACKNOWLEDGEMENT_WSA_ACTION;
+ public static final String TERMINATE_SEQUENCE_WSA_ACTION;
+ public static final String TERMINATE_SEQUENCE_RESPONSE_WSA_ACTION;
+ public static final String WSA_ANONYMOUS_URI =
AddressingBuilder.getAddressingBuilder().newAddressingConstants().getAnonymousURI();
+
+ static
+ {
+ String namespaceURI = RMProvider.get().getConstants().getNamespaceURI();
+ CREATE_SEQUENCE_WSA_ACTION = namespaceURI + "/CreateSequence";
+ CREATE_SEQUENCE_RESPONSE_WSA_ACTION = namespaceURI +
"/CreateSequenceResponse";
+ CLOSE_SEQUENCE_WSA_ACTION = namespaceURI + "/CloseSequence";
+ CLOSE_SEQUENCE_RESPONSE_WSA_ACTION = namespaceURI +
"/CloseSequenceResponse";
+ SEQUENCE_ACKNOWLEDGEMENT_WSA_ACTION = namespaceURI +
"/SequenceAcknowledgement";
+ TERMINATE_SEQUENCE_WSA_ACTION = namespaceURI + "/TerminateSequence";
+ TERMINATE_SEQUENCE_RESPONSE_WSA_ACTION = namespaceURI +
"/TerminateSequenceResponse";
+ }
+
+}
Property changes on:
stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/RMAddressingConstants.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Modified:
stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/RMClientSequence.java
===================================================================
---
stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/RMClientSequence.java 2007-12-14
12:09:11 UTC (rev 5313)
+++
stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/RMClientSequence.java 2007-12-14
13:08:04 UTC (rev 5314)
@@ -60,7 +60,7 @@
* @since Oct 25, 2007
*/
@SuppressWarnings("unchecked")
-public final class RMClientSequence implements RMSequenceIface,
RMUnassignedMessageListener
+public final class RMClientSequence implements RMSequenceExt,
RMUnassignedMessageListener
{
private static final Logger logger = Logger.getLogger(RMClientSequence.class);
private static final String PATH_PREFIX = "/temporary_listen_address/";
@@ -286,7 +286,7 @@
this.getBindingProvider().getRequestContext().put(RMConstant.REQUEST_CONTEXT,
wsrmReqCtx);
List msgs = new LinkedList();
msgs.add(wsrmConstants.getCloseSequenceQName());
- sendMessage(RMConstant.CLOSE_SEQUENCE_WSA_ACTION,
wsrmConstants.getCloseSequenceQName(), msgs);
+ sendMessage(RMAddressingConstants.CLOSE_SEQUENCE_WSA_ACTION,
wsrmConstants.getCloseSequenceQName(), msgs);
}
public final void sendTerminateMessage()
@@ -297,7 +297,7 @@
{
msgs.add(wsrmConstants.getSequenceAcknowledgementQName());
}
- sendMessage(RMConstant.TERMINATE_SEQUENCE_WSA_ACTION,
wsrmConstants.getTerminateSequenceQName(), msgs);
+ sendMessage(RMAddressingConstants.TERMINATE_SEQUENCE_WSA_ACTION,
wsrmConstants.getTerminateSequenceQName(), msgs);
}
public final void sendSequenceAcknowledgementMessage()
@@ -308,7 +308,7 @@
ackRequested(false);
List msgs = new LinkedList();
msgs.add(wsrmConstants.getSequenceAcknowledgementQName());
- sendMessage(RMConstant.SEQUENCE_ACKNOWLEDGEMENT_WSA_ACTION,
wsrmConstants.getSequenceAcknowledgementQName(), msgs);
+ sendMessage(RMAddressingConstants.SEQUENCE_ACKNOWLEDGEMENT_WSA_ACTION,
wsrmConstants.getSequenceAcknowledgementQName(), msgs);
}
public final void setBehavior(RMIncompleteSequenceBehavior behavior)
Modified: stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/RMConstant.java
===================================================================
---
stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/RMConstant.java 2007-12-14
12:09:11 UTC (rev 5313)
+++
stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/RMConstant.java 2007-12-14
13:08:04 UTC (rev 5314)
@@ -2,19 +2,22 @@
import java.util.Collections;
import java.util.HashSet;
-import java.util.LinkedList;
-import java.util.List;
import java.util.Set;
import javax.xml.namespace.QName;
-import javax.xml.ws.addressing.AddressingBuilder;
import org.jboss.ws.extensions.wsrm.spi.RMConstants;
import org.jboss.ws.extensions.wsrm.spi.RMProvider;
public final class RMConstant
{
- private static final String PREFIX = RMConstant.class.getName();
+
+ private RMConstant()
+ {
+ // instances not allowed
+ }
+
+ private static final String PREFIX = "wsrm";
public static final String TARGET_ADDRESS = PREFIX + ".targetAddress";
public static final String REMOTING_VERSION = PREFIX + ".remotingVersion";
public static final String ONE_WAY_OPERATION = PREFIX + ".oneWayOperation";
@@ -29,20 +32,9 @@
public static final String SEQUENCE_REFERENCE = PREFIX +
".sequenceReference";
public static final String PROTOCOL_MESSAGES = PREFIX +
".protocolMessages";
public static final String PROTOCOL_MESSAGES_MAPPING = PREFIX +
".protocolMessagesMapping";
- // WS-Addressing related actions
- public static final String CREATE_SEQUENCE_WSA_ACTION;
- public static final String CREATE_SEQUENCE_RESPONSE_WSA_ACTION;
- public static final String CLOSE_SEQUENCE_WSA_ACTION;
- public static final String CLOSE_SEQUENCE_RESPONSE_WSA_ACTION;
- public static final String SEQUENCE_ACKNOWLEDGEMENT_WSA_ACTION;
- public static final String TERMINATE_SEQUENCE_WSA_ACTION;
- public static final String TERMINATE_SEQUENCE_RESPONSE_WSA_ACTION;
-
+ public static final String WSA_MESSAGE_ID = PREFIX + ".wsaMessageId";
public static final Set<QName> PROTOCOL_OPERATION_QNAMES;
- public static final String WSA_ANONYMOUS_URI =
AddressingBuilder.getAddressingBuilder().newAddressingConstants().getAnonymousURI();
- public static final String WSA_MESSAGE_ID = PREFIX + ".wsaMessageId";
-
static
{
Set<QName> temp = new HashSet<QName>();
@@ -57,19 +49,7 @@
temp.add(constants.getCloseSequenceResponseQName());
temp.add(constants.getTerminateSequenceQName());
temp.add(constants.getTerminateSequenceResponseQName());
- String namespaceURI = RMProvider.get().getConstants().getNamespaceURI();
PROTOCOL_OPERATION_QNAMES = Collections.unmodifiableSet(temp);
- CREATE_SEQUENCE_WSA_ACTION = namespaceURI + "/CreateSequence";
- CREATE_SEQUENCE_RESPONSE_WSA_ACTION = namespaceURI +
"/CreateSequenceResponse";
- CLOSE_SEQUENCE_WSA_ACTION = namespaceURI + "/CloseSequence";
- CLOSE_SEQUENCE_RESPONSE_WSA_ACTION = namespaceURI +
"/CloseSequenceResponse";
- SEQUENCE_ACKNOWLEDGEMENT_WSA_ACTION = namespaceURI +
"/SequenceAcknowledgement";
- TERMINATE_SEQUENCE_WSA_ACTION = namespaceURI + "/TerminateSequence";
- TERMINATE_SEQUENCE_RESPONSE_WSA_ACTION = namespaceURI +
"/TerminateSequenceResponse";
}
- private RMConstant()
- {
- // no instances
- }
}
Added: stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/RMSequenceExt.java
===================================================================
--- stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/RMSequenceExt.java
(rev 0)
+++
stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/RMSequenceExt.java 2007-12-14
13:08:04 UTC (rev 5314)
@@ -0,0 +1,44 @@
+/*
+ * 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.Set;
+
+import org.jboss.ws.extensions.wsrm.api.RMSequence;
+
+/**
+ * An extension of the standard RM sequence
+ *
+ * @author richard.opalka(a)jboss.com
+ *
+ * @since Dec 12, 2007
+ */
+public interface RMSequenceExt extends RMSequence
+{
+ String getOutboundId();
+ String getInboundId();
+ long newMessageNumber();
+ long getLastMessageNumber();
+ long getDuration();
+ String getAcksTo();
+ Set<Long> getReceivedInboundMessages();
+}
Property changes on:
stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/RMSequenceExt.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Deleted:
stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/RMSequenceIface.java
===================================================================
---
stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/RMSequenceIface.java 2007-12-14
12:09:11 UTC (rev 5313)
+++
stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/RMSequenceIface.java 2007-12-14
13:08:04 UTC (rev 5314)
@@ -1,44 +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.Set;
-
-import org.jboss.ws.extensions.wsrm.api.RMSequence;
-
-/**
- * Detailed view to the sequence - not visible to API clients
- *
- * @author richard.opalka(a)jboss.com
- *
- * @since Dec 12, 2007
- */
-public interface RMSequenceIface extends RMSequence
-{
- String getOutboundId();
- long newMessageNumber();
- long getLastMessageNumber();
- String getInboundId();
- long getDuration();
- String getAcksTo();
- Set<Long> getReceivedInboundMessages();
-}
Modified:
stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/common/RMHelper.java
===================================================================
---
stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/common/RMHelper.java 2007-12-14
12:09:11 UTC (rev 5313)
+++
stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/common/RMHelper.java 2007-12-14
13:08:04 UTC (rev 5314)
@@ -33,6 +33,7 @@
import org.jboss.logging.Logger;
import org.jboss.ws.extensions.addressing.AddressingPropertiesImpl;
import org.jboss.ws.extensions.addressing.metadata.AddressingOpMetaExt;
+import org.jboss.ws.extensions.wsrm.RMAddressingConstants;
import org.jboss.ws.extensions.wsrm.RMConstant;
import org.jboss.ws.extensions.wsrm.RMClientSequence;
import org.jboss.ws.extensions.wsrm.api.RMException;
@@ -221,8 +222,8 @@
createSequenceMD.setOneWay(false);
// setup addressing related data
AddressingOpMetaExt createSequenceAddrExt = new AddressingOpMetaExt(new
AddressingPropertiesImpl().getNamespaceURI());
- createSequenceAddrExt.setInboundAction(RMConstant.CREATE_SEQUENCE_WSA_ACTION);
-
createSequenceAddrExt.setOutboundAction(RMConstant.CREATE_SEQUENCE_RESPONSE_WSA_ACTION);
+
createSequenceAddrExt.setInboundAction(RMAddressingConstants.CREATE_SEQUENCE_WSA_ACTION);
+
createSequenceAddrExt.setOutboundAction(RMAddressingConstants.CREATE_SEQUENCE_RESPONSE_WSA_ACTION);
createSequenceMD.addExtension(createSequenceAddrExt);
// register operation metadata with endpoint metadata
endpointMD.addOperation(createSequenceMD);
@@ -233,7 +234,7 @@
sequenceAcknowledgementMD.setOneWay(true);
// setup addressing related data
AddressingOpMetaExt sequenceAcknowledgementAddrExt = new AddressingOpMetaExt(new
AddressingPropertiesImpl().getNamespaceURI());
-
sequenceAcknowledgementAddrExt.setInboundAction(RMConstant.SEQUENCE_ACKNOWLEDGEMENT_WSA_ACTION);
+
sequenceAcknowledgementAddrExt.setInboundAction(RMAddressingConstants.SEQUENCE_ACKNOWLEDGEMENT_WSA_ACTION);
sequenceAcknowledgementMD.addExtension(sequenceAcknowledgementAddrExt);
// register operation metadata with endpoint metadata
endpointMD.addOperation(sequenceAcknowledgementMD);
@@ -244,8 +245,8 @@
closeSequenceMD.setOneWay(false);
// setup addressing related data
AddressingOpMetaExt closeSequenceAddrExt = new AddressingOpMetaExt(new
AddressingPropertiesImpl().getNamespaceURI());
- closeSequenceAddrExt.setInboundAction(RMConstant.CLOSE_SEQUENCE_WSA_ACTION);
-
closeSequenceAddrExt.setOutboundAction(RMConstant.CLOSE_SEQUENCE_RESPONSE_WSA_ACTION);
+
closeSequenceAddrExt.setInboundAction(RMAddressingConstants.CLOSE_SEQUENCE_WSA_ACTION);
+
closeSequenceAddrExt.setOutboundAction(RMAddressingConstants.CLOSE_SEQUENCE_RESPONSE_WSA_ACTION);
closeSequenceMD.addExtension(closeSequenceAddrExt);
// register operation metadata with endpoint metadata
endpointMD.addOperation(closeSequenceMD);
@@ -256,8 +257,8 @@
terminateSequenceMD.setOneWay(false);
// setup addressing related data
AddressingOpMetaExt terminateSequenceAddrExt = new AddressingOpMetaExt(new
AddressingPropertiesImpl().getNamespaceURI());
-
terminateSequenceAddrExt.setInboundAction(RMConstant.TERMINATE_SEQUENCE_WSA_ACTION);
-
terminateSequenceAddrExt.setOutboundAction(RMConstant.TERMINATE_SEQUENCE_RESPONSE_WSA_ACTION);
+
terminateSequenceAddrExt.setInboundAction(RMAddressingConstants.TERMINATE_SEQUENCE_WSA_ACTION);
+
terminateSequenceAddrExt.setOutboundAction(RMAddressingConstants.TERMINATE_SEQUENCE_RESPONSE_WSA_ACTION);
terminateSequenceMD.addExtension(terminateSequenceAddrExt);
// register operation metadata with endpoint metadata
endpointMD.addOperation(terminateSequenceMD);
Modified:
stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/jaxws/RMClientHandler.java
===================================================================
---
stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/jaxws/RMClientHandler.java 2007-12-14
12:09:11 UTC (rev 5313)
+++
stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/jaxws/RMClientHandler.java 2007-12-14
13:08:04 UTC (rev 5314)
@@ -36,7 +36,7 @@
import org.jboss.ws.core.CommonMessageContext;
import org.jboss.ws.extensions.wsrm.RMConstant;
-import org.jboss.ws.extensions.wsrm.RMSequenceIface;
+import org.jboss.ws.extensions.wsrm.RMSequenceExt;
import org.jboss.ws.extensions.wsrm.api.RMException;
import org.jboss.ws.extensions.wsrm.spi.RMConstants;
import org.jboss.ws.extensions.wsrm.spi.RMProvider;
@@ -67,7 +67,7 @@
rmOutboundContext.put(RMConstant.WSA_MESSAGE_ID, optionalMessageId);
rmOutboundContext.put(RMConstant.PROTOCOL_MESSAGES_MAPPING, data);
SOAPMessage soapMessage = ((SOAPMessageContext)commonMsgContext).getMessage();
- RMSequenceIface sequenceImpl =
(RMSequenceIface)rmOutboundContext.get(RMConstant.SEQUENCE_REFERENCE);
+ RMSequenceExt sequenceImpl =
(RMSequenceExt)rmOutboundContext.get(RMConstant.SEQUENCE_REFERENCE);
// try to serialize CreateSequence to message
serialize(rmConstants.getCreateSequenceQName(), outMsgs, data, soapMessage,
sequenceImpl);
Modified:
stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/jaxws/RMHandlerAbstractBase.java
===================================================================
---
stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/jaxws/RMHandlerAbstractBase.java 2007-12-14
12:09:11 UTC (rev 5313)
+++
stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/jaxws/RMHandlerAbstractBase.java 2007-12-14
13:08:04 UTC (rev 5314)
@@ -31,7 +31,7 @@
import org.jboss.logging.Logger;
import org.jboss.ws.core.jaxws.handler.GenericSOAPHandler;
import org.jboss.ws.extensions.wsrm.RMConstant;
-import org.jboss.ws.extensions.wsrm.RMSequenceIface;
+import org.jboss.ws.extensions.wsrm.RMSequenceExt;
import org.jboss.ws.extensions.wsrm.api.RMException;
import org.jboss.ws.extensions.wsrm.spi.protocol.RMSerializable;
@@ -51,7 +51,7 @@
return RMConstant.PROTOCOL_OPERATION_QNAMES;
}
- protected final void serialize(QName msgQN, List<QName> outMsgs, Map<QName,
RMSerializable> data, SOAPMessage soapMessage, RMSequenceIface seq)
+ protected final void serialize(QName msgQN, List<QName> outMsgs, Map<QName,
RMSerializable> data, SOAPMessage soapMessage, RMSequenceExt seq)
{
RMSerializable msg = RMHandlerHelper.prepareData(msgQN, outMsgs, seq);
if (msg != null)
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 2007-12-14
12:09:11 UTC (rev 5313)
+++
stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/jaxws/RMHandlerHelper.java 2007-12-14
13:08:04 UTC (rev 5314)
@@ -26,7 +26,7 @@
import javax.xml.namespace.QName;
-import org.jboss.ws.extensions.wsrm.RMSequenceIface;
+import org.jboss.ws.extensions.wsrm.RMSequenceExt;
import org.jboss.ws.extensions.wsrm.common.RMHelper;
import org.jboss.ws.extensions.wsrm.spi.RMConstants;
import org.jboss.ws.extensions.wsrm.spi.RMMessageFactory;
@@ -97,7 +97,7 @@
throw new IllegalArgumentException();
}
- public static RMSerializable prepareData(QName msgQN, List<QName> outMsgs,
RMSequenceIface seq)
+ public static RMSerializable prepareData(QName msgQN, List<QName> outMsgs,
RMSequenceExt seq)
{
if (outMsgs.contains(msgQN))
{
@@ -144,14 +144,14 @@
return null;
}
- private static RMSerializable newCreateSequence(RMSequenceIface seq)
+ private static RMSerializable newCreateSequence(RMSequenceExt seq)
{
RMCreateSequence createSequence = rmFactory.newCreateSequence();
createSequence.setAcksTo(seq.getAcksTo());
return createSequence;
}
- private static RMSerializable newCreateSequenceResponse(RMSequenceIface seq)
+ private static RMSerializable newCreateSequenceResponse(RMSequenceExt seq)
{
RMCreateSequenceResponse createSequenceResponse =
rmFactory.newCreateSequenceResponse();
createSequenceResponse.setIdentifier(seq.getInboundId());
@@ -159,7 +159,7 @@
return createSequenceResponse;
}
- private static RMSerializable newCloseSequenceResponse(RMSequenceIface seq)
+ private static RMSerializable newCloseSequenceResponse(RMSequenceExt seq)
{
// construct CloseSequenceResponse object
RMCloseSequenceResponse closeSequenceResponse =
rmFactory.newCloseSequenceResponse();
@@ -167,7 +167,7 @@
return closeSequenceResponse;
}
- private static RMSerializable newCloseSequence(RMSequenceIface seq)
+ private static RMSerializable newCloseSequence(RMSequenceExt seq)
{
// construct CloseSequenceResponse object
RMCloseSequence closeSequence = rmFactory.newCloseSequence();
@@ -179,7 +179,7 @@
return closeSequence;
}
- private static RMSerializable newTerminateSequence(RMSequenceIface seq)
+ private static RMSerializable newTerminateSequence(RMSequenceExt seq)
{
// construct CloseSequenceResponse object
RMTerminateSequence terminateSequence = rmFactory.newTerminateSequence();
@@ -191,7 +191,7 @@
return terminateSequence;
}
- private static RMSerializable newTerminateSequenceResponse(RMSequenceIface seq)
+ private static RMSerializable newTerminateSequenceResponse(RMSequenceExt seq)
{
// construct TerminateSequenceResponse object
RMTerminateSequenceResponse terminateSequenceResponse =
rmFactory.newTerminateSequenceResponse();
@@ -199,7 +199,7 @@
return terminateSequenceResponse;
}
- private static RMSerializable newSequenceAcknowledgement(RMSequenceIface seq)
+ private static RMSerializable newSequenceAcknowledgement(RMSequenceExt seq)
{
// construct SequenceAcknowledgement object
RMSequenceAcknowledgement sequenceAcknowledgement =
rmFactory.newSequenceAcknowledgement();
@@ -224,7 +224,7 @@
return sequenceAcknowledgement;
}
- private static RMSerializable newAckRequested(RMSequenceIface seq)
+ private static RMSerializable newAckRequested(RMSequenceExt seq)
{
// construct AckRequested object
RMAckRequested wsrmMsg = rmFactory.newAckRequested();
@@ -233,7 +233,7 @@
return wsrmMsg;
}
- private static RMSerializable newSequence(RMSequenceIface seq)
+ private static RMSerializable newSequence(RMSequenceExt seq)
{
// construct Sequence object
RMSequence sequence = rmFactory.newSequence();
Modified:
stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/jaxws/RMServerHandler.java
===================================================================
---
stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/jaxws/RMServerHandler.java 2007-12-14
12:09:11 UTC (rev 5313)
+++
stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/jaxws/RMServerHandler.java 2007-12-14
13:08:04 UTC (rev 5314)
@@ -36,7 +36,7 @@
import org.jboss.ws.core.CommonMessageContext;
import org.jboss.ws.extensions.wsrm.RMConstant;
-import org.jboss.ws.extensions.wsrm.RMSequenceIface;
+import org.jboss.ws.extensions.wsrm.RMSequenceExt;
import org.jboss.ws.extensions.wsrm.api.RMException;
import org.jboss.ws.extensions.wsrm.spi.RMConstants;
import org.jboss.ws.extensions.wsrm.spi.RMProvider;
@@ -67,7 +67,7 @@
rmOutboundContext.put(RMConstant.WSA_MESSAGE_ID, optionalMessageId);
rmOutboundContext.put(RMConstant.PROTOCOL_MESSAGES_MAPPING, data);
SOAPMessage soapMessage = ((SOAPMessageContext)commonMsgContext).getMessage();
- RMSequenceIface sequenceImpl =
(RMSequenceIface)rmOutboundContext.get(RMConstant.SEQUENCE_REFERENCE);
+ RMSequenceExt sequenceImpl =
(RMSequenceExt)rmOutboundContext.get(RMConstant.SEQUENCE_REFERENCE);
// try to serialize CreateSequenceResponse to message
serialize(rmConstants.getCreateSequenceResponseQName(), outMsgs, data, soapMessage,
sequenceImpl);
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 2007-12-14
12:09:11 UTC (rev 5313)
+++
stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/server/RMInvocationHandler.java 2007-12-14
13:08:04 UTC (rev 5314)
@@ -39,6 +39,7 @@
import org.jboss.ws.core.CommonMessageContext;
import org.jboss.ws.core.soap.MessageContextAssociation;
import org.jboss.ws.extensions.addressing.AddressingPropertiesImpl;
+import org.jboss.ws.extensions.wsrm.RMAddressingConstants;
import org.jboss.ws.extensions.wsrm.RMConstant;
import org.jboss.ws.extensions.wsrm.api.RMException;
import org.jboss.ws.extensions.wsrm.common.RMHelper;
@@ -206,7 +207,7 @@
addressingProps.setRelatesTo(new Relationship[]
{builder.newRelationship(addrProps.getMessageID().getURI())});
try
{
-
addressingProps.setAction(builder.newURI(RMConstant.SEQUENCE_ACKNOWLEDGEMENT_WSA_ACTION));
+
addressingProps.setAction(builder.newURI(RMAddressingConstants.SEQUENCE_ACKNOWLEDGEMENT_WSA_ACTION));
}
catch (URISyntaxException ignore)
{
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 2007-12-14
12:09:11 UTC (rev 5313)
+++
stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/server/RMServerSequence.java 2007-12-14
13:08:04 UTC (rev 5314)
@@ -28,7 +28,7 @@
import org.jboss.logging.Logger;
import org.jboss.ws.extensions.addressing.AddressingClientUtil;
-import org.jboss.ws.extensions.wsrm.RMSequenceIface;
+import org.jboss.ws.extensions.wsrm.RMSequenceExt;
/**
* Server side implementation of the RM sequence
@@ -37,7 +37,7 @@
*
* @since Dec 12, 2007
*/
-public class RMServerSequence implements RMSequenceIface
+public class RMServerSequence implements RMSequenceExt
{
private static final Logger logger = Logger.getLogger(RMServerSequence.class);
Modified:
stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/wsrm/oneway/RMAbstractOneWayTest.java
===================================================================
---
stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/wsrm/oneway/RMAbstractOneWayTest.java 2007-12-14
12:09:11 UTC (rev 5313)
+++
stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/wsrm/oneway/RMAbstractOneWayTest.java 2007-12-14
13:08:04 UTC (rev 5314)
@@ -47,25 +47,20 @@
{
private static final Properties props = new Properties();
private final String serviceURL = "http://" + getServerHost() +
":" + props.getProperty("port") +
props.getProperty("path");
-
private String targetNS = "http://wsrm.jaxws.ws.test.jboss.org/";
private OneWayServiceIface proxy;
static
{
- System.out.println("FIXME [JBWS-515] Provide an initial implementation for
WS-ReliableMessaging");
- System.out.println("FIXME [JBWS-1699] Implement the basic message exchange
that is required for WS-RM");
- System.out.println("FIXME [JBWS-1700] Provide a comprehensive test case for
WS-RM");
-
- // load test properties
- File propertiesFile = new
File("resources/jaxws/wsrm/properties/RMAbstractOneWayTest.properties");
try
{
- props.load(new FileInputStream(propertiesFile));
+ props.load(
+ new FileInputStream(
+ new
File("resources/jaxws/wsrm/properties/RMAbstractOneWayTest.properties")));
}
- catch (IOException ignore)
+ catch (IOException ioe)
{
- ignore.printStackTrace();
+ ioe.printStackTrace();
}
}
@@ -73,6 +68,7 @@
protected void setUp() throws Exception
{
super.setUp();
+
QName serviceName = new QName(targetNS, "OneWayService");
URL wsdlURL = new URL(serviceURL + "?wsdl");
Service service = Service.create(wsdlURL, serviceName);
@@ -81,7 +77,8 @@
public void testOneWayMethods() throws Exception
{
- RMSequence sequence = ((RMProvider)proxy).createSequence(isClientAddressable());
+ boolean addressableClient = isClientAddressable();
+ RMSequence sequence = ((RMProvider)proxy).createSequence(addressableClient);
setAddrProps(proxy, "http://useless/action1", serviceURL);
proxy.method1();
setAddrProps(proxy, "http://useless/action2", serviceURL);
Modified:
stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/wsrm/reqres/RMAbstractReqResTest.java
===================================================================
---
stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/wsrm/reqres/RMAbstractReqResTest.java 2007-12-14
12:09:11 UTC (rev 5313)
+++
stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/wsrm/reqres/RMAbstractReqResTest.java 2007-12-14
13:08:04 UTC (rev 5314)
@@ -68,14 +68,11 @@
static
{
- System.out.println("FIXME [JBWS-515] Provide an initial implementation for
WS-ReliableMessaging");
- System.out.println("FIXME [JBWS-1699] Implement the basic message exchange
that is required for WS-RM");
- System.out.println("FIXME [JBWS-1700] Provide a comprehensive test case for
WS-RM");
- // load test properties
- File propertiesFile = new
File("resources/jaxws/wsrm/properties/RMAbstractReqResTest.properties");
try
{
- props.load(new FileInputStream(propertiesFile));
+ props.load(
+ new FileInputStream(
+ new
File("resources/jaxws/wsrm/properties/RMAbstractReqResTest.properties")));
}
catch (IOException ioe)
{