Search in sources :

Example 1 with WSIFService

use of xsul.wsif.WSIFService in project airavata by apache.

the class GFacServiceCreator method shutdownService.

/**
 * Shutdowns the service created.
 *
 * @throws WorkflowException
 */
public void shutdownService() throws WorkflowException {
    WSIFService service = WSIFServiceFactory.newInstance().getService(this.serviceDefinitions);
    WSIFPort port = service.getPort();
    WSIFOperation operation = port.createOperation(SHUTDOWN_OPERATION);
    WSIFMessage inputMessage = operation.createInputMessage();
    WSIFMessage outputMessage = operation.createOutputMessage();
    WSIFMessage faultMessage = operation.createFaultMessage();
    boolean success = operation.executeRequestResponseOperation(inputMessage, outputMessage, faultMessage);
    if (!success) {
        // An implementation of WSIFMessage, WSIFMessageElement,
        // implements toString(), which serialize the message XML.
        String message = "Failed to shutdown the service: " + faultMessage.toString();
        throw new WorkflowException(message);
    }
}
Also used : WSIFService(xsul.wsif.WSIFService) WSIFOperation(xsul.wsif.WSIFOperation) WSIFPort(xsul.wsif.WSIFPort) WorkflowException(org.apache.airavata.workflow.model.exceptions.WorkflowException) WSIFMessage(xsul.wsif.WSIFMessage)

Aggregations

WorkflowException (org.apache.airavata.workflow.model.exceptions.WorkflowException)1 WSIFMessage (xsul.wsif.WSIFMessage)1 WSIFOperation (xsul.wsif.WSIFOperation)1 WSIFPort (xsul.wsif.WSIFPort)1 WSIFService (xsul.wsif.WSIFService)1