private String executeCommand ( HttpClientService csHttpClient , HttpClientInputs httpClientInputs , String shellId , WSManRequestInputs wsManRequestInputs , String command ) throws RuntimeException , IOException , URISyntaxException , TransformerException , XPathExpressionException , SAXException , ParserConfigurationException { String documentStr = ResourceLoader . loadAsString ( EXECUTE_COMMAND_REQUEST_XML ) ; documentStr = createExecuteCommandRequestBody ( documentStr , httpClientInputs . getUrl ( ) , shellId , command , String . valueOf ( wsManRequestInputs . getMaxEnvelopeSize ( ) ) , wsManRequestInputs . getWinrmLocale ( ) , String . valueOf ( wsManRequestInputs . getOperationTimeout ( ) ) ) ; commandExecutionStartTime = System . currentTimeMillis ( ) / 1000 ; Map < String , String > executeCommandResult = executeRequestWithBody ( csHttpClient , httpClientInputs , documentStr ) ; return getResourceId ( executeCommandResult . get ( RETURN_RESULT ) , COMMAND_RESPONSE_ACTION , COMMAND_RESULT_COMMAND_ID_XPATH , COMMAND_ID_NOT_RETRIEVED ) ; }
Executes a command on the given shell .