Subversion Repositories XServices

Rev

Rev 67 | Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
59 brianR 1
<?xml version="1.0" encoding="UTF-8"?><book xmlns="http://docbook.org/ns/docbook" xmlns:xi="http://www.w3.org/2001/XInclude" version="5.0">
2
	<title>Brutex XServices Documentation</title>
3
	<bookinfo>
4
		<date>February, 16th 2010</date>
5
		<author>
6
			<firstname>Brian</firstname>
7
			<surname>Rosenberger</surname>
8
			<email>bru@brutex.de</email>
9
		</author>
10
		<corpname>Brutex Network</corpname>
11
		<copyright>
12
			<year>2011</year>
13
		</copyright>
14
		<legalnotice>
15
			<para>
16
				The copyright holders make no representation about the suitability
17
				of this document for any purpose. It is provided
18
				<quote>as is</quote>
19
				without expressed or implied warranty.
20
			</para>
21
		</legalnotice>
22
		<legalnotice>
23
			<para>Apache Tomcat and Apache Ant are trademarks of the Apache
24
				Software Foundation.</para>
25
		</legalnotice>
26
		<abstract xml:base="common/abstract.xml">
27
			<title>Abstract</title>
28
			<para>In complex IT environments it is necessary to integrate
29
				different information systems with each other, exchange data
30
				between
31
				tools and automate actions and function calls depending
32
				on events
33
				arising from user interaction. To meet the requirements
34
				of
35
				integration building usually means to implement APIs and to
36
				create
37
				tool-to-tool bridges. Web Services can help to clean up
38
				bridges into
39
				interfaces as well as to abstract functions from
40
				their underlying
41
				platform and implementation.</para>
42
			<para>These are the major goals of the loosely coupled
43
				integration
44
				strategy which is in turn one essential idea of a
45
				service-oriented
46
				architecture (SOA).</para>
47
			<para>provide a low level set of functions and web services.
48
				These can
49
				be orchestrated into services and used in business
50
				processes which
51
				make up the execution part of a SOA
52
				environment.</para>
53
			<para>is an add-on to XBridgeNG 2.0. It runs standalone or in
54
				combination with XBridgeNG. Pure XBridgeNG has two
55
				components:</para>
56
			<para>
57
				<itemizedlist>
58
					<listitem>
59
						<para>XML Schema for item based data types (e.g. tickets
60
							from a bug
61
							tracker system or a database record)</para>
62
					</listitem>
63
					<listitem>
64
						<para>Set of Apache Ant tasks to function as a bridge
65
							between the
66
							XBridgeNG XML format at legacy 3rd party
67
							software (e.g. HP Quality
68
							Center, Serena TeamTrack,
69
							...)</para>
70
					</listitem>
71
					<listitem>
72
						<para>The add Web Services (SOAP) wrapper around Apache Ant
73
							tasks
74
							(since XBridgeNG 2.0)</para>
75
					</listitem>
76
				</itemizedlist>
77
			</para>
78
			<para>The current focus is on file-based operations. do not
79
				contain an
80
				integration server or a process execution
81
				engine.</para>
82
		</abstract>
83
	</bookinfo>
84
	<chapter id="installation">
85
		<beginpage/>
86
		<title>Getting started</title>
87
		<para>This chapter describes the installation.</para>
88
		<section xmlns:xlink="http://www.w3.org/1999/xlink" version="5.0" xml:base="common/installation.xml" xmlns="http://docbook.org/ns/docbook" xmlns:xi="http://www.w3.org/2001/XInclude">
89
 
90
	<section>
91
		<title>Installation</title>
92
		<para>tbd.</para>
93
		<para>Sun Java SE 1.6.0</para>
94
		<para>Apache Tomcat 7</para>
95
		<para>tbd.</para>
96
		<para>In short: Deploy .WAR file to Apache Tomcat</para>
97
		<section>
98
			<title>Securing with Basic Authentication</title>
99
			<para>There is a quick guide explaining Basic Authentication for Tomcat here: <link xlink:href="http://oreilly.com/pub/a/java/archive/tomcat-tips.html?page=1">
100
					http://oreilly.com/pub/a/java/archive/tomcat-tips.html?page=1</link>
101
					</para>
102
			<para>
103
 
104
			</para>
105
		</section>
106
		<section>
107
			<title>Limit access to</title>
108
			<para>Sometimes you'll only want to restrict access to to
109
				only
110
				specified host names or IP addresses. This way, only
111
				clients at
112
				those specified addresses can use the web services.
113
				Tomcat provides
114
				two configuration values for that:
115
				RemoteHostValve and
116
				RemoteAddrValve.</para>
117
			<para>These Valves allow you to filter requests by host name or
118
				by IP
119
				address, and to allow or deny hosts that match. The
120
				example below
121
				restricts access to the ArchiveService from any
122
				machine that is not
123
				the local host.</para>
