// register createSequence method
QName createSequenceQName = rmProvider.getConstants().getCreateSequenceQName();
OperationMetaData createSequenceMD = new OperationMetaData(endpointMD, createSequenceQName, "createSequence");
createSequenceMD.setOneWay(false);
// setup addressing related data
AddressingOpMetaExt createSequenceAddrExt = new AddressingOpMetaExt(new AddressingPropertiesImpl().getNamespaceURI());
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);
// register sequenceAcknowledgement method
QName sequenceAcknowledgementQName = rmProvider.getConstants().getSequenceAcknowledgementQName();
OperationMetaData sequenceAcknowledgementMD = new OperationMetaData(endpointMD, sequenceAcknowledgementQName, "sequenceAcknowledgement");
sequenceAcknowledgementMD.setOneWay(true);
// setup addressing related data
AddressingOpMetaExt sequenceAcknowledgementAddrExt = new AddressingOpMetaExt(new AddressingPropertiesImpl().getNamespaceURI());
sequenceAcknowledgementAddrExt.setInboundAction(RMAddressingConstants.SEQUENCE_ACKNOWLEDGEMENT_WSA_ACTION);
sequenceAcknowledgementMD.addExtension(sequenceAcknowledgementAddrExt);
// register operation metadata with endpoint metadata
endpointMD.addOperation(sequenceAcknowledgementMD);
if (rmProvider.getMessageFactory().newCloseSequence() != null)
{
// register closeSequence method
QName closeSequenceQName = rmProvider.getConstants().getCloseSequenceQName();
OperationMetaData closeSequenceMD = new OperationMetaData(endpointMD, closeSequenceQName, "closeSequence");
closeSequenceMD.setOneWay(false);
// setup addressing related data
AddressingOpMetaExt closeSequenceAddrExt = new AddressingOpMetaExt(new AddressingPropertiesImpl().getNamespaceURI());
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);
}
// register terminateSequence method
QName terminateSequenceQName = rmProvider.getConstants().getTerminateSequenceQName();
OperationMetaData terminateSequenceMD = new OperationMetaData(endpointMD, terminateSequenceQName, "terminateSequence");
boolean isOneWay = rmProvider.getMessageFactory().newTerminateSequenceResponse() == null;
terminateSequenceMD.setOneWay(isOneWay);
// setup addressing related data
AddressingOpMetaExt terminateSequenceAddrExt = new AddressingOpMetaExt(new AddressingPropertiesImpl().getNamespaceURI());
terminateSequenceAddrExt.setInboundAction(RMAddressingConstants.TERMINATE_SEQUENCE_WSA_ACTION);
if (!isOneWay)
{
terminateSequenceAddrExt.setOutboundAction(RMAddressingConstants.TERMINATE_SEQUENCE_RESPONSE_WSA_ACTION);
}
terminateSequenceMD.addExtension(terminateSequenceAddrExt);
// register operation metadata with endpoint metadata
endpointMD.addOperation(terminateSequenceMD);
}