You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by sv...@apache.org on 2018/04/12 21:22:04 UTC

svn commit: r1829011 [3/12] - in /maven/doxia/website/content: ./ book/ css/ developers/ doxia-example-book/ fonts/ images/ images/logos/ images/profiles/ img/ issues/ js/ macros/ modules/ references/

Added: maven/doxia/website/content/doxia-example-book/bindings.html
URL: http://svn.apache.org/viewvc/maven/doxia/website/content/doxia-example-book/bindings.html?rev=1829011&view=auto
==============================================================================
--- maven/doxia/website/content/doxia-example-book/bindings.html (added)
+++ maven/doxia/website/content/doxia-example-book/bindings.html Thu Apr 12 21:22:02 2018
@@ -0,0 +1,251 @@
+<!DOCTYPE html>
+<!--
+ | Generated by Apache Maven Doxia Site Renderer 1.8 from target/generated-site/xdoc/doxia-example-book/bindings.xml at 2018-04-12
+ | Rendered using Apache Maven Fluido Skin 1.7
+-->
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+  <head>
+    <meta charset="UTF-8" />
+    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
+    <meta name="author" content="XFire User&apos;s Guide" />
+    <meta name="Date-Revision-yyyymmdd" content="20180412" />
+    <meta http-equiv="Content-Language" content="en" />
+    <title>Doxia &#x2013; Bindings Overview</title>
+    <link rel="stylesheet" href="../css/apache-maven-fluido-1.7.min.css" />
+    <link rel="stylesheet" href="../css/site.css" />
+    <link rel="stylesheet" href="../css/print.css" media="print" />
+    <script type="text/javascript" src="../js/apache-maven-fluido-1.7.min.js"></script>
+    <!-- Google Analytics -->
+    <script type="text/javascript">
+      var _gaq = _gaq || [];
+      _gaq.push(['_setAccount', 'UA-140879-1']);
+      _gaq.push(['_trackPageview']);
+      (function() {
+        var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
+        ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
+        var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
+      })();
+    </script>
+  </head>
+  <body class="topBarDisabled">
+    <div class="container-fluid">
+      <div id="banner">
+        <div class="pull-left"><a href="https://www.apache.org/" id="bannerLeft"><img src="../../images/apache-maven-project.png"  alt="Doxia Site"/></a></div>
+        <div class="pull-right"><a href=".././" id="bannerRight"><img src="../images/doxia-logo.png"  alt="Doxia"/></a></div>
+        <div class="clear"><hr/></div>
+      </div>
+
+      <div id="breadcrumbs">
+        <ul class="breadcrumb">
+      <li class=""><a href="https://www.apache.org/" class="externalLink" title="Apache">Apache</a><span class="divider">/</span></li>
+      <li class=""><a href="../../index.html" title="Maven">Maven</a><span class="divider">/</span></li>
+      <li class=""><a href="http://maven.apache.org/doxia/index.html" class="externalLink" title="Doxia">Doxia</a><span class="divider">/</span></li>
+    <li class="active ">Bindings Overview</li>
+        <li id="publishDate" class="pull-right">Last Published: 2018-04-12</li>
+        </ul>
+      </div>
+      <div class="row-fluid">
+        <div id="leftColumn" class="span2">
+          <div class="well sidebar-nav">
+    <ul class="nav nav-list">
+      <li class="nav-header">About Doxia</li>
+    <li><a href="../index.html" title="What is Doxia?"><span class="none"></span>What is Doxia?</a></li>
+    <li><a href="../overview.html" title="Overview"><span class="none"></span>Overview</a></li>
+    <li><a href="../upgrading.html" title="Upgrading"><span class="icon-chevron-right"></span>Upgrading</a></li>
+    <li><a href="../downloads.html" title="Downloads"><span class="none"></span>Downloads</a></li>
+    <li><a href="../faq.html" title="FAQ"><span class="none"></span>FAQ</a></li>
+      <li class="nav-header">Documentation</li>
+    <li><a href="../references/index.html" title="Format References"><span class="icon-chevron-right"></span>Format References</a></li>
+    <li><a href="../modules/index.html" title="Doxia Modules Guide"><span class="none"></span>Doxia Modules Guide</a></li>
+    <li><a href="../macros/index.html" title="Doxia Macros Guide"><span class="none"></span>Doxia Macros Guide</a></li>
+    <li><a href="../book/index.html" title="Writing Books"><span class="none"></span>Writing Books</a></li>
+    <li><a href="../issues/index.html" title="Issues &amp; Gotchas"><span class="none"></span>Issues &amp; Gotchas</a></li>
+    <li><a href="../resources.html" title="External Resources"><span class="none"></span>External Resources</a></li>
+      <li class="nav-header">Developer Docs</li>
+    <li><a href="../developers/index.html" title="Developer Centre"><span class="icon-chevron-right"></span>Developer Centre</a></li>
+    <li><a href="../doxia/index.html" title="Doxia 1.8"><span class="icon-chevron-down"></span>Doxia 1.8</a>
+    <ul class="nav nav-list">
+    <li><a href="../doxia/index.html" title="Doxia base"><span class="none"></span>Doxia base</a></li>
+    <li><a href="../doxia-sitetools/index.html" title="Doxia Sitetools"><span class="none"></span>Doxia Sitetools</a></li>
+    </ul>
+</li>
+    <li><a href="../doxia-archives/doxia-1.7/index.html" title="Doxia 1.7"><span class="icon-chevron-down"></span>Doxia 1.7</a>
+    <ul class="nav nav-list">
+    <li><a href="../doxia-archives/doxia-1.7/index.html" title="Doxia base"><span class="none"></span>Doxia base</a></li>
+    <li><a href="../doxia-sitetools-archives/doxia-sitetools-1.7.5/index.html" title="Doxia Sitetools"><span class="none"></span>Doxia Sitetools</a></li>
+    </ul>
+</li>
+    <li><a href="../doxia-archives/doxia-1.6/index.html" title="Doxia 1.6"><span class="icon-chevron-down"></span>Doxia 1.6</a>
+    <ul class="nav nav-list">
+    <li><a href="../doxia-archives/doxia-1.6/index.html" title="Doxia base"><span class="none"></span>Doxia base</a></li>
+    <li><a href="../doxia-sitetools-archives/doxia-sitetools-1.6/index.html" title="Doxia Sitetools"><span class="none"></span>Doxia Sitetools</a></li>
+    </ul>
+</li>
+    <li><a href="../doxia/index.html" title="Doxia 1.5"><span class="icon-chevron-down"></span>Doxia 1.5</a>
+    <ul class="nav nav-list">
+    <li><a href="../doxia-archives/doxia-1.5/index.html" title="Doxia base"><span class="none"></span>Doxia base</a></li>
+    </ul>
+</li>
+    <li><a href="../doxia-archives/doxia-1.4/index.html" title="Doxia 1.4"><span class="icon-chevron-down"></span>Doxia 1.4</a>
+    <ul class="nav nav-list">
+    <li><a href="../doxia-archives/doxia-1.4/index.html" title="Doxia base"><span class="none"></span>Doxia base</a></li>
+    <li><a href="../doxia-sitetools-archives/doxia-sitetools-1.4/index.html" title="Doxia Sitetools"><span class="none"></span>Doxia Sitetools</a></li>
+    </ul>
+</li>
+    <li><a href="../doxia-archives/doxia-1.3/index.html" title="Doxia 1.3"><span class="icon-chevron-down"></span>Doxia 1.3</a>
+    <ul class="nav nav-list">
+    <li><a href="../doxia-archives/doxia-1.3/index.html" title="Doxia base"><span class="none"></span>Doxia base</a></li>
+    <li><a href="../doxia-sitetools-archives/doxia-sitetools-1.3/index.html" title="Doxia Sitetools"><span class="none"></span>Doxia Sitetools</a></li>
+    </ul>
+</li>
+    <li><a href="../doxia-archives/doxia-1.2/index.html" title="Doxia 1.2"><span class="icon-chevron-down"></span>Doxia 1.2</a>
+    <ul class="nav nav-list">
+    <li><a href="../doxia-archives/doxia-1.2/index.html" title="Doxia base"><span class="none"></span>Doxia base</a></li>
+    <li><a href="../doxia-sitetools-archives/doxia-sitetools-1.2/index.html" title="Doxia Sitetools"><span class="none"></span>Doxia Sitetools</a></li>
+    </ul>
+</li>
+    <li><a href="../doxia-tools/index.html" title="Doxia Tools"><span class="none"></span>Doxia Tools</a></li>
+    <li><a href="../doxia-ide.html" title="Doxia IDE"><span class="none"></span>Doxia IDE</a></li>
+      <li class="nav-header">Project Documentation</li>
+    <li><a href="../project-info.html" title="Project Information"><span class="icon-chevron-right"></span>Project Information</a></li>
+      <li class="nav-header">Maven Projects</li>
+    <li><a href="../../archetype/index.html" title="Archetype"><span class="none"></span>Archetype</a></li>
+    <li><a href="../../resolver/index.html" title="Artifact Resolver"><span class="none"></span>Artifact Resolver</a></li>
+    <li><a href="../index.html" title="Doxia"><span class="none"></span>Doxia</a></li>
+    <li><a href="../../jxr/index.html" title="JXR"><span class="none"></span>JXR</a></li>
+    <li><a href="../../ref/current" title="Maven"><span class="none"></span>Maven</a></li>
+    <li><a href="../../pom/index.html" title="Parent POMs"><span class="none"></span>Parent POMs</a></li>
+    <li><a href="../../plugins/index.html" title="Plugins"><span class="none"></span>Plugins</a></li>
+    <li><a href="../../plugin-testing/index.html" title="Plugin Testing"><span class="none"></span>Plugin Testing</a></li>
+    <li><a href="../../plugin-tools/index.html" title="Plugin Tools"><span class="none"></span>Plugin Tools</a></li>
+    <li><a href="../../apache-resource-bundles/index.html" title="Resource Bundles"><span class="none"></span>Resource Bundles</a></li>
+    <li><a href="../../scm/index.html" title="SCM"><span class="none"></span>SCM</a></li>
+    <li><a href="../../shared/index.html" title="Shared Components"><span class="none"></span>Shared Components</a></li>
+    <li><a href="../../skins/index.html" title="Skins"><span class="none"></span>Skins</a></li>
+    <li><a href="../../surefire/index.html" title="Surefire"><span class="none"></span>Surefire</a></li>
+    <li><a href="../../wagon/index.html" title="Wagon"><span class="none"></span>Wagon</a></li>
+      <li class="nav-header">ASF</li>
+    <li><a href="https://www.apache.org/foundation/how-it-works.html" class="externalLink" title="How Apache Works"><span class="none"></span>How Apache Works</a></li>
+    <li><a href="https://www.apache.org/foundation/" class="externalLink" title="Foundation"><span class="none"></span>Foundation</a></li>
+    <li><a href="https://www.apache.org/foundation/sponsorship.html" class="externalLink" title="Sponsoring Apache"><span class="none"></span>Sponsoring Apache</a></li>
+    <li><a href="https://www.apache.org/foundation/thanks.html" class="externalLink" title="Thanks"><span class="none"></span>Thanks</a></li>
+</ul>
+<form id="search-form" action="https://www.google.com/search" method="get" >
+  <input value="$sitesearchValue" name="sitesearch" type="hidden"/>
+  <input class="search-query" name="q" id="query" type="text" />
+</form>
+<script type="text/javascript">asyncJs( 'https://cse.google.com/brand?form=search-form' )</script>
+          <hr />
+          <div id="poweredBy">
+            <div class="clear"></div>
+            <div class="clear"></div>
+    <div id="twitter">
+    <a href="https://twitter.com/ASFMavenProject" class="twitter-follow-button" data-show-count="false" data-align="left" data-size="medium" data-show-screen-name="true" data-lang="en">Follow ASFMavenProject</a>
+    <script type="text/javascript">!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
+    </div>
+            <div class="clear"></div>
+            <div class="clear"></div>
+<a href="http://maven.apache.org/" title="Built by Maven" class="poweredBy"><img class="builtBy" alt="Built by Maven" src="../images/logos/maven-feather.png" /></a>
+            </div>
+          </div>
+        </div>
+        <div id="bodyColumn"  class="span10" >
+<div class="section">
+<h2></h2>
+<table class="table table-striped" width="100%" align="center" border="0">
+<tr class="a">
+<td align="left">Previous: <a href="bind.html">Bindings</a></td>
+<td align="center">Up: <a href="bind.html">Bindings</a></td>
+<td align="right">Next: <a href="aegis-binding.html">Aegis Binding</a></td></tr></table><hr /></div>
+<div class="section">
+<h2><a name="Bindings_Overview"></a>Bindings Overview</h2>
+<p>Bindings are one of the most important pieces of XFire. They control how the incoming and outoing XML is mapped to objects.</p>
+<p>The default binding in XFire is &quot;Aegis&quot;. Aegis means &quot;shield&quot;, and the point of it is to create a simple layer which makes going between objects and XML easy. Aegis also provides the layer which allows other bindings to integrate with XFire - like JAXB, XMLBeans and Castor.</p>
+<p>Lets take a look at how you would use a different binding with XFire. The BindingProvider class is the one for actually taking the xml streams and reading/writing to them. When we create a service we need to actually supply a BindingProvider to the service. In the simplest case of creating a service you're probably writing code like this:</p>
+<div class="source"><pre class="prettyprint linenums">ServiceFactory factory = new ObjectServiceFactory();</pre></div>
+<p>But, what this is actually doing in the constructor is creating an AegisBindingProvider:</p>
+<div class="source"><pre class="prettyprint linenums"> ServiceFactory factory = new ObjectServiceFactory(new AegisBindingProvider());</pre></div></div>
+<div class="section">
+<h2><a name="Using_another_binding"></a>Using another binding</h2>
+<p>This AegisBindingProvider has the concept of a TypeRegistry and TypeCreators (don't worry you don't need to know much about this), which create Type classes for you. Types serialize and deserialize java classes. When you use a different binding it actually provides a different TypeRegistry and TypeCreator for its types.</p>
+<p>So if you were to create a JAXB 2.0 binding you would do:</p>
+<div class="source"><pre class="prettyprint linenums">import org.codehaus.xfire.aegis.AegisBindingProvider;
+import org.codehaus.xfire.jaxb2.JaxbTypeRegistry;
+import org.codehaus.xfire.service.binding.ObjectServiceFactory;
+...
+
+ServiceFactory factory = new ObjectServiceFactory(new AegisBindingProvider(new JaxbTypeRegistry()));</pre></div>
+<p>Each binding has a different type registry:</p>
+<table class="table table-striped" border="1">
+<tr class="a" valign="top">
+<td align="left"><b>Binding</b></td>
+<td align="left"><b>Type Registry</b></td></tr>
+<tr class="b" valign="top">
+<td align="left">Default POJOs</td>
+<td align="left">org.codehaus.xfire.aegis.DefaultTypeMappingRegistry</td></tr>
+<tr class="a" valign="top">
+<td align="left">Castor</td>
+<td align="left">org.codehaus.xfire.castor.CastorTypeMappingRegistry</td></tr>
+<tr class="b" valign="top">
+<td align="left">JAXB 1.1</td>
+<td align="left">org.codehaus.xfire.jaxb.JaxbTypeRegistry</td></tr>
+<tr class="a" valign="top">
+<td align="left">JAXB 2.0</td>
+<td align="left">org.codehaus.xfire.jaxb2.JaxbTypeRegistry</td></tr>
+<tr class="b" valign="top">
+<td align="left">XMLBeans</td>
+<td align="left">org.codehaus.xfire.xmlbeans.XmlBeansTypeRegistry</td></tr></table>
+<p>But don't stop here, you can use these BindingProviders with different ServiceFactorys. Here is an example using JAXB 2.0 and the annotation service factory.</p>
+<div class="source"><pre class="prettyprint linenums">import org.codehaus.xfire.aegis.AegisBindingProvider;
+import org.codehaus.xfire.jaxb2.JaxbTypeRegistry;
+import org.codehaus.xfire.service.binding.ObjectServiceFactory;
+...
+
+ServiceFactory factory = new AnnotationServiceFactory(new Jsr181WebAnnotations(),
+  new AegisBindingProvider(new JaxbTypeRegistry()));</pre></div></div>
+<div class="section">
+<h2><a name="Convenience_ServiceFactorys"></a>Convenience ServiceFactorys</h2>
+<p>If you just want to use the simple ObjectServiceFactory we have several convenience ServiceFactorys around:</p>
+<table class="table table-striped" border="1">
+<tr class="a" valign="top">
+<td align="left"><b>Binding</b></td>
+<td align="left"><b>Service Factory</b></td></tr>
+<tr class="b" valign="top">
+<td align="left">JAXB 1.1</td>
+<td align="left">org.codehaus.xfire.jaxb.JaxbServiceFactory</td></tr>
+<tr class="a" valign="top">
+<td align="left">JAXB 2.0</td>
+<td align="left">org.codehaus.xfire.jaxb2.JaxbServiceFactory</td></tr>
+<tr class="b" valign="top">
+<td align="left">XMLBeans</td>
+<td align="left">org.codehaus.xfire.xmlbeans.XmlBeansServiceFactory</td></tr></table>
+<p>You can use these just like you would an ObjectServiceFactory:</p>
+<div class="source"><pre class="prettyprint linenums">import org.codehaus.xfire.jaxb2.JaxbServiceFactory;
+import org.codehaus.xfire.service.ServiceFactory;
+...
+ServiceFactory factory = new JaxbServiceFactory();</pre></div></div>
+<div class="section">
+<h2><a name="The_MessageBinding"></a>The MessageBinding</h2>
+<p>There is also one other type of binding, the MessageBinding. The MessageBinding has special semantics to allow you to work with XML streams and fragments real easily. Read more on the Message Binding page.</p></div>
+<div class="section">
+<h2></h2><hr />
+<table class="table table-striped" width="100%" align="center" border="0">
+<tr class="a">
+<td align="left">Previous: <a href="bind.html">Bindings</a></td>
+<td align="center">Up: <a href="bind.html">Bindings</a></td>
+<td align="right">Next: <a href="aegis-binding.html">Aegis Binding</a></td></tr></table></div>
+        </div>
+      </div>
+    </div>
+    <hr/>
+    <footer>
+      <div class="container-fluid">
+        <div class="row-fluid">
+            <p>Copyright &copy;2005&#x2013;2018
+<a href="https://www.apache.org/">The Apache Software Foundation</a>.
+All rights reserved.</p>
+        </div>
+      </div>
+    </footer>
+  </body>
+</html>
\ No newline at end of file