124
			<programlisting language="xml">&lt;Context
125
				path="/XService/ArchiveService"
126
				...&gt; &lt;Valve
127
				className="org.apache.catalina.valves.RemoteAddrValve"
128
				allow="127.0.0.1" deny=""/&gt; &lt;/Context&gt;
129
			</programlisting>
130
			<para>If no allow pattern is given, then patterns that match
131
				the deny
132
				attribute patterns will be rejected, and all others
133
				will be allowed.
134
				Similarly, if no deny pattern is given,
135
				patterns that match the
136
				allow attribute will be allowed, and
137
				all others will be denied.
138
				</para>
139
			<para>The &lt;context&gt; element must be placed into the
140
				server.xml
141
				file (into &lt;engine&gt;&lt;host&gt;).</para>
142
		</section>
143
	</section>
144
</section>
145
	</chapter>
146
	<chapter id="services">
147
		<beginpage/>
148
		<title>Available Services</title>
149
		<para>List of available web services and their operations.</para>
150
		<section id="archiveservices" version="5.0" xml:base="ArchiveServices.xml" xmlns="http://docbook.org/ns/docbook" xmlns:xi="http://www.w3.org/2001/XInclude">
151
			<title>ArchiveServices</title>
152
			<para>The ArchiveService bundles file packing operations. Its
153
				WSDL is
154
				located at
155
				http://server:port/XServices/ArchiveService?wsdl</para>
156
		</section>
157
		<section id="executeservices" version="5.0" xml:base="ExecuteServices.xml" xmlns="http://docbook.org/ns/docbook" xmlns:xi="http://www.w3.org/2001/XInclude">
158
	<title>ExecuteServices</title>
159
	<para>The ExecuteService bundles local and remote command
160
		execution operations. Its WSDL is located at
161
		http://server:port/XServices/ExecuteService?wsdl</para>
162
		<section version="5.0" xml:base="ExecuteServices/rExec.xml" xmlns="http://docbook.org/ns/docbook" xmlns:xi="http://www.w3.org/2001/XInclude">
163
	<title>rExec
164
	</title>
165
	<para>provides remote execution facilities with authentication based on
166
		user names and passwords.</para>
167
	<section>
168
		<title>Input parameters
169
		</title>
170
		<para/>
171
		<table frame="all">
172
			<title>rExec
173
				input parameters
174
			</title>
175
			<tgroup cols="4">
176
				<colspec colname="parameter" colnum="1"/>
177
				<colspec colname="type" colnum="2"/>
178
				<colspec colname="required" colnum="3"/>
179
				<colspec colname="description" colnum="4"/>
180
				<thead>
181
					<row>
182
						<entry>parameter</entry>
183
						<entry>type</entry>
184
						<entry>required</entry>
185
						<entry>description</entry>
186
					</row>
187
				</thead>
188
				<tbody>
189
					<row>
190
						<entry>host</entry>
191
						<entry>HostConnection</entry>
192
						<entry>Yes</entry>
193
						<entry>
194
							Host where to execute the command. See
195
							<link linkend="hostconnection">HostConnection</link>
196
							.
197
						</entry>
198
					</row>
199
					<row>
200
						<entry>command</entry>
201
						<entry>String</entry>
202
						<entry>No</entry>
203
						<entry>Any command including arguments</entry>
204
					</row>
205
          <row xml:base="file:/C:/Users/brosenberger/workspace/XServices/doc/entities.ent">
206
            <entry>timeout</entry>
207
            <entry>Long</entry>
208
            <entry>Yes</entry>
209
            <entry>Timeout in milliseconds. The command is forcefully terminated when timeout is reached.</entry>
210
          </row>
211
				</tbody>
212
			</tgroup>
213
		</table>
214
		<para/>
215
	</section>
216
	<section>
217
		<title>Output parameters
218
		</title>
219
		<section version="5.0" xml:base="ExecuteServices/../types/ReturnCode.xml" xmlns="http://docbook.org/ns/docbook" xmlns:xi="http://www.w3.org/2001/XInclude">
220
	<title>ReturnCode type</title>
221
	<para>
222
		The ReturnCode type is used as the generic answer type for most of the
223
		<application class="software">BruteXservices</application>
224
		operations.
225
	</para>
226
	<para>
227
		The defining Java class is
228
		<ulink url="javadoc/net/brutex/xservices/types/ReturnCode.html">
229
			<classname>net.brutex.xservices.types.ReturnCode</classname>
230
		</ulink>
231
		.
232
	</para>
233
	<bridgehead renderas="sect3">Schema definition</bridgehead>
