You are viewing a plain text version of this content. The canonical link for it is here.
Posted to wsrf-dev@ws.apache.org by sc...@apache.org on 2004/12/22 19:12:06 UTC

svn commit: r123131 - in incubator/apollo/trunk: examples examples/filesystem examples/filesystem/src examples/filesystem/src/example examples/filesystem/src/example/filesystem src/java/org/apache/ws/resource src/java/org/apache/ws/resource/impl src/site/content/tutorial/src/example/filesystem src/site/content/tutorial/src/example/sysprops src/site/content/xdocs/tutorial src/test/org/apache/ws/resource/properties

Author: scamp
Date: Wed Dec 22 10:12:04 2004
New Revision: 123131

URL: http://svn.apache.org/viewcvs?view=rev&rev=123131
Log:
Modified while writing documentation on how to write you service, deploy etc....
Added:
   incubator/apollo/trunk/examples/
   incubator/apollo/trunk/examples/filesystem/
   incubator/apollo/trunk/examples/filesystem/src/
   incubator/apollo/trunk/examples/filesystem/src/example/
   incubator/apollo/trunk/examples/filesystem/src/example/filesystem/
   incubator/apollo/trunk/examples/filesystem/src/example/filesystem/CustomSoapMethodNameMap.java
Removed:
   incubator/apollo/trunk/src/java/org/apache/ws/resource/impl/ResourceFactory.java
Modified:
   incubator/apollo/trunk/src/java/org/apache/ws/resource/AbstractPortType.java
   incubator/apollo/trunk/src/java/org/apache/ws/resource/ResourceHome.java
   incubator/apollo/trunk/src/site/content/tutorial/src/example/filesystem/FileSystemHome.java
   incubator/apollo/trunk/src/site/content/tutorial/src/example/sysprops/JavaSysPropsHome.java
   incubator/apollo/trunk/src/site/content/xdocs/tutorial/callback.xml
   incubator/apollo/trunk/src/site/content/xdocs/tutorial/deploy.xml
   incubator/apollo/trunk/src/site/content/xdocs/tutorial/home.xml
   incubator/apollo/trunk/src/site/content/xdocs/tutorial/index.xml
   incubator/apollo/trunk/src/site/content/xdocs/tutorial/resource.xml
   incubator/apollo/trunk/src/site/content/xdocs/tutorial/service.xml
   incubator/apollo/trunk/src/site/content/xdocs/tutorial/test.xml
   incubator/apollo/trunk/src/site/content/xdocs/tutorial/webapp.xml
   incubator/apollo/trunk/src/test/org/apache/ws/resource/properties/SushiHome.java

Added: incubator/apollo/trunk/examples/filesystem/src/example/filesystem/CustomSoapMethodNameMap.java
Url: http://svn.apache.org/viewcvs/incubator/apollo/trunk/examples/filesystem/src/example/filesystem/CustomSoapMethodNameMap.java?view=auto&rev=123131
==============================================================================
--- (empty file)
+++ incubator/apollo/trunk/examples/filesystem/src/example/filesystem/CustomSoapMethodNameMap.java	Wed Dec 22 10:12:04 2004
@@ -0,0 +1,56 @@
+/*=============================================================================*
+ *  Copyright 2004 The Apache Software Foundation
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *=============================================================================*/
+package example.filesystem;
+
+import org.apache.ws.resource.ResourceContext;
+import org.apache.ws.resource.handler.ServiceSoapMethodNameMap;
+import javax.xml.namespace.QName;
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * NOTE: This class is generated and is NOT meant to be modified.
+ *
+ * @author Sal Campana
+ */
+public class CustomSoapMethodNameMap
+   extends ServiceSoapMethodNameMap
+{
+
+   protected static final Map CUSTOM_METHOD_NAME_MAP = initMap();
+
+
+   private static Map initMap()
+   {
+      Map map = new HashMap();
+      map.put( new QName( FileSystemService.TARGET_NSURI, "Mount" ),
+                                  "mount" );
+      map.put( new QName( FileSystemService.TARGET_NSURI, "Unmount" ),
+                                  "unmount"  );
+      return map;
+   }
+
+   /**
+    * Creates a new {@link CustomSoapMethodNameMap} object.
+    *
+    * @param context ResourceContext
+    */
+   public CustomSoapMethodNameMap( ResourceContext context )
+   {
+      super(context );
+   }
+
+}
\ No newline at end of file

Modified: incubator/apollo/trunk/src/java/org/apache/ws/resource/AbstractPortType.java
Url: http://svn.apache.org/viewcvs/incubator/apollo/trunk/src/java/org/apache/ws/resource/AbstractPortType.java?view=diff&rev=123131&p1=incubator/apollo/trunk/src/java/org/apache/ws/resource/AbstractPortType.java&r1=123130&p2=incubator/apollo/trunk/src/java/org/apache/ws/resource/AbstractPortType.java&r2=123131
==============================================================================
--- incubator/apollo/trunk/src/java/org/apache/ws/resource/AbstractPortType.java	(original)
+++ incubator/apollo/trunk/src/java/org/apache/ws/resource/AbstractPortType.java	Wed Dec 22 10:12:04 2004
@@ -15,14 +15,13 @@
  *=============================================================================*/
 package org.apache.ws.resource;
 
