// also, to workaround the problem that it may not be possible to determine
// the soap version depending on the bindingId, speciffy the soap version
// explicitly
if (null != applicationEndpoint) {
final QName bindingQName = new QName(protocol.getWSRMNamespace(), BINDING_NAME);
SoapBindingInfo sbi = (SoapBindingInfo)applicationEndpoint.getEndpointInfo().getBinding();
SoapVersion sv = sbi.getSoapVersion();
String bindingId = sbi.getBindingId();
SoapBindingInfo bi = new SoapBindingInfo(si, bindingId, sv);
bi.setName(bindingQName);
BindingOperationInfo boi = null;
RMConstants consts = protocol.getConstants();
boi = bi.buildOperation(consts.getCreateSequenceOperationName(),
consts.getCreateSequenceOperationName().getLocalPart(), null);
addAction(boi, consts.getCreateSequenceAction(), consts.getCreateSequenceResponseAction());
bi.addOperation(boi);
boi = bi.buildOperation(consts.getTerminateSequenceOperationName(),
consts.getTerminateSequenceOperationName().getLocalPart(), null);
if (RM11Constants.NAMESPACE_URI.equals(protocol.getWSRMNamespace())) {
addAction(boi, consts.getTerminateSequenceAction(),
RM11Constants.INSTANCE.getTerminateSequenceResponseAction());
} else {
addAction(boi, consts.getTerminateSequenceAction());
}
bi.addOperation(boi);
boi = bi.buildOperation(consts.getTerminateSequenceAnonymousOperationName(),
null, consts.getTerminateSequenceAnonymousOperationName().getLocalPart());
addAction(boi, consts.getTerminateSequenceAction());
bi.addOperation(boi);
boi = bi.buildOperation(consts.getSequenceAckOperationName(), null, null);
addAction(boi, consts.getSequenceAckAction());
bi.addOperation(boi);
boi = bi.buildOperation(consts.getCloseSequenceOperationName(), null, null);
if (RM11Constants.NAMESPACE_URI.equals(protocol.getWSRMNamespace())) {
addAction(boi, consts.getCloseSequenceAction(),
RM11Constants.INSTANCE.getCloseSequenceResponseAction());
} else {
addAction(boi, consts.getCloseSequenceAction());
}
bi.addOperation(boi);
boi = bi.buildOperation(consts.getAckRequestedOperationName(), null, null);
addAction(boi, consts.getAckRequestedAction());
bi.addOperation(boi);
boi = bi.buildOperation(consts.getCreateSequenceOnewayOperationName(),
consts.getCreateSequenceOnewayOperationName().getLocalPart(), null);
addAction(boi, consts.getCreateSequenceAction());
bi.addOperation(boi);
boi = bi.buildOperation(consts.getCreateSequenceResponseOnewayOperationName(),
consts.getCreateSequenceResponseOnewayOperationName().getLocalPart(),
null);
addAction(boi, consts.getCreateSequenceResponseAction());
bi.addOperation(boi);
si.addBinding(bi);
}
// TODO: BindingFaultInfo (SequenceFault)