234
	<programlisting language="xml"><![CDATA[
235
<xs:complexType name="ReturnCodeType">
236
    <xs:sequence>
237
        <xs:element name="returnCode" type="xs:int"/>
238
        <xs:element minOccurs="0" name="stdOut" type="xs:string"/>
239
        <xs:element minOccurs="0" name="stdErr" type="xs:string"/>
240
        <xs:element maxOccurs="unbounded" minOccurs="0" name="propertyList" nillable="true" type="]]><link linkend="antproperty">tns:antProperty</link><![CDATA["/>
241
    </xs:sequence>
242
</xs:complexType>]]>
243
	</programlisting>
244
 
245
	<bridgehead renderas="sect3">Example XML</bridgehead>
246
	<programlisting language="xml">
247
		&lt;ReturnCode
248
		xmlns:ns2="http://ws.xservices.brutex.net"&gt;
249
		&lt;returnCode&gt;0&lt;/returnCode&gt;
250
		&lt;stdOut/&gt;
251
		&lt;stdErr/&gt;
252
		&lt;propertyList&gt;
253
		<lineannotation>
254
			See
255
			<link linkend="antproperty">tns:antProperty</link>
256
			for details about the &lt;propertyList&gt; elements.
257
		</lineannotation>
258
		&lt;name&gt;key1&lt;/name&gt;
259
		&lt;value&gt;value1&lt;/value&gt;
260
		&lt;/propertyList&gt;
261
		&lt;propertyList&gt;
262
		&lt;name&gt;key2&lt;/name&gt;
263
		&lt;value&gt;value2&lt;/value&gt;
264
		&lt;/propertyList&gt;
265
		&lt;/ReturnCode&gt;
266
	</programlisting>
267
 
268
</section>
269
	</section>
270
</section>
271
		<section version="5.0" xml:base="ExecuteServices/runCommand.xml" xmlns="http://docbook.org/ns/docbook" xmlns:xi="http://www.w3.org/2001/XInclude">
272
	<title>runCommand</title>
273
	<para>Run an executable with arguments on the server providing the web
274
		service. The command is run within the environment and under the user
275
		privileges of the user who is running the Tomcat Server.</para>
276
	<section>
277
		<title>Input parameters
278
		</title>
279
		<para/>
280
		<table frame="all">
281
			<title>runCommand input parameters</title>
282
			<tgroup cols="4">
283
				<colspec colname="parameter" colnum="1"/>
284
				<colspec colname="type" colnum="2"/>
285
				<colspec colname="required" colnum="3"/>
286
				<colspec colname="description" colnum="4"/>
287
				<thead>
288
					<row>
289
						<entry>parameter</entry>
290
						<entry>type</entry>
291
						<entry>required</entry>
292
						<entry>description</entry>
293
					</row>
294
				</thead>
295
				<tbody>
296
					<row>
297
						<entry>executable</entry>
298
						<entry>String</entry>
299
						<entry>Yes</entry>
300
						<entry>Command to be run. The command may be specified with full
301
							path using forward slash "/" as path separator.</entry>
302
					</row>
303
					<row>
304
						<entry>argline</entry>
305
						<entry>String</entry>
306
						<entry>No</entry>
307
						<entry>Any command line arguments</entry>
308
					</row>
309
          <row xml:base="file:/C:/Users/brosenberger/workspace/XServices/doc/entities.ent">
310
            <entry>timeout</entry>
311
            <entry>Long</entry>
312
            <entry>Yes</entry>
313
            <entry>Timeout in milliseconds. The command is forcefully terminated when timeout is reached.</entry>
314
          </row>
315
				</tbody>
316
			</tgroup>
317
		</table>
318
		<para/>
319
	</section>
320
	<section>
321
		<title>Output parameters
322
		</title>
323
		<section version="5.0" xml:base="ExecuteServices/../types/ReturnCode.xml" xmlns="http://docbook.org/ns/docbook" xmlns:xi="http://www.w3.org/2001/XInclude">
324
	<title>ReturnCode type</title>
325
	<para>
326
		The ReturnCode type is used as the generic answer type for most of the
327
		<application class="software">BruteXservices</application>
328
		operations.
329
	</para>
330
	<para>
331
		The defining Java class is
332
		<ulink url="javadoc/net/brutex/xservices/types/ReturnCode.html">
333
			<classname>net.brutex.xservices.types.ReturnCode</classname>
334
		</ulink>
335
		.
336
	</para>
337
	<bridgehead renderas="sect3">Schema definition</bridgehead>
338
	<programlisting language="xml"><![CDATA[
339
<xs:complexType name="ReturnCodeType">
340
    <xs:sequence>
341
        <xs:element name="returnCode" type="xs:int"/>
342
        <xs:element minOccurs="0" name="stdOut" type="xs:string"/>
343
        <xs:element minOccurs="0" name="stdErr" type="xs:string"/>
344
        <xs:element maxOccurs="unbounded" minOccurs="0" name="propertyList" nillable="true" type="]]><link linkend="antproperty">tns:antProperty</link><![CDATA["/>
345
    </xs:sequence>
346
</xs:complexType>]]>
347
	</programlisting>
348
 