-import org.apache.ws.resource.impl.ResourceFactory;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.apache.ws.resource.i18n.Keys;
+import org.apache.ws.resource.i18n.MessagesImpl;
 import org.apache.ws.resource.impl.AbstractResourceHome;
 import org.apache.ws.resource.lifetime.faults.ResourceUnknownFaultException;
-import org.apache.ws.resource.i18n.MessagesImpl;
-import org.apache.ws.resource.i18n.Keys;
 import org.apache.ws.util.i18n.Messages;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
 
 import javax.xml.rpc.JAXRPCException;
 
@@ -75,7 +74,7 @@
       LOG.debug( MSG.getMessage(Keys.PORTTYPE_RECIEVED_REQUEST, m_resourceContext.getServiceName(), String.valueOf(m_resourceKey)) );
       try
       {
-         m_resource = ( (ResourceFactory) m_resourceHome ).getInstance( m_resourceContext );
+         m_resource = ( (ResourceHome) m_resourceHome ).getInstance( m_resourceContext );
       }
       catch ( ResourceException re )
       {

Modified: incubator/apollo/trunk/src/java/org/apache/ws/resource/ResourceHome.java
Url: http://svn.apache.org/viewcvs/incubator/apollo/trunk/src/java/org/apache/ws/resource/ResourceHome.java?view=diff&rev=123131&p1=incubator/apollo/trunk/src/java/org/apache/ws/resource/ResourceHome.java&r1=123130&p2=incubator/apollo/trunk/src/java/org/apache/ws/resource/ResourceHome.java&r2=123131
==============================================================================
--- incubator/apollo/trunk/src/java/org/apache/ws/resource/ResourceHome.java	(original)
+++ incubator/apollo/trunk/src/java/org/apache/ws/resource/ResourceHome.java	Wed Dec 22 10:12:04 2004
@@ -129,4 +129,9 @@
           NoSuchResourceException, 
           InvalidResourceKeyException, 
           RemoveNotSupportedException;
+
+   public Resource getInstance( ResourceContext resourceContext )
+   throws ResourceException,
+          ResourceContextException,
+          ResourceUnknownException;
 }

Deleted: /incubator/apollo/trunk/src/java/org/apache/ws/resource/impl/ResourceFactory.java
Url: http://svn.apache.org/viewcvs/incubator/apollo/trunk/src/java/org/apache/ws/resource/impl/ResourceFactory.java?view=auto&rev=123130
==============================================================================

Modified: incubator/apollo/trunk/src/site/content/tutorial/src/example/filesystem/FileSystemHome.java
Url: http://svn.apache.org/viewcvs/incubator/apollo/trunk/src/site/content/tutorial/src/example/filesystem/FileSystemHome.java?view=diff&rev=123131&p1=incubator/apollo/trunk/src/site/content/tutorial/src/example/filesystem/FileSystemHome.java&r1=123130&p2=incubator/apollo/trunk/src/site/content/tutorial/src/example/filesystem/FileSystemHome.java&r2=123131
==============================================================================
--- incubator/apollo/trunk/src/site/content/tutorial/src/example/filesystem/FileSystemHome.java	(original)
+++ incubator/apollo/trunk/src/site/content/tutorial/src/example/filesystem/FileSystemHome.java	Wed Dec 22 10:12:04 2004
@@ -15,35 +15,15 @@
  *=============================================================================*/
 package example.filesystem;
 
-import example.filesystem.backend.FileSystem;
-import example.filesystem.backend.UnixFileSystem;
-import example.filesystem.callback.BackupFrequencyCallback;
-import example.filesystem.callback.CommentCallback;
-import example.filesystem.callback.FsckPassNumberCallback;
-import example.filesystem.callback.OptionsCallback;
-import example.filesystem.callback.MountPointCallback;
 import org.apache.ws.resource.Resource;
 import org.apache.ws.resource.ResourceContext;
 import org.apache.ws.resource.ResourceContextException;
 import org.apache.ws.resource.ResourceException;
 import org.apache.ws.resource.ResourceKey;
 import org.apache.ws.resource.ResourceUnknownException;
-import org.apache.ws.resource.example.filesystem.BackupFrequencyDocument;
-import org.apache.ws.resource.example.filesystem.CommentDocument;
-import org.apache.ws.resource.example.filesystem.DeviceSpecialFileDocument;
-import org.apache.ws.resource.example.filesystem.FileSystemPropertiesDocument;
-import org.apache.ws.resource.example.filesystem.FsckPassNumberDocument;
-import org.apache.ws.resource.example.filesystem.MountPointDirectoryDocument;
-import org.apache.ws.resource.example.filesystem.OptionsDocument;
-import org.apache.ws.resource.example.filesystem.TypeDocument;
 import org.apache.ws.resource.impl.AbstractResourceHome;
