Update XService documentation

git-svn-id: https://brutex.net/svn/xservices/trunk@59 e7e49efb-446e-492e-b9ec-fcafc1997a86
tag-20130205r
Brian Rosenberger 2011-05-02 18:06:19 +00:00
parent 22de86be72
commit eed2c21c0f
25 changed files with 1607 additions and 383 deletions

View File

@ -1,5 +1,9 @@
<?xml version='1.0' encoding='UTF-8'?><section> <?xml version='1.0' encoding='utf-8'?>
<title>ArchiveServices</title> <section xmlns="http://docbook.org/ns/docbook" version="5.0" xmlns:xi="http://www.w3.org/2001/XInclude"
<para>The ArchiveService bundles file packing operations. Its WSDL is located at id="archiveservices">
http://server:port/XServices/ArchiveService?wsdl</para> <title>ArchiveServices</title>
</section> <para>The ArchiveService bundles file packing operations. Its
WSDL is
located at
http://server:port/XServices/ArchiveService?wsdl</para>
</section>

View File

@ -0,0 +1,887 @@
<?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">
<title>Brutex XServices Documentation</title>
<bookinfo>
<date>February, 16th 2010</date>
<author>
<firstname>Brian</firstname>
<surname>Rosenberger</surname>
<email>bru@brutex.de</email>
</author>
<corpname>Brutex Network</corpname>
<copyright>
<year>2011</year>
</copyright>
<legalnotice>
<para>
The copyright holders make no representation about the suitability
of this document for any purpose. It is provided
<quote>as is</quote>
without expressed or implied warranty.
</para>
</legalnotice>
<legalnotice>
<para>Apache Tomcat and Apache Ant are trademarks of the Apache
Software Foundation.</para>
</legalnotice>
<abstract xml:base="common/abstract.xml">
<title>Abstract</title>
<para>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.</para>
<para>These are the major goals of the loosely coupled
integration
strategy which is in turn one essential idea of a
service-oriented
architecture (SOA).</para>
<para>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.</para>
<para>is an add-on to XBridgeNG 2.0. It runs standalone or in
combination with XBridgeNG. Pure XBridgeNG has two
components:</para>
<para>
<itemizedlist>
<listitem>
<para>XML Schema for item based data types (e.g. tickets
from a bug
tracker system or a database record)</para>
</listitem>
<listitem>
<para>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,
...)</para>
</listitem>
<listitem>
<para>The add Web Services (SOAP) wrapper around Apache Ant
tasks
(since XBridgeNG 2.0)</para>
</listitem>
</itemizedlist>
</para>
<para>The current focus is on file-based operations. do not
contain an
integration server or a process execution
engine.</para>
</abstract>
</bookinfo>
<chapter id="installation">
<beginpage/>
<title>Getting started</title>
<para>This chapter describes the installation.</para>
<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">
<section>
<title>Installation</title>
<para>tbd.</para>
<para>Sun Java SE 1.6.0</para>
<para>Apache Tomcat 7</para>
<para>tbd.</para>
<para>In short: Deploy .WAR file to Apache Tomcat</para>
<section>
<title>Securing with Basic Authentication</title>
<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">
http://oreilly.com/pub/a/java/archive/tomcat-tips.html?page=1</link>
</para>
<para>
</para>
</section>
<section>
<title>Limit access to</title>
<para>Sometimes you'll only want to restrict access to to
only
specified host names or IP addresses. This way, only
clients at
those specified addresses can use the web services.
Tomcat provides
two configuration values for that:
RemoteHostValve and
RemoteAddrValve.</para>
<para>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.</para>
<programlisting language="xml">&lt;Context
path="/XService/ArchiveService"
...&gt; &lt;Valve
className="org.apache.catalina.valves.RemoteAddrValve"
allow="127.0.0.1" deny=""/&gt; &lt;/Context&gt;
</programlisting>
<para>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.
</para>
<para>The &lt;context&gt; element must be placed into the
server.xml
file (into &lt;engine&gt;&lt;host&gt;).</para>
</section>
</section>
</section>
</chapter>
<chapter id="services">
<beginpage/>
<title>Available Services</title>
<para>List of available web services and their operations.</para>
<section id="archiveservices" version="5.0" xml:base="ArchiveServices.xml" xmlns="http://docbook.org/ns/docbook" xmlns:xi="http://www.w3.org/2001/XInclude">
<title>ArchiveServices</title>
<para>The ArchiveService bundles file packing operations. Its
WSDL is
located at
http://server:port/XServices/ArchiveService?wsdl</para>
</section>
<section id="executeservices" version="5.0" xml:base="ExecuteServices.xml" xmlns="http://docbook.org/ns/docbook" xmlns:xi="http://www.w3.org/2001/XInclude">
<title>ExecuteServices</title>
<para>The ExecuteService bundles local and remote command
execution operations. Its WSDL is located at
http://server:port/XServices/ExecuteService?wsdl</para>
<section version="5.0" xml:base="ExecuteServices/rExec.xml" xmlns="http://docbook.org/ns/docbook" xmlns:xi="http://www.w3.org/2001/XInclude">
<title>rExec
</title>
<para>provides remote execution facilities with authentication based on
user names and passwords.</para>
<section>
<title>Input parameters
</title>
<para/>
<table frame="all">
<title>rExec
input parameters
</title>
<tgroup cols="4">
<colspec colname="parameter" colnum="1"/>
<colspec colname="type" colnum="2"/>
<colspec colname="required" colnum="3"/>
<colspec colname="description" colnum="4"/>
<thead>
<row>
<entry>parameter</entry>
<entry>type</entry>
<entry>required</entry>
<entry>description</entry>
</row>
</thead>
<tbody>
<row>
<entry>host</entry>
<entry>HostConnection</entry>
<entry>Yes</entry>
<entry>
Host where to execute the command. See
<link linkend="hostconnection">HostConnection</link>
.
</entry>
</row>
<row>
<entry>command</entry>
<entry>String</entry>
<entry>No</entry>
<entry>Any command including arguments</entry>
</row>
<row xml:base="file:/C:/Users/brosenberger/workspace/XServices/doc/entities.ent">
<entry>timeout</entry>
<entry>Long</entry>
<entry>Yes</entry>
<entry>Timeout in milliseconds. The command is forcefully terminated when timeout is reached.</entry>
</row>
</tbody>
</tgroup>
</table>
<para/>
</section>
<section>
<title>Output parameters
</title>
<section version="5.0" xml:base="ExecuteServices/../types/ReturnCode.xml" xmlns="http://docbook.org/ns/docbook" xmlns:xi="http://www.w3.org/2001/XInclude">
<title>ReturnCode type</title>
<para>
The ReturnCode type is used as the generic answer type for most of the
<application class="software">BruteXservices</application>
operations.
</para>
<para>
The defining Java class is
<ulink url="javadoc/net/brutex/xservices/types/ReturnCode.html">
<classname>net.brutex.xservices.types.ReturnCode</classname>
</ulink>
.
</para>
<bridgehead renderas="sect3">Schema definition</bridgehead>
<programlisting language="xml"><![CDATA[
<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="]]><link linkend="antproperty">tns:antProperty</link><![CDATA["/>
</xs:sequence>
</xs:complexType>]]>
</programlisting>
<bridgehead renderas="sect3">Example XML</bridgehead>
<programlisting language="xml">
&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;
<lineannotation>
See
<link linkend="antproperty">tns:antProperty</link>
for details about the &lt;propertyList&gt; elements.
</lineannotation>
&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;
</programlisting>
</section>
</section>
</section>
<section version="5.0" xml:base="ExecuteServices/runCommand.xml" xmlns="http://docbook.org/ns/docbook" xmlns:xi="http://www.w3.org/2001/XInclude">
<title>runCommand</title>
<para>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.</para>
<section>
<title>Input parameters
</title>
<para/>
<table frame="all">
<title>runCommand input parameters</title>
<tgroup cols="4">
<colspec colname="parameter" colnum="1"/>
<colspec colname="type" colnum="2"/>
<colspec colname="required" colnum="3"/>
<colspec colname="description" colnum="4"/>
<thead>
<row>
<entry>parameter</entry>
<entry>type</entry>
<entry>required</entry>
<entry>description</entry>
</row>
</thead>
<tbody>
<row>
<entry>executable</entry>
<entry>String</entry>
<entry>Yes</entry>
<entry>Command to be run. The command may be specified with full
path using forward slash "/" as path separator.</entry>
</row>
<row>
<entry>argline</entry>
<entry>String</entry>
<entry>No</entry>
<entry>Any command line arguments</entry>
</row>
<row xml:base="file:/C:/Users/brosenberger/workspace/XServices/doc/entities.ent">
<entry>timeout</entry>
<entry>Long</entry>
<entry>Yes</entry>
<entry>Timeout in milliseconds. The command is forcefully terminated when timeout is reached.</entry>
</row>
</tbody>
</tgroup>
</table>
<para/>
</section>
<section>
<title>Output parameters
</title>
<section version="5.0" xml:base="ExecuteServices/../types/ReturnCode.xml" xmlns="http://docbook.org/ns/docbook" xmlns:xi="http://www.w3.org/2001/XInclude">
<title>ReturnCode type</title>
<para>
The ReturnCode type is used as the generic answer type for most of the
<application class="software">BruteXservices</application>
operations.
</para>
<para>
The defining Java class is
<ulink url="javadoc/net/brutex/xservices/types/ReturnCode.html">
<classname>net.brutex.xservices.types.ReturnCode</classname>
</ulink>
.
</para>
<bridgehead renderas="sect3">Schema definition</bridgehead>
<programlisting language="xml"><![CDATA[
<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="]]><link linkend="antproperty">tns:antProperty</link><![CDATA["/>
</xs:sequence>
</xs:complexType>]]>
</programlisting>
<bridgehead renderas="sect3">Example XML</bridgehead>
<programlisting language="xml">
&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;
<lineannotation>
See
<link linkend="antproperty">tns:antProperty</link>
for details about the &lt;propertyList&gt; elements.
</lineannotation>
&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;
</programlisting>
</section>
</section>
</section>
<section version="5.0" xml:base="ExecuteServices/runCommandWithSSH.xml" xmlns="http://docbook.org/ns/docbook" xmlns:xi="http://www.w3.org/2001/XInclude">
<title>runCommandWithSSH</title>
<para>Executes a command through a SSH session.</para>
<section>
<title>Input parameters
</title>
<para/>
<table frame="all">
<title>runCommandWithSSH input parameters</title>
<tgroup cols="4">
<colspec colname="parameter" colnum="1"/>
<colspec colname="type" colnum="2"/>
<colspec colname="required" colnum="3"/>
<colspec colname="description" colnum="4"/>
<thead>
<row>
<entry>parameter</entry>
<entry>type</entry>
<entry>required</entry>
<entry>description</entry>
</row>
</thead>
<tbody>
<row>
<entry>host</entry>
<entry>HostConnection</entry>
<entry>Yes</entry>
<entry>
Host to connect to (see:
<link linkend="hostconnection">tns:HostConnection</link>
)
</entry>
</row>
<row>
<entry>command</entry>
<entry>String</entry>
<entry>No</entry>
<entry>The command to execute.</entry>
</row>
<row xml:base="file:/C:/Users/brosenberger/workspace/XServices/doc/entities.ent">
<entry>timeout</entry>
<entry>Long</entry>
<entry>Yes</entry>
<entry>Timeout in milliseconds. The command is forcefully terminated when timeout is reached.</entry>
</row>
</tbody>
</tgroup>
</table>
<para/>
</section>
<section>
<title>Output parameters
</title>
<section version="5.0" xml:base="ExecuteServices/../types/ReturnCode.xml" xmlns="http://docbook.org/ns/docbook" xmlns:xi="http://www.w3.org/2001/XInclude">
<title>ReturnCode type</title>
<para>
The ReturnCode type is used as the generic answer type for most of the
<application class="software">BruteXservices</application>
operations.
</para>
<para>
The defining Java class is
<ulink url="javadoc/net/brutex/xservices/types/ReturnCode.html">
<classname>net.brutex.xservices.types.ReturnCode</classname>
</ulink>
.
</para>
<bridgehead renderas="sect3">Schema definition</bridgehead>
<programlisting language="xml"><![CDATA[
<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="]]><link linkend="antproperty">tns:antProperty</link><![CDATA["/>
</xs:sequence>
</xs:complexType>]]>
</programlisting>
<bridgehead renderas="sect3">Example XML</bridgehead>
<programlisting language="xml">
&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;
<lineannotation>
See
<link linkend="antproperty">tns:antProperty</link>
for details about the &lt;propertyList&gt; elements.
</lineannotation>
&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;
</programlisting>
</section>
</section>
<section>
<title>Sample Request:</title>
<programlisting language="xml">
<![CDATA[
<ws:runCommandWithSSH>
<host>
<hostname>ssh.brutex.net</hostname>
<port>22</port>
<user>roger</user>
<password>xxx</password>
</host>
<command>ls /etc/</command>
<timeout>30000</timeout>
</ws:runCommandWithSSH>
]]></programlisting>
</section>
</section>
<section version="5.0" xml:base="ExecuteServices/telnet.xml" xmlns="http://docbook.org/ns/docbook" xmlns:xi="http://www.w3.org/2001/XInclude">
<title>telnet</title>
<para>Runs a telnet session with an "expect shell" like behaviour.</para>
<section>
<title>Input parameters
</title>
<para/>
<table frame="all">
<title>telnet input parameters</title>
<tgroup cols="4">
<colspec colname="parameter" colnum="1"/>
<colspec colname="type" colnum="2"/>
<colspec colname="required" colnum="3"/>
<colspec colname="description" colnum="4"/>
<thead>
<row>
<entry>parameter</entry>
<entry>type</entry>
<entry>required</entry>
<entry>description</entry>
</row>
</thead>
<tbody>
<row>
<entry>host</entry>
<entry>HostConnection</entry>
<entry>Yes</entry>
<entry>Host to connect to (see: <link linkend="hostconnection">tns:HostConnection</link>)</entry>
</row>
<row>
<entry>prompt</entry>
<entry>String</entry>
<entry>No</entry>
<entry>The prompt string to expect after login. This is used to recognize when
the session is open.</entry>
</row>
<row>
<entry>command</entry>
<entry>String</entry>
<entry>No</entry>
<entry>The command to execute.</entry>
</row>
<row>
<entry>expect</entry>
<entry>String</entry>
<entry>No</entry>
<entry>The prompt to expect after the command has been executed successfully.</entry>
</row>
<row xml:base="file:/C:/Users/brosenberger/workspace/XServices/doc/entities.ent">
<entry>timeout</entry>
<entry>Long</entry>
<entry>Yes</entry>
<entry>Timeout in milliseconds. The command is forcefully terminated when timeout is reached.</entry>
</row>
</tbody>
</tgroup>
</table>
<para/>
</section>
<section>
<title>Output parameters</title>
<section version="5.0" xml:base="ExecuteServices/../types/ReturnCode.xml" xmlns="http://docbook.org/ns/docbook" xmlns:xi="http://www.w3.org/2001/XInclude">
<title>ReturnCode type</title>
<para>
The ReturnCode type is used as the generic answer type for most of the
<application class="software">BruteXservices</application>
operations.
</para>
<para>
The defining Java class is
<ulink url="javadoc/net/brutex/xservices/types/ReturnCode.html">
<classname>net.brutex.xservices.types.ReturnCode</classname>
</ulink>
.
</para>
<bridgehead renderas="sect3">Schema definition</bridgehead>
<programlisting language="xml"><![CDATA[
<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="]]><link linkend="antproperty">tns:antProperty</link><![CDATA["/>
</xs:sequence>
</xs:complexType>]]>
</programlisting>
<bridgehead renderas="sect3">Example XML</bridgehead>
<programlisting language="xml">
&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;
<lineannotation>
See
<link linkend="antproperty">tns:antProperty</link>
for details about the &lt;propertyList&gt; elements.
</lineannotation>
&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;
</programlisting>
</section>
</section>
<section>
<title>Sample Request:</title>
<programlisting language="xml">
<![CDATA[
<ws:telnet>
<host>
<hostname>localhost</hostname>
<port>23</port>
<user>brosenberger</user>
<password></password>
</host>
<prompt>C:\Users\brosenberger&gt;</prompt>
<command>dir c:\temp</command>
<expect>enberger&gt;</expect>
<timeout>60000</timeout>
</ws:telnet>
]]></programlisting>
</section>
</section>
</section>
<section id="fileservices" version="5.0" xml:base="FileServices.xml" xmlns="http://docbook.org/ns/docbook" xmlns:xi="http://www.w3.org/2001/XInclude">
<title>FileServices</title>
<para>The FileServces bundles various file operations. Its WSDL is located at
http://server:port/XServices/FileService?wsdl</para>
</section>
<section id="miscservices" version="5.0" xml:base="MiscServices.xml" xmlns="http://docbook.org/ns/docbook" xmlns:xi="http://www.w3.org/2001/XInclude">
<title>MiscServices</title>
<para>The MiscService bundles various operations. Its WSDL is located at
http://server:port/XServices/MiscService?wsdl</para>
</section>
</chapter>
<chapter id="xmltypes">
<beginpage/>
<title>XML Types</title>
<para>This chapter bundles the documentation for common XML types used
by XServices web service.</para>
<section version="5.0" xml:base="Types.xml" xmlns="http://docbook.org/ns/docbook" xmlns:xi="http://www.w3.org/2001/XInclude">
<!-- Sort alphabetically -->
<section xml:base="types/AntProperty.xml">
<title>AntProperty type</title>
<para>The AntProperty type defines a list of key/value pairs.</para>
<para>
The defining Java class is
<ulink url="javadoc/net/brutex/xservices/types/AntProperty.html">
<classname>net.brutex.xservices.types.AntProperty</classname>
</ulink>
.
</para>
<programlisting language="xml"><![CDATA[
<xs:complexType name="antProperty">
<xs:sequence>
<xs:element name="name" type="xs:string"/>
<xs:element name="value" type="xs:string"/>
</xs:sequence>
</xs:complexType>]]>
</programlisting>
<programlisting language="xml"><![CDATA[
<AntProperty>
<name>key2</name>
<value>value2</value>
</AntProperty>]]>
</programlisting>
</section>
<section xml:base="types/FileResource.xml">
<title>FileResource type</title>
<para>The FileResource type defines an URI to a file with optional on-the-fly decompression.</para>
<para>
The defining Java class is
<ulink url="javadoc/net/brutex/xservices/types/FileResource.html">
<classname>net.brutex.xservices.types.FileResource</classname>
</ulink>
.
</para>
<programlisting language="xml"><![CDATA[
<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>]]>
</programlisting>
<para>Available types:</para>
<para>FILE: URI points to a local file resource. Examples: c:\temp\something.txt, c:/dir/another.file, /home/brian/file</para>
<para>URL: File from URL (http, https, ftp, ...). Example: http://brutex.net/file.pdf</para>
<para>GZIP and BZIP2: File from a local file system with on-the-fly decompression.</para>
<programlisting language="xml"><![CDATA[
<resource>
<type>FILE</type>
<uri>c:\temp\xservices.war</uri>
</resource>]]>
</programlisting>
</section>
<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">
<title>HostConnection type</title>
<para>The HostConnection type identifies a server resource and login
credentials.</para>
<para>
The defining Java class is
<ulink url="javadoc/net/brutex/xservices/types/HostConnection.html">
<classname>net.brutex.xservices.types.HostConnection</classname>
</ulink>
.
</para>
<bridgehead renderas="sect3">Schema definition</bridgehead>
<programlisting language="xml"><![CDATA[
<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>
]]>
</programlisting>
<bridgehead renderas="sect3">Example XML</bridgehead>
<programlisting language="xml"><![CDATA[
<host>
<hostname>server.brutex.net</hostname>
<port>512</port> <!-- default rExec port -->
<user>brian</user>
<!--Optional:-->
<password>somepass</password>
</host>
]]>
</programlisting>
</section>
<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">
<title>PatternElement type</title>
<para>The PatternElement type defines single string pattern for file/
directory matching.</para>
<para>
The defining Java class is
<ulink url="javadoc/net/brutex/xservices/types/PatternElement.html">
<classname>net.brutex.xservices.types.PatternElement</classname>
</ulink>
.
</para>
<para>
These patterns look exactly like those used in Apache Ant
<ulink url="http://ant.apache.org/manual/dirtasks.html#patterns">Patterns</ulink>.
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.
</para>
<para>Some example patterns:</para>
<para>
<parameter>**/mydir/**</parameter>
</para>
<para>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.</para>
<para>
<parameter>/mydir/</parameter>
</para>
<para>The
parser will automatically append an '**' symbol, thus the
resulting pattern is
<parameter>/mydir/**</parameter>.
All files below the "/mydir/" directory (including its
sub-directories will be chosen.
</para>
<note>
<para>The pattern is OS independent. You should always use
"/" as path separator, even on windows based systems.
</para>
</note>
<bridgehead renderas="sect3">Schema definition</bridgehead>
<programlisting language="xml"><![CDATA[<xs:simpleType name="patternElement">
<xs:restriction base="xs:string"/>
</xs:simpleType>]]></programlisting>
<bridgehead renderas="sect3">Example XML</bridgehead>
<programlisting language="xml"><![CDATA[<PatternElement>**/*</PatternElement>]]></programlisting>
</section>
<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">
<title>PatternSetType type</title>
<para>The PatternSetType exposes various filters/ selectors for the
selection of resources (files).</para>
<para>
The defining Java class is
<ulink url="javadoc/net/brutex/xservices/types/PatternSetType.html">
<classname>net.brutex.xservices.types.PatternSetType</classname>
</ulink>
.
</para>
<bridgehead renderas="sect3">Schema definition</bridgehead>
<programlisting language="xml"><![CDATA[
<xs:complexType name="patternSetType">
<xs:sequence>
<xs:element default="**/*" maxOccurs="unbounded" minOccurs="0" name="include" type="]]><link linkend="patternelement">tns:patternElement</link><![CDATA["/>
<xs:element maxOccurs="unbounded" minOccurs="0" name="exclude" type="]]><link linkend="patternelement">tns:patternElement</link><![CDATA["/>
<xs:element minOccurs="0" name="selector" nillable="true" type="]]><link linkend="selectortype">tns:selectorType</link><![CDATA["/>
</xs:sequence>
</xs:complexType>]]>
</programlisting>
<bridgehead renderas="sect3">Example XML</bridgehead>
<programlisting language="xml"><![CDATA[
tbd.]]>
</programlisting>
</section>
<section version="5.0" xml:base="types/ReturnCode.xml" xmlns="http://docbook.org/ns/docbook" xmlns:xi="http://www.w3.org/2001/XInclude">
<title>ReturnCode type</title>
<para>
The ReturnCode type is used as the generic answer type for most of the
<application class="software">BruteXservices</application>
operations.
</para>
<para>
The defining Java class is
<ulink url="javadoc/net/brutex/xservices/types/ReturnCode.html">
<classname>net.brutex.xservices.types.ReturnCode</classname>
</ulink>
.
</para>
<bridgehead renderas="sect3">Schema definition</bridgehead>
<programlisting language="xml"><![CDATA[
<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="]]><link linkend="antproperty">tns:antProperty</link><![CDATA["/>
</xs:sequence>
</xs:complexType>]]>
</programlisting>
<bridgehead renderas="sect3">Example XML</bridgehead>
<programlisting language="xml">
&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;
<lineannotation>
See
<link linkend="antproperty">tns:antProperty</link>
for details about the &lt;propertyList&gt; elements.
</lineannotation>
&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;
</programlisting>
</section>
<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">
<title>SelectorType type</title>
<para>The SelectorType exposes various selectors for the selection of resources (files).</para>
<para>The defining Java class is
<ulink url="javadoc/net/brutex/xservices/types/SelectorType.html">
<classname>net.brutex.xservices.types.SelectorType</classname></ulink>.</para>
<bridgehead renderas="sect3">Schema definition</bridgehead>
<programlisting language="xml"><![CDATA[
<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>]]>
</programlisting>
<bridgehead renderas="sect3">Example XML</bridgehead>
<programlisting language="xml"><![CDATA[
tbd.]]>
</programlisting>
</section>
</section>
</chapter>
</book>

