Search in sources :

Example 1 with NativeEndpointReference

use of com.arjuna.webservices11.wsaddr.NativeEndpointReference in project narayana by jbosstm.

the class CompletionInitiatorClient method getCompletionCoordinator.

/**
 * return a completion coordinator endpoint appropriate to the type of completion initiator
 * @param participant
 * @return either the secure terminaton participant endpoint or the non-secure endpoint
 */
MAPEndpoint getCompletionCoordinator(W3CEndpointReference participant) {
    NativeEndpointReference nativeRef = EndpointHelper.transform(NativeEndpointReference.class, participant);
    String address = nativeRef.getAddress();
    if (address.startsWith("https")) {
        return secureCompletionCoordinator;
    } else {
        return completionCoordinator;
    }
}
Also used : NativeEndpointReference(com.arjuna.webservices11.wsaddr.NativeEndpointReference)

Example 2 with NativeEndpointReference

use of com.arjuna.webservices11.wsaddr.NativeEndpointReference in project narayana by jbosstm.

the class ParticipantClient method getCoordinator.

/**
 * return a coordinator endpoint appropriate to the type of participant
 * @param endpoint
 * @return either the secure coordinator endpoint or the non-secure endpoint
 */
MAPEndpoint getCoordinator(W3CEndpointReference endpoint, MAP map) {
    String address;
    if (endpoint != null) {
        NativeEndpointReference nativeRef = EndpointHelper.transform(NativeEndpointReference.class, endpoint);
        address = nativeRef.getAddress();
    } else {
        address = map.getTo();
    }
    if (address.startsWith("https")) {
        return secureCoordinator;
    } else {
        return coordinator;
    }
}
Also used : NativeEndpointReference(com.arjuna.webservices11.wsaddr.NativeEndpointReference)

Example 3 with NativeEndpointReference

use of com.arjuna.webservices11.wsaddr.NativeEndpointReference in project narayana by jbosstm.

the class CoordinatorCompletionParticipantClient method getCoordinator.

/**
 * return a coordinator endpoint appropriate to the type of participant
 * @param endpoint
 * @return either the secure coordinator endpoint or the non-secure endpoint
 */
MAPEndpoint getCoordinator(W3CEndpointReference endpoint, MAP map) {
    String address;
    if (endpoint != null) {
        NativeEndpointReference nativeRef = EndpointHelper.transform(NativeEndpointReference.class, endpoint);
        address = nativeRef.getAddress();
    } else {
        address = map.getTo();
    }
    if (address.startsWith("https")) {
        return secureCoordinatorCompletionCoordinator;
    } else {
        return coordinatorCompletionCoordinator;
    }
}
Also used : NativeEndpointReference(com.arjuna.webservices11.wsaddr.NativeEndpointReference)

Example 4 with NativeEndpointReference

use of com.arjuna.webservices11.wsaddr.NativeEndpointReference in project narayana by jbosstm.

the class TerminationCoordinatorClient method getParticipant.

/**
 * return a participant endpoint appropriate to the type of coordinator
 * @param coordinator
 * @return either the secure terminaton coordinator endpoint or the non-secure endpoint
 */
MAPEndpoint getParticipant(W3CEndpointReference coordinator) {
    NativeEndpointReference nativeRef = EndpointHelper.transform(NativeEndpointReference.class, coordinator);
    String address = nativeRef.getAddress();
    if (address.startsWith("https")) {
        return secureTerminationParticipant;
    } else {
        return terminationParticipant;
    }
}
Also used : NativeEndpointReference(com.arjuna.webservices11.wsaddr.NativeEndpointReference)

Example 5 with NativeEndpointReference

use of com.arjuna.webservices11.wsaddr.NativeEndpointReference in project narayana by jbosstm.

the class TerminationParticipantClient method getCoordinator.

/**
 * return a coordinator endpoint appropriate to the type of participant
 * @param participant
 * @return either the secure terminaton participant endpoint or the non-secure endpoint
 */
MAPEndpoint getCoordinator(W3CEndpointReference participant) {
    NativeEndpointReference nativeRef = EndpointHelper.transform(NativeEndpointReference.class, participant);
    String address = nativeRef.getAddress();
    if (address.startsWith("https")) {
        return secureTerminationCoordinator;
    } else {
        return terminationCoordinator;
    }
}
Also used : NativeEndpointReference(com.arjuna.webservices11.wsaddr.NativeEndpointReference)

Aggregations

NativeEndpointReference (com.arjuna.webservices11.wsaddr.NativeEndpointReference)12 W3CEndpointReference (javax.xml.ws.wsaddressing.W3CEndpointReference)2 CoordinationContextType (org.oasis_open.docs.ws_tx.wscoor._2006._06.CoordinationContextType)2