349
	<bridgehead renderas="sect3">Example XML</bridgehead>
350
	<programlisting language="xml">
351
		&lt;ReturnCode
352
		xmlns:ns2="http://ws.xservices.brutex.net"&gt;
353
		&lt;returnCode&gt;0&lt;/returnCode&gt;
354
		&lt;stdOut/&gt;
355
		&lt;stdErr/&gt;
356
		&lt;propertyList&gt;
357
		<lineannotation>
358
			See
359
			<link linkend="antproperty">tns:antProperty</link>
360
			for details about the &lt;propertyList&gt; elements.
361
		</lineannotation>
362
		&lt;name&gt;key1&lt;/name&gt;
363
		&lt;value&gt;value1&lt;/value&gt;
364
		&lt;/propertyList&gt;
365
		&lt;propertyList&gt;
366
		&lt;name&gt;key2&lt;/name&gt;
367
		&lt;value&gt;value2&lt;/value&gt;
368
		&lt;/propertyList&gt;
369
		&lt;/ReturnCode&gt;
370
	</programlisting>
371
 
372
</section>
373
	</section>
374
</section>
375
		<section version="5.0" xml:base="ExecuteServices/runCommandWithSSH.xml" xmlns="http://docbook.org/ns/docbook" xmlns:xi="http://www.w3.org/2001/XInclude">
376
	<title>runCommandWithSSH</title>
377
	<para>Executes a command through a SSH session.</para>
378
	<section>
379
		<title>Input parameters
380
		</title>
381
		<para/>
382
		<table frame="all">
383
			<title>runCommandWithSSH input parameters</title>
384
			<tgroup cols="4">
385
				<colspec colname="parameter" colnum="1"/>
386
				<colspec colname="type" colnum="2"/>
387
				<colspec colname="required" colnum="3"/>
388
				<colspec colname="description" colnum="4"/>
389
				<thead>
390
					<row>
391
						<entry>parameter</entry>
392
						<entry>type</entry>
393
						<entry>required</entry>
394
						<entry>description</entry>
395
					</row>
396
				</thead>
397
				<tbody>
398
					<row>
399
						<entry>host</entry>
400
						<entry>HostConnection</entry>
401
						<entry>Yes</entry>
402
						<entry>
403
							Host to connect to (see:
404
							<link linkend="hostconnection">tns:HostConnection</link>
405
							)
406
						</entry>
407
					</row>
408
					<row>
409
						<entry>command</entry>
410
						<entry>String</entry>
411
						<entry>No</entry>
412
						<entry>The command to execute.</entry>
413
					</row>
414
          <row xml:base="file:/C:/Users/brosenberger/workspace/XServices/doc/entities.ent">
415
            <entry>timeout</entry>
416
            <entry>Long</entry>
417
            <entry>Yes</entry>
418
            <entry>Timeout in milliseconds. The command is forcefully terminated when timeout is reached.</entry>
419
          </row>
420
				</tbody>
421
			</tgroup>
422
		</table>
423
		<para/>
424
	</section>
425
	<section>
426
		<title>Output parameters
427
		</title>
428
		<section version="5.0" xml:base="ExecuteServices/../types/ReturnCode.xml" xmlns="http://docbook.org/ns/docbook" xmlns:xi="http://www.w3.org/2001/XInclude">
429
	<title>ReturnCode type</title>
430
	<para>
431
		The ReturnCode type is used as the generic answer type for most of the
432
		<application class="software">BruteXservices</application>
433
		operations.
434
	</para>
435
	<para>
436
		The defining Java class is
437
		<ulink url="javadoc/net/brutex/xservices/types/ReturnCode.html">
438
			<classname>net.brutex.xservices.types.ReturnCode</classname>
439
		</ulink>
440
		.
441
	</para>
442
	<bridgehead renderas="sect3">Schema definition</bridgehead>
443
	<programlisting language="xml"><![CDATA[
444
<xs:complexType name="ReturnCodeType">
445
    <xs:sequence>
446
        <xs:element name="returnCode" type="xs:int"/>
447
        <xs:element minOccurs="0" name="stdOut" type="xs:string"/>
448
        <xs:element minOccurs="0" name="stdErr" type="xs:string"/>
449
        <xs:element maxOccurs="unbounded" minOccurs="0" name="propertyList" nillable="true" type="]]><link linkend="antproperty">tns:antProperty</link><![CDATA["/>
450
    </xs:sequence>
451
</xs:complexType>]]>
452
	</programlisting>
453
 
454
	<bridgehead renderas="sect3">Example XML</bridgehead>
455
	<programlisting language="xml">
456
		&lt;ReturnCode
457
		xmlns:ns2="http://ws.xservices.brutex.net"&gt;
458
		&lt;returnCode&gt;0&lt;/returnCode&gt;
459
		&lt;stdOut/&gt;
460
		&lt;stdErr/&gt;
