use of org.jboss.ws.api.addressing.MAPEndpoint in project narayana by jbosstm.
the class ParticipantCompletionParticipantClient method sendExited.
/**
* Send an exited request.
* @param map addressing context initialised with to and message ID.
* @param identifier The identifier of the initiator.
* @throws com.arjuna.webservices.SoapFault For any errors.
* @throws java.io.IOException for any transport errors.
*/
public void sendExited(W3CEndpointReference endpoint, final MAP map, final InstanceIdentifier identifier) throws SoapFault, IOException {
MAPEndpoint coordinator = getCoordinator(endpoint, map);
AddressingHelper.installFaultTo(map, coordinator, identifier);
BusinessAgreementWithParticipantCompletionParticipantPortType port;
port = getPort(endpoint, map, exitedAction);
NotificationType exited = new NotificationType();
port.exitedOperation(exited);
}
use of org.jboss.ws.api.addressing.MAPEndpoint in project narayana by jbosstm.
the class ParticipantCompletionParticipantClient method sendStatus.
/**
* Send a status request.
* @param map addressing context initialised with to and message ID.
* @param identifier The identifier of the initiator.
* @throws com.arjuna.webservices.SoapFault For any errors.
* @throws java.io.IOException for any transport errors.
*/
public void sendStatus(W3CEndpointReference endpoint, final MAP map, final InstanceIdentifier identifier, final QName state) throws SoapFault, IOException {
MAPEndpoint coordinator = getCoordinator(endpoint, map);
AddressingHelper.installFromFaultTo(map, coordinator, identifier);
BusinessAgreementWithParticipantCompletionParticipantPortType port;
port = getPort(endpoint, map, statusAction);
StatusType status = new StatusType();
status.setState(state);
port.statusOperation(status);
}
use of org.jboss.ws.api.addressing.MAPEndpoint in project narayana by jbosstm.
the class ParticipantCompletionParticipantClient method sendCancel.
/**
* Send a cancel request.
* @param map addressing context initialised with to and message ID.
* @param identifier The identifier of the initiator.
* @throws com.arjuna.webservices.SoapFault For any errors.
* @throws java.io.IOException for any transport errors.
*/
public void sendCancel(W3CEndpointReference endpoint, final MAP map, final InstanceIdentifier identifier) throws SoapFault, IOException {
MAPEndpoint coordinator = getCoordinator(endpoint, map);
AddressingHelper.installFromFaultTo(map, coordinator, identifier);
BusinessAgreementWithParticipantCompletionParticipantPortType port;
port = getPort(endpoint, map, cancelAction);
NotificationType cancel = new NotificationType();
port.cancelOperation(cancel);
}
use of org.jboss.ws.api.addressing.MAPEndpoint in project narayana by jbosstm.
the class CoordinatorClient method sendReadOnly.
/**
* Send a read only request.
* @param map addressing context initialised with to and message ID.
* @param identifier The identifier of the initiator.
* @throws com.arjuna.webservices.SoapFault For any SOAP errors.
* @throws java.io.IOException for any transport errors.
*/
public void sendReadOnly(final W3CEndpointReference endpoint, final MAP map, final InstanceIdentifier identifier) throws SoapFault, IOException {
MAPEndpoint participant = getParticipant(endpoint, map);
AddressingHelper.installFaultTo(map, participant, identifier);
CoordinatorPortType port = getPort(endpoint, map, readOnlyAction);
Notification readOnly = new Notification();
port.readOnlyOperation(readOnly);
}
use of org.jboss.ws.api.addressing.MAPEndpoint in project jbossws-cxf by jbossws.
the class AddressingPort method setClientID.
/**
* This installs the ID for this client in the outbound messages
*/
private void setClientID() {
BindingProvider bindingProvider = (BindingProvider) port;
Map<String, Object> msgContext = bindingProvider.getRequestContext();
MAPBuilder builder = MAPBuilderFactory.getInstance().getBuilderInstance();
MAPConstants ADDR = builder.newConstants();
MAP outProps = builder.newMap();
MAPEndpoint replyTo = builder.newEndpoint(ADDR.getAnonymousURI());
outProps.setReplyTo(replyTo);
outProps.setMessageID("urn:uuid:" + UUIDGenerator.generateRandomUUIDString());
// Assign a new clientid
if (clientID == null) {
clientID = "clientid-" + (++maxClientId);
log.info("New clientid: " + clientID);
}
try {
replyTo.addReferenceParameter(DOMUtils.parse(getClientIdElement(clientID), getDocumentBuilder()));
} catch (IOException e) {
throw new RuntimeException(e);
}
outProps.installOutboundMapOnClientSide(msgContext, outProps);
}
Aggregations