64 |
brianR |
1 |
<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
|
|
|
2 |
execution operations. Its WSDL is located at
|
|
|
3 |
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
|
|
|
4 |
</h3></div></div></div><p>provides remote execution facilities with authentication based on
|
|
|
5 |
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
|
|
|
6 |
</h4></div></div></div><p></p><div class="table"><a name="N10096"></a><p class="title"><b>Table 2.1. rExec
|
|
|
7 |
input parameters
|
|
|
8 |
</b></p><div class="table-contents"><table summary="rExec
|
|
|
9 |
input parameters
|
|
|
10 |
" 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>
|
|
|
11 |
Host where to execute the command. See
|
|
|
12 |
<a class="link" href="xmltypes.html#hostconnection" title="HostConnection type">HostConnection</a>
|
|
|
13 |
.
|
|
|
14 |
</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
|
|
|
15 |
</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>
|
|
|
16 |
The ReturnCode type is used as the generic answer type for most of the
|
|
|
17 |
<span class="application">BruteXservices</span>
|
|
|
18 |
operations.
|
|
|
19 |
</p><p>
|
|
|
20 |
The defining Java class is
|
|
|
21 |
<a class="ulink" href="javadoc/net/brutex/xservices/types/ReturnCode.html" target="_top">
|
|
|
22 |
<code class="classname">net.brutex.xservices.types.ReturnCode</code>
|
|
|
23 |
</a>
|
|
|
24 |
.
|
|
|
25 |
</p><h4><a name="N100ED"></a>Schema definition</h4><pre class="programlisting">
|
|
|
26 |
<xs:complexType name="ReturnCodeType">
|
|
|
27 |
<xs:sequence>
|
|
|
28 |
<xs:element name="returnCode" type="xs:int"/>
|
|
|
29 |
<xs:element minOccurs="0" name="stdOut" type="xs:string"/>
|
|
|
30 |
<xs:element minOccurs="0" name="stdErr" type="xs:string"/>
|
|
|
31 |
<xs:element maxOccurs="unbounded" minOccurs="0" name="propertyList" nillable="true" type="<a class="link" href="">tns:antProperty</a>"/>
|
|
|
32 |
</xs:sequence>
|
|
|
33 |
</xs:complexType>
|
|
|
34 |
</pre><h4><a name="N100F7"></a>Example XML</h4><pre class="programlisting">
|
|
|
35 |
<ReturnCode
|
|
|
36 |
xmlns:ns2="http://ws.xservices.brutex.net">
|
|
|
37 |
<returnCode>0</returnCode>
|
|
|
38 |
<stdOut/>
|
|
|
39 |
<stdErr/>
|
|
|
40 |
<propertyList>
|
|
|
41 |
<em class="lineannotation"><span class="lineannotation">
|
|
|
42 |
See
|
|
|
43 |
<a class="link" href="">tns:antProperty</a>
|
|
|
44 |
for details about the <propertyList> elements.
|
|
|
45 |
</span></em>
|
|
|
46 |
<name>key1</name>
|
|
|
47 |
<value>value1</value>
|
|
|
48 |
</propertyList>
|
|
|
49 |
<propertyList>
|
|
|
50 |
<name>key2</name>
|
|
|
51 |
<value>value2</value>
|
|
|
52 |
</propertyList>
|
|
|
53 |
</ReturnCode>
|
|
|
54 |
</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
|
|
|
55 |
service. The command is run within the environment and under the user
|
|
|
56 |
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
|
|
|
57 |
</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
|
|
|
58 |
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
|
|
|
59 |
</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>
|
|
|
60 |
The ReturnCode type is used as the generic answer type for most of the
|
|
|
61 |
<span class="application">BruteXservices</span>
|
|
|
62 |
operations.
|
|
|
63 |
</p><p>
|
|
|
64 |
The defining Java class is
|
|
|
65 |
<a class="ulink" href="javadoc/net/brutex/xservices/types/ReturnCode.html" target="_top">
|
|
|
66 |
<code class="classname">net.brutex.xservices.types.ReturnCode</code>
|
|
|
67 |
</a>
|
|
|
68 |
.
|
|
|
69 |
</p><h4><a name="N10164"></a>Schema definition</h4><pre class="programlisting">
|
|
|
70 |
<xs:complexType name="ReturnCodeType">
|
|
|
71 |
<xs:sequence>
|
|
|
72 |
<xs:element name="returnCode" type="xs:int"/>
|
|
|
73 |
<xs:element minOccurs="0" name="stdOut" type="xs:string"/>
|
|
|
74 |
<xs:element minOccurs="0" name="stdErr" type="xs:string"/>
|
|
|
75 |
<xs:element maxOccurs="unbounded" minOccurs="0" name="propertyList" nillable="true" type="<a class="link" href="">tns:antProperty</a>"/>
|
|
|
76 |
</xs:sequence>
|
|
|
77 |
</xs:complexType>
|
|
|
78 |
</pre><h4><a name="N1016E"></a>Example XML</h4><pre class="programlisting">
|
|
|
79 |
<ReturnCode
|
|
|
80 |
xmlns:ns2="http://ws.xservices.brutex.net">
|
|
|
81 |
<returnCode>0</returnCode>
|
|
|
82 |
<stdOut/>
|
|
|
83 |
<stdErr/>
|
|
|
84 |
<propertyList>
|
|
|
85 |
<em class="lineannotation"><span class="lineannotation">
|
|
|
86 |
See
|
|
|
87 |
<a class="link" href="">tns:antProperty</a>
|
|
|
88 |
for details about the <propertyList> elements.
|
|
|
89 |
</span></em>
|
|
|
90 |
<name>key1</name>
|
|
|
91 |
<value>value1</value>
|
|
|
92 |
</propertyList>
|
|
|
93 |
<propertyList>
|
|
|
94 |
<name>key2</name>
|
|
|
95 |
<value>value2</value>
|
|
|
96 |
</propertyList>
|
|
|
97 |
</ReturnCode>
|
|
|
98 |
</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
|
|
|
99 |
</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>
|
|
|
100 |
Host to connect to (see:
|
|
|
101 |
<a class="link" href="xmltypes.html#hostconnection" title="HostConnection type">tns:HostConnection</a>
|
|
|
102 |
)
|
|
|
103 |
</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
|
|
|
104 |
</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>
|
|
|
105 |
The ReturnCode type is used as the generic answer type for most of the
|
|
|
106 |
<span class="application">BruteXservices</span>
|
|
|
107 |
operations.
|
|
|
108 |
</p><p>
|
|
|
109 |
The defining Java class is
|
|
|
110 |
<a class="ulink" href="javadoc/net/brutex/xservices/types/ReturnCode.html" target="_top">
|
|
|
111 |
<code class="classname">net.brutex.xservices.types.ReturnCode</code>
|
|
|
112 |
</a>
|
|
|
113 |
.
|
|
|
114 |
</p><h4><a name="N101DF"></a>Schema definition</h4><pre class="programlisting">
|
|
|
115 |
<xs:complexType name="ReturnCodeType">
|
|
|
116 |
<xs:sequence>
|
|
|
117 |
<xs:element name="returnCode" type="xs:int"/>
|
|
|
118 |
<xs:element minOccurs="0" name="stdOut" type="xs:string"/>
|
|
|
119 |
<xs:element minOccurs="0" name="stdErr" type="xs:string"/>
|
|
|
120 |
<xs:element maxOccurs="unbounded" minOccurs="0" name="propertyList" nillable="true" type="<a class="link" href="">tns:antProperty</a>"/>
|
|
|
121 |
</xs:sequence>
|
|
|
122 |
</xs:complexType>
|
|
|
123 |
</pre><h4><a name="N101E9"></a>Example XML</h4><pre class="programlisting">
|
|
|
124 |
<ReturnCode
|
|
|
125 |
xmlns:ns2="http://ws.xservices.brutex.net">
|
|
|
126 |
<returnCode>0</returnCode>
|
|
|
127 |
<stdOut/>
|
|
|
128 |
<stdErr/>
|
|
|
129 |
<propertyList>
|
|
|
130 |
<em class="lineannotation"><span class="lineannotation">
|
|
|
131 |
See
|
|
|
132 |
<a class="link" href="">tns:antProperty</a>
|
|
|
133 |
for details about the <propertyList> elements.
|
|
|
134 |
</span></em>
|
|
|
135 |
<name>key1</name>
|
|
|
136 |
<value>value1</value>
|
|
|
137 |
</propertyList>
|
|
|
138 |
<propertyList>
|
|
|
139 |
<name>key2</name>
|
|
|
140 |
<value>value2</value>
|
|
|
141 |
</propertyList>
|
|
|
142 |
</ReturnCode>
|
|
|
143 |
</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">
|
|
|
144 |
|
|
|
145 |
<ws:runCommandWithSSH>
|
|
|
146 |
<host>
|
|
|
147 |
<hostname>ssh.brutex.net</hostname>
|
|
|
148 |
<port>22</port>
|
|
|
149 |
<user>roger</user>
|
|
|
150 |
<password>xxx</password>
|
|
|
151 |
</host>
|
|
|
152 |
<command>ls /etc/</command>
|
|
|
153 |
<timeout>30000</timeout>
|
|
|
154 |
</ws:runCommandWithSSH>
|
|
|
155 |
</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
|
|
|
156 |
</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
|
|
|
157 |
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>
|
|
|
158 |
The ReturnCode type is used as the generic answer type for most of the
|
|
|
159 |
<span class="application">BruteXservices</span>
|
|
|
160 |
operations.
|
|
|
161 |
</p><p>
|
|
|
162 |
The defining Java class is
|
|
|
163 |
<a class="ulink" href="javadoc/net/brutex/xservices/types/ReturnCode.html" target="_top">
|
|
|
164 |
<code class="classname">net.brutex.xservices.types.ReturnCode</code>
|
|
|
165 |
</a>
|
|
|
166 |
.
|
|
|
167 |
</p><h4><a name="N10272"></a>Schema definition</h4><pre class="programlisting">
|
|
|
168 |
<xs:complexType name="ReturnCodeType">
|
|
|
169 |
<xs:sequence>
|
|
|
170 |
<xs:element name="returnCode" type="xs:int"/>
|
|
|
171 |
<xs:element minOccurs="0" name="stdOut" type="xs:string"/>
|
|
|
172 |
<xs:element minOccurs="0" name="stdErr" type="xs:string"/>
|
|
|
173 |
<xs:element maxOccurs="unbounded" minOccurs="0" name="propertyList" nillable="true" type="<a class="link" href="">tns:antProperty</a>"/>
|
|
|
174 |
</xs:sequence>
|
|
|
175 |
</xs:complexType>
|
|
|
176 |
</pre><h4><a name="N1027C"></a>Example XML</h4><pre class="programlisting">
|
|
|
177 |
<ReturnCode
|
|
|
178 |
xmlns:ns2="http://ws.xservices.brutex.net">
|
|
|
179 |
<returnCode>0</returnCode>
|
|
|
180 |
<stdOut/>
|
|
|
181 |
<stdErr/>
|
|
|
182 |
<propertyList>
|
|
|
183 |
<em class="lineannotation"><span class="lineannotation">
|
|
|
184 |
See
|
|
|
185 |
<a class="link" href="">tns:antProperty</a>
|
|
|
186 |
for details about the <propertyList> elements.
|
|
|
187 |
</span></em>
|
|
|
188 |
<name>key1</name>
|
|
|
189 |
<value>value1</value>
|
|
|
190 |
</propertyList>
|
|
|
191 |
<propertyList>
|
|
|
192 |
<name>key2</name>
|
|
|
193 |
<value>value2</value>
|
|
|
194 |
</propertyList>
|
|
|
195 |
</ReturnCode>
|
|
|
196 |
</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">
|
|
|
197 |
|
|
|
198 |
<ws:telnet>
|
|
|
199 |
<host>
|
|
|
200 |
<hostname>localhost</hostname>
|
|
|
201 |
<port>23</port>
|
|
|
202 |
<user>brosenberger</user>
|
|
|
203 |
<password></password>
|
|
|
204 |
</host>
|
|
|
205 |
<prompt>C:\Users\brosenberger&gt;</prompt>
|
|
|
206 |
<command>dir c:\temp</command>
|
|
|
207 |
<expect>enberger&gt;</expect>
|
|
|
208 |
<timeout>60000</timeout>
|
|
|
209 |
</ws:telnet>
|
|
|
210 |
</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>
|