View File

@ -1,178 +1,57 @@
<?xml version='1.0'?> <?xml version='1.0'?>
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd"> <!DOCTYPE book [
<book> <!ENTITY % myent SYSTEM "entities.ent">
<title>User Guide</title> %myent;
<bookinfo> ]>
<date>February, 16th 2010</date> <book xmlns="http://docbook.org/ns/docbook" version="5.0"
<author> xmlns:xi="http://www.w3.org/2001/XInclude">
<firstname>Brian</firstname> <title>Brutex XServices Documentation</title>
<surname>Rosenberger</surname> <bookinfo>
<email>bru@brutex.de</email> <date>February, 16th 2010</date>
</author> <author>
<corpname>Brutex Network</corpname> <firstname>Brian</firstname>
<pubdate>1997</pubdate> <surname>Rosenberger</surname>
<copyright><year>2010</year></copyright> <email>bru@brutex.de</email>
<legalnotice> </author>
<para>The copyright holders make no representation about the <corpname>Brutex Network</corpname>
suitability of this document for any purpose. It is provided <copyright>
<quote>as is</quote> without expressed or implied warranty.</para> <year>2011</year>
</legalnotice> </copyright>
<legalnotice> <legalnotice>
<para>Apache Tomcat and Apache Ant are trademarks of the Apache <para>
Software Foundation.</para> The copyright holders make no representation about the suitability
</legalnotice> of this document for any purpose. It is provided
<abstract> <quote>as is</quote>
<title>Abstract</title> without expressed or implied warranty.
<para>In complex IT environments it is necessary to integrate </para>
different information systems with each other, exchange data </legalnotice>
between tools and automate actions and function calls depending <legalnotice>
on events arising from user interaction. To meet the requirements <para>Apache Tomcat and Apache Ant are trademarks of the Apache
of integration building usually means to implement APIs and to Software Foundation.</para>
create tool-to-tool bridges. Web Services can help to clean up </legalnotice>
bridges into interfaces as well as to abstract functions from <xi:include href="common/abstract.xml" />
their underlying platform and implementation.</para> </bookinfo>
<para>These are the major goals of the loosely coupled <chapter id="installation">
integration strategy which is in turn one essential idea of a <beginpage />
service-oriented architecture (SOA).</para> <title>Getting started</title>
<para>provide a low level set of functions and web services. <para>This chapter describes the installation.</para>
These can be orchestrated into services and used in business <xi:include href="common/installation.xml"/>
processes which make up the execution part of a SOA </chapter>
environment.</para> <chapter id="services">
<para>is an add-on to XBridgeNG 2.0. It runs standalone or in <beginpage />
combination with XBridgeNG. Pure XBridgeNG has two <title>Available Services</title>
components:</para> <para>List of available web services and their operations.</para>
<para> <xi:include href="ArchiveServices.xml" />
<itemizedlist> <xi:include href="ExecuteServices.xml" />
<listitem> <xi:include href="FileServices.xml" />
<para>XML Schema for item based data types (e.g. tickets <xi:include href="MiscServices.xml" />
from a bug tracker system or a database record)</para> </chapter>
</listitem>
<listitem> <chapter id="xmltypes">
<para>Set of Apache Ant tasks to function as a bridge <beginpage />
between the XBridgeNG XML format at legacy 3rd party <title>XML Types</title>
software (e.g. HP Quality Center, Serena TeamTrack, <para>This chapter bundles the documentation for common XML types used
...)</para> by XServices web service.</para>
</listitem> <xi:include href="Types.xml" />
<listitem> </chapter>
<para>The add Web Services (SOAP) wrapper around Apache Ant
tasks (since XBridgeNG 2.0)</para>
</listitem>
</itemizedlist>
</para>
<para>The current focus is on file-based operations. do not
contain an integration server or a process execution
engine.</para>
</abstract>
</bookinfo>
<chapter>
<beginpage />
<title>Getting started</title>
<para>This chapter describes the installation.</para>
<sect1>
<title>Prerequisites</title>
<para>tbd.</para>
<para>Sun Java SE 1.6.0</para>
<para>Apache Tomcat 6</para>
</sect1>
<sect1>
<title>Installation</title>
<para>tbd.</para>
<para>In short: Deploy .WAR file to Apache Tomcat</para>
<sect2>
<title>Securing with Basic Authentication</title>
<para>There is a quick guide explaining Basic Authentication
for Tomcat here:</para>
<para>
<ulink url="http://oreilly.com/pub/a/java/archive/tomcat-tips.html?page=1"/></para>
</sect2>
<sect2>
<title>Limit access to</title>
<para>Sometimes you&apos;ll only want to restrict access to to
only specified host names or IP addresses. This way, only
clients at those specified addresses can use the web services.
Tomcat provides two configuration values for that:
RemoteHostValve and RemoteAddrValve.</para>
<para>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.</para>
<programlisting language="xml">&lt;Context path=&quot;/XService/ArchiveService&quot; ...&gt;
&lt;Valve className=&quot;org.apache.catalina.valves.RemoteAddrValve&quot;
allow=&quot;127.0.0.1&quot; deny=&quot;&quot;/&gt;
&lt;/Context&gt;</programlisting>
<para>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.</para>
<para>The &lt;context&gt; element must be placed into the
server.xml file (into &lt;engine&gt;&lt;host&gt;).</para>
</sect2>
</sect1>
</chapter>
<chapter>
<title />
<section>
<title>ArchiveServices</title>
<para>The ArchiveService bundles file packing operations. Its
WSDL is located at
http://server:port/XServices/ArchiveService?wsdl</para>
</section>
<section>
<title>ExecuteServices</title>
<para>The ExecuteService bundles local and remote command
execution operations. Its WSDL is located at
http://server:port/XServices/ExecuteService?wsdl</para>
<section>
<title>runCommand</title>
<para>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.</para>
<section>
<title />
<para />
<table frame="all">
<title>runCommand input parameters</title>
<tgroup cols="4">
<colspec colname="parameter" colnum="1"/>
<colspec colname="type" colnum="2"/>
<colspec colname="required" colnum="3"/>
<colspec colname="description" colnum="4"/>
<thead>
<row>
<entry>parameter</entry>
<entry>type</entry>
<entry>required</entry>
<entry>description</entry>
</row>
</thead>
<tbody>
<row>
<entry>executable</entry>
<entry>String</entry>
<entry>Yes</entry>
<entry>Command to be run. The command may be
specified with full path using forward slash
&quot;/&quot; as path separator.</entry>
</row>
<row>
<entry>argline</entry>
<entry>String</entry>
<entry>No</entry>
<entry>Any command line arguments</entry>
</row>
</tbody>
</tgroup>
</table>
<para />
</section>
</section>
</section>
</chapter>
<chapter>
<title>XML Types</title>
<para>This chapter bundles the documentation for common xml types
used by XServices web service.</para>
</chapter>
</book> </book>

