Author: buildbot
Date: Fri Dec 21 12:48:06 2012
New Revision: 843365
Log:
Production update by buildbot for cxf
Modified:
websites/production/cxf/content/cache/docs.pageCache
websites/production/cxf/content/docs/developing-a-service.html
Modified: websites/production/cxf/content/cache/docs.pageCache
==============================================================================
Binary files - no diff available.
Modified: websites/production/cxf/content/docs/developing-a-service.html
==============================================================================
--- websites/production/cxf/content/docs/developing-a-service.html (original)
+++ websites/production/cxf/content/docs/developing-a-service.html Fri Dec 21
12:48:06 2012
@@ -127,10 +127,11 @@ Apache CXF -- Developing a Service
<h1><a shape="rect"
name="DevelopingaService-DevelopingaServiceusingJAXWS"></a>Developing a Service
using JAX-WS</h1>
<p>You can develop a service using one of two approaches:</p>
-<ul><li>Start with a WSDL contract and generate Java objects to implement the
service.</li><li>Start with a Java object and service enable it using
annotations.<br clear="none">
-For new development the preferred path is to design your services in WSDL and
then generate the code to implement them. This approach enforces the concept
that a service is an abstract entity that is implementation neutral. It also
means you can spend more time working out the exact interface your service
requires before you start coding.</li></ul>
+<ul><li>Start with a WSDL contract and generate Java objects to implement the
service.</li><li>Start with a Java object and service enable it using
annotations.</li></ul>
+<p>For new development the preferred path is to design your services in WSDL
and then generate the code to implement them. This approach enforces the
concept that a service is an abstract entity that is implementation neutral. It
also means you can spend more time working out the exact interface your service
requires before you start coding.</p>
+
<p>However, there are many cases where you may need to service enable an
existing application. While JAX-WS eases the process, it does require that you
make some changes to source code of your application. You will need to add
annotations to the source. It also requires that you migrate your code to Java
5.0.</p>
<h2><a shape="rect" name="DevelopingaService-WSDLFirstDevelopment"></a>WSDL
First Development</h2>
@@ -202,18 +203,18 @@ For new development the preferred path i
<span class="code-keyword">public</span> class GreeterImpl <span
class="code-keyword">implements</span> Greeter {
- <span class="code-keyword">public</span> <span
class="code-object">String</span> greetMe(<span
class="code-object">String</span> me)
-{
- <span class="code-object">System</span>.out.println(<span
class="code-quote">"Executing operation greetMe"</span>);
- <span class="code-object">System</span>.out.println(<span
class="code-quote">"Message received: "</span> + me + <span
class="code-quote">"\n"</span>);
- <span class="code-keyword">return</span> <span
class="code-quote">"Hello "</span> + me;
- }
+ <span class="code-keyword">public</span> <span
class="code-object">String</span> greetMe(<span
class="code-object">String</span> me)
+ {
+ <span class="code-object">System</span>.out.println(<span
class="code-quote">"Executing operation greetMe"</span>);
+ <span class="code-object">System</span>.out.println(<span
class="code-quote">"Message received: "</span> + me + <span
class="code-quote">"\n"</span>);
+ <span class="code-keyword">return</span> <span class="code-quote">"Hello
"</span> + me;
+ }
- <span class="code-keyword">public</span> <span
class="code-object">String</span> sayHi()
-{
- <span class="code-object">System</span>.out.println(<span
class="code-quote">"Executing operation sayHi\n"</span>);
- <span class="code-keyword">return</span> <span
class="code-quote">"Bonjour"</span>;
- }
+ <span class="code-keyword">public</span> <span
class="code-object">String</span> sayHi()
+ {
+ <span class="code-object">System</span>.out.println(<span
class="code-quote">"Executing operation sayHi\n"</span>);
+ <span class="code-keyword">return</span> <span
class="code-quote">"Bonjour"</span>;
+ }
}
</pre>
</div></div>
@@ -278,7 +279,7 @@ In this pattern, you typically have an e
<span class="code-keyword">public</span> class StockQuoteReporter <span
class="code-keyword">implements</span> QuoteReporter
{
...
-<span class="code-keyword">public</span> Quote getQuote(<span
class="code-object">String</span> ticker)
+ <span class="code-keyword">public</span> Quote getQuote(<span
class="code-object">String</span> ticker)
{
Quote retVal = <span class="code-keyword">new</span> Quote();
retVal.setID(ticker);
@@ -357,7 +358,7 @@ In this pattern, you typically have an e
)
<span class="code-keyword">public</span> class StockQuoteReporter <span
class="code-keyword">implements</span> QuoteReporter
{
-<span class="code-keyword">public</span> Quote getQuote(<span
class="code-object">String</span> ticker)
+ <span class="code-keyword">public</span> Quote getQuote(<span
class="code-object">String</span> ticker)
{
...
}
@@ -368,7 +369,7 @@ In this pattern, you typically have an e
<h4><a shape="rect" name="DevelopingaService-OptionalAnnotations"></a>Optional
Annotations</h4>
<p>While the <tt>@WebService</tt> annotation is sufficient for service
enabling a Java interface or a Java class, it does not provide a lot of
information about how the service will be exposed as an endpoint. The JAX-WS
programming model uses a number of optional annotations for adding details
about your service, such as the binding it uses, to the Java code. You add
these annotations to the service's SEI.</p>
-<div class="panelMacro"><table class="tipMacro"><colgroup span="1"><col
span="1" width="24"><col span="1"></colgroup><tr><td colspan="1" rowspan="1"
valign="top"><img align="middle"
src="https://cwiki.apache.org/confluence/images/icons/emoticons/check.gif"
width="16" height="16" alt="" border="0"></td><td colspan="1"
rowspan="1"><b>Tip</b><br clear="none">The more details you provide in the
SEIthe easier it will be for developers to implement applications that can use
the functionality it defines. It will also provide for better generated WSDL
contracts.</td></tr></table></div>
+<div class="panelMacro"><table class="tipMacro"><colgroup span="1"><col
span="1" width="24"><col span="1"></colgroup><tr><td colspan="1" rowspan="1"
valign="top"><img align="middle"
src="https://cwiki.apache.org/confluence/images/icons/emoticons/check.gif"
width="16" height="16" alt="" border="0"></td><td colspan="1"
rowspan="1"><b>Tip</b><br clear="none">The more details you provide in the SEI,
the easier it will be for developers to implement applications that can use the
functionality it defines. It will also provide for better generated WSDL
contracts.</td></tr></table></div>
<h5><a shape="rect"
name="DevelopingaService-DefiningtheBindingPropertieswithAnnotations"></a>Defining
the Binding Properties with Annotations</h5>
@@ -486,7 +487,7 @@ FixMe: <tt>faultName</tt> is defined as
<h5><a shape="rect"
name="DevelopingaService-DefiningParameterPropertieswithAnnotations"></a>Defining
Parameter Properties with Annotations</h5>
-<p>The method parameters in the SEI coresspond to the <tt>wsdl:message</tt>
elements and their <tt>wsdl:part</tt> elements. JAX-WS provides annotations
that allow you to describe the <tt>wsdl:part</tt> elements that are generated
for the method parameters.</p>
+<p>The method parameters in the SEI correspond to the <tt>wsdl:message</tt>
elements and their <tt>wsdl:part</tt> elements. JAX-WS provides annotations
that allow you to describe the <tt>wsdl:part</tt> elements that are generated
for the method parameters.</p>
<h5><a shape="rect"
name="DevelopingaService-The%7B%7B@WebParam%7D%7Dannotation"></a>The
<tt>@WebParam</tt> annotation</h5>