Author: andreasmyth
Date: Mon Dec 4 11:08:04 2006
New Revision: 482293
URL: http://svn.apache.org/viewvc?view=rev&rev=482293
Log:
[JIRA CXF-277] First part of server side originated sequence creation.
Extending RM service model by oneway versions of CreateSequence,
CreateSequenceResponse.
Added:
incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/rm/twoway-no-offer-test.xml
(with props)
incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/rm/twoway-no-offer.xml
(with props)
Modified:
incubator/cxf/trunk/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/Proxy.java
incubator/cxf/trunk/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/RMConstants.java
incubator/cxf/trunk/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/RMContextUtils.java
incubator/cxf/trunk/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/RMEndpoint.java
incubator/cxf/trunk/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/RMInInterceptor.java
incubator/cxf/trunk/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/RMManager.java
incubator/cxf/trunk/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/RetransmissionQueue.java
incubator/cxf/trunk/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/Servant.java
incubator/cxf/trunk/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/soap/RMSoapInterceptor.java
incubator/cxf/trunk/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/soap/RetransmissionQueueImpl.java
incubator/cxf/trunk/rt/ws/rm/src/test/java/org/apache/cxf/ws/rm/RMEndpointTest.java
incubator/cxf/trunk/rt/ws/rm/src/test/java/org/apache/cxf/ws/rm/RMManagerTest.java
incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/rm/ControlImpl.java
incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/rm/SequenceTest.java
Modified:
incubator/cxf/trunk/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/Proxy.java
URL:
http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/Proxy.java?view=diff&rev=482293&r1=482292&r2=482293
==============================================================================
--- incubator/cxf/trunk/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/Proxy.java
(original)
+++ incubator/cxf/trunk/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/Proxy.java
Mon Dec 4 11:08:04 2006
@@ -36,6 +36,7 @@
import org.apache.cxf.phase.PhaseInterceptorChain;
import org.apache.cxf.service.model.BindingInfo;
import org.apache.cxf.service.model.BindingOperationInfo;
+import org.apache.cxf.service.model.InterfaceInfo;
import org.apache.cxf.service.model.OperationInfo;
import org.apache.cxf.transport.Conduit;
import org.apache.cxf.ws.addressing.RelatesToType;
@@ -111,14 +112,34 @@
ts.setIdentifier(ss.getIdentifier());
invoke(oi, new Object[] {ts}, null);
}
+
+ void createSequenceResponse(final CreateSequenceResponseType
createResponse) {
+ LOG.fine("sending CreateSequenceResponse from client side");
+ final OperationInfo oi =
reliableEndpoint.getService().getServiceInfo().getInterface()
+
.getOperation(RMConstants.getCreateSequenceResponseOnewayOperationName());
+
+ // TODO: need to set relatesTo
+
+ Runnable r = new Runnable() {
+ public void run() {
+ Proxy.this.invoke(oi, new Object[] {createResponse}, null);
+ }
+ };
+ Thread t = new Thread(r);
+ t.start();
+
+ // invoke(oi, new Object[] {createResponse}, null);
+
+ }
public CreateSequenceResponseType createSequence(
org.apache.cxf.ws.addressing.EndpointReferenceType to,
EndpointReferenceType defaultAcksTo,
- RelatesToType relatesTo) throws IOException {
+ RelatesToType relatesTo,
+ boolean isServer) throws IOException {
SourcePolicyType sp = reliableEndpoint.getManager().getSourcePolicy();
- CreateSequenceType create =
RMUtils.getWSRMFactory().createCreateSequenceType();
+ final CreateSequenceType create =
RMUtils.getWSRMFactory().createCreateSequenceType();
String address = sp.getAcksTo();
EndpointReferenceType acksTo = null;
@@ -149,8 +170,26 @@
setOfferedIdentifier(offer);
}
- OperationInfo oi =
reliableEndpoint.getService().getServiceInfo().getInterface()
- .getOperation(RMConstants.getCreateSequenceOperationName());
+ InterfaceInfo ii =
reliableEndpoint.getService().getServiceInfo().getInterface();
+
+ final OperationInfo oi = isServer
+ ?
ii.getOperation(RMConstants.getCreateSequenceOnewayOperationName())
+ : ii.getOperation(RMConstants.getCreateSequenceOperationName());
+
+ // tried using separate thread - did not help either
+
+ if (isServer) {
+ Runnable r = new Runnable() {
+ public void run() {
+ invoke(oi, new Object[] {create}, null);
+ }
+ };
+ //
reliableEndpoint.getApplicationEndpoint().getService().getExecutor().execute(r);
+ Thread t = new Thread(r);
+ t.start();
+ return null;
+ }
+
return (CreateSequenceResponseType)invoke(oi, new Object[] {create},
null);
}
@@ -170,7 +209,8 @@
}
Object invoke(OperationInfo oi, Object[] params, Map<String, Object>
context) {
- LOG.log(Level.INFO, "Invoking out-of-band RM protocol message {0}.",
+ LOG.log(Level.INFO, "Invoking out-of-band RM protocol message {0} on
thread "
+ + Thread.currentThread(),
oi == null ? null : oi.getName());
// assuming we are on the client side
@@ -184,7 +224,9 @@
BindingOperationInfo boi = bi.getOperation(oi);
try {
+ LOG.fine("invoking on client");
Object[] result = client.invoke(boi, params, context);
+ LOG.fine("Returned from client invocation");
if (result != null && result.length > 0) {
return result[0];
}
Modified:
incubator/cxf/trunk/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/RMConstants.java
URL:
http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/RMConstants.java?view=diff&rev=482293&r1=482292&r2=482293
==============================================================================
---
incubator/cxf/trunk/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/RMConstants.java
(original)
+++
incubator/cxf/trunk/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/RMConstants.java
Mon Dec 4 11:08:04 2006
@@ -81,6 +81,12 @@
private static final QName WSRM_CREATE_SEQUENCE_RESPONSE_QNAME =
new QName(WSRM_NAMESPACE_NAME, "CreateSequenceResponse");
+ private static final QName WSRM_CREATE_SEQUENCE_ONEWAY_QNAME =
+ new QName(WSRM_NAMESPACE_NAME, "CreateSequenceOneway");
+
+ private static final QName WSRM_CREATE_SEQUENCE_RESPONSE_ONEWAY_QNAME =
+ new QName(WSRM_NAMESPACE_NAME, "CreateSequenceResponseOneway");
+
private static final QName WSRM_TERMINATE_SEQUENCE_QNAME =
new QName(WSRM_NAMESPACE_NAME, "TerminateSequence");
@@ -196,6 +202,14 @@
public static QName getCreateSequenceResponseOperationName() {
return WSRM_CREATE_SEQUENCE_RESPONSE_QNAME;
+ }
+
+ public static QName getCreateSequenceOnewayOperationName() {
+ return WSRM_CREATE_SEQUENCE_ONEWAY_QNAME;
+ }
+
+ public static QName getCreateSequenceResponseOnewayOperationName() {
+ return WSRM_CREATE_SEQUENCE_RESPONSE_ONEWAY_QNAME;
}
public static QName getTerminateSequenceOperationName() {
Modified:
incubator/cxf/trunk/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/RMContextUtils.java
URL:
http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/RMContextUtils.java?view=diff&rev=482293&r1=482292&r2=482293
==============================================================================
---
incubator/cxf/trunk/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/RMContextUtils.java
(original)
+++
incubator/cxf/trunk/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/RMContextUtils.java
Mon Dec 4 11:08:04 2006
@@ -74,12 +74,7 @@
* @return true iff message is currently being processed on server side
*/
public static boolean isServerSide(Message message) {
- if (isOutbound(message)) {
- return message.getExchange().getInMessage() != null;
- } else {
- return message.getExchange().getOutMessage() == null
- && message.getExchange().getOutFaultMessage() == null;
- }
+ return message.getExchange().getDestination() != null;
}
/**
Modified:
incubator/cxf/trunk/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/RMEndpoint.java
URL:
http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/RMEndpoint.java?view=diff&rev=482293&r1=482292&r2=482293
==============================================================================
---
incubator/cxf/trunk/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/RMEndpoint.java
(original)
+++
incubator/cxf/trunk/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/RMEndpoint.java
Mon Dec 4 11:08:04 2006
@@ -19,6 +19,9 @@
package org.apache.cxf.ws.rm;
+import java.util.List;
+
+import javax.wsdl.extensions.ExtensibilityElement;
import javax.xml.bind.JAXBException;
import javax.xml.namespace.QName;
@@ -41,7 +44,7 @@
import org.apache.cxf.service.model.OperationInfo;
import org.apache.cxf.service.model.ServiceInfo;
import org.apache.cxf.service.model.UnwrappedOperationInfo;
-import org.apache.cxf.ws.addressing.wsdl.UsingAddressing;
+import org.apache.cxf.ws.addressing.Names;
public class RMEndpoint {
@@ -201,10 +204,14 @@
ei.setAddress(applicationEndpoint.getEndpointInfo().getAddress());
ei.setName(PORT_NAME);
ei.setBinding(si.getBinding(BINDING_NAME));
- org.apache.cxf.ws.addressing.wsdl.ObjectFactory aof =
- new org.apache.cxf.ws.addressing.wsdl.ObjectFactory();
- UsingAddressing ua = aof.createUsingAddressing();
- ei.addExtensor(ua);
+
+ // get the addressing extensor from the application endpoint (must
exist)
+
+ Object ua = getUsingAddressing(applicationEndpoint.getEndpointInfo());
+ if (null != ua) {
+ ei.addExtensor(ua);
+ }
+
si.addEndpoint(ei);
try {
@@ -230,6 +237,12 @@
}
void buildOperationInfo(InterfaceInfo ii) {
+ buildCreateSequenceOperationInfo(ii);
+ buildTerminateSequenceOperationInfo(ii);
+ buildSequenceAckOperationInfo(ii);
+ }
+
+ void buildCreateSequenceOperationInfo(InterfaceInfo ii) {
OperationInfo operationInfo = null;
MessagePartInfo partInfo = null;
@@ -266,6 +279,47 @@
partInfo.setElement(true);
partInfo.setTypeClass(CreateSequenceResponseType.class);
+ operationInfo =
ii.addOperation(RMConstants.getCreateSequenceOnewayOperationName());
+ messageInfo =
operationInfo.createMessage(RMConstants.getCreateSequenceOperationName());
+ operationInfo.setInput(messageInfo.getName().getLocalPart(),
messageInfo);
+ partInfo = messageInfo.addMessagePart("create");
+ partInfo.setElementQName(RMConstants.getCreateSequenceOperationName());
+ partInfo.setElement(true);
+ partInfo.setTypeClass(CreateSequenceType.class);
+ unwrappedMessageInfo = new MessageInfo(operationInfo,
messageInfo.getName());
+ unwrappedOperationInfo = new UnwrappedOperationInfo(operationInfo);
+ operationInfo.setUnwrappedOperation(unwrappedOperationInfo);
+ unwrappedOperationInfo.setInput(operationInfo.getInputName(),
unwrappedMessageInfo);
+ partInfo = unwrappedMessageInfo.addMessagePart("create");
+ partInfo.setElementQName(RMConstants.getCreateSequenceOperationName());
+ partInfo.setElement(true);
+ partInfo.setTypeClass(CreateSequenceType.class);
+
+ operationInfo =
ii.addOperation(RMConstants.getCreateSequenceResponseOnewayOperationName());
+ messageInfo =
operationInfo.createMessage(RMConstants.getCreateSequenceResponseOperationName());
+ operationInfo.setInput(messageInfo.getName().getLocalPart(),
messageInfo);
+ partInfo = messageInfo.addMessagePart("createResponse");
+
partInfo.setElementQName(RMConstants.getCreateSequenceResponseOperationName());
+ partInfo.setElement(true);
+ partInfo.setTypeClass(CreateSequenceResponseType.class);
+ unwrappedMessageInfo = new MessageInfo(operationInfo,
messageInfo.getName());
+ unwrappedOperationInfo = new UnwrappedOperationInfo(operationInfo);
+ operationInfo.setUnwrappedOperation(unwrappedOperationInfo);
+ unwrappedOperationInfo.setInput(operationInfo.getInputName(),
unwrappedMessageInfo);
+ partInfo = unwrappedMessageInfo.addMessagePart("createResponse");
+
partInfo.setElementQName(RMConstants.getCreateSequenceResponseOperationName());
+ partInfo.setElement(true);
+ partInfo.setTypeClass(CreateSequenceResponseType.class);
+ }
+
+ void buildTerminateSequenceOperationInfo(InterfaceInfo ii) {
+
+ OperationInfo operationInfo = null;
+ MessagePartInfo partInfo = null;
+ UnwrappedOperationInfo unwrappedOperationInfo = null;
+ MessageInfo messageInfo = null;
+ MessageInfo unwrappedMessageInfo = null;
+
operationInfo =
ii.addOperation(RMConstants.getTerminateSequenceOperationName());
messageInfo =
operationInfo.createMessage(RMConstants.getTerminateSequenceOperationName());
operationInfo.setInput(messageInfo.getName().getLocalPart(),
messageInfo);
@@ -281,7 +335,15 @@
partInfo.setElementQName(RMConstants.getTerminateSequenceOperationName());
partInfo.setElement(true);
partInfo.setTypeClass(TerminateSequenceType.class);
-
+ }
+
+ void buildSequenceAckOperationInfo(InterfaceInfo ii) {
+
+ OperationInfo operationInfo = null;
+ UnwrappedOperationInfo unwrappedOperationInfo = null;
+ MessageInfo messageInfo = null;
+ MessageInfo unwrappedMessageInfo = null;
+
operationInfo =
ii.addOperation(RMConstants.getSequenceAckOperationName());
messageInfo =
operationInfo.createMessage(RMConstants.getSequenceAckOperationName());
operationInfo.setInput(messageInfo.getName().getLocalPart(),
messageInfo);
@@ -321,9 +383,60 @@
soi.setAction(RMConstants.getSequenceAckAction());
boi.addExtensor(soi);
bi.addOperation(boi);
+
+ boi =
bi.buildOperation(RMConstants.getCreateSequenceOnewayOperationName(),
+ RMConstants.getCreateSequenceOperationName().getLocalPart(),
null);
+ soi = new SoapOperationInfo();
+ soi.setAction(RMConstants.getCreateSequenceAction());
+ boi.addExtensor(soi);
+ bi.addOperation(boi);
+
+ boi =
bi.buildOperation(RMConstants.getCreateSequenceResponseOnewayOperationName(),
+
RMConstants.getCreateSequenceResponseOperationName().getLocalPart(), null);
+ soi = new SoapOperationInfo();
+ soi.setAction(RMConstants.getCreateSequenceResponseAction());
+ boi.addExtensor(soi);
+ bi.addOperation(boi);
si.addBinding(bi);
}
+ }
+
+ Object getUsingAddressing(EndpointInfo endpointInfo) {
+ if (null == endpointInfo) {
+ return null;
+ }
+ Object ua = null;
+ List<ExtensibilityElement> exts =
endpointInfo.getExtensors(ExtensibilityElement.class);
+ ua = getUsingAddressing(exts);
+ if (null != ua) {
+ return ua;
+ }
+ exts = endpointInfo.getBinding() != null
+ ?
endpointInfo.getBinding().getExtensors(ExtensibilityElement.class) : null;
+ ua = getUsingAddressing(exts);
+ if (null != ua) {
+ return ua;
+ }
+ exts = endpointInfo.getService() != null
+ ?
endpointInfo.getService().getExtensors(ExtensibilityElement.class) : null;
+ ua = getUsingAddressing(exts);
+ if (null != ua) {
+ return ua;
+ }
+ return ua;
+ }
+
+ Object getUsingAddressing(List<ExtensibilityElement> exts) {
+ Object ua = null;
+ if (exts != null) {
+ for (ExtensibilityElement ext : exts) {
+ if
(Names.WSAW_USING_ADDRESSING_QNAME.equals(ext.getElementType())) {
+ ua = ext;
+ }
+ }
+ }
+ return ua;
}
}
Modified:
incubator/cxf/trunk/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/RMInInterceptor.java
URL:
http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/RMInInterceptor.java?view=diff&rev=482293&r1=482292&r2=482293
==============================================================================
---
incubator/cxf/trunk/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/RMInInterceptor.java
(original)
+++
incubator/cxf/trunk/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/RMInInterceptor.java
Mon Dec 4 11:08:04 2006
@@ -81,6 +81,20 @@
// Destination destination = getManager().getDestination(message);
// RMEndpoint rme = getManager().getReliableEndpoint(message);
// Servant servant = new Servant(rme);
+
+ boolean isServer = RMContextUtils.isServerSide(message);
+ LOG.fine("isServerSide: " + isServer);
+
+ if (RMConstants.getCreateSequenceAction().equals(action) && !isServer)
{
+ LOG.fine("Processing inbound CreateSequence on client side.");
+ RMEndpoint rme = getManager().getReliableEndpoint(message);
+ Servant servant = rme.getServant();
+ CreateSequenceResponseType csr = servant.createSequence(message);
+ Proxy proxy = rme.getProxy();
+ proxy.createSequenceResponse(csr);
+ return;
+ }
+
if (RMConstants.getCreateSequenceAction().equals(action)
|| RMConstants.getCreateSequenceResponseAction().equals(action)
Modified:
incubator/cxf/trunk/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/RMManager.java
URL:
http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/RMManager.java?view=diff&rev=482293&r1=482292&r2=482293
==============================================================================
---
incubator/cxf/trunk/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/RMManager.java
(original)
+++
incubator/cxf/trunk/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/RMManager.java
Mon Dec 4 11:08:04 2006
@@ -31,9 +31,14 @@
import org.apache.cxf.Bus;
import org.apache.cxf.endpoint.Endpoint;
+import org.apache.cxf.endpoint.ServerImpl;
+import org.apache.cxf.message.Exchange;
+import org.apache.cxf.message.ExchangeImpl;
import org.apache.cxf.message.Message;
+import org.apache.cxf.message.MessageImpl;
import org.apache.cxf.ws.addressing.AddressingProperties;
import org.apache.cxf.ws.addressing.AddressingPropertiesImpl;
+import org.apache.cxf.ws.addressing.ContextUtils;
import org.apache.cxf.ws.addressing.RelatesToType;
import org.apache.cxf.ws.addressing.VersionTransformer;
import org.apache.cxf.ws.addressing.v200408.EndpointReferenceType;
@@ -72,9 +77,6 @@
if (null != bus) {
bus.setExtension(this, RMManager.class);
}
- if (null == retransmissionQueue) {
- retransmissionQueue = new RetransmissionQueueImpl(this);
- }
}
public RMStore getStore() {
@@ -148,26 +150,26 @@
if (null == seq) {
// TODO: better error handling
org.apache.cxf.ws.addressing.EndpointReferenceType to = null;
+ boolean isServer = RMContextUtils.isServerSide(message);
try {
EndpointReferenceType acksTo = null;
RelatesToType relatesTo = null;
- if (RMContextUtils.isServerSide(message)) {
+ if (isServer) {
AddressingPropertiesImpl inMaps =
RMContextUtils.retrieveMAPs(message, false, false);
inMaps.exposeAs(VersionTransformer.Names200408.WSA_NAMESPACE_NAME);
acksTo =
RMUtils.createReference2004(inMaps.getTo().getValue());
to = inMaps.getReplyTo();
- // getServant().setUnattachedIdentifier(inSeqId);
+
source.getReliableEndpoint().getServant().setUnattachedIdentifier(inSeqId);
relatesTo = (new
org.apache.cxf.ws.addressing.ObjectFactory()).createRelatesToType();
Destination destination = getDestination(message);
- DestinationSequence inSeq =
destination.getSequence(inSeqId);
+ DestinationSequence inSeq = inSeqId == null ? null :
destination.getSequence(inSeqId);
relatesTo.setValue(inSeq != null ?
inSeq.getCorrelationID() : null);
} else {
to = RMUtils.createReference(maps.getTo().getValue());
acksTo = VersionTransformer.convert(maps.getReplyTo());
- if (!RMContextUtils.isServerSide(message)
- &&
RMConstants.getNoneAddress().equals(acksTo.getAddress().getValue())) {
+ if
(RMConstants.getNoneAddress().equals(acksTo.getAddress().getValue())) {
org.apache.cxf.transport.Destination dest =
message.getExchange()
.getConduit().getBackChannel();
if (null == dest) {
@@ -180,14 +182,16 @@
Proxy proxy = source.getReliableEndpoint().getProxy();
CreateSequenceResponseType createResponse =
- proxy.createSequence(to, acksTo, relatesTo);
- Servant servant = source.getReliableEndpoint().getServant();
- servant.createSequenceResponse(createResponse);
+ proxy.createSequence(to, acksTo, relatesTo, isServer);
+ if (!isServer) {
+ Servant servant =
source.getReliableEndpoint().getServant();
+ servant.createSequenceResponse(createResponse);
+ }
} catch (IOException ex) {
ex.printStackTrace();
}
- seq = source.getCurrent(inSeqId);
+ seq = source.awaitCurrent(inSeqId);
seq.setTarget(to);
}
@@ -222,7 +226,7 @@
new org.apache.cxf.ws.rm.policy.ObjectFactory();
RMAssertion rma = factory.createRMAssertion();
BaseRetransmissionInterval bri =
factory.createRMAssertionBaseRetransmissionInterval();
- bri.setMilliseconds(new BigInteger("3000"));
+ bri.setMilliseconds(new
BigInteger(RetransmissionQueue.DEFAULT_BASE_RETRANSMISSION_INTERVAL));
rma.setBaseRetransmissionInterval(bri);
rma.setExponentialBackoff(factory.createRMAssertionExponentialBackoff());
setRMAssertion(rma);
@@ -246,7 +250,10 @@
DestinationPolicyType dp = factory.createDestinationPolicyType();
dp.setAcksPolicy(factory.createAcksPolicyType());
setDestinationPolicy(dp);
- }
+ }
+ if (null == retransmissionQueue) {
+ retransmissionQueue = new RetransmissionQueueImpl(this);
+ }
}
void addSourceSequence(SourceSequence ss) {
@@ -260,6 +267,44 @@
if (null != sourceSequences) {
sourceSequences.remove(id.getValue());
}
+ }
+
+ public void testServerSideSequenceCreation(final ServerImpl server, final
String address) {
+
+ Runnable r = new Runnable() {
+
+ public void run() {
+ try {
+ Thread.sleep(5000);
+ } catch (InterruptedException ex) {
+ // ignore
+ }
+
+ Endpoint ep = server.getEndpoint();
+ org.apache.cxf.transport.Destination dest =
server.getDestination();
+ Message message = new MessageImpl();
+ Exchange exchange = new ExchangeImpl();
+ exchange.setInMessage(message);
+ message.setExchange(exchange);
+ exchange.put(Endpoint.class, ep);
+ exchange.setDestination(dest);
+ AddressingProperties maps = new AddressingPropertiesImpl();
+ maps.setReplyTo(RMUtils.createReference(address));
+ maps.setTo(dest.getAddress().getAddress());
+ ContextUtils.storeMAPs(maps, message, false);
+
+
+ try {
+ RMManager.this.getSequence(null, message, null);
+ } catch (SequenceFault ex) {
+ ex.printStackTrace();
+ }
+
+ }
+
+ };
+ Thread t = new Thread(r);
+ t.start();
}
}
Modified:
incubator/cxf/trunk/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/RetransmissionQueue.java
URL:
http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/RetransmissionQueue.java?view=diff&rev=482293&r1=482292&r2=482293
==============================================================================
---
incubator/cxf/trunk/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/RetransmissionQueue.java
(original)
+++
incubator/cxf/trunk/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/RetransmissionQueue.java
Mon Dec 4 11:08:04 2006
@@ -27,7 +27,7 @@
String DEFAULT_BASE_RETRANSMISSION_INTERVAL = "3000";
- String DEFAULT_EXPONENTIAL_BACKOFF = "2";
+ int DEFAULT_EXPONENTIAL_BACKOFF = 2;
/**
* @param seq the sequence under consideration
Modified:
incubator/cxf/trunk/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/Servant.java
URL:
http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/Servant.java?view=diff&rev=482293&r1=482292&r2=482293
==============================================================================
---
incubator/cxf/trunk/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/Servant.java
(original)
+++
incubator/cxf/trunk/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/Servant.java
Mon Dec 4 11:08:04 2006
@@ -59,7 +59,8 @@
LOG.fine("No operation info.");
return null;
}
- if (RMConstants.getCreateSequenceOperationName().equals(oi.getName()))
{
+ if (RMConstants.getCreateSequenceOperationName().equals(oi.getName())
+ ||
RMConstants.getCreateSequenceOnewayOperationName().equals(oi.getName())) {
try {
return
Collections.singletonList(createSequence(exchange.getInMessage()));
} catch (SequenceFault ex) {
@@ -67,6 +68,14 @@
} catch (Exception ex) {
ex.printStackTrace();
}
+ } else if
(RMConstants.getCreateSequenceResponseOnewayOperationName().equals(oi.getName()))
{
+ CreateSequenceResponseType createResponse =
+
(CreateSequenceResponseType)getParameter(exchange.getInMessage());
+ try {
+ createSequenceResponse(createResponse);
+ } catch (SequenceFault ex) {
+ ex.printStackTrace();
+ }
}
return null;
@@ -76,9 +85,11 @@
CreateSequenceResponseType createSequence(Message message) throws
SequenceFault {
LOG.fine("Creating sequence");
- AddressingProperties maps = RMContextUtils.retrieveMAPs(message,
false, false);
- Message outMessage = message.getExchange().getOutMessage();
- RMContextUtils.storeMAPs(maps, outMessage, false, false);
+ AddressingProperties maps = RMContextUtils.retrieveMAPs(message,
false, false);
+ Message outMessage = message.getExchange().getOutMessage();
+ if (null != outMessage) {
+ RMContextUtils.storeMAPs(maps, outMessage, false, false);
+ }
CreateSequenceType create = (CreateSequenceType)getParameter(message);
Destination destination = reliableEndpoint.getDestination();
@@ -137,7 +148,7 @@
create.getAcksTo(),
destination);
seq.setCorrelationID(maps.getMessageID().getValue());
destination.addSequence(seq);
-
+ LOG.fine("returning " + createResponse);
return createResponse;
}
@@ -215,7 +226,7 @@
Object getParameter(Message message) {
List resList = null;
- assert message == message.getExchange().getInMessage();
+ // assert message == message.getExchange().getInMessage();
if (message != null) {
resList = message.getContent(List.class);
Modified:
incubator/cxf/trunk/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/soap/RMSoapInterceptor.java
URL:
http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/soap/RMSoapInterceptor.java?view=diff&rev=482293&r1=482292&r2=482293
==============================================================================
---
incubator/cxf/trunk/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/soap/RMSoapInterceptor.java
(original)
+++
incubator/cxf/trunk/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/soap/RMSoapInterceptor.java
Mon Dec 4 11:08:04 2006
@@ -391,7 +391,6 @@
*
* @param message the message
*/
-
private void updateServiceModelInfo(SoapMessage message) {
assert !RMContextUtils.isOutbound(message);
@@ -428,9 +427,21 @@
BindingInfo bi = rme.getEndpoint().getEndpointInfo().getBinding();
BindingOperationInfo boi = null;
- if (RMConstants.getCreateSequenceAction().equals(action)
- || RMConstants.getCreateSequenceResponseAction().equals(action)) {
- boi =
bi.getOperation(RMConstants.getCreateSequenceOperationName());
+ boolean isOneway = true;
+ if (RMConstants.getCreateSequenceAction().equals(action)) {
+ if (RMContextUtils.isServerSide(message)) {
+ boi =
bi.getOperation(RMConstants.getCreateSequenceOperationName());
+ isOneway = false;
+ } else {
+ boi =
bi.getOperation(RMConstants.getCreateSequenceOnewayOperationName());
+ }
+ } else if
(RMConstants.getCreateSequenceResponseAction().equals(action)) {
+ if (RMContextUtils.isServerSide(message)) {
+ boi =
bi.getOperation(RMConstants.getCreateSequenceResponseOnewayOperationName());
+ isOneway = false;
+ } else {
+ boi =
bi.getOperation(RMConstants.getCreateSequenceOperationName());
+ }
} else if (RMConstants.getSequenceAckAction().equals(action)) {
boi = bi.getOperation(RMConstants.getSequenceAckOperationName());
} else if (RMConstants.getTerminateSequenceAction().equals(action)) {
@@ -438,6 +449,7 @@
}
assert boi != null;
exchange.put(BindingOperationInfo.class, boi);
+ exchange.setOneWay(isOneway);
// Fix requestor role (as the client side message observer always sets
it to TRUE)
// to allow unmarshalling the body of a server originated
TerminateSequence request.
@@ -454,12 +466,7 @@
message.put(RMMessageConstants.ORIGINAL_REQUESTOR_ROLE,
originalRequestorRole);
}
message.put(Message.REQUESTOR_ROLE, Boolean.FALSE);
- }
-
- if (RMConstants.getSequenceAckAction().equals(action)) {
- exchange.setOneWay(true);
- }
-
+ }
}
private RMManager getManager(SoapMessage message) {
Modified:
incubator/cxf/trunk/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/soap/RetransmissionQueueImpl.java
URL:
http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/soap/RetransmissionQueueImpl.java?view=diff&rev=482293&r1=482292&r2=482293
==============================================================================
---
incubator/cxf/trunk/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/soap/RetransmissionQueueImpl.java
(original)
+++
incubator/cxf/trunk/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/soap/RetransmissionQueueImpl.java
Mon Dec 4 11:08:04 2006
@@ -54,6 +54,7 @@
import org.apache.cxf.ws.rm.SequenceType;
import org.apache.cxf.ws.rm.SourceSequence;
import org.apache.cxf.ws.rm.persistence.RMStore;
+import org.apache.cxf.ws.rm.policy.RMAssertion;
/**
*
@@ -62,8 +63,6 @@
private static final Logger LOG =
LogUtils.getL7dLogger(RetransmissionQueueImpl.class);
- private long baseRetransmissionInterval = 3000L;
- private int exponentialBackoff = 2;
private Map<String, List<ResendCandidate>> candidates = new
HashMap<String, List<ResendCandidate>>();
private Resender resender;
private Runnable resendInitiator;
@@ -83,15 +82,12 @@
}
public long getBaseRetransmissionInterval() {
- return baseRetransmissionInterval;
- }
-
- public void setBaseRetransmissionInterval(long baseRetransmissionInterval)
{
- this.baseRetransmissionInterval = baseRetransmissionInterval;
- }
-
- public void setExponentialBackoff(int exponentialBackoff) {
- this.exponentialBackoff = exponentialBackoff;
+ RMAssertion rma = null == manager ? null : manager.getRMAssertion();
+ if (null != rma && null != rma.getBaseRetransmissionInterval()
+ && null != rma.getBaseRetransmissionInterval().getMilliseconds()) {
+ return
rma.getBaseRetransmissionInterval().getMilliseconds().longValue();
+ }
+ return new
BigInteger(DEFAULT_BASE_RETRANSMISSION_INTERVAL).longValue();
}
public void addUnacknowledged(Message message) {
@@ -163,7 +159,6 @@
return;
}
LOG.fine("Starting retransmission queue");
-
// setup resender
if (null == resender) {
resender = getDefaultResender();
@@ -197,7 +192,7 @@
* @return the exponential backoff
*/
protected int getExponentialBackoff() {
- return exponentialBackoff;
+ return DEFAULT_EXPONENTIAL_BACKOFF;
}
/**
Modified:
incubator/cxf/trunk/rt/ws/rm/src/test/java/org/apache/cxf/ws/rm/RMEndpointTest.java
URL:
http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/ws/rm/src/test/java/org/apache/cxf/ws/rm/RMEndpointTest.java?view=diff&rev=482293&r1=482292&r2=482293
==============================================================================
---
incubator/cxf/trunk/rt/ws/rm/src/test/java/org/apache/cxf/ws/rm/RMEndpointTest.java
(original)
+++
incubator/cxf/trunk/rt/ws/rm/src/test/java/org/apache/cxf/ws/rm/RMEndpointTest.java
Mon Dec 4 11:08:04 2006
@@ -40,17 +40,28 @@
InterfaceInfo intf = si.getInterface();
- assertEquals(3, intf.getOperations().size());
+ assertEquals(5, intf.getOperations().size());
String ns = si.getName().getNamespaceURI();
OperationInfo oi = intf.getOperation(new QName(ns, "CreateSequence"));
assertNotNull("No operation info.", oi);
+ assertTrue("Operation is oneway.", !oi.isOneWay());
oi = intf.getOperation(new QName(ns, "TerminateSequence"));
assertNotNull("No operation info.", oi);
+ assertTrue("Operation is toway.", oi.isOneWay());
oi = intf.getOperation(new QName(ns, "SequenceAcknowledgement"));
assertNotNull("No operation info.", oi);
+ assertTrue("Operation is toway.", oi.isOneWay());
+
+ oi = intf.getOperation(new QName(ns, "CreateSequenceOneway"));
+ assertNotNull("No operation info.", oi);
+ assertTrue("Operation is toway.", oi.isOneWay());
+
+ oi = intf.getOperation(new QName(ns, "CreateSequenceResponseOneway"));
+ assertNotNull("No operation info.", oi);
+ assertTrue("Operation is toway.", oi.isOneWay());
}
Modified:
incubator/cxf/trunk/rt/ws/rm/src/test/java/org/apache/cxf/ws/rm/RMManagerTest.java
URL:
http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/ws/rm/src/test/java/org/apache/cxf/ws/rm/RMManagerTest.java?view=diff&rev=482293&r1=482292&r2=482293
==============================================================================
---
incubator/cxf/trunk/rt/ws/rm/src/test/java/org/apache/cxf/ws/rm/RMManagerTest.java
(original)
+++
incubator/cxf/trunk/rt/ws/rm/src/test/java/org/apache/cxf/ws/rm/RMManagerTest.java
Mon Dec 4 11:08:04 2006
@@ -207,14 +207,15 @@
CreateSequenceResponseType createResponse =
control.createMock(CreateSequenceResponseType.class);
proxy.createSequence(EasyMock.isA(EndpointReferenceType.class),
EasyMock.isA(org.apache.cxf.ws.addressing.v200408.EndpointReferenceType.class),
- (RelatesToType)EasyMock.isNull());
+ (RelatesToType)EasyMock.isNull(),
+ EasyMock.eq(false));
EasyMock.expectLastCall().andReturn(createResponse);
Servant servant = control.createMock(Servant.class);
EasyMock.expect(rme.getServant()).andReturn(servant);
servant.createSequenceResponse(createResponse);
EasyMock.expectLastCall();
SourceSequence sseq = control.createMock(SourceSequence.class);
- EasyMock.expect(source.getCurrent(inSid)).andReturn(sseq);
+ EasyMock.expect(source.awaitCurrent(inSid)).andReturn(sseq);
sseq.setTarget(EasyMock.isA(EndpointReferenceType.class));
EasyMock.expectLastCall();
Modified:
incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/rm/ControlImpl.java
URL:
http://svn.apache.org/viewvc/incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/rm/ControlImpl.java?view=diff&rev=482293&r1=482292&r2=482293
==============================================================================
---
incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/rm/ControlImpl.java
(original)
+++
incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/rm/ControlImpl.java
Mon Dec 4 11:08:04 2006
@@ -30,9 +30,11 @@
import org.apache.cxf.Bus;
import org.apache.cxf.bus.spring.SpringBusFactory;
+import org.apache.cxf.endpoint.ServerImpl;
import org.apache.cxf.greeter_control.Control;
import org.apache.cxf.greeter_control.types.StartGreeterResponse;
import org.apache.cxf.greeter_control.types.StopGreeterResponse;
+import org.apache.cxf.jaxws.EndpointImpl;
import org.apache.cxf.ws.rm.RMManager;
@@ -60,6 +62,13 @@
String address = "http://localhost:9020/SoapContext/GreeterPort";
endpoint = Endpoint.publish(address, implementor);
LOG.info("Published greeter endpoint.");
+
+ if (cfgResource.endsWith("twoway-no-offer-test.xml")) {
+
+ final ServerImpl server = ((EndpointImpl)endpoint).getServer();
+ RMManager mgr = greeterBus.getExtension(RMManager.class);
+ mgr.testServerSideSequenceCreation(server,
"http://localhost:9994/decoupled_endpoint");
+ }
return true;
}
Modified:
incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/rm/SequenceTest.java
URL:
http://svn.apache.org/viewvc/incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/rm/SequenceTest.java?view=diff&rev=482293&r1=482292&r2=482293
==============================================================================
---
incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/rm/SequenceTest.java
(original)
+++
incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/rm/SequenceTest.java
Mon Dec 4 11:08:04 2006
@@ -73,6 +73,8 @@
private boolean doTestTwowayNonAnonymousMaximumSequenceLength2 = testAll;
private boolean doTestOnewayMessageLoss = testAll;
private boolean doTestTwowayMessageLoss = testAll;
+ private boolean doTestServerSideSequenceCreation = testAll;
+ private boolean doTestTwowayNonAnonymousNoOffer;
public static void main(String[] args) {
junit.textui.TestRunner.run(SequenceTest.class);
@@ -499,7 +501,7 @@
greeterBus.getOutInterceptors().add(new MessageLossSimulator());
RMManager manager = greeterBus.getExtension(RMManager.class);
manager.getRMAssertion().getBaseRetransmissionInterval().setMilliseconds(new
BigInteger("2000"));
-
+
greeter.greetMeOneWay("one");
greeter.greetMeOneWay("two");
greeter.greetMeOneWay("three");
@@ -593,6 +595,53 @@
mf.verifyMessageNumbers(new String[] {null, "1", "2", "3", "4"},
false);
mf.verifyAcknowledgements(new boolean[] {false, true, true, true,
true}, false);
+ }
+
+ public void testServerSideSequenceCreation() throws Exception {
+ if (!doTestServerSideSequenceCreation) {
+ return;
+ }
+ setupGreeter("org/apache/cxf/systest/ws/rm/twoway-no-offer-test.xml");
+
+ greeter.greetMeOneWay("one");
+
+ awaitMessages(3, 4, 10000);
+ }
+
+
+ public void testTwowayNonAnonymousNoOffer() throws Exception {
+ if (!doTestTwowayNonAnonymousNoOffer) {
+ return;
+ }
+ setupGreeter("org/apache/cxf/systest/ws/rm/twoway-no-offer.xml");
+
+ greeter.greetMe("one");
+ // greeter.greetMe("two");
+
+ // Outbound expected:
+ // CreateSequence + greetMe + CreateSequenceResponse = 3 messages
+
+ awaitMessages(3, 6);
+ MessageFlow mf = new MessageFlow(outRecorder.getOutboundMessages(),
inRecorder.getInboundMessages());
+
+ mf.verifyMessages(3, true);
+ String[] expectedActions = new String[]
{RMConstants.getCreateSequenceAction(),
+ GREETME_ACTION,
+
RMConstants.getCreateSequenceResponseAction()};
+ mf.verifyActions(expectedActions, true);
+ mf.verifyMessageNumbers(new String[] {null, "1", null}, true);
+ mf.verifyLastMessage(new boolean[] {false, false, false}, true);
+ mf.verifyAcknowledgements(new boolean[] {false, false, false}, true);
+
+ mf.verifyPartialResponses(3, new boolean[3]);
+ mf.purgePartialResponses();
+
+ expectedActions = new String[]
{RMConstants.getCreateSequenceResponseAction(),
+ RMConstants.getCreateSequenceAction(),
+ GREETME_RESPONSE_ACTION};
+ mf.verifyActions(expectedActions, false);
+ mf.verifyMessageNumbers(new String[] {null, null, "1"}, false);
+ mf.verifyAcknowledgements(new boolean[] {false, false, true}, false);
}
// --- test utilities ---
Added:
incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/rm/twoway-no-offer-test.xml
URL:
http://svn.apache.org/viewvc/incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/rm/twoway-no-offer-test.xml?view=auto&rev=482293
==============================================================================
---
incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/rm/twoway-no-offer-test.xml
(added)
+++
incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/rm/twoway-no-offer-test.xml
Mon Dec 4 11:08:04 2006
@@ -0,0 +1,63 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+<beans xmlns="http://www.springframework.org/schema/beans"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:wsrm-mgmt="http://cxf.apache.org/ws/rm/manager"
+ xmlns:wsrm-policy="http://schemas.xmlsoap.org/ws/2005/02/rm/policy"
+ xmlns:http-conf="http://cxf.apache.org/transports/http/configuration"
+ xsi:schemaLocation="
+http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd">
+
+ <bean
name="{http://cxf.apache.org/greeter_control}GreeterPort.http-conduit"
abstract="true">
+ <property name="client">
+ <value>
+ <http-conf:client
DecoupledEndpoint="http://localhost:9994/decoupled_endpoint"/>
+ </value>
+ </property>
+ </bean>
+
+ <bean id="org.apache.cxf.ws.rm.RMManager"
class="org.apache.cxf.ws.rm.RMManager">
+ <property name="bus" ref="cxf"/>
+ <property name="destinationPolicy">
+ <value>
+ <wsrm-mgmt:destinationPolicy>
+ <wsrm-mgmt:acksPolicy intraMessageThreshold="0"/>
+ </wsrm-mgmt:destinationPolicy>
+ </value>
+ </property>
+ <property name="sourcePolicy">
+ <value>
+ <wsrm-mgmt:sourcePolicy includeOffer="false"/>
+ </value>
+ </property>
+
+ <property name="RMAssertion">
+ <value>
+ <wsrm-policy:RMAssertion>
+ <wsrm-policy:BaseRetransmissionInterval
Milliseconds="60000"/>
+ <wsrm-policy:AcknowledgementInterval
Milliseconds="60000"/>
+ </wsrm-policy:RMAssertion>
+ </value>
+ </property>
+ </bean>
+
+ <import resource="rminterceptors.xml"/>
+
+</beans>
\ No newline at end of file
Propchange:
incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/rm/twoway-no-offer-test.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange:
incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/rm/twoway-no-offer-test.xml
------------------------------------------------------------------------------
svn:keywords = Rev Date
Propchange:
incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/rm/twoway-no-offer-test.xml
------------------------------------------------------------------------------
svn:mime-type = text/xml
Added:
incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/rm/twoway-no-offer.xml
URL:
http://svn.apache.org/viewvc/incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/rm/twoway-no-offer.xml?view=auto&rev=482293
==============================================================================
---
incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/rm/twoway-no-offer.xml
(added)
+++
incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/rm/twoway-no-offer.xml
Mon Dec 4 11:08:04 2006
@@ -0,0 +1,63 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+<beans xmlns="http://www.springframework.org/schema/beans"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:wsrm-mgmt="http://cxf.apache.org/ws/rm/manager"
+ xmlns:wsrm-policy="http://schemas.xmlsoap.org/ws/2005/02/rm/policy"
+ xmlns:http-conf="http://cxf.apache.org/transports/http/configuration"
+ xsi:schemaLocation="
+http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd">
+
+ <bean
name="{http://cxf.apache.org/greeter_control}GreeterPort.http-conduit"
abstract="true">
+ <property name="client">
+ <value>
+ <http-conf:client
DecoupledEndpoint="http://localhost:9995/decoupled_endpoint"/>
+ </value>
+ </property>
+ </bean>
+
+ <bean id="org.apache.cxf.ws.rm.RMManager"
class="org.apache.cxf.ws.rm.RMManager">
+ <property name="bus" ref="cxf"/>
+ <property name="destinationPolicy">
+ <value>
+ <wsrm-mgmt:destinationPolicy>
+ <wsrm-mgmt:acksPolicy intraMessageThreshold="0"/>
+ </wsrm-mgmt:destinationPolicy>
+ </value>
+ </property>
+ <property name="sourcePolicy">
+ <value>
+ <wsrm-mgmt:sourcePolicy includeOffer="false"/>
+ </value>
+ </property>
+
+ <property name="RMAssertion">
+ <value>
+ <wsrm-policy:RMAssertion>
+ <wsrm-policy:BaseRetransmissionInterval
Milliseconds="60000"/>
+ <wsrm-policy:AcknowledgementInterval
Milliseconds="60000"/>
+ </wsrm-policy:RMAssertion>
+ </value>
+ </property>
+ </bean>
+
+ <import resource="rminterceptors.xml"/>
+
+</beans>
\ No newline at end of file
Propchange:
incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/rm/twoway-no-offer.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange:
incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/rm/twoway-no-offer.xml
------------------------------------------------------------------------------
svn:keywords = Rev Date
Propchange:
incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/rm/twoway-no-offer.xml
------------------------------------------------------------------------------
svn:mime-type = text/xml