View File

@ -1,5 +1,13 @@
<?xml version='1.0' encoding='UTF-8'?><section> <?xml version='1.0' encoding="utf-8"?>
<title>ExecuteServices</title> <section xmlns="http://docbook.org/ns/docbook" version="5.0"
<para>The ExecuteService bundles local and remote command execution operations. Its WSDL is located at xmlns:xi="http://www.w3.org/2001/XInclude"
http://server:port/XServices/ExecuteService?wsdl</para> id="executeservices">
&runCommand;</section> <title>ExecuteServices</title>
<para>The ExecuteService bundles local and remote command
execution operations. Its WSDL is located at
http://server:port/XServices/ExecuteService?wsdl</para>
<xi:include href="ExecuteServices/rExec.xml" />
<xi:include href="ExecuteServices/runCommand.xml" />
<xi:include href="ExecuteServices/runCommandWithSSH.xml" />
<xi:include href="ExecuteServices/telnet.xml" />
</section>

View File

@ -0,0 +1,62 @@
<?xml version='1.0' encoding='utf-8'?>
<!DOCTYPE section [
<!ENTITY % myent SYSTEM "../entities.ent">
<!ENTITY rExec "rExec">
%myent;
]>
<section xmlns="http://docbook.org/ns/docbook" version="5.0"
xmlns:xi="http://www.w3.org/2001/XInclude">
<title>&rExec;
</title>
<para>provides remote execution facilities with authentication based on
user names and passwords.</para>
<section>
<title>&inp;
</title>
<para />
<table frame="all">
<title>&rExec;
input parameters
</title>
<tgroup cols="4">
<colspec colnum="1" colname="parameter" />
<colspec colnum="2" colname="type" />
<colspec colnum="3" colname="required" />
<colspec colnum="4" colname="description" />
<thead>
<row>
<entry>parameter</entry>
<entry>type</entry>
<entry>required</entry>
<entry>description</entry>
</row>
</thead>
<tbody>
<row>
<entry>host</entry>
<entry>HostConnection</entry>
<entry>Yes</entry>
<entry>
Host where to execute the command. See
<link linkend='hostconnection'>HostConnection</link>
.
</entry>
</row>
<row>
<entry>command</entry>
<entry>String</entry>
<entry>No</entry>
<entry>Any command including arguments</entry>
</row>
&param-timeout;
</tbody>
</tgroup>
</table>
<para />
</section>
<section>
<title>&outp;
</title>
<xi:include href="../types/ReturnCode.xml" />
</section>
</section>

View File

@ -1,42 +1,56 @@
<?xml version='1.0' encoding='UTF-8'?><section> <?xml version='1.0' encoding='utf-8'?>
<title>runCommand</title> <!DOCTYPE section [
<para>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.</para> <!ENTITY % myent SYSTEM "../entities.ent">
<section> %myent;
<title>&inp;</title> ]>
<para/> <section xmlns="http://docbook.org/ns/docbook" version="5.0"
<table frame="all"> xmlns:xi="http://www.w3.org/2001/XInclude">
<title>runCommand input parameters</title> <title>runCommand</title>
<tgroup cols="4"> <para>Run an executable with arguments on the server providing the web
<colspec colnum="1" colname="parameter"/> service. The command is run within the environment and under the user
<colspec colnum="2" colname="type"/> privileges of the user who is running the Tomcat Server.</para>
<colspec colnum="3" colname="required"/> <section>
<colspec colnum="4" colname="description"/> <title>&inp;
<thead> </title>
<row> <para />
<entry>parameter</entry> <table frame="all">
<entry>type</entry> <title>runCommand input parameters</title>
<entry>required</entry> <tgroup cols="4">
<entry>description</entry> <colspec colnum="1" colname="parameter" />
</row> <colspec colnum="2" colname="type" />
</thead> <colspec colnum="3" colname="required" />
<tbody> <colspec colnum="4" colname="description" />
<row> <thead>
<entry>executable</entry> <row>
<entry>String</entry> <entry>parameter</entry>
<entry>Yes</entry> <entry>type</entry>
<entry>Command to be run. The command may be specified with full path using forward slash &quot;/&quot; as path separator.</entry> <entry>required</entry>
</row> <entry>description</entry>
<row> </row>
<entry>argline</entry> </thead>
<entry>String</entry> <tbody>
<entry>No</entry> <row>
<entry>Any command line arguments</entry> <entry>executable</entry>
</row> <entry>String</entry>
<entry>Yes</entry>
<entry>Command to be run. The command may be specified with full
path using forward slash &quot;/&quot; as path separator.</entry>
</row>
<row>
<entry>argline</entry>
<entry>String</entry>
<entry>No</entry>
<entry>Any command line arguments</entry>
</row>
&param-timeout; &param-timeout;
</tbody> </tbody>
</tgroup> </tgroup>
</table> </table>
<para/> <para />
&returncode; </section>
</section> <section>
<title>&outp;
</title>
<xi:include href="../types/ReturnCode.xml" />
</section>
</section> </section>

