The ExecuteService bundles local and remote command execution operations. Its WSDL is located at http://server:port/XServices/ExecuteService?wsdl
provides remote execution facilities with authentication based on user names and passwords.
Table 2.1. rExec input parameters
parameter | type | required | description |
---|---|---|---|
host | HostConnection | Yes | Host where to execute the command. See HostConnection . |
command | String | No | Any command including arguments |
timeout | Long | Yes | Timeout in milliseconds. The command is forcefully terminated when timeout is reached. |
The ReturnCode type is used as the generic answer type for most of the BruteXservices operations.
The defining Java class is
net.brutex.xservices.types.ReturnCode
.
<xs:complexType name="ReturnCodeType"> <xs:sequence> <xs:element name="returnCode" type="xs:int"/> <xs:element minOccurs="0" name="stdOut" type="xs:string"/> <xs:element minOccurs="0" name="stdErr" type="xs:string"/> <xs:element maxOccurs="unbounded" minOccurs="0" name="propertyList" nillable="true" type="tns:antProperty"/> </xs:sequence> </xs:complexType>
<ReturnCode
xmlns:ns2="http://ws.xservices.brutex.net">
<returnCode>0</returnCode>
<stdOut/>
<stdErr/>
<propertyList>
See
tns:antProperty
for details about the <propertyList> elements.
<name>key1</name>
<value>value1</value>
</propertyList>
<propertyList>
<name>key2</name>
<value>value2</value>
</propertyList>
</ReturnCode>
Run an executable with arguments on the server providing the web service. The command is run within the environment and under the user privileges of the user who is running the Tomcat Server.
Table 2.2. runCommand input parameters
parameter | type | required | description |
---|---|---|---|
executable | String | Yes | Command to be run. The command may be specified with full path using forward slash "/" as path separator. |
argline | String | No | Any command line arguments |
timeout | Long | Yes | Timeout in milliseconds. The command is forcefully terminated when timeout is reached. |
The ReturnCode type is used as the generic answer type for most of the BruteXservices operations.
The defining Java class is
net.brutex.xservices.types.ReturnCode
.
<xs:complexType name="ReturnCodeType"> <xs:sequence> <xs:element name="returnCode" type="xs:int"/> <xs:element minOccurs="0" name="stdOut" type="xs:string"/> <xs:element minOccurs="0" name="stdErr" type="xs:string"/> <xs:element maxOccurs="unbounded" minOccurs="0" name="propertyList" nillable="true" type="tns:antProperty"/> </xs:sequence> </xs:complexType>
<ReturnCode
xmlns:ns2="http://ws.xservices.brutex.net">
<returnCode>0</returnCode>
<stdOut/>
<stdErr/>
<propertyList>
See
tns:antProperty
for details about the <propertyList> elements.
<name>key1</name>
<value>value1</value>
</propertyList>
<propertyList>
<name>key2</name>
<value>value2</value>
</propertyList>
</ReturnCode>
Executes a command through a SSH session.
Table 2.3. runCommandWithSSH input parameters
parameter | type | required | description |
---|---|---|---|
host | HostConnection | Yes | Host to connect to (see: tns:HostConnection ) |
command | String | No | The command to execute. |
timeout | Long | Yes | Timeout in milliseconds. The command is forcefully terminated when timeout is reached. |
The ReturnCode type is used as the generic answer type for most of the BruteXservices operations.
The defining Java class is
net.brutex.xservices.types.ReturnCode
.
<xs:complexType name="ReturnCodeType"> <xs:sequence> <xs:element name="returnCode" type="xs:int"/> <xs:element minOccurs="0" name="stdOut" type="xs:string"/> <xs:element minOccurs="0" name="stdErr" type="xs:string"/> <xs:element maxOccurs="unbounded" minOccurs="0" name="propertyList" nillable="true" type="tns:antProperty"/> </xs:sequence> </xs:complexType>
<ReturnCode
xmlns:ns2="http://ws.xservices.brutex.net">
<returnCode>0</returnCode>
<stdOut/>
<stdErr/>
<propertyList>
See
tns:antProperty
for details about the <propertyList> elements.
<name>key1</name>
<value>value1</value>
</propertyList>
<propertyList>
<name>key2</name>
<value>value2</value>
</propertyList>
</ReturnCode>
Runs a telnet session with an "expect shell" like behaviour.
Table 2.4. telnet input parameters
parameter | type | required | description |
---|---|---|---|
host | HostConnection | Yes | Host to connect to (see: tns:HostConnection) |
prompt | String | No | The prompt string to expect after login. This is used to recognize when the session is open. |
command | String | No | The command to execute. |
expect | String | No | The prompt to expect after the command has been executed successfully. |
timeout | Long | Yes | Timeout in milliseconds. The command is forcefully terminated when timeout is reached. |
The ReturnCode type is used as the generic answer type for most of the BruteXservices operations.
The defining Java class is
net.brutex.xservices.types.ReturnCode
.
<xs:complexType name="ReturnCodeType"> <xs:sequence> <xs:element name="returnCode" type="xs:int"/> <xs:element minOccurs="0" name="stdOut" type="xs:string"/> <xs:element minOccurs="0" name="stdErr" type="xs:string"/> <xs:element maxOccurs="unbounded" minOccurs="0" name="propertyList" nillable="true" type="tns:antProperty"/> </xs:sequence> </xs:complexType>
<ReturnCode
xmlns:ns2="http://ws.xservices.brutex.net">
<returnCode>0</returnCode>
<stdOut/>
<stdErr/>
<propertyList>
See
tns:antProperty
for details about the <propertyList> elements.
<name>key1</name>
<value>value1</value>
</propertyList>
<propertyList>
<name>key2</name>
<value>value2</value>
</propertyList>
</ReturnCode>