-import org.apache.ws.resource.impl.ResourceFactory;
-import org.apache.ws.resource.properties.ResourceProperty;
-import org.apache.ws.resource.properties.ResourcePropertySet;
-import org.apache.ws.resource.properties.impl.XmlBeansResourcePropertySet;
 
 import java.io.Serializable;
-import java.util.List;
 
 /**
  * Home for FileSystem WS-Resources.
@@ -54,8 +34,7 @@
  */
 public class FileSystemHome
         extends AbstractResourceHome
-        implements ResourceFactory,
-        Serializable
+        implements Serializable
 {
 
     /**

Modified: incubator/apollo/trunk/src/site/content/tutorial/src/example/sysprops/JavaSysPropsHome.java
Url: http://svn.apache.org/viewcvs/incubator/apollo/trunk/src/site/content/tutorial/src/example/sysprops/JavaSysPropsHome.java?view=diff&rev=123131&p1=incubator/apollo/trunk/src/site/content/tutorial/src/example/sysprops/JavaSysPropsHome.java&r1=123130&p2=incubator/apollo/trunk/src/site/content/tutorial/src/example/sysprops/JavaSysPropsHome.java&r2=123131
==============================================================================
--- incubator/apollo/trunk/src/site/content/tutorial/src/example/sysprops/JavaSysPropsHome.java	(original)
+++ incubator/apollo/trunk/src/site/content/tutorial/src/example/sysprops/JavaSysPropsHome.java	Wed Dec 22 10:12:04 2004
@@ -22,8 +22,7 @@
 import org.apache.ws.resource.ResourceKey;
 import org.apache.ws.resource.ResourceUnknownException;
 import org.apache.ws.resource.impl.AbstractResourceHome;
-import org.apache.ws.resource.impl.ResourceFactory;
-import javax.xml.namespace.QName;
+
 import java.io.Serializable;
 
 /**
@@ -31,8 +30,7 @@
  */
 public class JavaSysPropsHome
    extends AbstractResourceHome
-   implements ResourceFactory,
-              Serializable
+   implements Serializable
 {
    /**
     * DOCUMENT_ME

Modified: incubator/apollo/trunk/src/site/content/xdocs/tutorial/callback.xml
Url: http://svn.apache.org/viewcvs/incubator/apollo/trunk/src/site/content/xdocs/tutorial/callback.xml?view=diff&rev=123131&p1=incubator/apollo/trunk/src/site/content/xdocs/tutorial/callback.xml&r1=123130&p2=incubator/apollo/trunk/src/site/content/xdocs/tutorial/callback.xml&r2=123131
==============================================================================
--- incubator/apollo/trunk/src/site/content/xdocs/tutorial/callback.xml	(original)
+++ incubator/apollo/trunk/src/site/content/xdocs/tutorial/callback.xml	Wed Dec 22 10:12:04 2004
@@ -5,12 +5,12 @@
 		<title>Writing Callback Objects.</title>
 	</header>
 	<body>
-		<section id="callbacks">
-			<title>Writing Callback Objects.</title>
+		<section id="intro">
+			<title>Introduction</title>
 			<p>Callback objects are how you keep the front-end resource properties in synch with your backend.  You write callback objects and register them with your non-static resource properties.  The registration is typically done upon initialization of the Resource class, in the init method.  An example of this can be seen in the FileSystemResource.</p>
 			<p>There are two interfaces which can be implemented when writing a Callback object.  Which one you choose will depend on how you would like each ResourceProperty to behave:</p>
 <ol>
-	<li>.org.apache.ws.resource.properties.ResourcePropertyCallback - Implement this interface if the resource property will change (not static i.e. "name"), but is not modifiable externally.  It provides the ability to refresh the front-end with the current state of your backend.</li>
+	<li>org.apache.ws.resource.properties.ResourcePropertyCallback - Implement this interface if the resource property will change (not static i.e. "name"), but is not modifiable externally.  It provides the ability to refresh the front-end with the current state of your backend.</li>
 	<li>org.apache.ws.resource.properties.SetResourcePropertyCallback - Implement this interface if the resource property is modifiable, thus methods like insert, update and delete <em>may</em> be appropriate.  This interface extends the ResourcePropertyCallback. </li>
 </ol>
 		</section>
@@ -72,6 +72,10 @@
     }
 </source>
 <p>Notice that the deleteProperty method does nothing since the implementor knew that the method would never be called since the schema forbids it.  The updateProperty simply hands-off to the insertProperty since the implementor knew that an update on the backend is the same as an insert.  The insertProperty is the workhorse method and takes the Object[], obtains the value from it and sets it on the backend.</p>
+		</section>
+		<section id="register">
+			<title>registering</title>
+			<p>Once you've written your callback objects you will need to register them with the resource properties.  This is done in the init() method of your Resource implementation class.  See the FileSystemResource for more information.</p>
 		</section>
 	</body>
 </document>

Modified: incubator/apollo/trunk/src/site/content/xdocs/tutorial/deploy.xml
Url: http://svn.apache.org/viewcvs/incubator/apollo/trunk/src/site/content/xdocs/tutorial/deploy.xml?view=diff&rev=123131&p1=incubator/apollo/trunk/src/site/content/xdocs/tutorial/deploy.xml&r1=123130&p2=incubator/apollo/trunk/src/site/content/xdocs/tutorial/deploy.xml&r2=123131
==============================================================================
--- incubator/apollo/trunk/src/site/content/xdocs/tutorial/deploy.xml	(original)
+++ incubator/apollo/trunk/src/site/content/xdocs/tutorial/deploy.xml	Wed Dec 22 10:12:04 2004
@@ -1,17 +1,19 @@
 <?xml version="1.0"?>
-
 <!DOCTYPE document PUBLIC "-//APACHE//DTD Documentation V2.0//EN" "http://forrest.apache.org/dtd/document-v20.dtd">
-
-<document> 
-  <header> 
-    <title> </title> 
-  </header> 
-  <body> 
-    <section>
-      <title> </title>
-      <p>
-        TODO
-      </p>
-    </section>
-  </body>
+<document>
+	<header>
+		<title>Deploy the Webapp to Tomcat</title>
+	</header>
+	<body>
+		<section>
+			<title>Introduction</title>
+			<p>This section will discuss how to deploy the webapp into the Tomcat container.</p>
+		</section>
+		<section id="deploy">
+			<title>Deploying the WebApp</title>
+			<p>Once you have deployed your service to the webapp, you will need to deploy the webapp to the Tomcat container.</p>
+			<p>Deploying to Tomcat entails copying the webapp dir "wsrf" to TOMCAT_HOME/webapps directory. </p>
+			<note>The directory name under the TOMCAT_HOME/webapps directory denotes the webapp context.  Pleanse ensure after copying, that there is a "wsrf" directory under TOMCAT_HOME/webapps</note>
+		</section>
+	</body>
 </document>

Modified: incubator/apollo/trunk/src/site/content/xdocs/tutorial/home.xml
Url: http://svn.apache.org/viewcvs/incubator/apollo/trunk/src/site/content/xdocs/tutorial/home.xml?view=diff&rev=123131&p1=incubator/apollo/trunk/src/site/content/xdocs/tutorial/home.xml&r1=123130&p2=incubator/apollo/trunk/src/site/content/xdocs/tutorial/home.xml&r2=123131
==============================================================================
--- incubator/apollo/trunk/src/site/content/xdocs/tutorial/home.xml	(original)
+++ incubator/apollo/trunk/src/site/content/xdocs/tutorial/home.xml	Wed Dec 22 10:12:04 2004
@@ -1,17 +1,66 @@
 <?xml version="1.0"?>
-
 <!DOCTYPE document PUBLIC "-//APACHE//DTD Documentation V2.0//EN" "http://forrest.apache.org/dtd/document-v20.dtd">
-
-<document> 
-  <header> 
-    <title> </title> 
-  </header> 
-  <body> 
-    <section>
-      <title> </title>
-      <p>
-        TODO
-      </p>
-    </section>
-  </body>
+<document>
+	<header>
+		<title>Writing a Home class</title>
+	</header>
+	<body>
+		<section id="intro">
+			<title>Introduction</title>
+			<p>This section will describe how to write a home for your resource class.  The home is used to lookup the resource instance.  It can act as a factory for creating instances upon request, or build all instances.  It is meant to be the entry point for locating a resource instance.</p>
+		</section>
+		<section id="class-declaration">
+			<title>Class Declaration</title>
+			<p>When declaring your "home" you <strong>should</strong> extend AbstractResourceHome.  Extending AbstractResourceHome will provide services for caching instances and looking them up.  It will also ensure that the correct interfaces are implemented so that Apollo can interact with your home.</p>
+<p>The FileSystemHome extends AbstractResourceHome and implements Serializable:</p>
+<source>public class FileSystemHome
+        extends AbstractResourceHome
+        implements Serializable</source>
+		</section>
+	<section id="ops">
+		<title>Operations</title>
+		<p>If you extend AbstractResourceHome, the only required operation you will need to invoke is:</p>
+		<source>public Resource getInstance( ResourceContext resourceContext )</source>
+		<p>The getInstance(...) operation provides the ability for you to intercept the request for retrieving an instance.  In the FileSystem example we use the operation to determine if the requested resource instance is one of our expected "filesystems", if it is not we throw an exception.</p>
+	<source>public Resource getInstance( ResourceContext resourceContext )
+            throws ResourceException,
+            ResourceContextException,
+            ResourceUnknownException
+    {
+        ResourceKey key = resourceContext.getResourceKey();
+        Resource resource = null;
+        try
+        {
+            resource = find( key );
+        }
+        catch ( ResourceException re )
+        {
+            Object id = key.getValue();
+            /**
+             * Determine if the passed-in key is, in fact, something we expect.
+             */
+            if ( id.equals( "/dev/vg00/lvol1" ) || id.equals( "/dev/vg00/lvol2" ) )
+            {
+                try
+                {
+                    resource = createInstance( key);
+                }
+                catch ( Exception e )
+                {
+                    throw new ResourceException( e );
+                }
+                add( key, resource );
+            }
+            else
+            {
+                throw new ResourceUnknownException( id,
+                        resourceContext.getServiceName() );
+            }
+        }
+        return resource;
+    }</source>
+    <p>Notice the method makes calls to find(...) and createInstance(...).  These operations are generic and implemented in the AbstractResourceHome, they provide functions like caching an instance and instantiating one.</p>
+<note>Many of the operations in the AbstractResourceHome may be overridden in your extension home class, if you have a need to extend its functionality.</note>
+	</section>
+	</body>
 </document>