View File

@ -0,0 +1,73 @@
<?xml version='1.0' encoding='utf-8'?>
<!DOCTYPE section [
<!ENTITY % myent SYSTEM "../entities.ent">
%myent;
]>
<section xmlns="http://docbook.org/ns/docbook" version="5.0"
xmlns:xi="http://www.w3.org/2001/XInclude">
<title>runCommandWithSSH</title>
<para>Executes a command through a SSH session.</para>
<section>
<title>&inp;
</title>
<para />
<table frame="all">
<title>runCommandWithSSH input parameters</title>
<tgroup cols="4">
<colspec colnum="1" colname="parameter" />
<colspec colnum="2" colname="type" />
<colspec colnum="3" colname="required" />
<colspec colnum="4" colname="description" />
<thead>
<row>
<entry>parameter</entry>
<entry>type</entry>
<entry>required</entry>
<entry>description</entry>
</row>
</thead>
<tbody>
<row>
<entry>host</entry>
<entry>HostConnection</entry>
<entry>Yes</entry>
<entry>
Host to connect to (see:
<link linkend="hostconnection">tns:HostConnection</link>
)
</entry>
</row>
<row>
<entry>command</entry>
<entry>String</entry>
<entry>No</entry>
<entry>The command to execute.</entry>
</row>
&param-timeout;
</tbody>
</tgroup>
</table>
<para />
</section>
<section>
<title>&outp;
</title>
<xi:include href="../types/ReturnCode.xml" />
</section>
<section>
<title>Sample Request:</title>
<programlisting language="xml">
<![CDATA[
<ws:runCommandWithSSH>
<host>
<hostname>ssh.brutex.net</hostname>
<port>22</port>
<user>roger</user>
<password>xxx</password>
</host>
<command>ls /etc/</command>
<timeout>30000</timeout>
</ws:runCommandWithSSH>
]]></programlisting>
</section>
</section>

View File

@ -0,0 +1,83 @@
<?xml version='1.0' encoding='utf-8'?>
<!DOCTYPE section [
<!ENTITY % myent SYSTEM "../entities.ent">
%myent;
]>
<section xmlns="http://docbook.org/ns/docbook" version="5.0"
xmlns:xi="http://www.w3.org/2001/XInclude">
<title>telnet</title>
<para>Runs a telnet session with an "expect shell" like behaviour.</para>
<section>
<title>&inp;
</title>
<para />
<table frame="all">
<title>telnet input parameters</title>
<tgroup cols="4">
<colspec colnum="1" colname="parameter" />
<colspec colnum="2" colname="type" />
<colspec colnum="3" colname="required" />
<colspec colnum="4" colname="description" />
<thead>
<row>
<entry>parameter</entry>
<entry>type</entry>
<entry>required</entry>
<entry>description</entry>
</row>
</thead>
<tbody>
<row>
<entry>host</entry>
<entry>HostConnection</entry>
<entry>Yes</entry>
<entry>Host to connect to (see: <link linkend="hostconnection">tns:HostConnection</link>)</entry>
</row>
<row>
<entry>prompt</entry>
<entry>String</entry>
<entry>No</entry>
<entry>The prompt string to expect after login. This is used to recognize when
the session is open.</entry>
</row>
<row>
<entry>command</entry>
<entry>String</entry>
<entry>No</entry>
<entry>The command to execute.</entry>
</row>
<row>
<entry>expect</entry>
<entry>String</entry>
<entry>No</entry>
<entry>The prompt to expect after the command has been executed successfully.</entry>
</row>
&param-timeout;
</tbody>
</tgroup>
</table>
<para />
</section>
<section>
<title>&outp;</title>
<xi:include href="../types/ReturnCode.xml" />
</section>
<section>
<title>Sample Request:</title>
<programlisting language="xml">
<![CDATA[
<ws:telnet>
<host>
<hostname>localhost</hostname>
<port>23</port>
<user>brosenberger</user>
<password></password>
</host>
<prompt>C:\Users\brosenberger&gt;</prompt>
<command>dir c:\temp</command>
<expect>enberger&gt;</expect>
<timeout>60000</timeout>
</ws:telnet>
]]></programlisting>
</section>
</section>