Added: maven/doxia/website/content/doxia-example-book/castor.html
URL: http://svn.apache.org/viewvc/maven/doxia/website/content/doxia-example-book/castor.html?rev=1829011&view=auto
==============================================================================
--- maven/doxia/website/content/doxia-example-book/castor.html (added)
+++ maven/doxia/website/content/doxia-example-book/castor.html Thu Apr 12 21:22:02 2018
@@ -0,0 +1,443 @@
+<!DOCTYPE html>
+<!--
+ | Generated by Apache Maven Doxia Site Renderer 1.8 from target/generated-site/xdoc/doxia-example-book/castor.xml at 2018-04-12
+ | Rendered using Apache Maven Fluido Skin 1.7
+-->
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+  <head>
+    <meta charset="UTF-8" />
+    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
+    <meta name="author" content="XFire User&apos;s Guide" />
+    <meta name="Date-Revision-yyyymmdd" content="20180412" />
+    <meta http-equiv="Content-Language" content="en" />
+    <title>Doxia &#x2013; Castor</title>
+    <link rel="stylesheet" href="../css/apache-maven-fluido-1.7.min.css" />
+    <link rel="stylesheet" href="../css/site.css" />
+    <link rel="stylesheet" href="../css/print.css" media="print" />
+    <script type="text/javascript" src="../js/apache-maven-fluido-1.7.min.js"></script>
+    <!-- Google Analytics -->
+    <script type="text/javascript">
+      var _gaq = _gaq || [];
+      _gaq.push(['_setAccount', 'UA-140879-1']);
+      _gaq.push(['_trackPageview']);
+      (function() {
+        var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
+        ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
+        var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
+      })();
+    </script>
+  </head>
+  <body class="topBarDisabled">
+    <div class="container-fluid">
+      <div id="banner">
+        <div class="pull-left"><a href="https://www.apache.org/" id="bannerLeft"><img src="../../images/apache-maven-project.png"  alt="Doxia Site"/></a></div>
+        <div class="pull-right"><a href=".././" id="bannerRight"><img src="../images/doxia-logo.png"  alt="Doxia"/></a></div>
+        <div class="clear"><hr/></div>
+      </div>
+
+      <div id="breadcrumbs">
+        <ul class="breadcrumb">
+      <li class=""><a href="https://www.apache.org/" class="externalLink" title="Apache">Apache</a><span class="divider">/</span></li>
+      <li class=""><a href="../../index.html" title="Maven">Maven</a><span class="divider">/</span></li>
+      <li class=""><a href="http://maven.apache.org/doxia/index.html" class="externalLink" title="Doxia">Doxia</a><span class="divider">/</span></li>
+    <li class="active ">Castor</li>
+        <li id="publishDate" class="pull-right">Last Published: 2018-04-12</li>
+        </ul>
+      </div>
+      <div class="row-fluid">
+        <div id="leftColumn" class="span2">
+          <div class="well sidebar-nav">
+    <ul class="nav nav-list">
+      <li class="nav-header">About Doxia</li>
+    <li><a href="../index.html" title="What is Doxia?"><span class="none"></span>What is Doxia?</a></li>
+    <li><a href="../overview.html" title="Overview"><span class="none"></span>Overview</a></li>
+    <li><a href="../upgrading.html" title="Upgrading"><span class="icon-chevron-right"></span>Upgrading</a></li>
+    <li><a href="../downloads.html" title="Downloads"><span class="none"></span>Downloads</a></li>
+    <li><a href="../faq.html" title="FAQ"><span class="none"></span>FAQ</a></li>
+      <li class="nav-header">Documentation</li>
+    <li><a href="../references/index.html" title="Format References"><span class="icon-chevron-right"></span>Format References</a></li>
+    <li><a href="../modules/index.html" title="Doxia Modules Guide"><span class="none"></span>Doxia Modules Guide</a></li>
+    <li><a href="../macros/index.html" title="Doxia Macros Guide"><span class="none"></span>Doxia Macros Guide</a></li>
+    <li><a href="../book/index.html" title="Writing Books"><span class="none"></span>Writing Books</a></li>
+    <li><a href="../issues/index.html" title="Issues &amp; Gotchas"><span class="none"></span>Issues &amp; Gotchas</a></li>
+    <li><a href="../resources.html" title="External Resources"><span class="none"></span>External Resources</a></li>
+      <li class="nav-header">Developer Docs</li>
+    <li><a href="../developers/index.html" title="Developer Centre"><span class="icon-chevron-right"></span>Developer Centre</a></li>
+    <li><a href="../doxia/index.html" title="Doxia 1.8"><span class="icon-chevron-down"></span>Doxia 1.8</a>
+    <ul class="nav nav-list">
+    <li><a href="../doxia/index.html" title="Doxia base"><span class="none"></span>Doxia base</a></li>
+    <li><a href="../doxia-sitetools/index.html" title="Doxia Sitetools"><span class="none"></span>Doxia Sitetools</a></li>
+    </ul>
+</li>
+    <li><a href="../doxia-archives/doxia-1.7/index.html" title="Doxia 1.7"><span class="icon-chevron-down"></span>Doxia 1.7</a>
+    <ul class="nav nav-list">
+    <li><a href="../doxia-archives/doxia-1.7/index.html" title="Doxia base"><span class="none"></span>Doxia base</a></li>
+    <li><a href="../doxia-sitetools-archives/doxia-sitetools-1.7.5/index.html" title="Doxia Sitetools"><span class="none"></span>Doxia Sitetools</a></li>
+    </ul>
+</li>
+    <li><a href="../doxia-archives/doxia-1.6/index.html" title="Doxia 1.6"><span class="icon-chevron-down"></span>Doxia 1.6</a>
+    <ul class="nav nav-list">
+    <li><a href="../doxia-archives/doxia-1.6/index.html" title="Doxia base"><span class="none"></span>Doxia base</a></li>
+    <li><a href="../doxia-sitetools-archives/doxia-sitetools-1.6/index.html" title="Doxia Sitetools"><span class="none"></span>Doxia Sitetools</a></li>
+    </ul>
+</li>
+    <li><a href="../doxia/index.html" title="Doxia 1.5"><span class="icon-chevron-down"></span>Doxia 1.5</a>
+    <ul class="nav nav-list">
+    <li><a href="../doxia-archives/doxia-1.5/index.html" title="Doxia base"><span class="none"></span>Doxia base</a></li>
+    </ul>
+</li>
+    <li><a href="../doxia-archives/doxia-1.4/index.html" title="Doxia 1.4"><span class="icon-chevron-down"></span>Doxia 1.4</a>
+    <ul class="nav nav-list">
+    <li><a href="../doxia-archives/doxia-1.4/index.html" title="Doxia base"><span class="none"></span>Doxia base</a></li>
+    <li><a href="../doxia-sitetools-archives/doxia-sitetools-1.4/index.html" title="Doxia Sitetools"><span class="none"></span>Doxia Sitetools</a></li>
+    </ul>
+</li>
+    <li><a href="../doxia-archives/doxia-1.3/index.html" title="Doxia 1.3"><span class="icon-chevron-down"></span>Doxia 1.3</a>
+    <ul class="nav nav-list">
+    <li><a href="../doxia-archives/doxia-1.3/index.html" title="Doxia base"><span class="none"></span>Doxia base</a></li>
+    <li><a href="../doxia-sitetools-archives/doxia-sitetools-1.3/index.html" title="Doxia Sitetools"><span class="none"></span>Doxia Sitetools</a></li>
+    </ul>
+</li>
+    <li><a href="../doxia-archives/doxia-1.2/index.html" title="Doxia 1.2"><span class="icon-chevron-down"></span>Doxia 1.2</a>
+    <ul class="nav nav-list">
+    <li><a href="../doxia-archives/doxia-1.2/index.html" title="Doxia base"><span class="none"></span>Doxia base</a></li>
+    <li><a href="../doxia-sitetools-archives/doxia-sitetools-1.2/index.html" title="Doxia Sitetools"><span class="none"></span>Doxia Sitetools</a></li>
+    </ul>
+</li>
+    <li><a href="../doxia-tools/index.html" title="Doxia Tools"><span class="none"></span>Doxia Tools</a></li>
+    <li><a href="../doxia-ide.html" title="Doxia IDE"><span class="none"></span>Doxia IDE</a></li>
+      <li class="nav-header">Project Documentation</li>
+    <li><a href="../project-info.html" title="Project Information"><span class="icon-chevron-right"></span>Project Information</a></li>
+      <li class="nav-header">Maven Projects</li>
+    <li><a href="../../archetype/index.html" title="Archetype"><span class="none"></span>Archetype</a></li>
+    <li><a href="../../resolver/index.html" title="Artifact Resolver"><span class="none"></span>Artifact Resolver</a></li>
+    <li><a href="../index.html" title="Doxia"><span class="none"></span>Doxia</a></li>
+    <li><a href="../../jxr/index.html" title="JXR"><span class="none"></span>JXR</a></li>
+    <li><a href="../../ref/current" title="Maven"><span class="none"></span>Maven</a></li>
+    <li><a href="../../pom/index.html" title="Parent POMs"><span class="none"></span>Parent POMs</a></li>
+    <li><a href="../../plugins/index.html" title="Plugins"><span class="none"></span>Plugins</a></li>
+    <li><a href="../../plugin-testing/index.html" title="Plugin Testing"><span class="none"></span>Plugin Testing</a></li>
+    <li><a href="../../plugin-tools/index.html" title="Plugin Tools"><span class="none"></span>Plugin Tools</a></li>
+    <li><a href="../../apache-resource-bundles/index.html" title="Resource Bundles"><span class="none"></span>Resource Bundles</a></li>
+    <li><a href="../../scm/index.html" title="SCM"><span class="none"></span>SCM</a></li>
+    <li><a href="../../shared/index.html" title="Shared Components"><span class="none"></span>Shared Components</a></li>
+    <li><a href="../../skins/index.html" title="Skins"><span class="none"></span>Skins</a></li>
+    <li><a href="../../surefire/index.html" title="Surefire"><span class="none"></span>Surefire</a></li>
+    <li><a href="../../wagon/index.html" title="Wagon"><span class="none"></span>Wagon</a></li>
+      <li class="nav-header">ASF</li>
+    <li><a href="https://www.apache.org/foundation/how-it-works.html" class="externalLink" title="How Apache Works"><span class="none"></span>How Apache Works</a></li>
+    <li><a href="https://www.apache.org/foundation/" class="externalLink" title="Foundation"><span class="none"></span>Foundation</a></li>
+    <li><a href="https://www.apache.org/foundation/sponsorship.html" class="externalLink" title="Sponsoring Apache"><span class="none"></span>Sponsoring Apache</a></li>
+    <li><a href="https://www.apache.org/foundation/thanks.html" class="externalLink" title="Thanks"><span class="none"></span>Thanks</a></li>
+</ul>
+<form id="search-form" action="https://www.google.com/search" method="get" >
+  <input value="$sitesearchValue" name="sitesearch" type="hidden"/>
+  <input class="search-query" name="q" id="query" type="text" />
+</form>
+<script type="text/javascript">asyncJs( 'https://cse.google.com/brand?form=search-form' )</script>
+          <hr />
+          <div id="poweredBy">
+            <div class="clear"></div>
+            <div class="clear"></div>
+    <div id="twitter">
+    <a href="https://twitter.com/ASFMavenProject" class="twitter-follow-button" data-show-count="false" data-align="left" data-size="medium" data-show-screen-name="true" data-lang="en">Follow ASFMavenProject</a>
+    <script type="text/javascript">!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
+    </div>
+            <div class="clear"></div>
+            <div class="clear"></div>
+<a href="http://maven.apache.org/" title="Built by Maven" class="poweredBy"><img class="builtBy" alt="Built by Maven" src="../images/logos/maven-feather.png" /></a>
+            </div>
+          </div>
+        </div>
+        <div id="bodyColumn"  class="span10" >
+<div class="section">
+<h2></h2>
+<table class="table table-striped" width="100%" align="center" border="0">
+<tr class="a">
+<td align="left">Previous: <a href="aegis-binding.html">Aegis Binding</a></td>
+<td align="center">Up: <a href="bind.html">Bindings</a></td>
+<td align="right">Next: <a href="transports.html">Transports</a></td></tr></table><hr /></div>
+<div class="section">
+<h2><a name="Castor"></a>Castor</h2>
+<p>Castor is a flexible XML binding tool that provides run-time marshalling and unmarshalling of XML and Java objects. One strength of Castor when compared to most (not all) other Java XML binding frameworks is that re-compilation of the Java code is not required if the mapping definition changes. Therefore, systems where the web service layer is being developed independently from the business layer can benefit from using Castor. XFire support for Castor is currently available in the latest XFire release. Two approaches to developing a Web service using Castor with XFire are presented below: top-down (schema first) and bottom-up (code first). Before proceeding, check the Dependency Guide for required castor module dependencies.</p>
+<div class="section">
+<h3><a name="Assumptions_about_Reader"></a>Assumptions about Reader</h3>
+<ul>
+<li>Competence with Java and XML</li>
+<li>Basic knowledge of Castor XML binding framework</li>
+<li>Experience configuring Java webapp and deploying</li>
+<li>Nominal familiarity with Spring framework</li></ul></div></div>
+<div class="section">
+<h2><a name="Top-down_Approach_.28starting_with_XML_schema.29:"></a>Top-down Approach (starting with XML schema):</h2>
+<p>Firstly, the XML schema that defines the structure of your web service messages must be developed. For the purposes of this guide, we'll borrow a schema from http://www.webservicex.net/WeatherForecast.asmx?WSDL which defines a pre-existing weather forecast service.</p>
+<p>The borrowed schema below should be saved under META-INF/schema/ in the classpath:</p>
+<div class="source"><pre class="prettyprint linenums">&lt;s:schema elementFormDefault=&quot;qualified&quot; targetNamespace=&quot;http://www.webservicex.net&quot;
+          xmlns:s=&quot;http://www.w3.org/2001/XMLSchema&quot; xmlns:tns=&quot;http://www.webservicex.net&quot;&gt;
+      &lt;s:element name=&quot;GetWeatherByZipCode&quot;&gt;
+        &lt;s:complexType&gt;
+          &lt;s:sequence&gt;
+            &lt;s:element minOccurs=&quot;0&quot; maxOccurs=&quot;1&quot; name=&quot;ZipCode&quot; type=&quot;s:string&quot;/&gt;
+          &lt;/s:sequence&gt;
+        &lt;/s:complexType&gt;
+      &lt;/s:element&gt;
+      &lt;s:element name=&quot;GetWeatherByZipCodeResponse&quot;&gt;
+        &lt;s:complexType&gt;
+          &lt;s:sequence&gt;
+            &lt;s:element minOccurs=&quot;1&quot; maxOccurs=&quot;1&quot; name=&quot;GetWeatherByZipCodeResult&quot; type=&quot;tns:WeatherForecasts&quot;/&gt;
+          &lt;/s:sequence&gt;
+        &lt;/s:complexType&gt;
+      &lt;/s:element&gt;
+      &lt;s:complexType name=&quot;WeatherForecasts&quot;&gt;
+        &lt;s:sequence&gt;
+          &lt;s:element minOccurs=&quot;1&quot; maxOccurs=&quot;1&quot; name=&quot;Latitude&quot; type=&quot;s:float&quot;/&gt;
+          &lt;s:element minOccurs=&quot;1&quot; maxOccurs=&quot;1&quot; name=&quot;Longitude&quot; type=&quot;s:float&quot;/&gt;
+          &lt;s:element minOccurs=&quot;1&quot; maxOccurs=&quot;1&quot; name=&quot;AllocationFactor&quot; type=&quot;s:float&quot;/&gt;
+          &lt;s:element minOccurs=&quot;0&quot; maxOccurs=&quot;1&quot; name=&quot;FipsCode&quot; type=&quot;s:string&quot;/&gt;
+          &lt;s:element minOccurs=&quot;0&quot; maxOccurs=&quot;1&quot; name=&quot;PlaceName&quot; type=&quot;s:string&quot;/&gt;
+          &lt;s:element minOccurs=&quot;0&quot; maxOccurs=&quot;1&quot; name=&quot;StateCode&quot; type=&quot;s:string&quot;/&gt;
+          &lt;s:element minOccurs=&quot;0&quot; maxOccurs=&quot;1&quot; name=&quot;Status&quot; type=&quot;s:string&quot;/&gt;
+          &lt;s:element minOccurs=&quot;0&quot; maxOccurs=&quot;1&quot; name=&quot;Details&quot; type=&quot;tns:ArrayOfWeatherData&quot;/&gt;
+        &lt;/s:sequence&gt;
+      &lt;/s:complexType&gt;
+      &lt;s:complexType name=&quot;ArrayOfWeatherData&quot;&gt;
+        &lt;s:sequence&gt;
+          &lt;s:element minOccurs=&quot;0&quot; maxOccurs=&quot;unbounded&quot; name=&quot;WeatherData&quot; type=&quot;tns:WeatherData&quot;/&gt;
+        &lt;/s:sequence&gt;
+      &lt;/s:complexType&gt;
+      &lt;s:complexType name=&quot;WeatherData&quot;&gt;
+        &lt;s:sequence&gt;
+          &lt;s:element minOccurs=&quot;0&quot; maxOccurs=&quot;1&quot; name=&quot;Day&quot; type=&quot;s:string&quot;/&gt;
+          &lt;s:element minOccurs=&quot;0&quot; maxOccurs=&quot;1&quot; name=&quot;WeatherImage&quot; type=&quot;s:string&quot;/&gt;
+          &lt;s:element minOccurs=&quot;0&quot; maxOccurs=&quot;1&quot; name=&quot;MaxTemperatureF&quot; type=&quot;s:string&quot;/&gt;
+          &lt;s:element minOccurs=&quot;0&quot; maxOccurs=&quot;1&quot; name=&quot;MinTemperatureF&quot; type=&quot;s:string&quot;/&gt;
+          &lt;s:element minOccurs=&quot;0&quot; maxOccurs=&quot;1&quot; name=&quot;MaxTemperatureC&quot; type=&quot;s:string&quot;/&gt;
+          &lt;s:element minOccurs=&quot;0&quot; maxOccurs=&quot;1&quot; name=&quot;MinTemperatureC&quot; type=&quot;s:string&quot;/&gt;
+        &lt;/s:sequence&gt;
+      &lt;/s:complexType&gt;
+&lt;/s:schema&gt;</pre></div>
+<p>Next, we'll use castor to generate POJO classes from the service schema. First, define the source generator task and a goal for generation. The example below is for a maven 1.x configuration. Go to Using the Source Code Generator for a full reference on generating java classes from XML schema.</p>
+<div class="source"><pre class="prettyprint linenums">&lt;ant:path id=&quot;castor.class.path&quot;&gt;
+        &lt;ant:path refid=&quot;maven.dependency.classpath&quot;/&gt;
+        &lt;ant:pathelement path=&quot;${maven.build.dest}&quot;/&gt;
+        &lt;ant:pathelement path=&quot;${maven.test.dest}&quot;/&gt;
+&lt;/ant:path&gt;
+
+&lt;ant:taskdef name=&quot;castor-srcgen&quot;
+                classname=&quot;org.exolab.castor.tools.ant.taskdefs.CastorSourceGenTask&quot;
+                classpathref=&quot;castor.class.path&quot;/&gt;
+
+&lt;goal name=&quot;generate-source&quot;&gt;
+        &lt;ant:delete dir=&quot;${maven.build.dir}/generated-src&quot;/&gt;
+        &lt;ant:mkdir dir=&quot;${maven.build.dir}/generated-src&quot;/&gt;
+        &lt;castor-srcgen file=&quot;src/main/META-INF/schema/WeatherForecast.xsd&quot;
+                      package=&quot;net.webservicex&quot;
+                      todir=&quot;${maven.build.dir}/generated-src&quot;
+                      types=&quot;j2&quot;
+                      warnings=&quot;false&quot; /&gt;
+&lt;/goal&gt;</pre></div>
+<p>After running the generate-source goal, the supporting classes will be in the generated-src directory under the net.webservicex package. Along with each class is an accompanying Descriptor class file (e.g. WeatherDataDescriptor.java) that contains XML binding information.</p>
+<p>Next, write a Web service with the support of the generated classes. Note, the example below is a trivial implementation.</p>
+<div class="source"><pre class="prettyprint linenums">package foo.bar;
+
+import net.webservicex.*;
+
+public class WeatherService
+{
+
+    public GetWeatherByZipCodeResponse GetWeatherByZipCode(GetWeatherByZipCode body)
+    {
+        GetWeatherByZipCodeResponse res = new GetWeatherByZipCodeResponse();
+        String zipCode = body.getZipCode();
+        if (!zipCode.equals(&quot;1050&quot;))
+            throw new RuntimeException(&quot;Parameter isnt passed correctly. expected: 1050, got &quot;
+                    + zipCode);
+        GetWeatherByZipCodeResult weather = new GetWeatherByZipCodeResult();
+
+        weather.setLatitude(1);
+        weather.setLongitude(1);
+        weather.setPlaceName(&quot;Vienna, AT&quot;);
+        weather.setAllocationFactor(1);
+
+        res.setGetWeatherByZipCodeResult(weather);
+
+        return res;
+    }
+
+}</pre></div>
+<p>After this, configure the service in Xfire. The example below takes the XML configuration approach (which uses Spring integration). In addition, XFire supports integration of configuration into containers such as Plexus and PicoContainer. For more control over the Web service definition, JSR 181 Annotations should be used in the service code.</p>
+<p>The configuration goes in the services.xml descriptor. This file goes in META-INF/xfire/ on the classpath:</p>
+<div class="source"><pre class="prettyprint linenums">&lt;beans xmlns=&quot;http://xfire.codehaus.org/config/1.0&quot;&gt;
+
+  &lt;service&gt;
+    &lt;serviceClass&gt;foo.bar.WeatherService&lt;/serviceBean&gt;
+    &lt;schemas&gt;
+      &lt;schema&gt;META-INF/schema/WeatherForecast.xsd&lt;/schema&gt;
+    &lt;/schemas&gt;
+    &lt;style&gt;document&lt;/style&gt;
+    &lt;serviceFactory&gt;#castorServiceFactory&lt;/serviceFactory&gt;
+  &lt;/service&gt;
+
+  &lt;bean id=&quot;castorTypeRegistry&quot; class=&quot;org.codehaus.xfire.castor.CastorTypeMappingRegistry&quot; /&gt;
+
+  &lt;bean id=&quot;bindingProvider&quot; class=&quot;org.codehaus.xfire.aegis.AegisBindingProvider&quot;&gt;
+        &lt;constructor-arg ref=&quot;castorTypeRegistry&quot; /&gt;
+  &lt;/bean
+
+  &lt;bean id=&quot;castorServiceFactory&quot; class=&quot;org.codehaus.xfire.service.binding.ObjectServiceFactory&quot;&gt;
+    &lt;constructor-arg index=&quot;0&quot; ref=&quot;xfire.transportManager&quot; /&gt;
+    &lt;constructor-arg index=&quot;1&quot; ref=&quot;bindingProvider&quot; /&gt;
+   &lt;/bean&gt;
+
+&lt;/beans&gt;</pre></div>
+<p>The service definition specifies the web service implementation class with the <i>serviceClass</i> property. A list of <tt> &lt;schemas&gt; </tt> can be provided to be included in WSDL generation. In this case, the borrowed schema definition in the classpath at META-INF/schema/WeatherForecast.xsd has been included.</p>
+<p>The request and response messages were defined in our schema and were included as a single parameter and return type, respectively, in our service method. This lends itself to a bare (or unwrapped) parameter-style. The service definition specifies a bare parameter-style by setting the <i>style</i> property as 'document'. If a wrapped parameter-style is preferable, the request and response schema definitions and generated classes would not be needed, as the operation name would wrap any request parameters and return type. The style property in the service definition would not be needed as service factories create services as wrapped style by default. The service method signature for a wrapped style service would be:</p>
+<div class="source"><pre class="prettyprint linenums">public WeatherForecasts GetWeatherByZipCode(String zipCode)</pre></div>
+<p>Service factories are responsible for creating the service inside of XFire. In this case, we want to use an ObjectServiceFactory with Castor binding, so the beans 'castorTypeRegistry', 'bindingProvider' and 'castorServiceFactory' are defined. Notice that these beans are using spring-style bean definitions (e.g. <i>bean id=...</i>) since XML Configuration uses Spring to build its services. We reference this service factory in the <i>serviceFactory</i> property of the service definition as #castorServiceFactory. The '#' denotes a reference to another defined bean. Read the Bindings section to learn more about setting up service factories with different xml binding mechanisms.</p>
+<p>After configuring the service within XFire, the service needs to be exposed so it can be reached by client-proxies. This can be done over HTTP by defining a servlet in the web.xml. Since we have taken the XML Configuration approach, it is best to set up the XFireConfigurableServlet in our web.xml. XFireConfigurableServlet will load the services.xml along with the included org.codehaus.xfire.spring.xfire.xml files upon initialization. Reference the XML Configuration for how to write the web.xml file.</p>
+<p>Finally, deploy the web application to your favorite servlet container, and the service should be visible at /services/WeatherService?wsdl under the deployed webapp context path.</p></div>
+<div class="section">
+<h2><a name="Bottom-up_Approach_.28starting_with_Java_classes.29:"></a>Bottom-up Approach (starting with Java classes):</h2>
+<p>Let's say you want to leverage your pre-existing business code by exposing certain methods with a Web Service. That's not too hard to do with Castor binding and XFire, but it's a different approach that involves mapping Java to XML rather than generating Java classes from schema. Service-oriented architecture discourages simply exposing the domain model, but in this example we're going to be rebellious and not insulate it. This doesn't mean that the bottom-up approach can't follow SOA best practices, altogether.</p>
+<p>Below is a Book class that's part of the domain:</p>
+<div class="source"><pre class="prettyprint linenums">package foo.bar;
+
+public class Book
+{
+    private String title;
+
+    private String isbn;
+
+    private String author;
+
+    public String getIsbn()
+    {
+        return isbn;
+    }
+
+    public void setIsbn(String isbn)
+    {
+        this.isbn = isbn;
+    }
+
+    public String getTitle()
+    {
+        return title;
+    }
+
+    public void setTitle(String title)
+    {
+        this.title = title;
+    }
+
+    public String getAuthor()
+    {
+        return author;
+    }
+
+    public void setAuthor(String author)
+    {
+        this.author = author;
+    }
+}</pre></div>
+<p>Next, is a service class that has a couple methods we want to expose as a web service. Note: This service class could have existed already as a business service, or could have been written specifically to be a web service. As you might have noticed, the implementation is quite trivial (ie. stoopid).</p>
+<div class="source"><pre class="prettyprint linenums">package foo.bar;
+
+public class BookService
+{
+    private Book onlyBook;
+
+    public BookService()
+    {
+        onlyBook = new Book();
+        onlyBook.setAuthor(&quot;Steve Ballmer&quot;);
+        onlyBook.setTitle(&quot;How to Yell Real Loud and Look Like You Might Have a Heart Attack&quot;);
+        onlyBook.setIsbn(&quot;012924828&quot;);
+    }
+
+    public String addBook(Book book)
+    {
+        return onlyBook.getIsbn();
+    }
+
+    public Book findBook(String isbn)
+    {
+        return onlyBook;
+    }
+}</pre></div>
+<p>Let's create an XSD that matches the Book class, so that we know what the XML element for the Book class should look like. The Book.xsd schema below should be saved under META-INF/schema/ in the classpath:</p>
+<div class="source"><pre class="prettyprint linenums">&lt;xsd:schema elementFormDefault=&quot;qualified&quot; targetNamespace=&quot;http://xfire.codehaus.org&quot;
+          xmlns:xsd=&quot;http://www.w3.org/2001/XMLSchema&quot; xmlns:tns=&quot;http://xfire.codehaus.org&quot;&gt;
+    &lt;xsd:complexType name=&quot;Book&quot;&gt;
+        &lt;xsd:sequence&gt;
+            &lt;xsd:element name=&quot;title&quot; type=&quot;xsd:string&quot;/&gt;
+            &lt;xsd:element name=&quot;isbn&quot; type=&quot;xsd:string&quot;/&gt;
+            &lt;xsd:element name=&quot;author&quot; type=&quot;xsd:string&quot;/&gt;
+        &lt;/xsd:sequence&gt;
+    &lt;/xsd:complexType&gt;
+&lt;/xsd:schema&gt;</pre></div>
+<p>The schema outlines a complex type that has three string elements. It is important to note that the namespace prefix for XML schema namespace is 'xsd' and the namespace prefix for the target namespace is 'tns'. These are the prefixes used by the XFire WSDL builder when creating the schema section, and this schema will actually be inserted inline into the schema section of the WSDL.</p>
+<p>Now we need to specify how to transform our Book class to an XML element that conforms to the XSD, and vice versa. This is done with a castor mapping file. More information on writing castor mappings is available at http://www.castor.org/xml-mapping.html</p>
+<p>The castor.xml mapping file below should be saved under the foo.bar package:</p>
+<div class="source"><pre class="prettyprint linenums">&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
+&lt;mapping&gt;
+  &lt;class name=&quot;org.codehaus.xfire.castor.Book&quot;&gt;
+    &lt;map-to xml=&quot;Book&quot; ns-uri=&quot;http://xfire.codehaus.org&quot; ns-prefix=&quot;tns&quot; element-definition=&quot;false&quot;/&gt;
+    &lt;field name=&quot;title&quot; type=&quot;string&quot;/&gt;
+    &lt;field name=&quot;isbn&quot; type=&quot;string&quot;/&gt;
+    &lt;field name=&quot;author&quot; type=&quot;string&quot;/&gt;
+  &lt;/class&gt;
+&lt;/mapping&gt;</pre></div>
+<p>Note again, the target namespace and tns prefix are the same as in the XSD. The element-defintion attribute denotes whether the XSD definition is a concrete element or an abstract complex type. In this case, it is a complex type so element-definition is false (which is actually is default value).</p>
+<p>All the distinct parts are there, time to configure the service in Xfire. The example below takes the XML configuration approach (which uses Spring integration).</p>
+<p>The configuration goes in the services.xml descriptor. This file goes in META-INF/xfire/ on the classpath:</p>
+<div class="source"><pre class="prettyprint linenums">&lt;beans xmlns=&quot;http://xfire.codehaus.org/config/1.0&quot;&gt;
+
+  &lt;service&gt;
+    &lt;serviceClass&gt;foo.bar.BookService&lt;/serviceBean&gt;
+    &lt;namespace&gt;http://xfire.codehaus.org&lt;/namespace&gt;
+    &lt;schemas&gt;
+      &lt;schema&gt;META-INF/schema/Book.xsd&lt;/schema&gt;
+    &lt;/schemas&gt;
+    &lt;serviceFactory&gt;#castorServiceFactory&lt;/serviceFactory&gt;
+  &lt;/service&gt;
+
+  &lt;bean id=&quot;castorTypeRegistry&quot; class=&quot;org.codehaus.xfire.castor.CastorTypeMappingRegistry&quot;&gt;
+      &lt;property name=&quot;mappingFile&quot; value=&quot;foo/bar/castor.xml&quot; /&gt;
+  &lt;/bean&gt;
+
+  &lt;bean id=&quot;bindingProvider&quot; class=&quot;org.codehaus.xfire.aegis.AegisBindingProvider&quot;&gt;
+        &lt;constructor-arg ref=&quot;castorTypeRegistry&quot; /&gt;
+  &lt;/bean
+
+  &lt;bean id=&quot;castorServiceFactory&quot; class=&quot;org.codehaus.xfire.service.binding.ObjectServiceFactory&quot;&gt;
+    &lt;constructor-arg index=&quot;0&quot; ref=&quot;xfire.transportManager&quot; /&gt;
+    &lt;constructor-arg index=&quot;1&quot; ref=&quot;bindingProvider&quot; /&gt;
+   &lt;/bean&gt;
+
+&lt;/beans&gt;</pre></div>
+<p>The service definition specifies the web service implementation class with the <i>serviceClass</i> property. A list of <i>schemas</i> can be provided to be included in WSDL generation. In this case, the schema definition in the classpath at META-INF/schema/Book.xsd has been included. Our service is of parameter style 'wrapped', as the method names in the service will wrap our request and response messages (e.g. <i>findBook</i>). The style property in the service definition is not be needed as service factories create services as wrapped style by default.</p>
+<p>Service factories are responsible for creating the service inside of XFire. In this case, we want to use an ObjectServiceFactory with Castor binding, so the beans 'castorTypeRegistry', 'bindingProvider' and 'castorServiceFactory' are defined. Notice that these beans are using spring-style bean definitions (e.g. <i>bean id=...</i>) since XML Configuration uses Spring to build its services. We reference this service factory in the <i>serviceFactory</i> property of the service definition as #castorServiceFactory. The '#' denotes a reference to another defined bean. The 'castorTypeRegistry' definition sets the 'mappingFile' property to point to the castor.xml mapping file in the classpath.</p>
+<p>After configuring the service within XFire, the service needs to be exposed so it can be reached by client-proxies. This can be done over HTTP by defining a servlet in the web.xml. Reference the XML Configuration for how to write the web.xml file.</p>
+<p>After configuring the service and web application, deploy it to your favorite servlet container, and the service should be visible at /services/BookService?wsdl under the deployed webapp context path.</p></div>
+<div class="section">
+<h2></h2><hr />
+<table class="table table-striped" width="100%" align="center" border="0">
+<tr class="a">
+<td align="left">Previous: <a href="aegis-binding.html">Aegis Binding</a></td>
+<td align="center">Up: <a href="bind.html">Bindings</a></td>
+<td align="right">Next: <a href="transports.html">Transports</a></td></tr></table></div>
+        </div>
+      </div>
+    </div>
+    <hr/>
+    <footer>
+      <div class="container-fluid">
+        <div class="row-fluid">
+            <p>Copyright &copy;2005&#x2013;2018
+<a href="https://www.apache.org/">The Apache Software Foundation</a>.
+All rights reserved.</p>
+        </div>
+      </div>
+    </footer>
+  </body>
+</html>
\ No newline at end of file

Added: maven/doxia/website/content/doxia-example-book/doxia-example-book.pdf
URL: http://svn.apache.org/viewvc/maven/doxia/website/content/doxia-example-book/doxia-example-book.pdf?rev=1829011&view=auto
==============================================================================
Binary file - no diff available.

Propchange: maven/doxia/website/content/doxia-example-book/doxia-example-book.pdf
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream