Modified:
websites/staging/maven-doxia/trunk/content/doxia-example-book/castor.html
==============================================================================
--- websites/staging/maven-doxia/trunk/content/doxia-example-book/castor.html
(original)
+++ websites/staging/maven-doxia/trunk/content/doxia-example-book/castor.html
Sat Nov 21 02:03:05 2015
@@ -1,259 +1,493 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<!DOCTYPE html>
<!--
- | Generated by Apache Maven Doxia at 2014-07-01
- | Rendered using Apache Maven Stylus Skin 1.5
+ | Generated by Apache Maven Doxia 1.6 at 2015-11-21
+ | Rendered using Apache Maven Fluido Skin 1.4
-->
-<html xmlns="http://www.w3.org/1999/xhtml">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
- <title>Doxia - Castor</title>
- <style type="text/css" media="all">
- @import url("../css/maven-base.css");
- @import url("../css/maven-theme.css");
- @import url("../css/site.css");
- </style>
- <link rel="stylesheet" href="../css/print.css" type="text/css"
media="print" />
- <meta name="author" content="XFire User's Guide" />
- <meta name="Date-Revision-yyyymmdd" content="20140701" />
- <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
-
-<script src="http://www.google-analytics.com/urchin.js"
type="text/javascript"></script>
-
+ <meta charset="UTF-8" />
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
+ <meta name="author" content="XFire User's Guide" />
+ <meta name="Date-Revision-yyyymmdd" content="20151121" />
+ <meta http-equiv="Content-Language" content="en" />
+ <title>Doxia – Castor</title>
+ <link rel="stylesheet" href="../css/apache-maven-fluido-1.4.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.4.min.js"></script>
+
+
+
+<script src="https://www.google-analytics.com/urchin.js"
type="text/javascript"></script>
+
+
<script type="text/javascript">_uacct = "UA-140879-1";
urchinTracker();</script>
- </head>
- <body class="composite">
- <div id="banner">
- <a href="../../" id="bannerLeft">
- <img
src="../images/apache-maven-project-2.png" alt="" />
+
+ </head>
+ <body class="topBarDisabled">
+
+
+
+
+ <div class="container-fluid">
+ <div id="banner">
+ <div class="pull-left">
+ <a href="http://www.apache.org/"
id="bannerLeft">
+
<img src="../../images/apache-maven-project.png" alt="Apache
Maven"/>
</a>
- <a href=".././" id="bannerRight">
- <img
src="../images/maven-logo-2.gif" alt="" />
+ </div>
+ <div class="pull-right"> <a
href="../../" id="bannerRight">
+
<img src="../../images/maven-logo-black-on-white.png" />
</a>
- <div class="clear">
- <hr/>
</div>
- </div>
- <div id="breadcrumbs">
+ <div class="clear"><hr/></div>
+ </div>
+
+ <div id="breadcrumbs">
+ <ul class="breadcrumb">
+
+
+ <li class="">
+ <a href="http://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="../index.html" title="Doxia">
+ Doxia</a>
+ <span class="divider">/</span>
+ </li>
+ <li class="active ">Castor</li>
+
+
+
+ <li id="publishDate" class="pull-right">Last Published:
2015-11-21</li>
- <div class="xleft">
- <a href="http://www.apache.org/"
class="externalLink">Apache</a>
- >
- <a href="../../index.html">Maven</a>
- >
- <a href="../index.html">Doxia</a>
- >
- Castor
- </div>
- <div class="xright">
- Last Published: 2014-07-01
- </div>
- <div class="clear">
- <hr/>
+ </ul>
</div>
- </div>
- <div id="leftColumn">
- <div id="navcolumn">
-
- <h5>About Doxia</h5>
- <ul>
- <li class="none">
- <a href="../index.html">What is Doxia?</a>
- </li>
- <li class="none">
- <a href="../overview.html">Overview</a>
- </li>
-
<li class="collapsed">
- <a href="../upgrading.html">Upgrading</a>
+
+
+ <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 class="none">
- <a href="../downloads.html">Downloads</a>
- </li>
- <li class="none">
- <a href="../faq.html">FAQ</a>
- </li>
- </ul>
- <h5>Documentation</h5>
- <ul>
-
<li class="collapsed">
- <a href="../references/index.html">Format References</a>
+
+ <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 class="none">
- <a href="../modules/index.html">Doxia Modules Guide</a>
- </li>
- <li class="none">
- <a href="../macros/index.html">Doxia Macros Guide</a>
- </li>
- <li class="none">
- <a href="../book/index.html">Writing Books</a>
- </li>
- <li class="none">
- <a href="../issues/index.html">Issues & Gotchas</a>
- </li>
- <li class="none">
- <a href="../resources.html">External Resources</a>
- </li>
- </ul>
- <h5>Developer Docs</h5>
- <ul>
-
<li class="collapsed">
- <a href="../developers/index.html">Developer Centre</a>
+
+ <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 &
Gotchas">
+ <span class="none"></span>
+ Issues & 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 class="expanded">
- <a href="../doxia/index.html">Doxia 1.6</a>
- <ul>
- <li class="none">
- <a href="../doxia/index.html">Doxia base</a>
- </li>
- <li class="none">
- <a href="../doxia-sitetools/index.html">Doxia Sitetools</a>
+
+ <li>
+
+ <a href="../doxia/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/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
class="expanded">
- <a href="../doxia/index.html">Doxia 1.5</a>
- <ul>
- <li class="none">
- <a href="../doxia-archives/doxia-1.5/index.html">Doxia
base</a>
+
+ <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 class="expanded">
- <a href="../doxia-archives/doxia-1.4/index.html">Doxia
1.4</a>
- <ul>
- <li class="none">
- <a href="../doxia-archives/doxia-1.4/index.html">Doxia
base</a>
- </li>
- <li class="none">
- <a
href="../doxia-sitetools-archives/doxia-sitetools-1.4/index.html">Doxia
Sitetools</a>
+
+ <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 class="expanded">
- <a href="../doxia-archives/doxia-1.3/index.html">Doxia
1.3</a>
- <ul>
- <li class="none">
- <a href="../doxia-archives/doxia-1.3/index.html">Doxia
base</a>
- </li>
- <li class="none">
- <a
href="../doxia-sitetools-archives/doxia-sitetools-1.3/index.html">Doxia
Sitetools</a>
+
+ <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 class="expanded">
- <a href="../doxia-archives/doxia-1.2/index.html">Doxia
1.2</a>
- <ul>
- <li class="none">
- <a href="../doxia-archives/doxia-1.2/index.html">Doxia
base</a>
- </li>
- <li class="none">
- <a
href="../doxia-sitetools-archives/doxia-sitetools-1.2/index.html">Doxia
Sitetools</a>
+
+ <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 class="none">
- <a href="../doxia-tools/index.html">Doxia Tools</a>
- </li>
- <li class="none">
- <a href="../doxia-ide.html">Doxia IDE</a>
- </li>
- </ul>
- <h5>Project Documentation</h5>
- <ul>
-
<li
class="collapsed">
- <a href="../project-info.html">Project Information</a>
+
+ <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>
- </ul>
- <h5>Maven Projects</h5>
- <ul>
- <li class="none">
- <a href="../../ant-tasks/index.html">Ant Tasks</a>
- </li>
- <li class="none">
- <a href="../../archetype/index.html">Archetype</a>
- </li>
- <li class="none">
- <a href="../index.html">Doxia</a>
- </li>
- <li class="none">
- <a href="../../jxr/index.html">JXR</a>
- </li>
- <li class="none">
- <a href="../../maven-1.x/index.html">Maven 1.x</a>
- </li>
- <li class="none">
- <a href="../../index.html">Maven 2 & 3</a>
- </li>
- <li class="none">
- <a href="../../pom/index.html">Parent POMs</a>
- </li>
- <li class="none">
- <a href="../../plugins/index.html">Plugins</a>
- </li>
- <li class="none">
- <a href="../../plugin-tools/index.html">Plugin Tools</a>
- </li>
- <li class="none">
- <a href="../../scm/index.html">SCM</a>
- </li>
- <li class="none">
- <a href="../../shared/index.html">Shared Components</a>
- </li>
- <li class="none">
- <a href="../../skins/index.html">Skins</a>
- </li>
- <li class="none">
- <a href="../../surefire/index.html">Surefire</a>
- </li>
- <li class="none">
- <a href="../../wagon/index.html">Wagon</a>
- </li>
- </ul>
- <h5>ASF</h5>
- <ul>
- <li class="none">
- <a href="http://www.apache.org/foundation/how-it-works.html"
class="externalLink">How Apache Works</a>
- </li>
- <li class="none">
- <a href="http://www.apache.org/foundation/"
class="externalLink">Foundation</a>
- </li>
- <li class="none">
- <a href="http://www.apache.org/foundation/sponsorship.html"
class="externalLink">Sponsoring Apache</a>
- </li>
- <li class="none">
- <a href="http://www.apache.org/foundation/thanks.html"
class="externalLink">Thanks</a>
- </li>
- </ul>
- <a href="http://maven.apache.org/"
title="Built by Maven" class="poweredBy">
- <img alt="Built by Maven" src="../images/logos/maven-feather.png"/>
- </a>
-
- </div>
- </div>
- <div id="bodyColumn">
- <div id="contentBox">
- <div class="section">
+ <li class="nav-header">Maven Projects</li>
+
+ <li>
+
+ <a href="../../ant-tasks/index.html" title="Ant
Tasks">
+ <span class="none"></span>
+ Ant Tasks</a>
+ </li>
+
+ <li>
+
+ <a href="../../archetype/index.html"
title="Archetype">
+ <span class="none"></span>
+ Archetype</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="http://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="http://www.apache.org/foundation/"
class="externalLink" title="Foundation">
+ <span class="none"></span>
+ Foundation</a>
+ </li>
+
+ <li>
+
+ <a
href="http://www.apache.org/foundation/sponsorship.html" class="externalLink"
title="Sponsoring Apache">
+ <span class="none"></span>
+ Sponsoring Apache</a>
+ </li>
+
+ <li>
+
+ <a
href="http://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="https://maven.apache.org/doxia" name="sitesearch"
type="hidden"/>
+ <input class="search-query" name="q" id="query" type="text" />
+</form>
+<script type="text/javascript"
src="https://www.google.com/coop/cse/brand?form=search-form"></script>
+
+ <hr />
+
+ <div id="poweredBy">
+
+ <script type="text/javascript"
src="https://apis.google.com/js/plusone.js"></script>
+
+
+ <div class="g-plusone" data-href="http://maven.apache.org/doxia/"
data-size="tall" ></div>
+
+ <div class="clear"></div>
+ <div class="clear"></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><!-- Navigation Panel -->
-<table class="bodyTable" width="100%" align="center" border="0">
+<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><!-- End of Navigation
Panel --><hr /></div>
<div class="section">
-<h2>Castor<a name="Castor"></a></h2>
+<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>Assumptions about Reader<a name="Assumptions_about_Reader"></a></h3>
+<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>Top-down Approach (starting with XML schema):<a
name="Top-down_Approach_starting_with_XML_schema:"></a></h2>
+<h2><a name="Top-down_Approach_starting_with_XML_schema:"></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><s:schema elementFormDefault="qualified"
targetNamespace="http://www.webservicex.net"
+<div class="source"><pre class="prettyprint linenums"><s:schema
elementFormDefault="qualified"
targetNamespace="http://www.webservicex.net"
xmlns:s="http://www.w3.org/2001/XMLSchema"
xmlns:tns="http://www.webservicex.net">
<s:element name="GetWeatherByZipCode">
<s:complexType>
@@ -298,8 +532,7 @@
</s:complexType>
</s:schema></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><ant:path id="castor.class.path">
+<div class="source"><pre class="prettyprint linenums"><ant:path
id="castor.class.path">
<ant:path refid="maven.dependency.classpath"/>
<ant:pathelement path="${maven.build.dest}"/>
<ant:pathelement path="${maven.test.dest}"/>
@@ -320,8 +553,7 @@
</goal></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>package foo.bar;
+<div class="source"><pre class="prettyprint linenums">package foo.bar;
import net.webservicex.*;
@@ -350,8 +582,7 @@ public class WeatherService
}</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><beans xmlns="http://xfire.codehaus.org/config/1.0">
+<div class="source"><pre class="prettyprint linenums"><beans
xmlns="http://xfire.codehaus.org/config/1.0">
<service>
<serviceClass>foo.bar.WeatherService</serviceBean>
@@ -376,17 +607,15 @@ public class WeatherService
</beans></pre></div>
<p>The service definition specifies the web service implementation class with
the <i>serviceClass</i> property. A list of <tt> <schemas> </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>public WeatherForecasts GetWeatherByZipCode(String zipCode)</pre></div>
+<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>Bottom-up Approach (starting with Java classes):<a
name="Bottom-up_Approach_starting_with_Java_classes:"></a></h2>
+<h2><a name="Bottom-up_Approach_starting_with_Java_classes:"></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>package foo.bar;
+<div class="source"><pre class="prettyprint linenums">package foo.bar;
public class Book
{
@@ -427,8 +656,7 @@ public class Book
}
}</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>package foo.bar;
+<div class="source"><pre class="prettyprint linenums">package foo.bar;
public class BookService
{
@@ -453,8 +681,7 @@ public class BookService
}
}</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><xsd:schema elementFormDefault="qualified"
targetNamespace="http://xfire.codehaus.org"
+<div class="source"><pre class="prettyprint linenums"><xsd:schema
elementFormDefault="qualified"
targetNamespace="http://xfire.codehaus.org"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:tns="http://xfire.codehaus.org">
<xsd:complexType name="Book">
<xsd:sequence>
@@ -467,8 +694,7 @@ public class BookService
<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><?xml version="1.0" encoding="UTF-8"?>
+<div class="source"><pre class="prettyprint linenums"><?xml
version="1.0" encoding="UTF-8"?>
<mapping>
<class name="org.codehaus.xfire.castor.Book">
<map-to xml="Book"
ns-uri="http://xfire.codehaus.org" ns-prefix="tns"
element-definition="false"/>
@@ -480,8 +706,7 @@ public class BookService
<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><beans xmlns="http://xfire.codehaus.org/config/1.0">
+<div class="source"><pre class="prettyprint linenums"><beans
xmlns="http://xfire.codehaus.org/config/1.0">
<service>
<serviceClass>foo.bar.BookService</serviceBean>
@@ -512,27 +737,29 @@ public class BookService
<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 /><!-- Navigation Panel -->
-<table class="bodyTable" width="100%" align="center" border="0">
+<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><!-- End of Navigation
Panel --></div>
- </div>
- </div>
- <div class="clear">
- <hr/>
- </div>
- <div id="footer">
- <div class="xright">
- © 2005-2014
- The Apache Software Foundation
-
- - <a
href="http://maven.apache.org/privacy-policy.html">Privacy Policy</a>.
- Apache Maven, Maven, Apache, the Apache feather logo, and the Apache
Maven project logos are trademarks of The Apache Software Foundation.
- </div>
- <div class="clear">
- <hr/>
- </div>
- </div>
- </body>
+ </div>
+ </div>
+ </div>
+
+ <hr/>
+
+ <footer>
+ <div class="container-fluid">
+ <div class="row-fluid">
+ <p >Copyright ©
2005–2015
+ <a href="http://www.apache.org/">The Apache Software
Foundation</a>.
+ All rights reserved.
+
+ </p>
+ </div>
+
+
+ </div>
+ </footer>
+ </body>
</html>
Modified:
websites/staging/maven-doxia/trunk/content/doxia-example-book/doxia-example-book.pdf
==============================================================================
Binary files - no diff available.
Modified:
websites/staging/maven-doxia/trunk/content/doxia-example-book/doxia-example-book.rtf
==============================================================================
---
websites/staging/maven-doxia/trunk/content/doxia-example-book/doxia-example-book.rtf
(original)
+++
websites/staging/maven-doxia/trunk/content/doxia-example-book/doxia-example-book.rtf
Sat Nov 21 02:03:05 2015
@@ -2,30 +2,30 @@
\deff0{\fonttbl{\f0\froman\fcharset0 Times New Roman;}{\f1\fswiss\fcharset0
Arial;}{\f2\froman\fcharset2 Symbol;}}
{\colortbl\red0\green0\blue0;\red255\green255\blue255;\red255\green0\blue0;\red0\green0\blue255;}
{\*\listtable
-{\list\listtemplateid948441409\hybrid
+{\list\listtemplateid1347507460\hybrid
{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelstartat1{\leveltext\'01\u-3913
?;}{\levelnumbers;}\f2\fi0\li300\ri0\tx300}
-\listid531516779}
-{\list\listtemplateid1130310458\hybrid
+\listid994069087}
+{\list\listtemplateid937082848\hybrid
{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelstartat1{\leveltext\'01\u-3913
?;}{\levelnumbers;}\f2\fi0\li300\ri0\tx300}
-\listid1743358951}
-{\list\listtemplateid909511801\hybrid
+\listid580762649}
+{\list\listtemplateid1081719698\hybrid
{\listlevel\levelnfc0\levelnfcn0\leveljc0\leveljcn0\levelstartat1{\leveltext\'02\'00.;}{\levelnumbers
\'01;}\fi0\li400\ri0\tx400}
-\listid151597517}
-{\list\listtemplateid2017614097\hybrid
+\listid1164629839}
+{\list\listtemplateid2090268521\hybrid
{\listlevel\levelnfc0\levelnfcn0\leveljc0\leveljcn0\levelstartat1{\leveltext\'02\'00.;}{\levelnumbers
\'01;}\fi0\li400\ri0\tx400}
-\listid178196985}
-{\list\listtemplateid1033480988\hybrid
+\listid359474417}
+{\list\listtemplateid525427238\hybrid
{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelstartat1{\leveltext\'01\u-3913
?;}{\levelnumbers;}\f2\fi0\li300\ri0\tx300}
-\listid1000552466}
+\listid1503649257}
}
{\*\listoverridetable
-{\listoverride\listid531516779\listoverridecount0\ls1}
-{\listoverride\listid1743358951\listoverridecount0\ls2}
-{\listoverride\listid151597517\listoverridecount0\ls3}
-{\listoverride\listid178196985\listoverridecount0\ls4}
-{\listoverride\listid1000552466\listoverridecount0\ls5}
+{\listoverride\listid994069087\listoverridecount0\ls1}
+{\listoverride\listid580762649\listoverridecount0\ls2}
+{\listoverride\listid1164629839\listoverridecount0\ls3}
+{\listoverride\listid359474417\listoverridecount0\ls4}
+{\listoverride\listid1503649257\listoverridecount0\ls5}
}
-{\info{\operator iText by lowagie.com}{\creationdate
\yr2014\mo6\dy1\hr0\min7\sec41}{\operator Doxia iText}{\creationdate
\yr2014\mo6\dy1\hr0\min7\sec41}}
+{\info{\operator iText by lowagie.com}{\creationdate
\yr2015\mo10\dy21\hr2\min2\sec27}{\operator Doxia iText}{\creationdate
\yr2015\mo10\dy21\hr2\min2\sec27}}
\paperw11907\paperh16840\margl720\margr720\margt720\margb720
{\footer }{\header }\pgwsxn11907\pghsxn16840\sectd{\footer }{\header
}\pgwsxn11907\pghsxn16840\pard\li0\ri0\f1\fs48\cf2 1. \f1\fs48\cf2
Bindings\par\par\pard\li0\ri0\f1\fs44\cf0 1.1. \f1\fs44\cf0 Bindings Overview
\par\par\f0\fs20\cf0 \par \pard\li0\ri0\f0\fs20\cf0 \par \f1\fs20\cf0 Bindings
are one of the most important pieces of XFire. They control how the incoming
and outoing XML is mapped to objects. \par\pard\li0\ri0\f0\fs20\cf0 \par
\f1\fs20\cf0 The default binding in XFire is "Aegis". Aegis means "shield", 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.
\par\pard\li0\ri0\f0\fs20\cf0 \par \f1\fs20\cf0 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 s
upply a BindingProvider to the service. In the simplest case of creating a
service you're probably writing code like this: \par\f1\fs20\cf0 \par\trowd
\trftsWidth3\trwWidth10400\trkeep\trqc\trgaph10\trbrdrl\brdrs\brdrw20\brdrcf0
Modified:
websites/staging/maven-doxia/trunk/content/doxia-example-book/http-transport.html
==============================================================================
---
websites/staging/maven-doxia/trunk/content/doxia-example-book/http-transport.html
(original)
+++
websites/staging/maven-doxia/trunk/content/doxia-example-book/http-transport.html
Sat Nov 21 02:03:05 2015
@@ -1,263 +1,496 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<!DOCTYPE html>
<!--
- | Generated by Apache Maven Doxia at 2014-07-01
- | Rendered using Apache Maven Stylus Skin 1.5
+ | Generated by Apache Maven Doxia 1.6 at 2015-11-21
+ | Rendered using Apache Maven Fluido Skin 1.4
-->
-<html xmlns="http://www.w3.org/1999/xhtml">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
- <title>Doxia - HTTP Transport</title>
- <style type="text/css" media="all">
- @import url("../css/maven-base.css");
- @import url("../css/maven-theme.css");
- @import url("../css/site.css");
- </style>
- <link rel="stylesheet" href="../css/print.css" type="text/css"
media="print" />
- <meta name="author" content="XFire User's Guide" />
- <meta name="Date-Revision-yyyymmdd" content="20140701" />
- <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
-
-<script src="http://www.google-analytics.com/urchin.js"
type="text/javascript"></script>
-
+ <meta charset="UTF-8" />
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
+ <meta name="author" content="XFire User's Guide" />
+ <meta name="Date-Revision-yyyymmdd" content="20151121" />
+ <meta http-equiv="Content-Language" content="en" />
+ <title>Doxia – HTTP Transport</title>
+ <link rel="stylesheet" href="../css/apache-maven-fluido-1.4.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.4.min.js"></script>
+
+
+
+<script src="https://www.google-analytics.com/urchin.js"
type="text/javascript"></script>
+
+
<script type="text/javascript">_uacct = "UA-140879-1";
urchinTracker();</script>
- </head>
- <body class="composite">
- <div id="banner">
- <a href="../../" id="bannerLeft">
- <img
src="../images/apache-maven-project-2.png" alt="" />
+
+ </head>
+ <body class="topBarDisabled">
+
+
+
+
+ <div class="container-fluid">
+ <div id="banner">
+ <div class="pull-left">
+ <a href="http://www.apache.org/"
id="bannerLeft">
+
<img src="../../images/apache-maven-project.png" alt="Apache
Maven"/>
</a>
- <a href=".././" id="bannerRight">
- <img
src="../images/maven-logo-2.gif" alt="" />
+ </div>
+ <div class="pull-right"> <a
href="../../" id="bannerRight">
+
<img src="../../images/maven-logo-black-on-white.png" />
</a>
- <div class="clear">
- <hr/>
</div>
- </div>
- <div id="breadcrumbs">
+ <div class="clear"><hr/></div>
+ </div>
+
+ <div id="breadcrumbs">
+ <ul class="breadcrumb">
+
+
+ <li class="">
+ <a href="http://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="../index.html" title="Doxia">
+ Doxia</a>
+ <span class="divider">/</span>
+ </li>
+ <li class="active ">HTTP Transport</li>
+
+
+
+ <li id="publishDate" class="pull-right">Last Published:
2015-11-21</li>
- <div class="xleft">
- <a href="http://www.apache.org/"
class="externalLink">Apache</a>
- >
- <a href="../../index.html">Maven</a>
- >
- <a href="../index.html">Doxia</a>
- >
- HTTP Transport
- </div>
- <div class="xright">
- Last Published: 2014-07-01
- </div>
- <div class="clear">
- <hr/>
+ </ul>
</div>
- </div>
- <div id="leftColumn">
- <div id="navcolumn">
-
- <h5>About Doxia</h5>
- <ul>
- <li class="none">
- <a href="../index.html">What is Doxia?</a>
- </li>
- <li class="none">
- <a href="../overview.html">Overview</a>
- </li>
-
<li class="collapsed">
- <a href="../upgrading.html">Upgrading</a>
+
+
+ <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 class="none">
- <a href="../downloads.html">Downloads</a>
- </li>
- <li class="none">
- <a href="../faq.html">FAQ</a>
- </li>
- </ul>
- <h5>Documentation</h5>
- <ul>
-
<li class="collapsed">
- <a href="../references/index.html">Format References</a>
+
+ <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 class="none">
- <a href="../modules/index.html">Doxia Modules Guide</a>
- </li>
- <li class="none">
- <a href="../macros/index.html">Doxia Macros Guide</a>
- </li>
- <li class="none">
- <a href="../book/index.html">Writing Books</a>
- </li>
- <li class="none">
- <a href="../issues/index.html">Issues & Gotchas</a>
- </li>
- <li class="none">
- <a href="../resources.html">External Resources</a>
- </li>
- </ul>
- <h5>Developer Docs</h5>
- <ul>
-
<li class="collapsed">
- <a href="../developers/index.html">Developer Centre</a>
+
+ <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 &
Gotchas">
+ <span class="none"></span>
+ Issues & 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 class="expanded">
- <a href="../doxia/index.html">Doxia 1.6</a>
- <ul>
- <li class="none">
- <a href="../doxia/index.html">Doxia base</a>
- </li>
- <li class="none">
- <a href="../doxia-sitetools/index.html">Doxia Sitetools</a>
+
+ <li>
+
+ <a href="../doxia/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/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
class="expanded">
- <a href="../doxia/index.html">Doxia 1.5</a>
- <ul>
- <li class="none">
- <a href="../doxia-archives/doxia-1.5/index.html">Doxia
base</a>
+
+ <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 class="expanded">
- <a href="../doxia-archives/doxia-1.4/index.html">Doxia
1.4</a>
- <ul>
- <li class="none">
- <a href="../doxia-archives/doxia-1.4/index.html">Doxia
base</a>
- </li>
- <li class="none">
- <a
href="../doxia-sitetools-archives/doxia-sitetools-1.4/index.html">Doxia
Sitetools</a>
+
+ <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 class="expanded">
- <a href="../doxia-archives/doxia-1.3/index.html">Doxia
1.3</a>
- <ul>
- <li class="none">
- <a href="../doxia-archives/doxia-1.3/index.html">Doxia
base</a>
- </li>
- <li class="none">
- <a
href="../doxia-sitetools-archives/doxia-sitetools-1.3/index.html">Doxia
Sitetools</a>
+
+ <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 class="expanded">
- <a href="../doxia-archives/doxia-1.2/index.html">Doxia
1.2</a>
- <ul>
- <li class="none">
- <a href="../doxia-archives/doxia-1.2/index.html">Doxia
base</a>
- </li>
- <li class="none">
- <a
href="../doxia-sitetools-archives/doxia-sitetools-1.2/index.html">Doxia
Sitetools</a>
+
+ <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 class="none">
- <a href="../doxia-tools/index.html">Doxia Tools</a>
- </li>
- <li class="none">
- <a href="../doxia-ide.html">Doxia IDE</a>
- </li>
- </ul>
- <h5>Project Documentation</h5>
- <ul>
-
<li
class="collapsed">
- <a href="../project-info.html">Project Information</a>
+
+ <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>
- </ul>
- <h5>Maven Projects</h5>
- <ul>
- <li class="none">
- <a href="../../ant-tasks/index.html">Ant Tasks</a>
- </li>
- <li class="none">
- <a href="../../archetype/index.html">Archetype</a>
- </li>
- <li class="none">
- <a href="../index.html">Doxia</a>
- </li>
- <li class="none">
- <a href="../../jxr/index.html">JXR</a>
- </li>
- <li class="none">
- <a href="../../maven-1.x/index.html">Maven 1.x</a>
- </li>
- <li class="none">
- <a href="../../index.html">Maven 2 & 3</a>
- </li>
- <li class="none">
- <a href="../../pom/index.html">Parent POMs</a>
- </li>
- <li class="none">
- <a href="../../plugins/index.html">Plugins</a>
- </li>
- <li class="none">
- <a href="../../plugin-tools/index.html">Plugin Tools</a>
- </li>
- <li class="none">
- <a href="../../scm/index.html">SCM</a>
- </li>
- <li class="none">
- <a href="../../shared/index.html">Shared Components</a>
- </li>
- <li class="none">
- <a href="../../skins/index.html">Skins</a>
- </li>
- <li class="none">
- <a href="../../surefire/index.html">Surefire</a>
- </li>
- <li class="none">
- <a href="../../wagon/index.html">Wagon</a>
- </li>
- </ul>
- <h5>ASF</h5>
- <ul>
- <li class="none">
- <a href="http://www.apache.org/foundation/how-it-works.html"
class="externalLink">How Apache Works</a>
- </li>
- <li class="none">
- <a href="http://www.apache.org/foundation/"
class="externalLink">Foundation</a>
- </li>
- <li class="none">
- <a href="http://www.apache.org/foundation/sponsorship.html"
class="externalLink">Sponsoring Apache</a>
- </li>
- <li class="none">
- <a href="http://www.apache.org/foundation/thanks.html"
class="externalLink">Thanks</a>
- </li>
- </ul>
- <a href="http://maven.apache.org/"
title="Built by Maven" class="poweredBy">
- <img alt="Built by Maven" src="../images/logos/maven-feather.png"/>
- </a>
-
- </div>
- </div>
- <div id="bodyColumn">
- <div id="contentBox">
- <div class="section">
+ <li class="nav-header">Maven Projects</li>
+
+ <li>
+
+ <a href="../../ant-tasks/index.html" title="Ant
Tasks">
+ <span class="none"></span>
+ Ant Tasks</a>
+ </li>
+
+ <li>
+
+ <a href="../../archetype/index.html"
title="Archetype">
+ <span class="none"></span>
+ Archetype</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="http://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="http://www.apache.org/foundation/"
class="externalLink" title="Foundation">
+ <span class="none"></span>
+ Foundation</a>
+ </li>
+
+ <li>
+
+ <a
href="http://www.apache.org/foundation/sponsorship.html" class="externalLink"
title="Sponsoring Apache">
+ <span class="none"></span>
+ Sponsoring Apache</a>
+ </li>
+
+ <li>
+
+ <a
href="http://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="https://maven.apache.org/doxia" name="sitesearch"
type="hidden"/>
+ <input class="search-query" name="q" id="query" type="text" />
+</form>
+<script type="text/javascript"
src="https://www.google.com/coop/cse/brand?form=search-form"></script>
+
+ <hr />
+
+ <div id="poweredBy">
+
+ <script type="text/javascript"
src="https://apis.google.com/js/plusone.js"></script>
+
+
+ <div class="g-plusone" data-href="http://maven.apache.org/doxia/"
data-size="tall" ></div>
+
+ <div class="clear"></div>
+ <div class="clear"></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><!-- Navigation Panel -->
-<table class="bodyTable" width="100%" align="center" border="0">
+<table class="table table-striped" width="100%" align="center" border="0">
<tr class="a">
<td align="left">Previous: <a href="transport-and-channel-api.html">Transport
and Channel API</a></td>
<td align="center">Up: <a href="transports.html">Transports</a></td>
<td align="right">Next: <a href="jms-transport.html">JMS
Transport</a></td></tr></table><!-- End of Navigation Panel --><hr /></div>
<div class="section">
-<h2>HTTP Transport<a name="HTTP_Transport"></a></h2>
+<h2><a name="HTTP_Transport"></a>HTTP Transport</h2>
<div class="section">
-<h3>XFireServlet<a name="XFireServlet"></a></h3>
+<h3><a name="XFireServlet"></a>XFireServlet</h3>
<p>The core of the HTTP Transport takes place in the XFireServletController.
Your own servlets can delegate appropriate requests to this class or you can
use one of XFire's internal servlet classes. The XFireServlet is just a thin
wrapper for the controller. The XFireServletController provides an xml
configuration layer on top of this.</p>
<p>XFire also provides the XFireConfigurableServlet which reads the
services.xml format automatically for you and the XFireSpringServlet which
provides Sprign integration.</p></div>
<div class="section">
-<h3>HttpServletRequest/HttpServletResponse<a
name="HttpServletRequestHttpServletResponse"></a></h3>
+<h3><a
name="HttpServletRequestHttpServletResponse"></a>HttpServletRequest/HttpServletResponse</h3>
<p>The HttpServletRequest/HttpServletResponse can be accessed via the
XFireServletController.</p>
-<div class="source">
-<pre>HttpServletRequest request = XFireServletController.getRequest();
+<div class="source"><pre class="prettyprint linenums">HttpServletRequest
request = XFireServletController.getRequest();
HttpServletResponse response =
XFireServletController.getResponse();</pre></div>
<p>This method will work all the XFire servlets (XFireServlet,
XFireConfigurableServlet, XFireSpringServlet).</p></div>
<div class="section">
-<h3>Client authentication<a name="Client_authentication"></a></h3>
+<h3><a name="Client_authentication"></a>Client authentication</h3>
<p>The Apache Jakarta HttpClient is used under the covers to provide HTTP
client support. There are two ways which you can override the HttpClient
settings:</p>
<ol style="list-style-type: decimal">
<li>You can set the USERNAME/PASSWORD
-<div class="source">
-<pre>// Create your client
+<div class="source"><pre class="prettyprint linenums">// Create your client
Client client = ....;
// Or get it from your proxy
@@ -266,14 +499,12 @@ Client client = ((XFireProxy) Proxy.getI
client.setProperty(Channel.USERNAME, "username");
client.setProperty(Channel.PASSWORD, "pass");</pre></div></li>
<li>You can supply your own HttpClientParms
-<div class="source">
-<pre>client.setProperty(CommonsHttpMessageSender.HTTP_CLIENT_PARAMS,
myParams);</pre></div>
+<div class="source"><pre class="prettyprint
linenums">client.setProperty(CommonsHttpMessageSender.HTTP_CLIENT_PARAMS,
myParams);</pre></div>
<p>The HTTPClient javadocs provide information on how to configure the
HttpClientParams.</p></li></ol></div>
<div class="section">
-<h3>Proxy Support<a name="Proxy_Support"></a></h3>
+<h3><a name="Proxy_Support"></a>Proxy Support</h3>
<p>Proxy support looks very similar to the username/password scenario:</p>
-<div class="source">
-<pre>// Create your client
+<div class="source"><pre class="prettyprint linenums">// Create your client
Client client = ....;
// Or get it from your proxy
@@ -281,36 +512,37 @@ Client client = ((XFireProxy) Proxy.getI
client.setProperty(CommonsHttpMessageSender.HTTP_PROXY_HOST, "host");
client.setProperty(CommonsHttpMessageSender.HTTP_PROXY_PORT,
"8080");</pre></div></div>
<div class="section">
-<h3>HTTP Chunking<a name="HTTP_Chunking"></a></h3>
+<h3><a name="HTTP_Chunking"></a>HTTP Chunking</h3>
<p>You'll need to enable HTTP chunking on the client if you are sending large
files which can't be cached in memory:</p>
-<div class="source">
-<pre>import org.codehaus.xfire.transport.http.HttpTransport;
+<div class="source"><pre class="prettyprint linenums">import
org.codehaus.xfire.transport.http.HttpTransport;
Client client = ....;
client.setProperty(HttpTransport.CHUNKING_ENABLED,
"true");</pre></div></div></div>
<div class="section">
<h2></h2><hr /><!-- Navigation Panel -->
-<table class="bodyTable" width="100%" align="center" border="0">
+<table class="table table-striped" width="100%" align="center" border="0">
<tr class="a">
<td align="left">Previous: <a href="transport-and-channel-api.html">Transport
and Channel API</a></td>
<td align="center">Up: <a href="transports.html">Transports</a></td>
<td align="right">Next: <a href="jms-transport.html">JMS
Transport</a></td></tr></table><!-- End of Navigation Panel --></div>
- </div>
- </div>
- <div class="clear">
- <hr/>
- </div>
- <div id="footer">
- <div class="xright">
- © 2005-2014
- The Apache Software Foundation
-
- - <a
href="http://maven.apache.org/privacy-policy.html">Privacy Policy</a>.
- Apache Maven, Maven, Apache, the Apache feather logo, and the Apache
Maven project logos are trademarks of The Apache Software Foundation.
- </div>
- <div class="clear">
- <hr/>
- </div>
- </div>
- </body>
+ </div>
+ </div>
+ </div>
+
+ <hr/>
+
+ <footer>
+ <div class="container-fluid">
+ <div class="row-fluid">
+ <p >Copyright ©
2005–2015
+ <a href="http://www.apache.org/">The Apache Software
Foundation</a>.
+ All rights reserved.
+
+ </p>
+ </div>
+
+
+ </div>
+ </footer>
+ </body>
</html>