Modified: incubator/apollo/trunk/src/site/content/xdocs/tutorial/index.xml
Url: http://svn.apache.org/viewcvs/incubator/apollo/trunk/src/site/content/xdocs/tutorial/index.xml?view=diff&rev=123131&p1=incubator/apollo/trunk/src/site/content/xdocs/tutorial/index.xml&r1=123130&p2=incubator/apollo/trunk/src/site/content/xdocs/tutorial/index.xml&r2=123131
==============================================================================
--- incubator/apollo/trunk/src/site/content/xdocs/tutorial/index.xml	(original)
+++ incubator/apollo/trunk/src/site/content/xdocs/tutorial/index.xml	Wed Dec 22 10:12:04 2004
@@ -21,7 +21,7 @@
         <li><a href="wsdl.html">Write the WSDL for the service</a></li>
         <li><a href="wsdl2java.html">Run Apollo's Wsdl2Java tool on the WSDL</a></li>
         <li><a href="service.html">Create the service class and add business logic to it</a></li>
-        <li><a href="resource.html">Create the resource class which will maintain state for a particular filesystem resource instance</a></li>        
+        <li><a href="resource.html">Create the resource class which will maintain state for a resource instance</a></li>        
         <li><a href="callback.html">Create backend callback objects.</a></li>        
         <li><a href="home.html">Create the home class and add business logic to it</a></li>
         <li><a href="webapp.html">Deploy the service to the Apollo webapp</a></li>

