Search in sources :

Example 51 with MAPEndpoint

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);
}
Also used : MAPEndpoint(org.jboss.ws.api.addressing.MAPEndpoint) NotificationType(org.oasis_open.docs.ws_tx.wsba._2006._06.NotificationType) BusinessAgreementWithParticipantCompletionParticipantPortType(org.oasis_open.docs.ws_tx.wsba._2006._06.BusinessAgreementWithParticipantCompletionParticipantPortType)

Example 52 with MAPEndpoint

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);
}
Also used : MAPEndpoint(org.jboss.ws.api.addressing.MAPEndpoint) StatusType(org.oasis_open.docs.ws_tx.wsba._2006._06.StatusType) BusinessAgreementWithParticipantCompletionParticipantPortType(org.oasis_open.docs.ws_tx.wsba._2006._06.BusinessAgreementWithParticipantCompletionParticipantPortType)

Example 53 with MAPEndpoint

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);
}
Also used : MAPEndpoint(org.jboss.ws.api.addressing.MAPEndpoint) NotificationType(org.oasis_open.docs.ws_tx.wsba._2006._06.NotificationType) BusinessAgreementWithParticipantCompletionParticipantPortType(org.oasis_open.docs.ws_tx.wsba._2006._06.BusinessAgreementWithParticipantCompletionParticipantPortType)

Example 54 with MAPEndpoint

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);
}
Also used : MAPEndpoint(org.jboss.ws.api.addressing.MAPEndpoint) CoordinatorPortType(org.oasis_open.docs.ws_tx.wsat._2006._06.CoordinatorPortType) Notification(org.oasis_open.docs.ws_tx.wsat._2006._06.Notification)

Example 55 with MAPEndpoint

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);
}
Also used : MAPEndpoint(org.jboss.ws.api.addressing.MAPEndpoint) MAPConstants(org.jboss.ws.api.addressing.MAPConstants) BindingProvider(javax.xml.ws.BindingProvider) IOException(java.io.IOException) MAP(org.jboss.ws.api.addressing.MAP) MAPBuilder(org.jboss.ws.api.addressing.MAPBuilder)

Aggregations

MAPEndpoint (org.jboss.ws.api.addressing.MAPEndpoint)55 NotificationType (org.oasis_open.docs.ws_tx.wsba._2006._06.NotificationType)29 Notification (org.oasis_open.docs.ws_tx.wsat._2006._06.Notification)11 BusinessAgreementWithCoordinatorCompletionCoordinatorPortType (org.oasis_open.docs.ws_tx.wsba._2006._06.BusinessAgreementWithCoordinatorCompletionCoordinatorPortType)9 BusinessAgreementWithCoordinatorCompletionParticipantPortType (org.oasis_open.docs.ws_tx.wsba._2006._06.BusinessAgreementWithCoordinatorCompletionParticipantPortType)9 BusinessAgreementWithParticipantCompletionCoordinatorPortType (org.oasis_open.docs.ws_tx.wsba._2006._06.BusinessAgreementWithParticipantCompletionCoordinatorPortType)9 BusinessAgreementWithParticipantCompletionParticipantPortType (org.oasis_open.docs.ws_tx.wsba._2006._06.BusinessAgreementWithParticipantCompletionParticipantPortType)8 NotificationType (com.arjuna.schemas.ws._2005._10.wsarjtx.NotificationType)7 TerminationParticipantPortType (com.arjuna.schemas.ws._2005._10.wsarjtx.TerminationParticipantPortType)4 CoordinatorPortType (org.oasis_open.docs.ws_tx.wsat._2006._06.CoordinatorPortType)4 StatusType (org.oasis_open.docs.ws_tx.wsba._2006._06.StatusType)4 TerminationCoordinatorPortType (com.arjuna.schemas.ws._2005._10.wsarjtx.TerminationCoordinatorPortType)3 ParticipantPortType (org.oasis_open.docs.ws_tx.wsat._2006._06.ParticipantPortType)3 MAP (org.jboss.ws.api.addressing.MAP)2 MAPBuilder (org.jboss.ws.api.addressing.MAPBuilder)2 CompletionCoordinatorPortType (org.oasis_open.docs.ws_tx.wsat._2006._06.CompletionCoordinatorPortType)2 CompletionInitiatorPortType (org.oasis_open.docs.ws_tx.wsat._2006._06.CompletionInitiatorPortType)2 ExceptionType (org.oasis_open.docs.ws_tx.wsba._2006._06.ExceptionType)2 IOException (java.io.IOException)1 QName (javax.xml.namespace.QName)1