Subversion Repositories XServices

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
24 brianR 1
<html>
2
<head>
3
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
4
<title>BruteXservices User Guide</title>
5
<meta name="generator" content="DocBook XSL Stylesheets V1.68.1">
6
</head>
7
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="book" lang="en">
8
<div class="titlepage">
9
<div>
10
<div><h1 class="title">
11
<a name="id2521065"></a><span class="application">BruteXservices</span> User Guide</h1></div>
12
<div><div class="author">
13
<h3 class="author">
14
<span class="firstname">Brian</span> <span class="surname">Rosenberger</span>
15
</h3>
16
<code class="email">&lt;<a href="mailto:bru@brutex.de">bru@brutex.de</a>&gt;</code>
17
</div></div>
18
<div><p class="copyright">Copyright © 2010 </p></div>
19
</div>
20
<hr>
21
</div>
22
<div class="toc">
23
<p><b>Table of Contents</b></p>
24
<dl>
25
<dt><span class="chapter"><a href="#id2530556">1. Abstract</a></span></dt>
26
<dt><span class="chapter"><a href="#id2521271">2. Getting startet</a></span></dt>
27
<dd><dl>
28
<dt><span class="sect1"><a href="#id2521225">Prerequisites</a></span></dt>
29
<dt><span class="sect1"><a href="#id2521243">Installation</a></span></dt>
30
<dd><dl>
31
<dt><span class="sect2"><a href="#id2521256">Securing <span class="application">BruteXservices</span> with Basic Authentication</a></span></dt>
32
<dt><span class="sect2"><a href="#id2520669">Limit access to <span class="application">BruteXservices</span></a></span></dt>
33
</dl></dd>
34
</dl></dd>
35
<dt><span class="chapter"><a href="#id2520743">3. <span class="application">BruteXservices</span></a></span></dt>
36
<dd><dl>
37
<dt><span class="section"><a href="#id2535352">ArchiveServices</a></span></dt>
38
<dt><span class="section"><a href="#id2520621">ExecuteServices</a></span></dt>
39
<dd><dl><dt><span class="section"><a href="#id2521931">runCommand</a></span></dt></dl></dd>
40
</dl></dd>
41
<dt><span class="chapter"><a href="#id2521830">4. XML Types</a></span></dt>
42
<dd><dl>
43
<dt><span class="section"><a href="#id2576253">ReturnCode type</a></span></dt>
44
<dd><dl>
45
<dt><span class="section"><a href="#id2576303">Schema description</a></span></dt>
46
<dt><span class="section"><a href="#id2576332">Example XML </a></span></dt>
47
</dl></dd>
48
<dt><span class="section"><a href="#antproperty">AntProperty type</a></span></dt>
49
<dd><dl>
50
<dt><span class="section"><a href="#id2535328">Schema description</a></span></dt>
51
<dt><span class="section"><a href="#id2535342">Example XML </a></span></dt>
52
</dl></dd>
53
<dt><span class="section"><a href="#patternelement">PatternElement type</a></span></dt>
54
<dd><dl>
55
<dt><span class="section"><a href="#id2534657">Schema description</a></span></dt>
56
<dt><span class="section"><a href="#id2534676">Example XML</a></span></dt>
57
</dl></dd>
58
</dl></dd>
59
</dl>
60
</div>
61
<div class="list-of-tables">
62
<p><b>List of Tables</b></p>
63
<dl><dt>3.1. <a href="#id2521913">runCommand input parameters</a>
64
</dt></dl>
65
</div>
66
<div class="chapter" lang="en">
67
<div class="titlepage"><div><div><h2 class="title">
68
<a name="id2530556"></a>Chapter 1. Abstract</h2></div></div></div>
69
<p>In complex IT environments it is necessary to integrate different information systems with each other, exchange data between tools and automate actions and function calls depending on events arising from user interaction. To meet the requirements of integration building usually means to implement APIs and to create tool-to-tool bridges. Web Services can help to clean up bridges into interfaces as well as to abstract functions from their underlying platform and implementation.</p>
70
<p>These are the major goals of the loosely coupled integration strategy which is in turn one essential idea of a service-oriented architecture (SOA).</p>
71
<p><span class="application">BruteXservices</span> provide a low level set of functions and web services. These can be orchestrated into services and used in business processes which make up the execution part of a SOA environment.</p>
72
<p><span class="application">BruteXservices</span> is an add-on to XBridgeNG 2.0. It runs standalone or in combination with XBridgeNG. Pure XBridgeNG has two components:</p>
73
<div class="itemizedlist"><ul type="disc">
74
<li><p>XML Schema for item based data types (e.g. tickets from a bug tracker system or a database record)</p></li>
75
<li><p>Set of Apache Ant tasks to function as a bridge between the XBridgeNG XML format at legacy 3rd party software (e.g. HP Quality Center, Serena TeamTrack, &#8230;)
76
</p></li>
77
<li><p>The <span class="application">BruteXservices</span> add
78
 Web Services (SOAP) wrapper around Apache Ant tasks (since XBridgeNG 2.0)</p></li>
79
</ul></div>
80
<p>The current focus is on file-based operations. <span class="application">BruteXservices</span> do not contain an integration server or a process execution engine.</p>
81
</div>
82
<div class="chapter" lang="en">
83
<div class="titlepage"><div><div><h2 class="title">
84
<a name="id2521271"></a>Chapter 2. Getting startet</h2></div></div></div>
85
<div class="toc">
86
<p><b>Table of Contents</b></p>
87
<dl>
88
<dt><span class="sect1"><a href="#id2521225">Prerequisites</a></span></dt>
89
<dt><span class="sect1"><a href="#id2521243">Installation</a></span></dt>
90
<dd><dl>
91
<dt><span class="sect2"><a href="#id2521256">Securing <span class="application">BruteXservices</span> with Basic Authentication</a></span></dt>
92
<dt><span class="sect2"><a href="#id2520669">Limit access to <span class="application">BruteXservices</span></a></span></dt>
93
</dl></dd>
94
</dl>
95
</div>
96
<p>This chapter describes the installation.</p>
97
<div class="sect1" lang="en">
98
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
99
<a name="id2521225"></a>Prerequisites</h2></div></div></div>
100
<p>tbd.</p>
101
<p>Sun Java SE 1.6.0</p>
102
<p>Apache Tomcat 6</p>
103
</div>
104
<div class="sect1" lang="en">
105
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
106
<a name="id2521243"></a>Installation</h2></div></div></div>
107
<p>tbd.</p>
108
<p>In short: Deploy .WAR file to Apache Tomcat</p>
109
<div class="sect2" lang="en">
110
<div class="titlepage"><div><div><h3 class="title">
111
<a name="id2521256"></a>Securing <span class="application">BruteXservices</span> with Basic Authentication</h3></div></div></div>
112
<p>There is a quick guide explaining Basic Authentication for Tomcat here: </p>
113
<p><a href="http://oreilly.com/pub/a/java/archive/tomcat-tips.html?page=1" target="_top">http://oreilly.com/pub/a/java/archive/tomcat-tips.html?page=1</a></p>
114
</div>
115
<div class="sect2" lang="en">
116
<div class="titlepage"><div><div><h3 class="title">
117
<a name="id2520669"></a>Limit access to <span class="application">BruteXservices</span>
118
</h3></div></div></div>
119
<p>Sometimes you'll only want to restrict access to <span class="application">BruteXservices</span> to only specified host names or IP addresses. This way, only clients at those specified addresses can use the <span class="application">BruteXservices</span> web services. Tomcat provides two configuration values for that: RemoteHostValve and RemoteAddrValve.</p>
120
<p>These Valves allow you to filter requests by host name or by IP address, and to allow or deny hosts that match. The example below restricts access to the ArchiveService from any machine that is not the local host.</p>
121
<pre class="programlisting">&lt;Context path="/XService/ArchiveService" ...&gt;
122
                &lt;Valve className="org.apache.catalina.valves.RemoteAddrValve"
123
                allow="127.0.0.1" deny=""/&gt;
124
            &lt;/Context&gt;</pre>
125
<p>If no allow pattern is given, then patterns that match the deny attribute patterns will be rejected, and all others will be allowed. Similarly, if no deny pattern is given, patterns that match the allow attribute will be allowed, and all others will be denied.</p>
126
<p>The &lt;context&gt; element must be placed into the server.xml file (into &lt;engine&gt;&lt;host&gt;).</p>
127
</div>
128
</div>
129
</div>
130
<div class="chapter" lang="en">
131
<div class="titlepage"><div><div><h2 class="title">
132
<a name="id2520743"></a>Chapter 3. <span class="application">BruteXservices</span>
133
</h2></div></div></div>
134
<div class="toc">
135
<p><b>Table of Contents</b></p>
136
<dl>
137
<dt><span class="section"><a href="#id2535352">ArchiveServices</a></span></dt>
138
<dt><span class="section"><a href="#id2520621">ExecuteServices</a></span></dt>
139
<dd><dl><dt><span class="section"><a href="#id2521931">runCommand</a></span></dt></dl></dd>
140
</dl>
141
</div>
142
<div class="section" lang="en">
143
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
144
<a name="id2535352"></a>ArchiveServices</h2></div></div></div>
145
<p>The ArchiveService bundles file packing operations. Its WSDL is located at
146
http://server:port/XServices/ArchiveService?wsdl</p>
147
</div>
148
<div class="section" lang="en">
149
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
150
<a name="id2520621"></a>ExecuteServices</h2></div></div></div>
151
<p>The ExecuteService bundles local and remote command execution operations. Its WSDL is located at
152
http://server:port/XServices/ExecuteService?wsdl</p>
153
<div class="section" lang="en">
154
<div class="titlepage"><div><div><h3 class="title">
155
<a name="id2521931"></a>runCommand</h3></div></div></div>
156
<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>
157
<div class="section" lang="en">
158
<div class="titlepage"><div><div><h4 class="title">
159
<a name="id2521943"></a>Input parameters</h4></div></div></div>
160
<p></p>
161
<div class="table">
162
<a name="id2521913"></a><p class="title"><b>Table 3.1. runCommand input parameters</b></p>
163
<table summary="runCommand input parameters" border="1">
164
<colgroup>
165
<col>
166
<col>
167
<col>
168
<col>
169
</colgroup>
170
<thead><tr>
171
<th>parameter</th>
172
<th>type</th>
173
<th>required</th>
174
<th>description</th>
175
</tr></thead>
176
<tbody>
177
<tr>
178
<td>executable</td>
179
<td>String</td>
180
<td>Yes</td>
181
<td>Command to be run. The command may be specified with full path using forward slash &#8220;/&#8221; as path separator.</td>
182
</tr>
183
<tr>
184
<td>argline</td>
185
<td>String</td>
186
<td>No</td>
187
<td>Any command line arguments</td>
188
</tr>
189
<tr>
190
<td>timeout</td>
191
<td>Long</td>
192
<td>Yes</td>
193
<td>Timeout in milliseconds. The command is forcefully terminated when timeout is reached.</td>
194
</tr>
195
</tbody>
196
</table>
197
</div>
198
<p></p>
199
<div class="section" lang="en">
200
<div class="titlepage"><div><div><h5 class="title">
201
<a name="id2576228"></a>ReturnCode type</h5></div></div></div>
202
<p>The ReturnCode type is used as the generic answer type for most of the <span class="application">BruteXservices</span> operations.</p>
203
<p>The defining Java class is
204
  <a href="javadoc/net/brutex/xservices/types/ReturnCode.html" target="_top">
205
      <code class="classname">net.brutex.xservices.types.ReturnCode</code></a>.</p>
206
<div class="section" lang="en">
207
<div class="titlepage"><div><div><h6 class="title">
208
<a name="id2576194"></a>Schema description</h6></div></div></div>
209
<pre class="programlisting">
210
&lt;xs:complexType name="ReturnCodeType"&gt;
211
    &lt;xs:sequence&gt;
212
       &lt;xs:element name="returnCode" type="xs:int"/&gt;
213
       &lt;xs:element minOccurs="0" name="stdOut" type="xs:string"/&gt;
214
       &lt;xs:element minOccurs="0" name="stdErr" type="xs:string"/&gt;
215
            &lt;xs:element maxOccurs="unbounded" minOccurs="0" name="propertyList" nillable="true" type="<a href="#antproperty" title="AntProperty type">tns:antProperty</a>"/&gt;
216
    &lt;/xs:sequence&gt;
217
            &lt;/xs:complexType&gt;
218
        </pre>
219
</div>
220
<div class="section" lang="en">
221
<div class="titlepage"><div><div><h6 class="title">
222
<a name="id2576265"></a>Example XML </h6></div></div></div>
223
<pre class="programlisting">&lt;ReturnCode xmlns:ns2="http://ws.xservices.brutex.net"&gt;
224
            &lt;returnCode&gt;0&lt;/returnCode&gt;
225
            &lt;stdOut/&gt;
226
            &lt;stdErr/&gt;
227
            &lt;propertyList&gt;            <em class="lineannotation"><span class="lineannotation">See <a href="#antproperty" title="AntProperty type">tns:antProperty</a> for details about the &lt;propertyList&gt; elements.</span></em>
228
            &lt;name&gt;key1&lt;/name&gt;
229
            &lt;value&gt;value1&lt;/value&gt;
230
            &lt;/propertyList&gt;
231
            &lt;propertyList&gt;
232
            &lt;name&gt;key2&lt;/name&gt;
233
            &lt;value&gt;value2&lt;/value&gt;
234
            &lt;/propertyList&gt;
235
        &lt;/ReturnCode&gt;</pre>
236
</div>
237
</div>
238
</div>
239
</div>
240
</div>
241
</div>
242
<div class="chapter" lang="en">
243
<div class="titlepage"><div><div><h2 class="title">
244
<a name="id2521830"></a>Chapter 4. XML Types</h2></div></div></div>
245
<div class="toc">
246
<p><b>Table of Contents</b></p>
247
<dl>
248
<dt><span class="section"><a href="#id2576253">ReturnCode type</a></span></dt>
249
<dd><dl>
250
<dt><span class="section"><a href="#id2576303">Schema description</a></span></dt>
251
<dt><span class="section"><a href="#id2576332">Example XML </a></span></dt>
252
</dl></dd>
253
<dt><span class="section"><a href="#antproperty">AntProperty type</a></span></dt>
254
<dd><dl>
255
<dt><span class="section"><a href="#id2535328">Schema description</a></span></dt>
256
<dt><span class="section"><a href="#id2535342">Example XML </a></span></dt>
257
</dl></dd>
258
<dt><span class="section"><a href="#patternelement">PatternElement type</a></span></dt>
259
<dd><dl>
260
<dt><span class="section"><a href="#id2534657">Schema description</a></span></dt>
261
<dt><span class="section"><a href="#id2534676">Example XML</a></span></dt>
262
</dl></dd>
263
</dl>
264
</div>
265
<p>This chapter bundles the documentation for common xml types used by XServices web service.</p>
266
<div class="section" lang="en">
267
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
268
<a name="id2576253"></a>ReturnCode type</h2></div></div></div>
269
<p>The ReturnCode type is used as the generic answer type for most of the <span class="application">BruteXservices</span> operations.</p>
270
<p>The defining Java class is
271
  <a href="javadoc/net/brutex/xservices/types/ReturnCode.html" target="_top">
272
      <code class="classname">net.brutex.xservices.types.ReturnCode</code></a>.</p>
273
<div class="section" lang="en">
274
<div class="titlepage"><div><div><h3 class="title">
275
<a name="id2576303"></a>Schema description</h3></div></div></div>
276
<pre class="programlisting">
277
&lt;xs:complexType name="ReturnCodeType"&gt;
278
    &lt;xs:sequence&gt;
279
       &lt;xs:element name="returnCode" type="xs:int"/&gt;
280
       &lt;xs:element minOccurs="0" name="stdOut" type="xs:string"/&gt;
281
       &lt;xs:element minOccurs="0" name="stdErr" type="xs:string"/&gt;
282
            &lt;xs:element maxOccurs="unbounded" minOccurs="0" name="propertyList" nillable="true" type="<a href="#antproperty" title="AntProperty type">tns:antProperty</a>"/&gt;
283
    &lt;/xs:sequence&gt;
284
            &lt;/xs:complexType&gt;
285
        </pre>
286
</div>
287
<div class="section" lang="en">
288
<div class="titlepage"><div><div><h3 class="title">
289
<a name="id2576332"></a>Example XML </h3></div></div></div>
290
<pre class="programlisting">&lt;ReturnCode xmlns:ns2="http://ws.xservices.brutex.net"&gt;
291
            &lt;returnCode&gt;0&lt;/returnCode&gt;
292
            &lt;stdOut/&gt;
293
            &lt;stdErr/&gt;
294
            &lt;propertyList&gt;            <em class="lineannotation"><span class="lineannotation">See <a href="#antproperty" title="AntProperty type">tns:antProperty</a> for details about the &lt;propertyList&gt; elements.</span></em>
295
            &lt;name&gt;key1&lt;/name&gt;
296
            &lt;value&gt;value1&lt;/value&gt;
297
            &lt;/propertyList&gt;
298
            &lt;propertyList&gt;
299
            &lt;name&gt;key2&lt;/name&gt;
300
            &lt;value&gt;value2&lt;/value&gt;
301
            &lt;/propertyList&gt;
302
        &lt;/ReturnCode&gt;</pre>
303
</div>
304
</div>
305
<div class="section" lang="en">
306
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
307
<a name="antproperty"></a>AntProperty type</h2></div></div></div>
308
<p>The AntProperty type defines a list of key/value pairs.</p>
309
<p>The defining Java class is
310
  <a href="javadoc/net/brutex/xservices/types/AntProperty.html" target="_top">
311
      <code class="classname">net.brutex.xservices.types.AntProperty</code></a>.</p>
312
<div class="section" lang="en">
313
<div class="titlepage"><div><div><h3 class="title">
314
<a name="id2535328"></a>Schema description</h3></div></div></div>
315
<pre class="programlisting">
316
&lt;xs:complexType name="antProperty"&gt;
317
   &lt;xs:sequence&gt;
318
      &lt;xs:element name="name" type="xs:string"/&gt;
319
      &lt;xs:element name="value" type="xs:string"/&gt;
320
   &lt;/xs:sequence&gt;
321
&lt;/xs:complexType&gt;
322
        </pre>
323
</div>
324
<div class="section" lang="en">
325
<div class="titlepage"><div><div><h3 class="title">
326
<a name="id2535342"></a>Example XML </h3></div></div></div>
327
<pre class="programlisting">
328
&lt;AntProperty&gt;
329
    &lt;name&gt;key2&lt;/name&gt;
330
    &lt;value&gt;value2&lt;/value&gt;
331
&lt;/AntProperty&gt;
332
</pre>
333
</div>
334
</div>
335
<div class="section" lang="en">
336
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
337
<a name="patternelement"></a>PatternElement type</h2></div></div></div>
338
<p>The PatternElement type defines single string pattern.</p>
339
<p>The defining Java class is
340
  <a href="javadoc/net/brutex/xservices/types/PatternElement.html" target="_top">
341
      <code class="classname">net.brutex.xservices.types.PatternElement</code></a>.</p>
342
<div class="section" lang="en">
343
<div class="titlepage"><div><div><h3 class="title">
344
<a name="id2534657"></a>Schema description</h3></div></div></div>
345
<pre class="programlisting">
346
&lt;xs:simpleType name="patternElement"&gt;
347
    &lt;xs:restriction base="xs:string"/&gt;
348
&lt;/xs:simpleType&gt;
349
        </pre>
350
</div>
351
<div class="section" lang="en">
352
<div class="titlepage"><div><div><h3 class="title">
353
<a name="id2534676"></a>Example XML</h3></div></div></div>
354
<pre class="programlisting">
355
&lt;PatternElement&gt;**/*&lt;/PatternElement&gt;
356
</pre>
357
</div>
358
</div>
359
</div>
360
</div></body>
361
</html>