8
doc/FileServices.xml Normal file
View File

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<section xmlns="http://docbook.org/ns/docbook" version="5.0"
xmlns:xi="http://www.w3.org/2001/XInclude"
id="fileservices">
<title>FileServices</title>
<para>The FileServces bundles various file operations. Its WSDL is located at
http://server:port/XServices/FileService?wsdl</para>
</section>

9
doc/MiscServices.xml Normal file
View File

@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<section xmlns="http://docbook.org/ns/docbook" version="5.0"
xmlns:xi="http://www.w3.org/2001/XInclude"
id="miscservices">
<title>MiscServices</title>
<para>The MiscService bundles various operations. Its WSDL is located at
http://server:port/XServices/MiscService?wsdl</para>
</section>

View File

@ -1,4 +1,12 @@
<?xml version='1.0' encoding='UTF-8'?><chapter> <?xml version='1.0' encoding='UTF-8'?>
<title>XML Types</title> <section xmlns="http://docbook.org/ns/docbook" version="5.0"
<para>This chapter bundles the documentation for common xml types used by XServices web service.</para> xmlns:xi="http://www.w3.org/2001/XInclude">
&returncode;&patternsettype;&selectortype;&antproperty;&patternelement;</chapter> <!-- Sort alphabetically -->
<xi:include href="types/AntProperty.xml" />
<xi:include href="types/FileResource.xml" />
<xi:include href="types/HostConnection.xml" />
<xi:include href="types/PatternElement.xml" />
<xi:include href="types/PatternSetType.xml" />
<xi:include href="types/ReturnCode.xml" />
<xi:include href="types/SelectorType.xml" />
</section>

View File

@ -1,3 +0,0 @@
<?xml version='1.0' encoding='UTF-8'?><chapter>
<title>&brs;</title>
&ArchiveServices;&ExecuteServices;</chapter>

Binary file not shown.

View File

@ -1,20 +0,0 @@
<?xml version='1.0' encoding='UTF-8'?>
<title>Abstract</title>
<para>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.</para>
<para>These are the major goals of the loosely coupled integration strategy which is in turn one essential idea of a service-oriented architecture (SOA).</para>
<para>&brs; 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.</para>
<para>&brs; is an add-on to XBridgeNG 2.0. It runs standalone or in combination with XBridgeNG. Pure XBridgeNG has two components:</para>
<para><itemizedlist>
<listitem>
<para>XML Schema for item based data types (e.g. tickets from a bug tracker system or a database record)</para>
</listitem>
<listitem>
<para>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, ...)</para>
</listitem>
<listitem>
<para>The &brs; add
Web Services (SOAP) wrapper around Apache Ant tasks (since XBridgeNG 2.0)</para>
</listitem>
</itemizedlist>
</para>
<para>The current focus is on file-based operations. &brs; do not contain an integration server or a process execution engine.</para>

59
doc/common/abstract.xml Normal file
View File

@ -0,0 +1,59 @@
<?xml version="1.0" encoding="UTF-8"?>
<abstract>
<title>Abstract</title>
<para>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.</para>
<para>These are the major goals of the loosely coupled
integration
strategy which is in turn one essential idea of a
service-oriented
architecture (SOA).</para>
<para>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.</para>
<para>is an add-on to XBridgeNG 2.0. It runs standalone or in
combination with XBridgeNG. Pure XBridgeNG has two
components:</para>
<para>
<itemizedlist>
<listitem>
<para>XML Schema for item based data types (e.g. tickets
from a bug
tracker system or a database record)</para>
</listitem>
<listitem>
<para>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,
...)</para>
</listitem>
<listitem>
<para>The add Web Services (SOAP) wrapper around Apache Ant
tasks
(since XBridgeNG 2.0)</para>
</listitem>
</itemizedlist>
</para>
<para>The current focus is on file-based operations. do not
contain an
integration server or a process execution
engine.</para>
</abstract>

View File

@ -0,0 +1,61 @@
<?xml version="1.0" encoding="UTF-8"?>
<section xmlns="http://docbook.org/ns/docbook" version="5.0"
xmlns:xi="http://www.w3.org/2001/XInclude"
xmlns:xlink="http://www.w3.org/1999/xlink">
<section>
<title>Installation</title>
<para>tbd.</para>
<para>Sun Java SE 1.6.0</para>
<para>Apache Tomcat 7</para>
<para>tbd.</para>
<para>In short: Deploy .WAR file to Apache Tomcat</para>
<section>
<title>Securing with Basic Authentication</title>
<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">
http://oreilly.com/pub/a/java/archive/tomcat-tips.html?page=1</link>
</para>
<para>
</para>
</section>
<section>
<title>Limit access to</title>
<para>Sometimes you&apos;ll only want to restrict access to to
only
specified host names or IP addresses. This way, only
clients at
those specified addresses can use the web services.
Tomcat provides
two configuration values for that:
RemoteHostValve and
RemoteAddrValve.</para>
<para>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.</para>
<programlisting language="xml">&lt;Context
path=&quot;/XService/ArchiveService&quot;
...&gt; &lt;Valve
className=&quot;org.apache.catalina.valves.RemoteAddrValve&quot;
allow=&quot;127.0.0.1&quot; deny=&quot;&quot;/&gt; &lt;/Context&gt;
</programlisting>
<para>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.
</para>
<para>The &lt;context&gt; element must be placed into the
server.xml
file (into &lt;engine&gt;&lt;host&gt;).</para>
</section>
</section>
</section>

View File

@ -1,6 +1,6 @@
<!ENTITY inp "Input parameters"> <!ENTITY inp "Input parameters">
<!ENTITY outp "Output parameters"> <!ENTITY outp "Output parameters">
<!ENTITY brs "<application class='software'>BruteXservices</application>"> <!ENTITY brs "">
<!ENTITY param-timeout "<row> <!ENTITY param-timeout "<row>
<entry>timeout</entry> <entry>timeout</entry>
<entry>Long</entry> <entry>Long</entry>
@ -12,9 +12,4 @@
<!ENTITY schemadefinition "<bridgehead renderas='sect3'>Schema definition</bridgehead>"> <!ENTITY schemadefinition "<bridgehead renderas='sect3'>Schema definition</bridgehead>">
<!ENTITY returncode SYSTEM "types/ReturnCode.xml">
<!ENTITY antproperty SYSTEM "types/AntProperty.xml">
<!ENTITY patternelement SYSTEM "types/PatternElement.xml">
<!ENTITY patternsettype SYSTEM "types/PatternSetType.xml">
<!ENTITY selectortype SYSTEM "types/SelectorType.xml">

View File

