/** * Send the completed message. * * @param timedOut true if this is in response to a comms timeout */ private void sendCompleted(boolean timedOut) { final MAP map = createContext() ; try { // if we are trying to reestablish the participant state then send getStatus otherwise send completed if (timedOut && checkStatus) { CoordinatorCompletionCoordinatorClient.getClient().sendGetStatus(coordinator, map, instanceIdentifier); ; } else { CoordinatorCompletionCoordinatorClient.getClient().sendCompleted(coordinator, map, instanceIdentifier) ; } } catch (final Throwable th) { if (WSTLogger.logger.isTraceEnabled()) { WSTLogger.logger.tracev("Unexpected exception while sending Completed", th) ; } } // if we timed out the increase the resend period otherwise make sure it is reset to the // initial resend period updateResendPeriod(timedOut); initiateTimer() ; }
/** * Send a get 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 sendGetStatus(W3CEndpointReference endpoint, final MAP map, final InstanceIdentifier identifier) throws SoapFault, IOException { MAPEndpoint participant = getParticipant(endpoint, map); AddressingHelper.installFromFaultTo(map, participant, identifier); BusinessAgreementWithCoordinatorCompletionCoordinatorPortType port; port = getPort(endpoint, map, getStatusAction); NotificationType getStatus = new NotificationType(); port.getStatusOperation(getStatus); }
/** * Send the cancelled message. * */ private void sendCancelled() { final MAP map = createContext() ; try { CoordinatorCompletionCoordinatorClient.getClient().sendCancelled(coordinator, map, instanceIdentifier) ; } catch (final Throwable th) { if (WSTLogger.logger.isTraceEnabled()) { WSTLogger.logger.tracev("Unexpected exception while sending Cancelled", th) ; } } }
/** * Send the exit message. * */ private void sendExit() { final MAP map = createContext() ; try { CoordinatorCompletionCoordinatorClient.getClient().sendExit(coordinator, map, instanceIdentifier) ; } catch (final Throwable th) { if (WSTLogger.logger.isTraceEnabled()) { WSTLogger.logger.tracev("Unexpected exception while sending Exit", th) ; } } }
/** * Send the closed message. * */ private void sendClosed() { final MAP map = createContext() ; try { CoordinatorCompletionCoordinatorClient.getClient().sendClosed(coordinator, map, instanceIdentifier) ; } catch (final Throwable th) { if (WSTLogger.logger.isTraceEnabled()) { WSTLogger.logger.tracev("Unexpected exception while sending Closed", th) ; } } }
/** * Send the compensated message. * */ private void sendCompensated() { final MAP map = createContext() ; try { CoordinatorCompletionCoordinatorClient.getClient().sendCompensated(coordinator, map, instanceIdentifier) ; } catch (final Throwable th) { if (WSTLogger.logger.isTraceEnabled()) { WSTLogger.logger.tracev("Unexpected exception while sending Compensated", th) ; } } }
/** * Send the fail message. * @param message The fail message. * */ private void sendFail(final QName message) { final MAP map = createContext() ; try { CoordinatorCompletionCoordinatorClient.getClient().sendFail(coordinator, map, instanceIdentifier, message) ; } catch (final Throwable th) { if (WSTLogger.logger.isTraceEnabled()) { WSTLogger.logger.tracev("Unexpected exception while sending Fail", th) ; } } }
/** * Send the cannot complete message. * */ private void sendCannotComplete() { final MAP map = createContext() ; try { CoordinatorCompletionCoordinatorClient.getClient().sendCannotComplete(coordinator, map, instanceIdentifier) ; } catch (final Throwable th) { if (WSTLogger.logger.isTraceEnabled()) { WSTLogger.logger.tracev("Unexpected exception while sending CannotComplete", th) ; } } }
/** * Send the status message. * @param state The state. * */ private void sendStatus(final State state) { final MAP map = createContext() ; try { CoordinatorCompletionCoordinatorClient.getClient().sendStatus(coordinator, map, instanceIdentifier, state.getValue()) ; } catch (final Throwable th) { if (WSTLogger.logger.isTraceEnabled()) { WSTLogger.logger.tracev("Unexpected exception while sending Status", th) ; } } }
CoordinatorCompletionCoordinatorClient.getClient().sendSoapFault(soapFault, null, faultMAP, getFaultAction());
/** * send a soap fault * @param soapFault the fault to be sent * @param endpoint the endpoint to send the fault to * @param map addressing context to be used to send the fault * @param faultAction the action to associate with the message */ public void sendSoapFault(SoapFault11 soapFault, W3CEndpointReference endpoint, MAP map, String faultAction) throws SoapFault, IOException { AddressingHelper.installNoneReplyTo(map); map.setAction(faultAction); BusinessAgreementWithCoordinatorCompletionCoordinatorPortType port; port = getPort(endpoint, map, faultAction); Fault fault = ((SoapFault11)soapFault).toFault(); port.soapFault(fault); } /**
/** * Send the closed message. * */ private void sendClosed() { final MAP map = createContext() ; try { CoordinatorCompletionCoordinatorClient.getClient().sendClosed(coordinator, map, instanceIdentifier) ; } catch (final Throwable th) { if (WSTLogger.logger.isTraceEnabled()) { WSTLogger.logger.tracev("Unexpected exception while sending Closed", th) ; } } }
/** * Send the compensated message. * */ private void sendCompensated() { final MAP map = createContext() ; try { CoordinatorCompletionCoordinatorClient.getClient().sendCompensated(coordinator, map, instanceIdentifier) ; } catch (final Throwable th) { if (WSTLogger.logger.isTraceEnabled()) { WSTLogger.logger.tracev("Unexpected exception while sending Compensated", th) ; } } }
/** * Send the fail message. * @param message The fail message. * */ private void sendFail(final QName message) { final MAP map = createContext() ; try { CoordinatorCompletionCoordinatorClient.getClient().sendFail(coordinator, map, instanceIdentifier, message) ; } catch (final Throwable th) { if (WSTLogger.logger.isTraceEnabled()) { WSTLogger.logger.tracev("Unexpected exception while sending Fail", th) ; } } }
/** * Send the exit message. * */ private void sendExit() { final MAP map = createContext() ; try { CoordinatorCompletionCoordinatorClient.getClient().sendExit(coordinator, map, instanceIdentifier) ; } catch (final Throwable th) { if (WSTLogger.logger.isTraceEnabled()) { WSTLogger.logger.tracev("Unexpected exception while sending Exit", th) ; } } }
/** * Send the cannot complete message. * */ private void sendCannotComplete() { final MAP map = createContext() ; try { CoordinatorCompletionCoordinatorClient.getClient().sendCannotComplete(coordinator, map, instanceIdentifier) ; } catch (final Throwable th) { if (WSTLogger.logger.isTraceEnabled()) { WSTLogger.logger.tracev("Unexpected exception while sending CannotComplete", th) ; } } }
/** * Send the status message. * @param state The state. * */ private void sendStatus(final State state) { final MAP map = createContext() ; try { CoordinatorCompletionCoordinatorClient.getClient().sendStatus(coordinator, map, instanceIdentifier, state.getValue()) ; } catch (final Throwable th) { if (WSTLogger.logger.isTraceEnabled()) { WSTLogger.logger.tracev("Unexpected exception while sending Status", th) ; } } }
CoordinatorCompletionCoordinatorClient.getClient().sendSoapFault(soapFault, null, faultMAP, getFaultAction());
/** * send a soap fault * @param soapFault the fault to be sent * @param endpoint the endpoint to send the fault to * @param map addressing context to be used to send the fault * @param faultAction the action to associate with the message */ public void sendSoapFault(SoapFault11 soapFault, W3CEndpointReference endpoint, MAP map, String faultAction) throws SoapFault, IOException { AddressingHelper.installNoneReplyTo(map); map.setAction(faultAction); BusinessAgreementWithCoordinatorCompletionCoordinatorPortType port; port = getPort(endpoint, map, faultAction); Fault fault = ((SoapFault11)soapFault).toFault(); port.soapFault(fault); } /**
/** * Send a compensated 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 sendCompensated(W3CEndpointReference endpoint, final MAP map, final InstanceIdentifier identifier) throws SoapFault, IOException { MAPEndpoint participant = getParticipant(endpoint, map); AddressingHelper.installFaultTo(map, participant, identifier); BusinessAgreementWithCoordinatorCompletionCoordinatorPortType port; port = getPort(endpoint, map, compensatedAction); NotificationType compensated = new NotificationType(); port.compensatedOperation(compensated); }