461
		&lt;propertyList&gt;
462
		<lineannotation>
463
			See
464
			<link linkend="antproperty">tns:antProperty</link>
465
			for details about the &lt;propertyList&gt; elements.
466
		</lineannotation>
467
		&lt;name&gt;key1&lt;/name&gt;
468
		&lt;value&gt;value1&lt;/value&gt;
469
		&lt;/propertyList&gt;
470
		&lt;propertyList&gt;
471
		&lt;name&gt;key2&lt;/name&gt;
472
		&lt;value&gt;value2&lt;/value&gt;
473
		&lt;/propertyList&gt;
474
		&lt;/ReturnCode&gt;
475
	</programlisting>
476
 
477
</section>
478
	</section>
479
	<section>
480
		<title>Sample Request:</title>
481
		<programlisting language="xml">
482
	<![CDATA[
483
      <ws:runCommandWithSSH>
484
         <host>
485
            <hostname>ssh.brutex.net</hostname>
486
            <port>22</port>
487
            <user>roger</user>
488
            <password>xxx</password>
489
         </host>
490
         <command>ls /etc/</command>
491
         <timeout>30000</timeout>
492
      </ws:runCommandWithSSH>
493
	]]></programlisting>
494
	</section>
495
</section>
496
		<section version="5.0" xml:base="ExecuteServices/telnet.xml" xmlns="http://docbook.org/ns/docbook" xmlns:xi="http://www.w3.org/2001/XInclude">
497
	<title>telnet</title>
498
	<para>Runs a telnet session with an "expect shell" like behaviour.</para>
499
	<section>
500
		<title>Input parameters
501
		</title>
502
		<para/>
503
		<table frame="all">
504
			<title>telnet input parameters</title>
505
			<tgroup cols="4">
506
				<colspec colname="parameter" colnum="1"/>
507
				<colspec colname="type" colnum="2"/>
508
				<colspec colname="required" colnum="3"/>
509
				<colspec colname="description" colnum="4"/>
510
				<thead>
511
					<row>
512
						<entry>parameter</entry>
513
						<entry>type</entry>
514
						<entry>required</entry>
515
						<entry>description</entry>
516
					</row>
517
				</thead>
518
				<tbody>
519
					<row>
520
						<entry>host</entry>
521
						<entry>HostConnection</entry>
522
						<entry>Yes</entry>
523
						<entry>Host to connect to (see: <link linkend="hostconnection">tns:HostConnection</link>)</entry>
524
					</row>
525
					<row>
526
						<entry>prompt</entry>
527
						<entry>String</entry>
528
						<entry>No</entry>
529
						<entry>The prompt string to expect after login. This is used to recognize when
530
						 the session is open.</entry>
531
					</row>
532
					<row>
533
						<entry>command</entry>
534
						<entry>String</entry>
535
						<entry>No</entry>
536
						<entry>The command to execute.</entry>
537
					</row>
538
					<row>
539
						<entry>expect</entry>
540
						<entry>String</entry>
541
						<entry>No</entry>
542
						<entry>The prompt to expect after the command has been executed successfully.</entry>
543
					</row>
544
          <row xml:base="file:/C:/Users/brosenberger/workspace/XServices/doc/entities.ent">
545
            <entry>timeout</entry>
546
            <entry>Long</entry>
547
            <entry>Yes</entry>
548
            <entry>Timeout in milliseconds. The command is forcefully terminated when timeout is reached.</entry>
549
          </row>
550
				</tbody>
551
			</tgroup>
552
		</table>
553
		<para/>
554
	</section>
555
	<section>
556
		<title>Output parameters</title>
557
		<section version="5.0" xml:base="ExecuteServices/../types/ReturnCode.xml" xmlns="http://docbook.org/ns/docbook" xmlns:xi="http://www.w3.org/2001/XInclude">
558
	<title>ReturnCode type</title>
559
	<para>
560
		The ReturnCode type is used as the generic answer type for most of the
561
		<application class="software">BruteXservices</application>
562
		operations.
563
	</para>
564
	<para>
565
		The defining Java class is
566
		<ulink url="javadoc/net/brutex/xservices/types/ReturnCode.html">
567
			<classname>net.brutex.xservices.types.ReturnCode</classname>
568
		</ulink>
569
		.
570
	</para>
571
	<bridgehead renderas="sect3">Schema definition</bridgehead>
572
	<programlisting language="xml"><![CDATA[
573
<xs:complexType name="ReturnCodeType">
574
    <xs:sequence>
575
        <xs:element name="returnCode" type="xs:int"/>
576
        <xs:element minOccurs="0" name="stdOut" type="xs:string"/>
577
        <xs:element minOccurs="0" name="stdErr" type="xs:string"/>
578
        <xs:element maxOccurs="unbounded" minOccurs="0" name="propertyList" nillable="true" type="]]><link linkend="antproperty">tns:antProperty</link><![CDATA["/>
579
    </xs:sequence>
580
</xs:complexType>]]>
581
	</programlisting>