@ -1,32 +0,0 @@
<?xml version='1.0' encoding='UTF-8'?><chapter>
<beginpage/>
<title>Getting started</title>
<para>This chapter describes the installation.</para>
<sect1>
<title>Prerequisites</title>
<para>tbd.</para>
<para>Sun Java SE 1.6.0</para>
<para>Apache Tomcat 6</para>
</sect1>
<sect1>
<title>Installation</title>
<para>tbd.</para>
<para>In short: Deploy .WAR file to Apache Tomcat</para>
<sect2>
<title>Securing &brs; with Basic Authentication</title>
<para>There is a quick guide explaining Basic Authentication for Tomcat here: </para>
<para><ulink url="http://oreilly.com/pub/a/java/archive/tomcat-tips.html?page=1"/></para>
</sect2>
<sect2>
<title>Limit access to &brs;</title>
<para>Sometimes you&apos;ll only want to restrict access to &brs; to only specified host names or IP addresses. This way, only clients at those specified addresses can use the &brs; web services. Tomcat provides two configuration values for that: RemoteHostValve and RemoteAddrValve.</para>
<para>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.</para>
<programlisting language="xml">&lt;Context path=&quot;/XService/ArchiveService&quot; ...&gt;
&lt;Valve className=&quot;org.apache.catalina.valves.RemoteAddrValve&quot;
allow=&quot;127.0.0.1&quot; deny=&quot;&quot;/&gt;
&lt;/Context&gt;</programlisting>
<para>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.</para>
<para>The &lt;context&gt; element must be placed into the server.xml file (into &lt;engine&gt;&lt;host&gt;).</para>
</sect2>
</sect1>
</chapter>

View File

@ -1,24 +1,31 @@
<?xml version='1.0' encoding='UTF-8'?><section id="antproperty"> <?xml version="1.0" encoding="UTF-8"?>
<title>AntProperty type</title> <section>
<para>The AntProperty type defines a list of key/value pairs.</para> <title>AntProperty type</title>
<para>The defining Java class is <para>The AntProperty type defines a list of key/value pairs.</para>
<ulink url="javadoc/net/brutex/xservices/types/AntProperty.html"> <para>
<classname>net.brutex.xservices.types.AntProperty</classname></ulink>.</para> The defining Java class is
&schemadefinition; <ulink
<programlisting language="xml"><![CDATA[ url="javadoc/net/brutex/xservices/types/AntProperty.html">
<xs:complexType name="antProperty"> <classname>net.brutex.xservices.types.AntProperty</classname>
<xs:sequence> </ulink>
<xs:element name="name" type="xs:string"/> .
<xs:element name="value" type="xs:string"/> </para>
</xs:sequence>
</xs:complexType>]]> <programlisting
</programlisting> language="xml"><![CDATA[
&examplexml; <xs:complexType name="antProperty">
<programlisting language="xml"><![CDATA[ <xs:sequence>
<AntProperty> <xs:element name="name" type="xs:string"/>
<name>key2</name> <xs:element name="value" type="xs:string"/>
<value>value2</value> </xs:sequence>
</AntProperty>]]> </xs:complexType>]]>
</programlisting> </programlisting>
</section> <programlisting
language="xml"><![CDATA[
<AntProperty>
<name>key2</name>
<value>value2</value>
</AntProperty>]]>
</programlisting>
</section>

View File

@ -0,0 +1,34 @@
<?xml version="1.0" encoding="UTF-8"?>
<section>
<title>FileResource type</title>
<para>The FileResource type defines an URI to a file with optional on-the-fly decompression.</para>
<para>
The defining Java class is
<ulink
url="javadoc/net/brutex/xservices/types/FileResource.html">
<classname>net.brutex.xservices.types.FileResource</classname>
</ulink>
.
</para>
<programlisting
language="xml"><![CDATA[
<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>]]>
</programlisting>
<para>Available types:</para>
<para>FILE: URI points to a local file resource. Examples: c:\temp\something.txt, c:/dir/another.file, /home/brian/file</para>
<para>URL: File from URL (http, https, ftp, ...). Example: http://brutex.net/file.pdf</para>
<para>GZIP and BZIP2: File from a local file system with on-the-fly decompression.</para>
<programlisting
language="xml"><![CDATA[
<resource>
<type>FILE</type>
<uri>c:\temp\xservices.war</uri>
</resource>]]>
</programlisting>
</section>

View File

@ -0,0 +1,37 @@
<?xml version="1.0" encoding="UTF-8"?>
<section xmlns="http://docbook.org/ns/docbook" version="5.0"
xmlns:xi="http://www.w3.org/2001/XInclude" id="hostconnection">
<title>HostConnection type</title>
<para>The HostConnection type identifies a server resource and login
credentials.</para>
<para>
The defining Java class is
<ulink url="javadoc/net/brutex/xservices/types/HostConnection.html">
<classname>net.brutex.xservices.types.HostConnection</classname>
</ulink>
.
</para>
<bridgehead renderas='sect3'>Schema definition</bridgehead>
<programlisting language="xml"><![CDATA[
<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>
]]>
</programlisting>
<bridgehead renderas='sect3'>Example XML</bridgehead>
<programlisting language="xml"><![CDATA[
<host>
<hostname>server.brutex.net</hostname>
<port>512</port> <!-- default rExec port -->
<user>brian</user>
<!--Optional:-->
<password>somepass</password>
</host>
]]>
</programlisting>
</section>

View File

