[jboss-cvs] JBossAS SVN: r92829 - projects/docs/enterprise/5.0/Administration_And_Configuration_Guide/en-US.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Wed Aug 26 07:18:35 EDT 2009


Author: richard.opalka at jboss.com
Date: 2009-08-26 07:18:35 -0400 (Wed, 26 Aug 2009)
New Revision: 92829

Modified:
   projects/docs/enterprise/5.0/Administration_And_Configuration_Guide/en-US/Web_Services.xml
Log:
[JBPAPP-2620] finished documentation review

Modified: projects/docs/enterprise/5.0/Administration_And_Configuration_Guide/en-US/Web_Services.xml
===================================================================
--- projects/docs/enterprise/5.0/Administration_And_Configuration_Guide/en-US/Web_Services.xml	2009-08-26 11:17:08 UTC (rev 92828)
+++ projects/docs/enterprise/5.0/Administration_And_Configuration_Guide/en-US/Web_Services.xml	2009-08-26 11:18:35 UTC (rev 92829)
@@ -1451,8 +1451,7 @@
 				<para>The following endpoint implementation has a set of operation for a typical stateful shopping chart application.</para>
 <programlisting role="JAVA">
 @WebService(name = &quot;StatefulEndpoint&quot;, targetNamespace = &quot;http://org.jboss.ws/samples/wsaddressing&quot;, serviceName = &quot;TestService&quot;)
- at EndpointConfig(configName = &quot;Standard WSAddressing Endpoint&quot;)
- at HandlerChain(file = &quot;WEB-INF/jaxws-handlers.xml&quot;)
+ at Addressing(enabled=true, required=true)
 @SOAPBinding(style = SOAPBinding.Style.RPC)
 public class StatefulEndpointImpl implements StatefulEndpoint, ServiceLifecycle
 {
@@ -1468,63 +1467,39 @@
    public String getItems()
    { ... }
 }</programlisting>
-				<para>It uses the <ulink url="http://www.jboss.org/community/wiki/JBossWS-NativeUserGuide#Addressing_Endpoint">JAX-WS Endpoint Configuration# Standard WSAddressing Endpoint</ulink> to enable the server side addressing handler. It processes the incomming WS-Addressing header elements and provides access to them through the JSR-261 API.</para>
-				<para>The endpoint handler chain</para>
-<programlisting role="XML">
-&lt;handler-chains xmlns=&quot;http://java.sun.com/xml/ns/javaee&quot; xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot;
-xsi:schemaLocation=&quot;http://java.sun.com/xml/ns/javaee javaee_web_services_1_2.xsd&quot;&gt;
-  
-&lt;handler-chain&gt;
-&lt;protocol-bindings&gt;##SOAP11_HTTP&lt;/protocol-bindings&gt;
-&lt;handler&gt;
-&lt;handler-name&gt;Application Server Handler&lt;/handler-name&gt;
-&lt;handler-class&gt;org.jboss.test.ws.jaxws.samples.wsaddressing.ServerHandler&lt;/handler-class&gt;
-&lt;/handler&gt;
-&lt;/handler-chain&gt;
-  
-&lt;/handler-chains&gt;
-</programlisting>
-				<para>Defines an application specific hander that assignes and processes stateful client IDs.</para>
+				<para>It uses the JAX-WS 2.1 defined <literal>javax.xml.ws.soap.Addressing</literal> annotation to enable the server side addressing handler.</para>
 			</section>
 			<section>
 				<title>Addressing Client</title>
-				<para>On the client side there are simmilar handlers that does the reverse. It uses the JSR-261 API to add WS-Addressing header elements including the clientid association.</para>
-				<para> The client sets a custom handler chain in the binding</para>
+				<para>The client code uses <literal>javax.xml.ws.soap.AddressingFeature</literal> feature from JAX-WS 2.1 API to enable the WS-Addressing.</para>
 <programlisting role="JAVA">
 Service service = Service.create(wsdlURL, serviceName);
-port1 = (StatefulEndpoint)service.getPort(StatefulEndpoint.class);
-BindingProvider bindingProvider = (BindingProvider)port1;
-  
-List&lt;Handler&gt; customHandlerChain = new ArrayList&lt;Handler&gt;();
-customHandlerChain.add(new ClientHandler());
-customHandlerChain.add(new WSAddressingClientHandler());
-bindingProvider.getBinding().setHandlerChain(customHandlerChain);
+port1 = (StatefulEndpoint)service.getPort(StatefulEndpoint.class,  new AddressingFeature());
 </programlisting>
-
-<para>The WSAddressingClientHandler is provided by JBossWS and reads/writes the addressing properties and puts then into the message context.</para>
 				<para>
 					<emphasis role="bold">A client connecting to the stateful endpoint</emphasis>
 				</para>
 <programlisting role="JAVA">
 public class AddressingStatefulTestCase extends JBossWSTest
 {
-public void testAddItem() throws Exception
-{
-port1.addItem(&quot;Ice Cream&quot;);
-port1.addItem(&quot;Ferrari&quot;);
+   ...
+   public void testAddItem() throws Exception
+   {
+      port1.addItem(&quot;Ice Cream&quot;);
+      port1.addItem(&quot;Ferrari&quot;);
   
-port2.addItem(&quot;Mars Bar&quot;);
-port2.addItem(&quot;Porsche&quot;);
-}
+      port2.addItem(&quot;Mars Bar&quot;);
+      port2.addItem(&quot;Porsche&quot;);
+   }
   
-public void testGetItems() throws Exception
-{
-String items1 = port1.getItems();
-assertEquals(&quot;[Ice Cream, Ferrari]&quot;, items1);
+   public void testGetItems() throws Exception
+   {
+      String items1 = port1.getItems();
+      assertEquals(&quot;[Ice Cream, Ferrari]&quot;, items1);
   
-String items2 = port2.getItems();
-assertEquals(&quot;[Mars Bar, Porsche]&quot;, items2);
-}
+      String items2 = port2.getItems();
+      assertEquals(&quot;[Mars Bar, Porsche]&quot;, items2);
+   }
 }</programlisting>
 				<para>
 					<emphasis role="bold">SOAP message exchange</emphasis>




More information about the jboss-cvs-commits mailing list