582
 
583
	<bridgehead renderas="sect3">Example XML</bridgehead>
584
	<programlisting language="xml">
585
		&lt;ReturnCode
586
		xmlns:ns2="http://ws.xservices.brutex.net"&gt;
587
		&lt;returnCode&gt;0&lt;/returnCode&gt;
588
		&lt;stdOut/&gt;
589
		&lt;stdErr/&gt;
590
		&lt;propertyList&gt;
591
		<lineannotation>
592
			See
593
			<link linkend="antproperty">tns:antProperty</link>
594
			for details about the &lt;propertyList&gt; elements.
595
		</lineannotation>
596
		&lt;name&gt;key1&lt;/name&gt;
597
		&lt;value&gt;value1&lt;/value&gt;
598
		&lt;/propertyList&gt;
599
		&lt;propertyList&gt;
600
		&lt;name&gt;key2&lt;/name&gt;
601
		&lt;value&gt;value2&lt;/value&gt;
602
		&lt;/propertyList&gt;
603
		&lt;/ReturnCode&gt;
604
	</programlisting>
605
 
606
</section>
607
	</section>
608
	<section>
609
	<title>Sample Request:</title>
610
	<programlisting language="xml">
611
	<![CDATA[
612
	 <ws:telnet>
613
         <host>
614
            <hostname>localhost</hostname>
615
            <port>23</port>
616
            <user>brosenberger</user>
617
            <password></password>
618
         </host>
619
         <prompt>C:\Users\brosenberger&gt;</prompt>
620
         <command>dir c:\temp</command>
621
         <expect>enberger&gt;</expect>
622
         <timeout>60000</timeout>
623
      </ws:telnet>
624
	]]></programlisting>
625
	</section>
626
</section>
627
</section>
628
		<section id="fileservices" version="5.0" xml:base="FileServices.xml" xmlns="http://docbook.org/ns/docbook" xmlns:xi="http://www.w3.org/2001/XInclude">
629
	<title>FileServices</title>
630
	<para>The FileServces bundles various file operations. Its WSDL is located at
631
		http://server:port/XServices/FileService?wsdl</para>
632
</section>
633
		<section id="miscservices" version="5.0" xml:base="MiscServices.xml" xmlns="http://docbook.org/ns/docbook" xmlns:xi="http://www.w3.org/2001/XInclude">
634
	<title>MiscServices</title>
635
	<para>The MiscService bundles various operations. Its WSDL is located at
636
		http://server:port/XServices/MiscService?wsdl</para>
637
 
638
</section>
639
	</chapter>
640
 
641
	<chapter id="xmltypes">
642
		<beginpage/>
643
		<title>XML Types</title>
644
		<para>This chapter bundles the documentation for common XML types used
645
			by XServices web service.</para>
646
		<section version="5.0" xml:base="Types.xml" xmlns="http://docbook.org/ns/docbook" xmlns:xi="http://www.w3.org/2001/XInclude">
647
	<!-- Sort alphabetically -->
648
	<section xml:base="types/AntProperty.xml">
649
<title>AntProperty type</title>
650
			<para>The AntProperty type defines a list of key/value pairs.</para>
651
			<para>
652
				The defining Java class is
653
				<ulink url="javadoc/net/brutex/xservices/types/AntProperty.html">
654
					<classname>net.brutex.xservices.types.AntProperty</classname>
655
				</ulink>
656
				.
657
			</para>
658
 
659
			<programlisting language="xml"><![CDATA[
660
<xs:complexType name="antProperty">
661
   <xs:sequence>
662
      <xs:element name="name" type="xs:string"/>
663
      <xs:element name="value" type="xs:string"/>
664
   </xs:sequence>
665
</xs:complexType>]]>
666
			</programlisting>
667
 
668
			<programlisting language="xml"><![CDATA[
669
<AntProperty>
670
    <name>key2</name>
671
    <value>value2</value>
672
</AntProperty>]]>
673
			</programlisting>
674
		</section>
675
	<section xml:base="types/FileResource.xml">
676
<title>FileResource type</title>
677
			<para>The FileResource type defines an URI to a file with optional on-the-fly decompression.</para>
678
			<para>
679
				The defining Java class is
680
				<ulink url="javadoc/net/brutex/xservices/types/FileResource.html">
681
					<classname>net.brutex.xservices.types.FileResource</classname>
682
				</ulink>
683
				.
684
			</para>
685
 
686
			<programlisting language="xml"><![CDATA[
687
<xs:complexType name="FileResourceType">
688
	<xs:sequence>
689
    	<xs:element default="FILE" name="type" type="tns:type"/>
690
        <xs:element name="uri" type="xs:string"/>
691
   </xs:sequence>
692
</xs:complexType>]]>
693
			</programlisting>
