use of org.apache.cxf.ws.rm.manager.AcksPolicyType in project cxf by apache.
the class ServantTest method verifyCreateSequenceExpiresSetAtSource.
private void verifyCreateSequenceExpiresSetAtSource(Servant servant, RMManager manager) throws SequenceFault {
DestinationPolicyType dp = RMMANGER_FACTORY.createDestinationPolicyType();
AcksPolicyType ap = RMMANGER_FACTORY.createAcksPolicyType();
dp.setAcksPolicy(ap);
manager.setDestinationPolicy(dp);
Expires expires = new Expires();
expires.setValue(DURATION_SHORT);
Message message = createTestCreateSequenceMessage(expires, null);
CreateSequenceResponseType csr = (CreateSequenceResponseType) servant.createSequence(message);
Expires expires2 = csr.getExpires();
assertNotNull(expires2);
assertEquals(DURATION_SHORT, expires2.getValue());
}
use of org.apache.cxf.ws.rm.manager.AcksPolicyType in project cxf by apache.
the class ServantTest method verifyCreateSequenceExpiresSetAtBoth.
private void verifyCreateSequenceExpiresSetAtBoth(Servant servant, RMManager manager) throws SequenceFault {
DestinationPolicyType dp = RMMANGER_FACTORY.createDestinationPolicyType();
AcksPolicyType ap = RMMANGER_FACTORY.createAcksPolicyType();
dp.setAcksPolicy(ap);
dp.setSequenceExpiration(DURATION_SHORT);
manager.setDestinationPolicy(dp);
Expires expires = new Expires();
expires.setValue(DURATION_VERY_SHORT);
Message message = createTestCreateSequenceMessage(expires, null);
CreateSequenceResponseType csr = (CreateSequenceResponseType) servant.createSequence(message);
Expires expires2 = csr.getExpires();
assertNotNull(expires2);
assertEquals(DURATION_VERY_SHORT, expires2.getValue());
}
use of org.apache.cxf.ws.rm.manager.AcksPolicyType in project cxf by apache.
the class ServantTest method verifyTerminateSequenceDefault.
private void verifyTerminateSequenceDefault(Servant servant, RMManager manager, String sidstr, ProtocolVariation protocol) throws SequenceFault {
DestinationPolicyType dp = RMMANGER_FACTORY.createDestinationPolicyType();
AcksPolicyType ap = RMMANGER_FACTORY.createAcksPolicyType();
dp.setAcksPolicy(ap);
manager.setDestinationPolicy(dp);
Message message = createTestTerminateSequenceMessage(sidstr, protocol);
Object tsr = servant.terminateSequence(message);
if (ProtocolVariation.RM10WSA200408.getWSRMNamespace().equals(protocol.getWSRMNamespace())) {
// rm 1.0
assertNull(tsr);
} else {
// rm 1.1
assertTrue(tsr instanceof TerminateSequenceResponseType);
org.apache.cxf.ws.rm.v200702.Identifier sid = ((TerminateSequenceResponseType) tsr).getIdentifier();
assertNotNull(sid);
assertEquals(sidstr, sid.getValue());
}
}
use of org.apache.cxf.ws.rm.manager.AcksPolicyType in project cxf by apache.
the class WSRM12ServerCycleTest method wsrm.
public static RMFeature wsrm(long brtxInterval, long ackInterval) {
RMAssertion.BaseRetransmissionInterval baseRetransmissionInterval = new RMAssertion.BaseRetransmissionInterval();
baseRetransmissionInterval.setMilliseconds(Long.valueOf(brtxInterval));
RMAssertion.AcknowledgementInterval acknowledgementInterval = new RMAssertion.AcknowledgementInterval();
acknowledgementInterval.setMilliseconds(Long.valueOf(ackInterval));
RMAssertion rmAssertion = new RMAssertion();
rmAssertion.setAcknowledgementInterval(acknowledgementInterval);
rmAssertion.setBaseRetransmissionInterval(baseRetransmissionInterval);
AcksPolicyType acksPolicy = new AcksPolicyType();
acksPolicy.setIntraMessageThreshold(0);
DestinationPolicyType destinationPolicy = new DestinationPolicyType();
destinationPolicy.setAcksPolicy(acksPolicy);
RMFeature feature = new RMFeature();
feature.setRMAssertion(rmAssertion);
feature.setDestinationPolicy(destinationPolicy);
feature.setRMNamespace(RM11Constants.NAMESPACE_URI);
return feature;
}
Aggregations