Modified: incubator/apollo/trunk/src/site/content/xdocs/tutorial/resource.xml
Url: http://svn.apache.org/viewcvs/incubator/apollo/trunk/src/site/content/xdocs/tutorial/resource.xml?view=diff&rev=123131&p1=incubator/apollo/trunk/src/site/content/xdocs/tutorial/resource.xml&r1=123130&p2=incubator/apollo/trunk/src/site/content/xdocs/tutorial/resource.xml&r2=123131
==============================================================================
--- incubator/apollo/trunk/src/site/content/xdocs/tutorial/resource.xml	(original)
+++ incubator/apollo/trunk/src/site/content/xdocs/tutorial/resource.xml	Wed Dec 22 10:12:04 2004
@@ -5,8 +5,8 @@
 		<title>Writing a Resource Class</title>
 	</header>
 	<body>
-		<section id="write-resource">
-			<title>Writing a Resource Class</title>
+		<section id="intro">
+			<title>Introduction</title>
 			<p>
         			The resource class is the stateful instance-representation of your of your Web service.  The resource maintains the resource id and the ResourcePropertySet.  The resource id is the unique identifier for an instance our your Web service.  It allows you to have multiple versions of the same Web service, each with it's own stateful properties.  The stateful properties are represented by the ResourcePropertySet.  The ResourcePropertySet is the Java representation of the Resource Properties document defined in the schema section of your WSDL file.
         		</p>
@@ -16,20 +16,22 @@
 		</section>
 		<section id="class-declaration">
 		<title>Class Declaration</title>
-			<p>When declaring your Resource class you MUST implement org.apache.ws.resource.Resource which provides the necessary operations for dealing with the ResourcePropertySet and the resource's id.</p><note>The resource id is a custom WS-Addressing header element which you will define in your configuration information for your service.</note>
+			<p>When declaring your Resource class you MUST implement org.apache.ws.resource.Resource which provides the necessary operations for dealing with the ResourcePropertySet and the resource's id.  When defining a singleton service</p><note>The resource id is a custom WS-Addressing header element which you will define in your configuration information for your service.</note>
 <p>Optionally, you may also implement PersistentResource, for providing hooks for persistence, and ScheduledResourceTerminationResource, for adding the ability to schedule when the resource should be terminated.</p>
 <p>The FileSystemResource's class declarations is as follows:</p>
-<source>public class FileSystemResource
-      implements Resource,
-      ScheduledResourceTerminationResource</source>
+<source>public class FileSystemResource extends
+      AbstractFileSystemResource</source>
+      <p>Notice that we've extended a base abstract class.  This allows us to focus solely on the init() operation for registering callback objects and initializing the values of our ResourceProperties.</p>
+<p>The AbstractFileSystemResource class implements Resource, PropertiesResource, ScheduledResourceTerminationResource.  We've "abstracted" the non-user specific code to the abstract class so that the user can focus on their initialization.</p>
 		</section>
 <section id="classvars">
 					<title>Class Variables</title>