@ -1,31 +1,52 @@
<?xml version='1.0' encoding='UTF-8'?><section id="patternelement"> <?xml version='1.0' encoding='UTF-8'?>
<title>PatternElement type</title> <section xmlns="http://docbook.org/ns/docbook" version="5.0"
<para>The PatternElement type defines single string pattern for file/ directory matching.</para> xmlns:xi="http://www.w3.org/2001/XInclude" id="patternelement">
<para>The defining Java class is <title>PatternElement type</title>
<ulink url="javadoc/net/brutex/xservices/types/PatternElement.html"> <para>The PatternElement type defines single string pattern for file/
<classname>net.brutex.xservices.types.PatternElement</classname> directory matching.</para>
</ulink>. <para>
</para> The defining Java class is
<para>These patterns look exactly like those used in Apache Ant <ulink url="javadoc/net/brutex/xservices/types/PatternElement.html">
<ulink url="http://ant.apache.org/manual/dirtasks.html#patterns">Patterns</ulink>. <classname>net.brutex.xservices.types.PatternElement</classname>
The &apos;*&apos; matches zero or more characters and the &apos;?&apos; will match a single character. </ulink>
Both symbols can be combined in one pattern. The &apos;**&apos; .
symbol can be used to match any directory deepth. </para>
</para> <para>
<para>Some example patterns:</para> These patterns look exactly like those used in Apache Ant
<para><parameter>**/mydir/**</parameter></para> <ulink url="http://ant.apache.org/manual/dirtasks.html#patterns">Patterns</ulink>.
<para>Match all file that are located in any directory that has &quot;mydir&quot; string in its pathname. Also applies to files with &quot;mydir&quot; in their name.</para> The &apos;*&apos; matches zero or more characters and the
<para><parameter>/mydir/</parameter></para> &apos;?&apos; will match a single character.
<para>The parser will automatically append an &apos;**&apos; symbol, thus the resulting pattern is <parameter>/mydir/**</parameter>. All files below the &quot;/mydir/&quot; directory (including its sub-directories will be chosen.</para> Both symbols can be combined in one pattern. The &apos;**&apos;
<note> symbol can be used to match any directory deepth.
<para>The pattern is OS independent. You should always use &quot;/&quot; as path separator, even on windows based systems.</para> </para>
</note> <para>Some example patterns:</para>
&schemadefinition; <para>
<programlisting language="xml"><![CDATA[<xs:simpleType name="patternElement"> <parameter>**/mydir/**</parameter>
</para>
<para>Match all file that are located in any directory that has
&quot;mydir&quot; string in its pathname. Also applies to files with
&quot;mydir&quot; in their name.</para>
<para>
<parameter>/mydir/</parameter>
</para>
<para>The
parser will automatically append an &apos;**&apos; symbol, thus the
resulting pattern is
<parameter>/mydir/**</parameter>.
All files below the &quot;/mydir/&quot; directory (including its
sub-directories will be chosen.
</para>
<note>
<para>The pattern is OS independent. You should always use
&quot;/&quot; as path separator, even on windows based systems.
</para>
</note>
<bridgehead renderas='sect3'>Schema definition</bridgehead>
<programlisting language="xml"><![CDATA[<xs:simpleType name="patternElement">
<xs:restriction base="xs:string"/> <xs:restriction base="xs:string"/>
</xs:simpleType>]]></programlisting> </xs:simpleType>]]></programlisting>
&examplexml; <bridgehead renderas='sect3'>Example XML</bridgehead>
<programlisting language="xml"><![CDATA[<PatternElement>**/*</PatternElement>]]></programlisting> <programlisting language="xml"><![CDATA[<PatternElement>**/*</PatternElement>]]></programlisting>
</section> </section>

View File

@ -1,23 +1,32 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<section id="patternsettype"> <section xmlns="http://docbook.org/ns/docbook" version="5.0"
<title>PatternSetType type</title> xmlns:xi="http://www.w3.org/2001/XInclude" id="patternsettype">
<para>The PatternSetType exposes various filters/ selectors for the selection of resources (files).</para> <title>PatternSetType type</title>
<para>The defining Java class is <para>The PatternSetType exposes various filters/ selectors for the
<ulink url="javadoc/net/brutex/xservices/types/PatternSetType.html"> selection of resources (files).</para>
<classname>net.brutex.xservices.types.PatternSetType</classname></ulink>.</para> <para>
&schemadefinition; The defining Java class is
<programlisting language="xml"><![CDATA[ <ulink url="javadoc/net/brutex/xservices/types/PatternSetType.html">
<classname>net.brutex.xservices.types.PatternSetType</classname>
</ulink>
.
</para>
<bridgehead renderas='sect3'>Schema definition</bridgehead>
<programlisting language="xml"><![CDATA[
<xs:complexType name="patternSetType"> <xs:complexType name="patternSetType">
<xs:sequence> <xs:sequence>
<xs:element default="**/*" maxOccurs="unbounded" minOccurs="0" name="include" type="]]><link linkend="patternelement">tns:patternElement</link><![CDATA["/> <xs:element default="**/*" maxOccurs="unbounded" minOccurs="0" name="include" type="]]><link
<xs:element maxOccurs="unbounded" minOccurs="0" name="exclude" type="]]><link linkend="patternelement">tns:patternElement</link><![CDATA["/> linkend="patternelement">tns:patternElement</link><![CDATA["/>
<xs:element minOccurs="0" name="selector" nillable="true" type="]]><link linkend="selectortype">tns:selectorType</link><![CDATA["/> <xs:element maxOccurs="unbounded" minOccurs="0" name="exclude" type="]]><link
linkend="patternelement">tns:patternElement</link><![CDATA["/>
<xs:element minOccurs="0" name="selector" nillable="true" type="]]><link
linkend="selectortype">tns:selectorType</link><![CDATA["/>
</xs:sequence> </xs:sequence>
</xs:complexType>]]> </xs:complexType>]]>
</programlisting> </programlisting>
&examplexml; <bridgehead renderas='sect3'>Example XML</bridgehead>
<programlisting language="xml"><![CDATA[ <programlisting language="xml"><![CDATA[
tbd.]]> tbd.]]>
</programlisting> </programlisting>
</section> </section>

View File

@ -1,34 +1,53 @@
<?xml version='1.0' encoding='UTF-8'?><section> <?xml version='1.0' encoding='UTF-8'?>
<title>ReturnCode type</title> <section xmlns="http://docbook.org/ns/docbook" version="5.0"
<para>The ReturnCode type is used as the generic answer type for most of the &brs; operations.</para> xmlns:xi="http://www.w3.org/2001/XInclude">
<para>The defining Java class is <title>ReturnCode type</title>
<ulink url="&javadoc-base;javadoc/net/brutex/xservices/types/ReturnCode.html"> <para>
<classname>net.brutex.xservices.types.ReturnCode</classname></ulink>.</para> The ReturnCode type is used as the generic answer type for most of the
&schemadefinition; <application class='software'>BruteXservices</application>
<programlisting language="xml"><![CDATA[ operations.
</para>
<para>
The defining Java class is
<ulink url="javadoc/net/brutex/xservices/types/ReturnCode.html">
<classname>net.brutex.xservices.types.ReturnCode</classname>
</ulink>
.
</para>
<bridgehead renderas='sect3'>Schema definition</bridgehead>
<programlisting language="xml"><![CDATA[
<xs:complexType name="ReturnCodeType"> <xs:complexType name="ReturnCodeType">
<xs:sequence> <xs:sequence>
<xs:element name="returnCode" type="xs:int"/> <xs:element name="returnCode" type="xs:int"/>
<xs:element minOccurs="0" name="stdOut" type="xs:string"/> <xs:element minOccurs="0" name="stdOut" type="xs:string"/>
<xs:element minOccurs="0" name="stdErr" type="xs:string"/> <xs:element minOccurs="0" name="stdErr" type="xs:string"/>
<xs:element maxOccurs="unbounded" minOccurs="0" name="propertyList" nillable="true" type="]]><link linkend="antproperty">tns:antProperty</link><![CDATA["/> <xs:element maxOccurs="unbounded" minOccurs="0" name="propertyList" nillable="true" type="]]><link
linkend="antproperty">tns:antProperty</link><![CDATA["/>
</xs:sequence> </xs:sequence>
</xs:complexType>]]> </xs:complexType>]]>
</programlisting> </programlisting>
&examplexml; <bridgehead renderas='sect3'>Example XML</bridgehead>
<programlisting language="xml">&lt;ReturnCode xmlns:ns2=&quot;http://ws.xservices.brutex.net&quot;&gt; <programlisting language="xml">
&lt;returnCode&gt;0&lt;/returnCode&gt; &lt;ReturnCode
&lt;stdOut/&gt; xmlns:ns2=&quot;http://ws.xservices.brutex.net&quot;&gt;
&lt;stdErr/&gt; &lt;returnCode&gt;0&lt;/returnCode&gt;
&lt;propertyList&gt; <lineannotation>See <link linkend="antproperty">tns:antProperty</link> for details about the &lt;propertyList&gt; elements.</lineannotation> &lt;stdOut/&gt;
&lt;name&gt;key1&lt;/name&gt; &lt;stdErr/&gt;
&lt;value&gt;value1&lt;/value&gt; &lt;propertyList&gt;
&lt;/propertyList&gt; <lineannotation>
&lt;propertyList&gt; See
&lt;name&gt;key2&lt;/name&gt; <link linkend="antproperty">tns:antProperty</link>
&lt;value&gt;value2&lt;/value&gt; for details about the &lt;propertyList&gt; elements.
&lt;/propertyList&gt; </lineannotation>
&lt;/ReturnCode&gt;</programlisting> &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;
</programlisting>
</section> </section>

View File

@ -1,11 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<section id="selectortype"> <section xmlns="http://docbook.org/ns/docbook"
version="5.0"
xmlns:xi="http://www.w3.org/2001/XInclude" id="selectortype">
<title>SelectorType type</title> <title>SelectorType type</title>
<para>The SelectorType exposes various selectors for the selection of resources (files).</para> <para>The SelectorType exposes various selectors for the selection of resources (files).</para>
<para>The defining Java class is <para>The defining Java class is
<ulink url="javadoc/net/brutex/xservices/types/SelectorType.html"> <ulink url="javadoc/net/brutex/xservices/types/SelectorType.html">
<classname>net.brutex.xservices.types.SelectorType</classname></ulink>.</para> <classname>net.brutex.xservices.types.SelectorType</classname></ulink>.</para>
&schemadefinition; <bridgehead renderas='sect3'>Schema definition</bridgehead>
<programlisting language="xml"><![CDATA[ <programlisting language="xml"><![CDATA[
<xs:complexType abstract="true" name="selectorType"> <xs:complexType abstract="true" name="selectorType">
<xs:sequence> <xs:sequence>
@ -13,7 +15,7 @@
</xs:sequence> </xs:sequence>
</xs:complexType>]]> </xs:complexType>]]>
</programlisting> </programlisting>
&examplexml; <bridgehead renderas='sect3'>Example XML</bridgehead>
<programlisting language="xml"><![CDATA[ <programlisting language="xml"><![CDATA[
tbd.]]> tbd.]]>
</programlisting> </programlisting>