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);
}
}
Aggregations