-					<p>	The class variables should include the resource id and the ResourcePropertySet.  The ResourcePropertySet will be the instance of the ResourceProperties Document associated with this resource, with this resource id.</p>
+					<p>	The class variables of AbstractFileSystemResource  should include the resource id and the ResourcePropertySet.  The ResourcePropertySet will be the instance of the ResourceProperties Document associated with this resource, with this resource id.</p>
+<note>Since it is not a requirement to have a resource property in your service, there is a PropertiesResource interface to denote that properties are being used.</note>
 				</section>
 		<section id="ops">
 					<title>Operations</title>
-					<p>The operations are defined by the interfaces you implement and are mainly setters and getters for the ResourcePropertySet and the resource id.  There are also operations which allow you to initialize your resource or destroy your resource (init(..) and destroy()).  The operations allow you to do setup, initializing your resource properties, adding callback objects, and cleanup in your resource class.  The exception, seen in the FileSystemResource, are the operations for ScheduledResourceTerminationResource in which we've provided a utility class (ResourcePropertyUtils) to help you implement these methods.</p><note>The use of ResourcePropertyUtils is purely optional and is meant to help the implementor.</note>
+					<p>The operations are defined by the interfaces you implement and are mainly setters and getters for the ResourcePropertySet and the resource id.  There are also operations which allow you to initialize your resource or destroy your resource (init(..) and destroy()).  The operations allow you to do setup, initializing your resource properties, adding callback objects, and cleanup in your resource class.  The exception, seen in the AbstractFileSystemResource, are the operations for ScheduledResourceTerminationResource in which we've provided a utility class (ResourcePropertyUtils) to help you implement these methods.</p><note>The use of ResourcePropertyUtils is purely optional and is meant to help the implementor.</note>
   		</section>
 	</body>
 </document>

Modified: incubator/apollo/trunk/src/site/content/xdocs/tutorial/service.xml
Url: http://svn.apache.org/viewcvs/incubator/apollo/trunk/src/site/content/xdocs/tutorial/service.xml?view=diff&rev=123131&p1=incubator/apollo/trunk/src/site/content/xdocs/tutorial/service.xml&r1=123130&p2=incubator/apollo/trunk/src/site/content/xdocs/tutorial/service.xml&r2=123131
==============================================================================
--- incubator/apollo/trunk/src/site/content/xdocs/tutorial/service.xml	(original)
+++ incubator/apollo/trunk/src/site/content/xdocs/tutorial/service.xml	Wed Dec 22 10:12:04 2004
@@ -5,15 +5,15 @@
 		<title>Writing a Service Class</title>
 	</header>
 	<body>
-		<section id="write-service">
-			<title>Writing a Service Class</title>
+		<section id="intro">
+			<title>Introduction</title>
 			<p>
         			The service class is the representation of your WSDL file as a Web service.  The public operations in the service class are the operations which will be invokable when a SOAP request is received for your service.
         		</p>
 			<p>This section will discuss how to write a service class.  Please note that the eventual goal will be to generate most of this code for you via code generation.  Currently, however, you will need to implement these classes by hand.</p>
 			<p>Initially, you should model your service off of the included FileSystemService example.  This will ensure you will write a working service.</p>
 		</section>
-		<section id="intro">
+		<section id="what-files">
 			<title>What files will need to be written?</title>
 			<p>The provided example "FileSystem" includes a FileSystemService.  The FileSystemService extends AbstractFileSystemService to abstract out the code which should not need to be altered.  The abstract class mainly consists of the specification operations (i.e. getMultipleResourceProperties) and the service class which extends this class contains the user-specific operations.  In the case of FileSystemService, these operations are "mount" and "unmount".</p>
 			<p>

Modified: incubator/apollo/trunk/src/site/content/xdocs/tutorial/test.xml
Url: http://svn.apache.org/viewcvs/incubator/apollo/trunk/src/site/content/xdocs/tutorial/test.xml?view=diff&rev=123131&p1=incubator/apollo/trunk/src/site/content/xdocs/tutorial/test.xml&r1=123130&p2=incubator/apollo/trunk/src/site/content/xdocs/tutorial/test.xml&r2=123131
==============================================================================
--- incubator/apollo/trunk/src/site/content/xdocs/tutorial/test.xml	(original)
+++ incubator/apollo/trunk/src/site/content/xdocs/tutorial/test.xml	Wed Dec 22 10:12:04 2004
@@ -1,17 +1,31 @@
 <?xml version="1.0"?>
-
 <!DOCTYPE document PUBLIC "-//APACHE//DTD Documentation V2.0//EN" "http://forrest.apache.org/dtd/document-v20.dtd">
