160 lines
12 KiB
HTML
160 lines
12 KiB
HTML
<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
|
|
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">
|
|
<xs:complexType name="antProperty">
|
|
<xs:sequence>
|
|
<xs:element name="name" type="xs:string"/>
|
|
<xs:element name="value" type="xs:string"/>
|
|
</xs:sequence>
|
|
</xs:complexType>
|
|
</pre><pre class="programlisting">
|
|
<AntProperty>
|
|
<name>key2</name>
|
|
<value>value2</value>
|
|
</AntProperty>
|
|
</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">
|
|
<xs:complexType name="FileResourceType">
|
|
<xs:sequence>
|
|
<xs:element default="FILE" name="type" type="tns:type"/>
|
|
<xs:element name="uri" type="xs:string"/>
|
|
</xs:sequence>
|
|
</xs:complexType>
|
|
</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">
|
|
<resource>
|
|
<type>FILE</type>
|
|
<uri>c:\temp\xservices.war</uri>
|
|
</resource>
|
|
</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">
|
|
<xs:complexType name="connection">
|
|
<xs:sequence>
|
|
<xs:element name="hostname" type="xs:string"/>
|
|
<xs:element name="port" type="xs:int"/>
|
|
<xs:element minOccurs="0" name="user" type="xs:string"/>
|
|
<xs:element minOccurs="0" name="password" type="xs:string"/>
|
|
</xs:sequence>
|
|
</xs:complexType>
|
|
|
|
</pre><h4><a name="N102FB"></a>Example XML</h4><pre class="programlisting">
|
|
<host>
|
|
<hostname>server.brutex.net</hostname>
|
|
<port>512</port> <!-- default rExec port -->
|
|
<user>brian</user>
|
|
<!--Optional:-->
|
|
<password>somepass</password>
|
|
</host>
|
|
|
|
</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"><xs:simpleType name="patternElement">
|
|
<xs:restriction base="xs:string"/>
|
|
</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
|
|
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">
|
|
<xs:complexType name="patternSetType">
|
|
<xs:sequence>
|
|
<xs:element default="**/*" maxOccurs="unbounded" minOccurs="0" name="include" type="<a class="link" href="xmltypes.html#patternelement" title="PatternElement type">tns:patternElement</a>"/>
|
|
<xs:element maxOccurs="unbounded" minOccurs="0" name="exclude" type="<a class="link" href="xmltypes.html#patternelement" title="PatternElement type">tns:patternElement</a>"/>
|
|
<xs:element minOccurs="0" name="selector" nillable="true" type="<a class="link" href="xmltypes.html#selectortype" title="SelectorType type">tns:selectorType</a>"/>
|
|
</xs:sequence>
|
|
</xs:complexType>
|
|
</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">
|
|
<xs:complexType name="ReturnCodeType">
|
|
<xs:sequence>
|
|
<xs:element name="returnCode" type="xs:int"/>
|
|
<xs:element minOccurs="0" name="stdOut" type="xs:string"/>
|
|
<xs:element minOccurs="0" name="stdErr" type="xs:string"/>
|
|
<xs:element maxOccurs="unbounded" minOccurs="0" name="propertyList" nillable="true" type="<a class="link" href="">tns:antProperty</a>"/>
|
|
</xs:sequence>
|
|
</xs:complexType>
|
|
</pre><h4><a name="N10387"></a>Example XML</h4><pre class="programlisting">
|
|
<ReturnCode
|
|
xmlns:ns2="http://ws.xservices.brutex.net">
|
|
<returnCode>0</returnCode>
|
|
<stdOut/>
|
|
<stdErr/>
|
|
<propertyList>
|
|
<em class="lineannotation"><span class="lineannotation">
|
|
See
|
|
<a class="link" href="">tns:antProperty</a>
|
|
for details about the <propertyList> elements.
|
|
</span></em>
|
|
<name>key1</name>
|
|
<value>value1</value>
|
|
</propertyList>
|
|
<propertyList>
|
|
<name>key2</name>
|
|
<value>value2</value>
|
|
</propertyList>
|
|
</ReturnCode>
|
|
</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">
|
|
<xs:complexType abstract="true" name="selectorType">
|
|
<xs:sequence>
|
|
<xs:element maxOccurs="unbounded" minOccurs="0" name="contains" nillable="true" type="tns:containsSelectorType"/>
|
|
</xs:sequence>
|
|
</xs:complexType>
|
|
</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> </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> |