694
			<para>Available types:</para>
695
			<para>FILE: URI points to a local file resource. Examples: c:\temp\something.txt, c:/dir/another.file, /home/brian/file</para>
696
			<para>URL: File from URL (http, https, ftp, ...). Example: http://brutex.net/file.pdf</para>
697
			<para>GZIP and BZIP2: File from a local file system with on-the-fly decompression.</para>
698
			<programlisting language="xml"><![CDATA[
699
<resource>
700
	<type>FILE</type>
701
    <uri>c:\temp\xservices.war</uri>
702
</resource>]]>
703
			</programlisting>
704
		</section>
705
	<section id="hostconnection" version="5.0" xml:base="types/HostConnection.xml" xmlns="http://docbook.org/ns/docbook" xmlns:xi="http://www.w3.org/2001/XInclude">
706
	<title>HostConnection type</title>
707
	<para>The HostConnection type identifies a server resource and login
708
		credentials.</para>
709
	<para>
710
		The defining Java class is
711
		<ulink url="javadoc/net/brutex/xservices/types/HostConnection.html">
712
			<classname>net.brutex.xservices.types.HostConnection</classname>
713
		</ulink>
714
		.
715
	</para>
716
	<bridgehead renderas="sect3">Schema definition</bridgehead>
717
	<programlisting language="xml"><![CDATA[
718
<xs:complexType name="connection">
719
   <xs:sequence>
720
      <xs:element name="hostname" type="xs:string"/>
721
      <xs:element name="port" type="xs:int"/>
722
      <xs:element minOccurs="0" name="user" type="xs:string"/>
723
      <xs:element minOccurs="0" name="password" type="xs:string"/>
724
   </xs:sequence>
725
</xs:complexType>
726
]]>
727
	</programlisting>
728
	<bridgehead renderas="sect3">Example XML</bridgehead>
729
	<programlisting language="xml"><![CDATA[
730
<host>
731
   <hostname>server.brutex.net</hostname>
732
   <port>512</port> <!-- default rExec port -->
733
   <user>brian</user>
734
   <!--Optional:-->
735
   <password>somepass</password>
736
</host>
737
]]>
738
	</programlisting>
739
</section>
740
	<section id="patternelement" version="5.0" xml:base="types/PatternElement.xml" xmlns="http://docbook.org/ns/docbook" xmlns:xi="http://www.w3.org/2001/XInclude">
741
	<title>PatternElement type</title>
742
	<para>The PatternElement type defines single string pattern for file/
743
		directory matching.</para>
744
	<para>
745
		The defining Java class is
746
		<ulink url="javadoc/net/brutex/xservices/types/PatternElement.html">
747
			<classname>net.brutex.xservices.types.PatternElement</classname>
748
		</ulink>
749
		.
750
	</para>
751
	<para>
752
		These patterns look exactly like those used in Apache Ant
753
		<ulink url="http://ant.apache.org/manual/dirtasks.html#patterns">Patterns</ulink>.
754
		The '*' matches zero or more characters and the
755
		'?' will match a single character.
756
		Both symbols can be combined in one pattern. The '**'
757
		symbol can be used to match any directory deepth.
758
	</para>
759
	<para>Some example patterns:</para>
760
	<para>
761
		<parameter>**/mydir/**</parameter>
762
	</para>
763
	<para>Match all file that are located in any directory that has
764
		"mydir" string in its pathname. Also applies to files with
765
		"mydir" in their name.</para>
766
	<para>
767
		<parameter>/mydir/</parameter>
768
	</para>
769
	<para>The
770
		parser will automatically append an '**' symbol, thus the
771
		resulting pattern is
772
		<parameter>/mydir/**</parameter>.
773
		All files below the "/mydir/" directory (including its
774
		sub-directories will be chosen.
775
	</para>
776
	<note>
777
		<para>The pattern is OS independent. You should always use
778
			"/" as path separator, even on windows based systems.
779
		</para>
780
	</note>
781
	<bridgehead renderas="sect3">Schema definition</bridgehead>
782
	<programlisting language="xml"><![CDATA[<xs:simpleType name="patternElement">
783
    <xs:restriction base="xs:string"/>
784
</xs:simpleType>]]></programlisting>
785
 
786
	<bridgehead renderas="sect3">Example XML</bridgehead>
787
	<programlisting language="xml"><![CDATA[<PatternElement>**/*</PatternElement>]]></programlisting>
788
 
789
</section>
790
	<section id="patternsettype" version="5.0" xml:base="types/PatternSetType.xml" xmlns="http://docbook.org/ns/docbook" xmlns:xi="http://www.w3.org/2001/XInclude">
791
	<title>PatternSetType type</title>
792
	<para>The PatternSetType exposes various filters/ selectors for the
793
		selection of resources (files).</para>
794
	<para>
795
		The defining Java class is