-
-<document> 
-  <header> 
-    <title> </title> 
-  </header> 
-  <body> 
-    <section>
-      <title> </title>
-      <p>
-        TODO
-      </p>
-    </section>
-  </body>
+<document>
+	<header>
+		<title>Testing Your Service</title>
+	</header>
+	<body>
+		<section id="intro">
+			<title>Introduction</title>
+			<p>This section will describe how to test your service running in the Tomcat container.</p>
+		</section>
+		<section id="start">
+			<title>Starting Tomcat</title>
+			<p>Tomcat can be started by utilizinge the scripts under the TOMCAT_HOME/bin directory.  The script most typically used is "startup.bat" (Windows) or "startup.sh" (Unix).</p>
+<p>Once Tomcat is started you can navigate to: <a href="http://localhost:8080/wsrf">http://localhost:8080/wsrf</a> to view the deployed services in the webapp.</p> 
+<note>Please refer to the Tomcat documentation for more details.</note>
+		</section>
+		<section id="testing">
+		<title>Testing the FileSystem Service</title>
+		<p>The provided example FileSystem includes some scripts for sending requests to the service.  The scripts can be leveredged in order to test your own services.</p>
+  <p>In order to test the FileSystem service you will need to change to the tutorial directory under docs.  The Ant build script contains a target for sending a SOAP request.  The name of the target is "sendRequest" and in order to invoke it you must specify a request XML file.  The request XML files are located in the requests subdirectory.  You can invoke the call by doing the following:</p>
+<p><strong>>ant sendRequest -Dxml=./requests/QueryResourceProperties_allProps.soap</strong></p>
+		</section>
+		<section id="your-own">
+			<title>Using the Provided Scripts to Invoke Your Service</title>
+			<p>Invoking your service will entail selecting the appropriate .soap script to use.  Each script is named appropriately for which specification operation it is calling.  You will need to make a copy of the script and modify the WS-Addressing headers for resource id to match the entry you put in the JNDI config and the resource id number for the instance you would like to invoke.  Remember this has to do with the home's implementation of getInstance() and allows you to "decide" which instances are valid for sending requests to.  Once done, in order to invoke your service with your modified scripts you will need to call:</p>
+			<p><strong>>ant -f soapclient.xml sendRequest -Durl=http://localhost:8080/wsrf/services/your_service  -Dxml=./requests/QueryResourceProperties_allProps.soap</strong>  where "your_service" represents your service endpoint name, and the script name should be the name of your modified script.</p>
+<note>You may also add an entry to build.properties for "url" which will alleviate the need to specify it on the command line.</note>
+		</section>
+	</body>
 </document>

Modified: incubator/apollo/trunk/src/site/content/xdocs/tutorial/webapp.xml
Url: http://svn.apache.org/viewcvs/incubator/apollo/trunk/src/site/content/xdocs/tutorial/webapp.xml?view=diff&rev=123131&p1=incubator/apollo/trunk/src/site/content/xdocs/tutorial/webapp.xml&r1=123130&p2=incubator/apollo/trunk/src/site/content/xdocs/tutorial/webapp.xml&r2=123131
==============================================================================
--- incubator/apollo/trunk/src/site/content/xdocs/tutorial/webapp.xml	(original)
+++ incubator/apollo/trunk/src/site/content/xdocs/tutorial/webapp.xml	Wed Dec 22 10:12:04 2004
@@ -1,17 +1,75 @@
 <?xml version="1.0"?>
-
 <!DOCTYPE document PUBLIC "-//APACHE//DTD Documentation V2.0//EN" "http://forrest.apache.org/dtd/document-v20.dtd">
