XServices/doc/html/xmltypes.html

160 lines
12 KiB
HTML
Raw Normal View History

<html><head><META http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>Chapter&nbsp;3.&nbsp;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&nbsp;3.&nbsp;XML Types</th></tr><tr><td align="left" width="20%"><a accesskey="p" href="miscservices.html">Prev</a>&nbsp;</td><th align="center" width="60%">&nbsp;</th><td align="right" width="20%">&nbsp;</td></tr></table><hr></div><div class="breadcrumbs"><span class="breadcrumb-link"><a href="index.html">Brutex XServices Documentation</a></span> &gt; <span class="breadcrumb-node">XML Types</span></div><div class="chapter" title="Chapter&nbsp;3.&nbsp;XML Types"><div class="titlepage"><div><div><h2 class="title"><a name="xmltypes"></a>Chapter&nbsp;3.&nbsp;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
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>
The defining Java class is
<a class="ulink" href="javadoc/net/brutex/xservices/types/AntProperty.html" target="_top">
<code class="classname">net.brutex.xservices.types.AntProperty</code>
</a>
.
</p><pre class="programlisting">
&lt;xs:complexType name="antProperty"&gt;
&lt;xs:sequence&gt;
&lt;xs:element name="name" type="xs:string"/&gt;
&lt;xs:element name="value" type="xs:string"/&gt;
&lt;/xs:sequence&gt;
&lt;/xs:complexType&gt;
</pre><pre class="programlisting">
&lt;AntProperty&gt;
&lt;name&gt;key2&lt;/name&gt;
&lt;value&gt;value2&lt;/value&gt;
&lt;/AntProperty&gt;
</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>
The defining Java class is
<a class="ulink" href="javadoc/net/brutex/xservices/types/FileResource.html" target="_top">
<code class="classname">net.brutex.xservices.types.FileResource</code>
</a>
.
</p><pre class="programlisting">
&lt;xs:complexType name="FileResourceType"&gt;
&lt;xs:sequence&gt;
&lt;xs:element default="FILE" name="type" type="tns:type"/&gt;
&lt;xs:element name="uri" type="xs:string"/&gt;
&lt;/xs:sequence&gt;
&lt;/xs:complexType&gt;
</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">
&lt;resource&gt;
&lt;type&gt;FILE&lt;/type&gt;
&lt;uri&gt;c:\temp\xservices.war&lt;/uri&gt;
&lt;/resource&gt;
</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
credentials.</p><p>
The defining Java class is
<a class="ulink" href="javadoc/net/brutex/xservices/types/HostConnection.html" target="_top">
<code class="classname">net.brutex.xservices.types.HostConnection</code>
</a>
.
</p><h4><a name="N102F5"></a>Schema definition</h4><pre class="programlisting">
&lt;xs:complexType name="connection"&gt;
&lt;xs:sequence&gt;
&lt;xs:element name="hostname" type="xs:string"/&gt;
&lt;xs:element name="port" type="xs:int"/&gt;
&lt;xs:element minOccurs="0" name="user" type="xs:string"/&gt;
&lt;xs:element minOccurs="0" name="password" type="xs:string"/&gt;
&lt;/xs:sequence&gt;
&lt;/xs:complexType&gt;
</pre><h4><a name="N102FB"></a>Example XML</h4><pre class="programlisting">
&lt;host&gt;
&lt;hostname&gt;server.brutex.net&lt;/hostname&gt;
&lt;port&gt;512&lt;/port&gt; &lt;!-- default rExec port --&gt;
&lt;user&gt;brian&lt;/user&gt;
&lt;!--Optional:--&gt;
&lt;password&gt;somepass&lt;/password&gt;
&lt;/host&gt;
</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/
directory matching.</p><p>
The defining Java class is
<a class="ulink" href="javadoc/net/brutex/xservices/types/PatternElement.html" target="_top">
<code class="classname">net.brutex.xservices.types.PatternElement</code>
</a>
.
</p><p>
These patterns look exactly like those used in Apache Ant
<a class="ulink" href="http://ant.apache.org/manual/dirtasks.html#patterns" target="_top">Patterns</a>.
The '*' matches zero or more characters and the
'?' will match a single character.
Both symbols can be combined in one pattern. The '**'
symbol can be used to match any directory deepth.
</p><p>Some example patterns:</p><p>
<em class="parameter"><code>**/mydir/**</code></em>
</p><p>Match all file that are located in any directory that has
"mydir" string in its pathname. Also applies to files with
"mydir" in their name.</p><p>
<em class="parameter"><code>/mydir/</code></em>
</p><p>The
parser will automatically append an '**' symbol, thus the
resulting pattern is
<em class="parameter"><code>/mydir/**</code></em>.
All files below the "/mydir/" directory (including its
sub-directories will be chosen.
</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
"/" as path separator, even on windows based systems.
</p></td></tr></table></div><h4><a name="N10330"></a>Schema definition</h4><pre class="programlisting">&lt;xs:simpleType name="patternElement"&gt;
&lt;xs:restriction base="xs:string"/&gt;
&lt;/xs:simpleType&gt;</pre><h4><a name="N10336"></a>Example XML</h4><pre class="programlisting">&lt;PatternElement&gt;**/*&lt;/PatternElement&gt;</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
selection of resources (files).</p><p>
The defining Java class is
<a class="ulink" href="javadoc/net/brutex/xservices/types/PatternSetType.html" target="_top">
<code class="classname">net.brutex.xservices.types.PatternSetType</code>
</a>
.
</p><h4><a name="N1034F"></a>Schema definition</h4><pre class="programlisting">
&lt;xs:complexType name="patternSetType"&gt;
&lt;xs:sequence&gt;
&lt;xs:element default="**/*" maxOccurs="unbounded" minOccurs="0" name="include" type="<a class="link" href="xmltypes.html#patternelement" title="PatternElement type">tns:patternElement</a>"/&gt;
&lt;xs:element maxOccurs="unbounded" minOccurs="0" name="exclude" type="<a class="link" href="xmltypes.html#patternelement" title="PatternElement type">tns:patternElement</a>"/&gt;
&lt;xs:element minOccurs="0" name="selector" nillable="true" type="<a class="link" href="xmltypes.html#selectortype" title="SelectorType type">tns:selectorType</a>"/&gt;
&lt;/xs:sequence&gt;
&lt;/xs:complexType&gt;
</pre><h4><a name="N10361"></a>Example XML</h4><pre class="programlisting">
tbd.
</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>
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="N1037D"></a>Schema definition</h4><pre class="programlisting">
&lt;xs:complexType name="ReturnCodeType"&gt;
&lt;xs:sequence&gt;
&lt;xs:element name="returnCode" type="xs:int"/&gt;
&lt;xs:element minOccurs="0" name="stdOut" type="xs:string"/&gt;
&lt;xs:element minOccurs="0" name="stdErr" type="xs:string"/&gt;
&lt;xs:element maxOccurs="unbounded" minOccurs="0" name="propertyList" nillable="true" type="<a class="link" href="">tns:antProperty</a>"/&gt;
&lt;/xs:sequence&gt;
&lt;/xs:complexType&gt;
</pre><h4><a name="N10387"></a>Example XML</h4><pre class="programlisting">
&lt;ReturnCode
xmlns:ns2="http://ws.xservices.brutex.net"&gt;
&lt;returnCode&gt;0&lt;/returnCode&gt;
&lt;stdOut/&gt;
&lt;stdErr/&gt;
&lt;propertyList&gt;
<em class="lineannotation"><span class="lineannotation">
See
<a class="link" href="">tns:antProperty</a>
for details about the &lt;propertyList&gt; elements.
</span></em>
&lt;name&gt;key1&lt;/name&gt;
&lt;value&gt;value1&lt;/value&gt;
&lt;/propertyList&gt;
&lt;propertyList&gt;
&lt;name&gt;key2&lt;/name&gt;
&lt;value&gt;value2&lt;/value&gt;
&lt;/propertyList&gt;
&lt;/ReturnCode&gt;
</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
<a class="ulink" href="javadoc/net/brutex/xservices/types/SelectorType.html" target="_top">
<code class="classname">net.brutex.xservices.types.SelectorType</code></a>.</p><h4><a name="N103A6"></a>Schema definition</h4><pre class="programlisting">
&lt;xs:complexType abstract="true" name="selectorType"&gt;
&lt;xs:sequence&gt;
&lt;xs:element maxOccurs="unbounded" minOccurs="0" name="contains" nillable="true" type="tns:containsSelectorType"/&gt;
&lt;/xs:sequence&gt;
&lt;/xs:complexType&gt;
</pre><h4><a name="N103AC"></a>Example XML</h4><pre class="programlisting">
tbd.
</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>&nbsp;</td><td align="center" width="20%">&nbsp;</td><td align="right" width="40%">&nbsp;</td></tr><tr><td valign="top" align="left" width="40%">MiscServices&nbsp;</td><td align="center" width="20%"><a accesskey="h" href="index.html">Home</a></td><td valign="top" align="right" width="40%">&nbsp;</td></tr></table></div></body></html>