210 lines
		
	
	
		
			17 KiB
		
	
	
	
		
			HTML
		
	
	
	
	
	
		
		
			
		
	
	
			210 lines
		
	
	
		
			17 KiB
		
	
	
	
		
			HTML
		
	
	
	
	
	
|  | <html><head><META http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>ExecuteServices</title><link href="corpstyle.css" type="text/css" rel="stylesheet"><meta content="DocBook XSL-NS Stylesheets V1.76.1" name="generator"><link rel="home" href="index.html" title="Brutex XServices Documentation"><link rel="up" href="services.html" title="Chapter 2. Available Services"><link rel="prev" href="services.html" title="Chapter 2. Available Services"><link rel="next" href="fileservices.html" title="FileServices"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table summary="Navigation header" width="100%"><tr><th align="center" colspan="3">ExecuteServices</th></tr><tr><td align="left" width="20%"><a accesskey="p" href="services.html">Prev</a> </td><th align="center" width="60%">Chapter 2. Available Services</th><td align="right" width="20%"> <a accesskey="n" href="fileservices.html">Next</a></td></tr></table><hr></div><div class="breadcrumbs"><span class="breadcrumb-link"><a href="index.html">Brutex XServices Documentation</a></span> > <span class="breadcrumb-link"><a href="services.html">Available Services</a></span> > <span class="breadcrumb-node">ExecuteServices</span></div><div class="section" title="ExecuteServices"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="executeservices"></a>ExecuteServices</h2></div></div></div><p>The ExecuteService bundles local and remote command | ||
|  | 		execution operations. Its WSDL is located at | ||
|  | 		http://server:port/XServices/ExecuteService?wsdl</p><div class="section" title="rExec"><div class="titlepage"><div><div><h3 class="title"><a name="N10089"></a>rExec | ||
|  | 	</h3></div></div></div><p>provides remote execution facilities with authentication based on | ||
|  | 		user names and passwords.</p><div class="section" title="Input parameters"><div class="titlepage"><div><div><h4 class="title"><a name="N10092"></a>Input parameters | ||
|  | 		</h4></div></div></div><p></p><div class="table"><a name="N10096"></a><p class="title"><b>Table 2.1. rExec | ||
|  | 				input parameters | ||
|  | 			</b></p><div class="table-contents"><table summary="rExec | ||
|  | 				input parameters | ||
|  | 			" border="1"><colgroup><col class="parameter"><col class="type"><col class="required"><col class="description"></colgroup><thead><tr><th>parameter</th><th>type</th><th>required</th><th>description</th></tr></thead><tbody><tr><td>host</td><td>HostConnection</td><td>Yes</td><td> | ||
|  | 							Host where to execute the command. See | ||
|  | 							<a class="link" href="xmltypes.html#hostconnection" title="HostConnection type">HostConnection</a> | ||
|  | 							. | ||
|  | 						</td></tr><tr><td>command</td><td>String</td><td>No</td><td>Any command including arguments</td></tr><tr><td>timeout</td><td>Long</td><td>Yes</td><td>Timeout in milliseconds. The command is forcefully terminated when timeout is reached.</td></tr></tbody></table></div></div><br class="table-break"><p></p></div><div class="section" title="Output parameters"><div class="titlepage"><div><div><h4 class="title"><a name="N100D4"></a>Output parameters | ||
|  | 		</h4></div></div></div><div class="section" title="ReturnCode type"><div class="titlepage"><div><div><h5 class="title"><a name="N100D7"></a>ReturnCode type</h5></div></div></div><p> | ||
|  | 		The ReturnCode type is used as the generic answer type for most of the | ||
|  | 		<span class="application">BruteXservices</span> | ||
|  | 		operations. | ||
|  | 	</p><p> | ||
|  | 		The defining Java class is | ||
|  | 		<a class="ulink" href="javadoc/net/brutex/xservices/types/ReturnCode.html" target="_top"> | ||
|  | 			<code class="classname">net.brutex.xservices.types.ReturnCode</code> | ||
|  | 		</a> | ||
|  | 		. | ||
|  | 	</p><h4><a name="N100ED"></a>Schema definition</h4><pre class="programlisting"> | ||
|  | <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="<a class="link" href="">tns:antProperty</a>"/> | ||
|  |     </xs:sequence> | ||
|  | </xs:complexType> | ||
|  | 	</pre><h4><a name="N100F7"></a>Example XML</h4><pre class="programlisting"> | ||
|  | 		<ReturnCode | ||
|  | 		xmlns:ns2="http://ws.xservices.brutex.net"> | ||
|  | 		<returnCode>0</returnCode> | ||
|  | 		<stdOut/> | ||
|  | 		<stdErr/> | ||
|  | 		<propertyList> | ||
|  | 		<em class="lineannotation"><span class="lineannotation"> | ||
|  | 			See | ||
|  | 			<a class="link" href="">tns:antProperty</a> | ||
|  | 			for details about the <propertyList> elements. | ||
|  | 		</span></em> | ||
|  | 		<name>key1</name> | ||
|  | 		<value>value1</value> | ||
|  | 		</propertyList> | ||
|  | 		<propertyList> | ||
|  | 		<name>key2</name> | ||
|  | 		<value>value2</value> | ||
|  | 		</propertyList> | ||
|  | 		</ReturnCode> | ||
|  | 	</pre></div></div></div><div class="section" title="runCommand"><div class="titlepage"><div><div><h3 class="title"><a name="N10104"></a>runCommand</h3></div></div></div><p>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.</p><div class="section" title="Input parameters"><div class="titlepage"><div><div><h4 class="title"><a name="N1010D"></a>Input parameters | ||
|  | 		</h4></div></div></div><p></p><div class="table"><a name="N10111"></a><p class="title"><b>Table 2.2. runCommand input parameters</b></p><div class="table-contents"><table summary="runCommand input parameters" border="1"><colgroup><col class="parameter"><col class="type"><col class="required"><col class="description"></colgroup><thead><tr><th>parameter</th><th>type</th><th>required</th><th>description</th></tr></thead><tbody><tr><td>executable</td><td>String</td><td>Yes</td><td>Command to be run. The command may be specified with full | ||
|  | 							path using forward slash "/" as path separator.</td></tr><tr><td>argline</td><td>String</td><td>No</td><td>Any command line arguments</td></tr><tr><td>timeout</td><td>Long</td><td>Yes</td><td>Timeout in milliseconds. The command is forcefully terminated when timeout is reached.</td></tr></tbody></table></div></div><br class="table-break"><p></p></div><div class="section" title="Output parameters"><div class="titlepage"><div><div><h4 class="title"><a name="N1014B"></a>Output parameters | ||
|  | 		</h4></div></div></div><div class="section" title="ReturnCode type"><div class="titlepage"><div><div><h5 class="title"><a name="N1014E"></a>ReturnCode type</h5></div></div></div><p> | ||
|  | 		The ReturnCode type is used as the generic answer type for most of the | ||
|  | 		<span class="application">BruteXservices</span> | ||
|  | 		operations. | ||
|  | 	</p><p> | ||
|  | 		The defining Java class is | ||
|  | 		<a class="ulink" href="javadoc/net/brutex/xservices/types/ReturnCode.html" target="_top"> | ||
|  | 			<code class="classname">net.brutex.xservices.types.ReturnCode</code> | ||
|  | 		</a> | ||
|  | 		. | ||
|  | 	</p><h4><a name="N10164"></a>Schema definition</h4><pre class="programlisting"> | ||
|  | <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="<a class="link" href="">tns:antProperty</a>"/> | ||
|  |     </xs:sequence> | ||
|  | </xs:complexType> | ||
|  | 	</pre><h4><a name="N1016E"></a>Example XML</h4><pre class="programlisting"> | ||
|  | 		<ReturnCode | ||
|  | 		xmlns:ns2="http://ws.xservices.brutex.net"> | ||
|  | 		<returnCode>0</returnCode> | ||
|  | 		<stdOut/> | ||
|  | 		<stdErr/> | ||
|  | 		<propertyList> | ||
|  | 		<em class="lineannotation"><span class="lineannotation"> | ||
|  | 			See | ||
|  | 			<a class="link" href="">tns:antProperty</a> | ||
|  | 			for details about the <propertyList> elements. | ||
|  | 		</span></em> | ||
|  | 		<name>key1</name> | ||
|  | 		<value>value1</value> | ||
|  | 		</propertyList> | ||
|  | 		<propertyList> | ||
|  | 		<name>key2</name> | ||
|  | 		<value>value2</value> | ||
|  | 		</propertyList> | ||
|  | 		</ReturnCode> | ||
|  | 	</pre></div></div></div><div class="section" title="runCommandWithSSH"><div class="titlepage"><div><div><h3 class="title"><a name="N1017B"></a>runCommandWithSSH</h3></div></div></div><p>Executes a command through a SSH session.</p><div class="section" title="Input parameters"><div class="titlepage"><div><div><h4 class="title"><a name="N10184"></a>Input parameters | ||
|  | 		</h4></div></div></div><p></p><div class="table"><a name="N10188"></a><p class="title"><b>Table 2.3. runCommandWithSSH input parameters</b></p><div class="table-contents"><table summary="runCommandWithSSH input parameters" border="1"><colgroup><col class="parameter"><col class="type"><col class="required"><col class="description"></colgroup><thead><tr><th>parameter</th><th>type</th><th>required</th><th>description</th></tr></thead><tbody><tr><td>host</td><td>HostConnection</td><td>Yes</td><td> | ||
|  | 							Host to connect to (see: | ||
|  | 							<a class="link" href="xmltypes.html#hostconnection" title="HostConnection type">tns:HostConnection</a> | ||
|  | 							) | ||
|  | 						</td></tr><tr><td>command</td><td>String</td><td>No</td><td>The command to execute.</td></tr><tr><td>timeout</td><td>Long</td><td>Yes</td><td>Timeout in milliseconds. The command is forcefully terminated when timeout is reached.</td></tr></tbody></table></div></div><br class="table-break"><p></p></div><div class="section" title="Output parameters"><div class="titlepage"><div><div><h4 class="title"><a name="N101C6"></a>Output parameters | ||
|  | 		</h4></div></div></div><div class="section" title="ReturnCode type"><div class="titlepage"><div><div><h5 class="title"><a name="N101C9"></a>ReturnCode type</h5></div></div></div><p> | ||
|  | 		The ReturnCode type is used as the generic answer type for most of the | ||
|  | 		<span class="application">BruteXservices</span> | ||
|  | 		operations. | ||
|  | 	</p><p> | ||
|  | 		The defining Java class is | ||
|  | 		<a class="ulink" href="javadoc/net/brutex/xservices/types/ReturnCode.html" target="_top"> | ||
|  | 			<code class="classname">net.brutex.xservices.types.ReturnCode</code> | ||
|  | 		</a> | ||
|  | 		. | ||
|  | 	</p><h4><a name="N101DF"></a>Schema definition</h4><pre class="programlisting"> | ||
|  | <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="<a class="link" href="">tns:antProperty</a>"/> | ||
|  |     </xs:sequence> | ||
|  | </xs:complexType> | ||
|  | 	</pre><h4><a name="N101E9"></a>Example XML</h4><pre class="programlisting"> | ||
|  | 		<ReturnCode | ||
|  | 		xmlns:ns2="http://ws.xservices.brutex.net"> | ||
|  | 		<returnCode>0</returnCode> | ||
|  | 		<stdOut/> | ||
|  | 		<stdErr/> | ||
|  | 		<propertyList> | ||
|  | 		<em class="lineannotation"><span class="lineannotation"> | ||
|  | 			See | ||
|  | 			<a class="link" href="">tns:antProperty</a> | ||
|  | 			for details about the <propertyList> elements. | ||
|  | 		</span></em> | ||
|  | 		<name>key1</name> | ||
|  | 		<value>value1</value> | ||
|  | 		</propertyList> | ||
|  | 		<propertyList> | ||
|  | 		<name>key2</name> | ||
|  | 		<value>value2</value> | ||
|  | 		</propertyList> | ||
|  | 		</ReturnCode> | ||
|  | 	</pre></div></div><div class="section" title="Sample Request:"><div class="titlepage"><div><div><h4 class="title"><a name="N101F6"></a>Sample Request:</h4></div></div></div><pre class="programlisting"> | ||
|  | 	 | ||
|  |       <ws:runCommandWithSSH> | ||
|  |          <host> | ||
|  |             <hostname>ssh.brutex.net</hostname> | ||
|  |             <port>22</port> | ||
|  |             <user>roger</user> | ||
|  |             <password>xxx</password> | ||
|  |          </host> | ||
|  |          <command>ls /etc/</command> | ||
|  |          <timeout>30000</timeout> | ||
|  |       </ws:runCommandWithSSH> | ||
|  | 	</pre></div></div><div class="section" title="telnet"><div class="titlepage"><div><div><h3 class="title"><a name="N101FC"></a>telnet</h3></div></div></div><p>Runs a telnet session with an "expect shell" like behaviour.</p><div class="section" title="Input parameters"><div class="titlepage"><div><div><h4 class="title"><a name="N10205"></a>Input parameters | ||
|  | 		</h4></div></div></div><p></p><div class="table"><a name="N10209"></a><p class="title"><b>Table 2.4. telnet input parameters</b></p><div class="table-contents"><table summary="telnet input parameters" border="1"><colgroup><col class="parameter"><col class="type"><col class="required"><col class="description"></colgroup><thead><tr><th>parameter</th><th>type</th><th>required</th><th>description</th></tr></thead><tbody><tr><td>host</td><td>HostConnection</td><td>Yes</td><td>Host to connect to (see: <a class="link" href="xmltypes.html#hostconnection" title="HostConnection type">tns:HostConnection</a>)</td></tr><tr><td>prompt</td><td>String</td><td>No</td><td>The prompt string to expect after login. This is used to recognize when | ||
|  | 						 the session is open.</td></tr><tr><td>command</td><td>String</td><td>No</td><td>The command to execute.</td></tr><tr><td>expect</td><td>String</td><td>No</td><td>The prompt to expect after the command has been executed successfully.</td></tr><tr><td>timeout</td><td>Long</td><td>Yes</td><td>Timeout in milliseconds. The command is forcefully terminated when timeout is reached.</td></tr></tbody></table></div></div><br class="table-break"><p></p></div><div class="section" title="Output parameters"><div class="titlepage"><div><div><h4 class="title"><a name="N10259"></a>Output parameters</h4></div></div></div><div class="section" title="ReturnCode type"><div class="titlepage"><div><div><h5 class="title"><a name="N1025C"></a>ReturnCode type</h5></div></div></div><p> | ||
|  | 		The ReturnCode type is used as the generic answer type for most of the | ||
|  | 		<span class="application">BruteXservices</span> | ||
|  | 		operations. | ||
|  | 	</p><p> | ||
|  | 		The defining Java class is | ||
|  | 		<a class="ulink" href="javadoc/net/brutex/xservices/types/ReturnCode.html" target="_top"> | ||
|  | 			<code class="classname">net.brutex.xservices.types.ReturnCode</code> | ||
|  | 		</a> | ||
|  | 		. | ||
|  | 	</p><h4><a name="N10272"></a>Schema definition</h4><pre class="programlisting"> | ||
|  | <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="<a class="link" href="">tns:antProperty</a>"/> | ||
|  |     </xs:sequence> | ||
|  | </xs:complexType> | ||
|  | 	</pre><h4><a name="N1027C"></a>Example XML</h4><pre class="programlisting"> | ||
|  | 		<ReturnCode | ||
|  | 		xmlns:ns2="http://ws.xservices.brutex.net"> | ||
|  | 		<returnCode>0</returnCode> | ||
|  | 		<stdOut/> | ||
|  | 		<stdErr/> | ||
|  | 		<propertyList> | ||
|  | 		<em class="lineannotation"><span class="lineannotation"> | ||
|  | 			See | ||
|  | 			<a class="link" href="">tns:antProperty</a> | ||
|  | 			for details about the <propertyList> elements. | ||
|  | 		</span></em> | ||
|  | 		<name>key1</name> | ||
|  | 		<value>value1</value> | ||
|  | 		</propertyList> | ||
|  | 		<propertyList> | ||
|  | 		<name>key2</name> | ||
|  | 		<value>value2</value> | ||
|  | 		</propertyList> | ||
|  | 		</ReturnCode> | ||
|  | 	</pre></div></div><div class="section" title="Sample Request:"><div class="titlepage"><div><div><h4 class="title"><a name="N10289"></a>Sample Request:</h4></div></div></div><pre class="programlisting"> | ||
|  | 	 | ||
|  | 	 <ws:telnet> | ||
|  |          <host> | ||
|  |             <hostname>localhost</hostname> | ||
|  |             <port>23</port> | ||
|  |             <user>brosenberger</user> | ||
|  |             <password></password> | ||
|  |          </host> | ||
|  |          <prompt>C:\Users\brosenberger&gt;</prompt> | ||
|  |          <command>dir c:\temp</command> | ||
|  |          <expect>enberger&gt;</expect> | ||
|  |          <timeout>60000</timeout> | ||
|  |       </ws:telnet> | ||
|  | 	</pre></div></div></div><div class="navfooter"><hr><table summary="Navigation footer" width="100%"><tr><td align="left" width="40%"><a accesskey="p" href="services.html">Prev</a> </td><td align="center" width="20%"><a accesskey="u" href="services.html">Up</a></td><td align="right" width="40%"> <a accesskey="n" href="fileservices.html">Next</a></td></tr><tr><td valign="top" align="left" width="40%">Chapter 2. Available Services </td><td align="center" width="20%"><a accesskey="h" href="index.html">Home</a></td><td valign="top" align="right" width="40%"> FileServices</td></tr></table></div></body></html> |