64 |
brianR |
1 |
<html><head><META http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>Chapter 3. XML Types</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="index.html" title="Brutex XServices Documentation"><link rel="prev" href="miscservices.html" title="MiscServices"></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">Chapter 3. XML Types</th></tr><tr><td align="left" width="20%"><a accesskey="p" href="miscservices.html">Prev</a> </td><th align="center" width="60%"> </th><td align="right" width="20%"> </td></tr></table><hr></div><div class="breadcrumbs"><span class="breadcrumb-link"><a href="index.html">Brutex XServices Documentation</a></span> > <span class="breadcrumb-node">XML Types</span></div><div class="chapter" title="Chapter 3. XML Types"><div class="titlepage"><div><div><h2 class="title"><a name="xmltypes"></a>Chapter 3. XML Types</h2></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="section"><a href="xmltypes.html#N102AA"></a></span></dt><dd><dl><dt><span class="section"><a href="xmltypes.html#N102B0">AntProperty type</a></span></dt><dt><span class="section"><a href="xmltypes.html#N102C5">FileResource type</a></span></dt><dt><span class="section"><a href="xmltypes.html#hostconnection">HostConnection type</a></span></dt><dt><span class="section"><a href="xmltypes.html#patternelement">PatternElement type</a></span></dt><dt><span class="section"><a href="xmltypes.html#patternsettype">PatternSetType type</a></span></dt><dt><span class="section"><a href="xmltypes.html#N10367">ReturnCode type</a></span></dt><dt><span class="section"><a href="xmltypes.html#selectortype">SelectorType type</a></span></dt></dl></dd></dl></div><p>This chapter bundles the documentation for common XML types used
|
|
|
2 |
by XServices web service.</p><div class="section"><div class="titlepage"></div><div class="section" title="AntProperty type"><div class="titlepage"><div><div><h3 class="title"><a name="N102B0"></a>AntProperty type</h3></div></div></div><p>The AntProperty type defines a list of key/value pairs.</p><p>
|
|
|
3 |
The defining Java class is
|
|
|
4 |
<a class="ulink" href="javadoc/net/brutex/xservices/types/AntProperty.html" target="_top">
|
|
|
5 |
<code class="classname">net.brutex.xservices.types.AntProperty</code>
|
|
|
6 |
</a>
|
|
|
7 |
.
|
|
|
8 |
</p><pre class="programlisting">
|
|
|
9 |
<xs:complexType name="antProperty">
|
|
|
10 |
<xs:sequence>
|
|
|
11 |
<xs:element name="name" type="xs:string"/>
|
|
|
12 |
<xs:element name="value" type="xs:string"/>
|
|
|
13 |
</xs:sequence>
|
|
|
14 |
</xs:complexType>
|
|
|
15 |
</pre><pre class="programlisting">
|
|
|
16 |
<AntProperty>
|
|
|
17 |
<name>key2</name>
|
|
|
18 |
<value>value2</value>
|
|
|
19 |
</AntProperty>
|
|
|
20 |
</pre></div><div class="section" title="FileResource type"><div class="titlepage"><div><div><h3 class="title"><a name="N102C5"></a>FileResource type</h3></div></div></div><p>The FileResource type defines an URI to a file with optional on-the-fly decompression.</p><p>
|
|
|
21 |
The defining Java class is
|
|
|
22 |
<a class="ulink" href="javadoc/net/brutex/xservices/types/FileResource.html" target="_top">
|
|
|
23 |
<code class="classname">net.brutex.xservices.types.FileResource</code>
|
|
|
24 |
</a>
|
|
|
25 |
.
|
|
|
26 |
</p><pre class="programlisting">
|
|
|
27 |
<xs:complexType name="FileResourceType">
|
|
|
28 |
<xs:sequence>
|
|
|
29 |
<xs:element default="FILE" name="type" type="tns:type"/>
|
|
|
30 |
<xs:element name="uri" type="xs:string"/>
|
|
|
31 |
</xs:sequence>
|
|
|
32 |
</xs:complexType>
|
|
|
33 |
</pre><p>Available types:</p><p>FILE: URI points to a local file resource. Examples: c:\temp\something.txt, c:/dir/another.file, /home/brian/file</p><p>URL: File from URL (http, https, ftp, ...). Example: http://brutex.net/file.pdf</p><p>GZIP and BZIP2: File from a local file system with on-the-fly decompression.</p><pre class="programlisting">
|
|
|
34 |
<resource>
|
|
|
35 |
<type>FILE</type>
|
|
|
36 |
<uri>c:\temp\xservices.war</uri>
|
|
|
37 |
</resource>
|
|
|
38 |
</pre></div><div class="section" title="HostConnection type"><div class="titlepage"><div><div><h3 class="title"><a name="hostconnection"></a>HostConnection type</h3></div></div></div><p>The HostConnection type identifies a server resource and login
|
|
|
39 |
credentials.</p><p>
|
|
|
40 |
The defining Java class is
|
|
|
41 |
<a class="ulink" href="javadoc/net/brutex/xservices/types/HostConnection.html" target="_top">
|
|
|
42 |
<code class="classname">net.brutex.xservices.types.HostConnection</code>
|
|
|
43 |
</a>
|
|
|
44 |
.
|
|
|
45 |
</p><h4><a name="N102F5"></a>Schema definition</h4><pre class="programlisting">
|
|
|
46 |
<xs:complexType name="connection">
|
|
|
47 |
<xs:sequence>
|
|
|
48 |
<xs:element name="hostname" type="xs:string"/>
|
|
|
49 |
<xs:element name="port" type="xs:int"/>
|
|
|
50 |
<xs:element minOccurs="0" name="user" type="xs:string"/>
|
|
|
51 |
<xs:element minOccurs="0" name="password" type="xs:string"/>
|
|
|
52 |
</xs:sequence>
|
|
|
53 |
</xs:complexType>
|
|
|
54 |
|
|
|
55 |
</pre><h4><a name="N102FB"></a>Example XML</h4><pre class="programlisting">
|
|
|
56 |
<host>
|
|
|
57 |
<hostname>server.brutex.net</hostname>
|
|
|
58 |
<port>512</port> <!-- default rExec port -->
|
|
|
59 |
<user>brian</user>
|
|
|
60 |
<!--Optional:-->
|
|
|
61 |
<password>somepass</password>
|
|
|
62 |
</host>
|
|
|
63 |
|
|
|
64 |
</pre></div><div class="section" title="PatternElement type"><div class="titlepage"><div><div><h3 class="title"><a name="patternelement"></a>PatternElement type</h3></div></div></div><p>The PatternElement type defines single string pattern for file/
|
|
|
65 |
directory matching.</p><p>
|
|
|
66 |
The defining Java class is
|
|
|
67 |
<a class="ulink" href="javadoc/net/brutex/xservices/types/PatternElement.html" target="_top">
|
|
|
68 |
<code class="classname">net.brutex.xservices.types.PatternElement</code>
|
|
|
69 |
</a>
|
|
|
70 |
.
|
|
|
71 |
</p><p>
|
|
|
72 |
These patterns look exactly like those used in Apache Ant
|
|
|
73 |
<a class="ulink" href="http://ant.apache.org/manual/dirtasks.html#patterns" target="_top">Patterns</a>.
|
|
|
74 |
The '*' matches zero or more characters and the
|
|
|
75 |
'?' will match a single character.
|
|
|
76 |
Both symbols can be combined in one pattern. The '**'
|
|
|
77 |
symbol can be used to match any directory deepth.
|
|
|
78 |
</p><p>Some example patterns:</p><p>
|
|
|
79 |
<em class="parameter"><code>**/mydir/**</code></em>
|
|
|
80 |
</p><p>Match all file that are located in any directory that has
|
|
|
81 |
"mydir" string in its pathname. Also applies to files with
|
|
|
82 |
"mydir" in their name.</p><p>
|
|
|
83 |
<em class="parameter"><code>/mydir/</code></em>
|
|
|
84 |
</p><p>The
|
|
|
85 |
parser will automatically append an '**' symbol, thus the
|
|
|
86 |
resulting pattern is
|
|
|
87 |
<em class="parameter"><code>/mydir/**</code></em>.
|
|
|
88 |
All files below the "/mydir/" directory (including its
|
|
|
89 |
sub-directories will be chosen.
|
|
|
90 |
</p><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Note"><tr><td valign="top" align="center" rowspan="2" width="25"><img alt="[Note]" src="images/note.png"></td><th align="left">Note</th></tr><tr><td valign="top" align="left"><p>The pattern is OS independent. You should always use
|
|
|
91 |
"/" as path separator, even on windows based systems.
|
|
|
92 |
</p></td></tr></table></div><h4><a name="N10330"></a>Schema definition</h4><pre class="programlisting"><xs:simpleType name="patternElement">
|
|
|
93 |
<xs:restriction base="xs:string"/>
|
|
|
94 |
</xs:simpleType></pre><h4><a name="N10336"></a>Example XML</h4><pre class="programlisting"><PatternElement>**/*</PatternElement></pre></div><div class="section" title="PatternSetType type"><div class="titlepage"><div><div><h3 class="title"><a name="patternsettype"></a>PatternSetType type</h3></div></div></div><p>The PatternSetType exposes various filters/ selectors for the
|
|
|
95 |
selection of resources (files).</p><p>
|
|
|
96 |
The defining Java class is
|
|
|
97 |
<a class="ulink" href="javadoc/net/brutex/xservices/types/PatternSetType.html" target="_top">
|
|
|
98 |
<code class="classname">net.brutex.xservices.types.PatternSetType</code>
|
|
|
99 |
</a>
|
|
|
100 |
.
|
|
|
101 |
</p><h4><a name="N1034F"></a>Schema definition</h4><pre class="programlisting">
|
|
|
102 |
<xs:complexType name="patternSetType">
|
|
|
103 |
<xs:sequence>
|
|
|
104 |
<xs:element default="**/*" maxOccurs="unbounded" minOccurs="0" name="include" type="<a class="link" href="xmltypes.html#patternelement" title="PatternElement type">tns:patternElement</a>"/>
|
|
|
105 |
<xs:element maxOccurs="unbounded" minOccurs="0" name="exclude" type="<a class="link" href="xmltypes.html#patternelement" title="PatternElement type">tns:patternElement</a>"/>
|
|
|
106 |
<xs:element minOccurs="0" name="selector" nillable="true" type="<a class="link" href="xmltypes.html#selectortype" title="SelectorType type">tns:selectorType</a>"/>
|
|
|
107 |
</xs:sequence>
|
|
|
108 |
</xs:complexType>
|
|
|
109 |
</pre><h4><a name="N10361"></a>Example XML</h4><pre class="programlisting">
|
|
|
110 |
tbd.
|
|
|
111 |
</pre></div><div class="section" title="ReturnCode type"><div class="titlepage"><div><div><h3 class="title"><a name="N10367"></a>ReturnCode type</h3></div></div></div><p>
|
|
|
112 |
The ReturnCode type is used as the generic answer type for most of the
|
|
|
113 |
<span class="application">BruteXservices</span>
|
|
|
114 |
operations.
|
|
|
115 |
</p><p>
|
|
|
116 |
The defining Java class is
|
|
|
117 |
<a class="ulink" href="javadoc/net/brutex/xservices/types/ReturnCode.html" target="_top">
|
|
|
118 |
<code class="classname">net.brutex.xservices.types.ReturnCode</code>
|
|
|
119 |
</a>
|
|
|
120 |
.
|
|
|
121 |
</p><h4><a name="N1037D"></a>Schema definition</h4><pre class="programlisting">
|
|
|
122 |
<xs:complexType name="ReturnCodeType">
|
|
|
123 |
<xs:sequence>
|
|
|
124 |
<xs:element name="returnCode" type="xs:int"/>
|
|
|
125 |
<xs:element minOccurs="0" name="stdOut" type="xs:string"/>
|
|
|
126 |
<xs:element minOccurs="0" name="stdErr" type="xs:string"/>
|
|
|
127 |
<xs:element maxOccurs="unbounded" minOccurs="0" name="propertyList" nillable="true" type="<a class="link" href="">tns:antProperty</a>"/>
|
|
|
128 |
</xs:sequence>
|
|
|
129 |
</xs:complexType>
|
|
|
130 |
</pre><h4><a name="N10387"></a>Example XML</h4><pre class="programlisting">
|
|
|
131 |
<ReturnCode
|
|
|
132 |
xmlns:ns2="http://ws.xservices.brutex.net">
|
|
|
133 |
<returnCode>0</returnCode>
|
|
|
134 |
<stdOut/>
|
|
|
135 |
<stdErr/>
|
|
|
136 |
<propertyList>
|
|
|
137 |
<em class="lineannotation"><span class="lineannotation">
|
|
|
138 |
See
|
|
|
139 |
<a class="link" href="">tns:antProperty</a>
|
|
|
140 |
for details about the <propertyList> elements.
|
|
|
141 |
</span></em>
|
|
|
142 |
<name>key1</name>
|
|
|
143 |
<value>value1</value>
|
|
|
144 |
</propertyList>
|
|
|
145 |
<propertyList>
|
|
|
146 |
<name>key2</name>
|
|
|
147 |
<value>value2</value>
|
|
|
148 |
</propertyList>
|
|
|
149 |
</ReturnCode>
|
|
|
150 |
</pre></div><div class="section" title="SelectorType type"><div class="titlepage"><div><div><h3 class="title"><a name="selectortype"></a>SelectorType type</h3></div></div></div><p>The SelectorType exposes various selectors for the selection of resources (files).</p><p>The defining Java class is
|
|
|
151 |
<a class="ulink" href="javadoc/net/brutex/xservices/types/SelectorType.html" target="_top">
|
|
|
152 |
<code class="classname">net.brutex.xservices.types.SelectorType</code></a>.</p><h4><a name="N103A6"></a>Schema definition</h4><pre class="programlisting">
|
|
|
153 |
<xs:complexType abstract="true" name="selectorType">
|
|
|
154 |
<xs:sequence>
|
|
|
155 |
<xs:element maxOccurs="unbounded" minOccurs="0" name="contains" nillable="true" type="tns:containsSelectorType"/>
|
|
|
156 |
</xs:sequence>
|
|
|
157 |
</xs:complexType>
|
|
|
158 |
</pre><h4><a name="N103AC"></a>Example XML</h4><pre class="programlisting">
|
|
|
159 |
tbd.
|
|
|
160 |
</pre></div></div></div><div class="navfooter"><hr><table summary="Navigation footer" width="100%"><tr><td align="left" width="40%"><a accesskey="p" href="miscservices.html">Prev</a> </td><td align="center" width="20%"> </td><td align="right" width="40%"> </td></tr><tr><td valign="top" align="left" width="40%">MiscServices </td><td align="center" width="20%"><a accesskey="h" href="index.html">Home</a></td><td valign="top" align="right" width="40%"> </td></tr></table></div></body></html>
|