796
		<ulink url="javadoc/net/brutex/xservices/types/PatternSetType.html">
797
			<classname>net.brutex.xservices.types.PatternSetType</classname>
798
		</ulink>
799
		.
800
	</para>
801
	<bridgehead renderas="sect3">Schema definition</bridgehead>
802
	<programlisting language="xml"><![CDATA[
803
<xs:complexType name="patternSetType">
804
    <xs:sequence>
805
        <xs:element default="**/*" maxOccurs="unbounded" minOccurs="0" name="include" type="]]><link linkend="patternelement">tns:patternElement</link><![CDATA["/>
806
        <xs:element maxOccurs="unbounded" minOccurs="0" name="exclude" type="]]><link linkend="patternelement">tns:patternElement</link><![CDATA["/>
807
        <xs:element minOccurs="0" name="selector" nillable="true" type="]]><link linkend="selectortype">tns:selectorType</link><![CDATA["/>
808
    </xs:sequence>
809
</xs:complexType>]]>
810
	</programlisting>
811
	<bridgehead renderas="sect3">Example XML</bridgehead>
812
	<programlisting language="xml"><![CDATA[
813
            tbd.]]>
814
	</programlisting>
815
</section>
816
	<section version="5.0" xml:base="types/ReturnCode.xml" xmlns="http://docbook.org/ns/docbook" xmlns:xi="http://www.w3.org/2001/XInclude">
817
	<title>ReturnCode type</title>
818
	<para>
819
		The ReturnCode type is used as the generic answer type for most of the
820
		<application class="software">BruteXservices</application>
821
		operations.
822
	</para>
823
	<para>
824
		The defining Java class is
825
		<ulink url="javadoc/net/brutex/xservices/types/ReturnCode.html">
826
			<classname>net.brutex.xservices.types.ReturnCode</classname>
827
		</ulink>
828
		.
829
	</para>
830
	<bridgehead renderas="sect3">Schema definition</bridgehead>
831
	<programlisting language="xml"><![CDATA[
832
<xs:complexType name="ReturnCodeType">
833
    <xs:sequence>
834
        <xs:element name="returnCode" type="xs:int"/>
835
        <xs:element minOccurs="0" name="stdOut" type="xs:string"/>
836
        <xs:element minOccurs="0" name="stdErr" type="xs:string"/>
837
        <xs:element maxOccurs="unbounded" minOccurs="0" name="propertyList" nillable="true" type="]]><link linkend="antproperty">tns:antProperty</link><![CDATA["/>
838
    </xs:sequence>
839
</xs:complexType>]]>
840
	</programlisting>
841
 
842
	<bridgehead renderas="sect3">Example XML</bridgehead>
843
	<programlisting language="xml">
844
		&lt;ReturnCode
845
		xmlns:ns2="http://ws.xservices.brutex.net"&gt;
846
		&lt;returnCode&gt;0&lt;/returnCode&gt;
847
		&lt;stdOut/&gt;
848
		&lt;stdErr/&gt;
849
		&lt;propertyList&gt;
850
		<lineannotation>
851
			See
852
			<link linkend="antproperty">tns:antProperty</link>
853
			for details about the &lt;propertyList&gt; elements.
854
		</lineannotation>
855
		&lt;name&gt;key1&lt;/name&gt;
856
		&lt;value&gt;value1&lt;/value&gt;
857
		&lt;/propertyList&gt;
858
		&lt;propertyList&gt;
859
		&lt;name&gt;key2&lt;/name&gt;
860
		&lt;value&gt;value2&lt;/value&gt;
861
		&lt;/propertyList&gt;
862
		&lt;/ReturnCode&gt;
863
	</programlisting>
864
 
865
</section>
866
	<section id="selectortype" version="5.0" xml:base="types/SelectorType.xml" xmlns="http://docbook.org/ns/docbook" xmlns:xi="http://www.w3.org/2001/XInclude">
867
    <title>SelectorType type</title>
868
    <para>The SelectorType exposes various selectors for the selection of resources (files).</para>
869
    <para>The defining Java class is
870
        <ulink url="javadoc/net/brutex/xservices/types/SelectorType.html">
871
    <classname>net.brutex.xservices.types.SelectorType</classname></ulink>.</para>
872
<bridgehead renderas="sect3">Schema definition</bridgehead>
873
        <programlisting language="xml"><![CDATA[
874
         <xs:complexType abstract="true" name="selectorType">
875
            <xs:sequence>
876
               <xs:element maxOccurs="unbounded" minOccurs="0" name="contains" nillable="true" type="tns:containsSelectorType"/>
877
            </xs:sequence>
878
         </xs:complexType>]]>
879
</programlisting>
880
<bridgehead renderas="sect3">Example XML</bridgehead>
881
    <programlisting language="xml"><![CDATA[
882
            tbd.]]>
883
        </programlisting>
884
</section>
885
</section>
886
	</chapter>
887
</book>