-
-<document> 
-  <header> 
-    <title> </title> 
-  </header> 
-  <body> 
-    <section>
-      <title> </title>
-      <p>
-        TODO
-      </p>
-    </section>
-  </body>
+<document>
+	<header>
+		<title>Deploy the service to the Apollo webapp</title>
+	</header>
+	<body>
+		<section id="intro">
+			<title>Introduction</title>
+			<p>Once you've written, and compiled,  the required classes, you will need to deploy your service to the webapp.  The distribution contains a "webapps" directory which contains a "wsrf" webapp.  We've provided an ANT script for deploying the FileSystem example.  We will discuss how the script works so you will be able to build your own scripts.</p>
+		</section>
+		<section id="steps">
+			<title>How to manually deploy your service</title>
+			<p>In this section we will describe how to manually deploy your service.  We will describe each step in the process.</p>
+			<ol>
+				<li><strong>Copy your WSDL file.</strong>
+				<p>You will need to copy your WSDL file to an appropriate location in the webapp.  We recommend you put it in the wsrf/WEB-INF/classes/wsdl directory.  This will allow Axis to reference it from the classpath and avoids the need to hard-code a location on your filesystem.  We will use this location when registering the service in the server-config.wsdd file.</p>
+				</li>
+				<li><strong>Copy your classes.</strong>
+				<p>You will need to copy any .class files, generated by Wsdl2Java or hand written, to the wsrf/WEB-INF/classes/ directory so that your service can be created by Axis and Apollo.</p>
+				</li>
+				<li><strong>Update the jndi-config.xml file.</strong>
+				<p>The jndi-config.xml contains information about yoru service, resource, home and resource key.  This information is necessary for Apollo to create your home and handle requests for your service.  It will setup the in-memory JNDI context for your classes.  Here is the entry for the FileSystem:</p>
+<source><![CDATA[   <service name="filesystem">
+      <resource name="home" type="example.filesystem.FileSystemHome">
+         <resourceParams>
+            <parameter>
+               <name>serviceClassName</name>
+               <value>example.filesystem.FileSystemService</value>
+            </parameter>
+            <parameter>
+               <name>resourceClassName</name>
+               <value>example.filesystem.FileSystemResource</value>
+            </parameter>
+            <parameter>
+               <name>wsdlTargetNamespace</name>
+               <value>http://ws.apache.org/resource/example/filesystem</value>
+            </parameter>
+            <parameter>
+               <name>resourceKeyName</name>
+               <value>{http://ws.apache.org/resource/example/filesystem}ResourceId</value>
+            </parameter>
+         </resourceParams>
+      </resource>
+   </service>]]></source>
+   <p>The "name" attribute is a unique name in the config file to denote your service in JNDI.  The resource "name" attribute is used for locating your home instance, and is named "home".  Notice the serviceClassName points to the clasname for the service class.  The same is said for the resourceClassName.  The wsdlTargetNamespace is the target namespace from your WSDL.</p>
+<p>The resourceKeyName represents the WS-Addressing-header name to be used for your resource id.  This can be anything you like and is configurable here.  If you omit this entry, it is assumed that the service is a <strong>SINGLETON</strong> service and no resourceid is expected in the WS-Addressing headers.</p>
+				</li>
+				<li><strong>Update the server-config.wsdd file.</strong>
+				<p>The server-config.wsdd file is an Axis-specific file for loading Web services.  It is located in the wsrf/WEB-INF/ directory.  The file maintains entry for each service to be loaded.  An example is the FileSystem service:</p>
+<source><![CDATA[    <service name="filesystem" provider="java:WSRF" style="document" use="literal">
+      <wsdlFile>/wsdl/FileSystem.wsdl</wsdlFile>      
+      <requestFlow>
+         <handler type="java:org.apache.axis.handlers.JAXRPCHandler">
+            <parameter name="className" value="org.apache.axis.message.addressing.handler.AxisServerSideAddressingHandler"/>
+            <parameter name="referencePropertyNames" value="*"/>
+         </handler>
+      </requestFlow>      
+   </service>]]></source>
+   <p>The service "name" attribute is endopoint name and should be the same as the port's "name" attribute from your WSDL file.  This will ensure people consuming your WSDL will be able to invoke your service.</p>
+   <p>Notice that we've made an entry for wsdlFile which points to the /wsdl/FileSystem.wsdl.  This translates to the wsdl directory under the WEB-INF/classes directory.</p>
+<p>The last part is the requestFlow.  This xml fragment is necessary to ensure the requests are routed through the WS-Addressing handler.   This is static and should always be present.  We did not define it globally in case there were other services defined which will not use WS-Addressing.</p>
+				</li>
+			</ol>
+		</section>
+		<section id="filesys">
+			<title>Deploying the FileSystem Example</title>
+			<p>To deploy the FileSystem example we will need to generate XmlBean code from the WSDL, compile all classes and deploy it to the webapp.  We've provided an ANT script for handling all the steps.</p>
+<p>You will need to change your directory to the docs/tutorial directory.  You will then need to run the command:</p>
+<p><strong>>ant generate compile deploy</strong></p>
+<p>This will do all the necessary tasks.</p>
+<note>This step assumes you have installed Apache's ANT.  If not, you can get it at: <a href="http://ant.apache.org/">Apache Ant</a></note>
+		</section>
+	</body>
 </document>

Modified: incubator/apollo/trunk/src/test/org/apache/ws/resource/properties/SushiHome.java
Url: http://svn.apache.org/viewcvs/incubator/apollo/trunk/src/test/org/apache/ws/resource/properties/SushiHome.java?view=diff&rev=123131&p1=incubator/apollo/trunk/src/test/org/apache/ws/resource/properties/SushiHome.java&r1=123130&p2=incubator/apollo/trunk/src/test/org/apache/ws/resource/properties/SushiHome.java&r2=123131
==============================================================================
--- incubator/apollo/trunk/src/test/org/apache/ws/resource/properties/SushiHome.java	(original)
+++ incubator/apollo/trunk/src/test/org/apache/ws/resource/properties/SushiHome.java	Wed Dec 22 10:12:04 2004
@@ -15,15 +15,14 @@
  *=============================================================================*/
 package org.apache.ws.resource.properties;
 
+import org.apache.ws.resource.PropertiesResource;
 import org.apache.ws.resource.Resource;
 import org.apache.ws.resource.ResourceContext;
 import org.apache.ws.resource.ResourceContextException;
 import org.apache.ws.resource.ResourceException;
 import org.apache.ws.resource.ResourceKey;
 import org.apache.ws.resource.ResourceUnknownException;
-import org.apache.ws.resource.PropertiesResource;
 import org.apache.ws.resource.impl.AbstractResourceHome;
-import org.apache.ws.resource.impl.ResourceFactory;
 import org.apache.ws.resource.impl.SimpleTypeResourceKey;
 import org.apache.ws.resource.properties.impl.XmlBeansResourcePropertySet;
 import org.apache.xmlbeans.XmlObject;
@@ -38,8 +37,7 @@
  */
 public class SushiHome
         extends AbstractResourceHome
-        implements ResourceFactory,
-        Serializable
+        implements Serializable
 {
 
     /**

---------------------------------------------------------------------
To unsubscribe, e-mail: apollo-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: apollo-dev-help@ws.apache.org