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 20:55:13 UTC

svn commit: r123137 - in incubator/apollo/site: skin tutorial tutorial/requests tutorial/src/example/filesystem tutorial/src/example/sysprops

Author: scamp
Date: Wed Dec 22 11:55:11 2004
New Revision: 123137

URL: http://svn.apache.org/viewcvs?view=rev&rev=123137
Log:
updated.....tutorial
Added:
   incubator/apollo/site/tutorial/requests/Copy of QueryResourceProperties_allProps.soap
Modified:
   incubator/apollo/site/skin/basic.css
   incubator/apollo/site/skin/print.css
   incubator/apollo/site/tutorial/   (props changed)
   incubator/apollo/site/tutorial/callback.html
   incubator/apollo/site/tutorial/deploy.html
   incubator/apollo/site/tutorial/home.html
   incubator/apollo/site/tutorial/index.html
   incubator/apollo/site/tutorial/resource.html
   incubator/apollo/site/tutorial/service.html
   incubator/apollo/site/tutorial/src/example/filesystem/FileSystemHome.java
   incubator/apollo/site/tutorial/src/example/sysprops/JavaSysPropsHome.java
   incubator/apollo/site/tutorial/test.html
   incubator/apollo/site/tutorial/webapp.html

Modified: incubator/apollo/site/skin/basic.css
Url: http://svn.apache.org/viewcvs/incubator/apollo/site/skin/basic.css?view=diff&rev=123137&p1=incubator/apollo/site/skin/basic.css&r1=123136&p2=incubator/apollo/site/skin/basic.css&r2=123137
==============================================================================
--- incubator/apollo/site/skin/basic.css	(original)
+++ incubator/apollo/site/skin/basic.css	Wed Dec 22 11:55:11 2004
@@ -1,143 +1,143 @@
-/*

-* Copyright 2002-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.

-*/

-/**

- * General

- */

-

-img { border: 0; }

-

-#content table {

-  border: 0;

-  width: 100%;

-}

-#content th,

-#content td {

-  margin: 0;

-  padding: 0;

-  vertical-align: top;

-}

-

-.clearboth {

-  clear: both;

-}

-

-.frame {

-  border: solid black 1px;

-  margin: 1em 3em;

-}

-

-.frame .label {

-  background: #369;

-  color: white;

-  font-weight: bold;

-  padding: 5px 10px;

-}

-.frame .content {

-  padding: 5px 10px;

-  background: #F0F0FF;

-  color: black;

-  line-height: 120%;

-  font-size: 90%;

-}

-.warning .label {

-  background: #C00;

-  color: white;

-}

-.warning .content {

-  background: #FFF0F0;

-  color: black;

-}

-.fixme .label {

-  background: #C6C600;

-}

-

-/**

- * Typography

- */

-

-body {

-  font-family: verdana, "Trebuchet MS", arial, helvetica, sans-serif;

-  font-size: 100%;

-}

-

-#content {

-  font-family: Georgia, Palatino, Times, serif;

-  font-size: 95%;

-}

-#tabs {

-  font-size: 70%;

-}

-#menu {

-  font-size: 80%;

-}

-#footer {

-  font-size: 70%;

-}

-

-h1, h2, h3, h4, h5, h6 {

-  font-family: "Trebuchet MS", verdana, arial, helvetica, sans-serif;

-  font-weight: bold;

-  margin-top: 1em;

-  margin-bottom: .5em;

-}

-

-h1 {

-    margin-top: 0;

-    margin-bottom: 1em;

-  font-size: 1.4em;

-}

-#content h1 {

-  font-size: 160%;

-  margin-bottom: .5em;

-}

-#menu h1 {

-  margin: 0;

-  padding: 10px;

-  background: #336699;

-  color: white;

-}

-h2 { font-size: 120%; }

-h3 { font-size: 100%; }

-h4 { font-size: 90%; }

-h5 { font-size: 80%; }

-h6 { font-size: 75%; }

-

-p {

-  line-height: 120%;

-  text-align: left;

-  margin-top: .5em;

-  margin-bottom: 1em;

-}

-

-#content li,

-#content th,

-#content td {

-  line-height: 110%;  

-  margin-top: .1em;

-  margin-bottom: .1em;

-}

-

-#content .attribution {

-  text-align: right;

-  font-style: italic;

-  font-size: 85%;

-  margin-top: 1em;

-}

-

-.codefrag {

-  font-family: "Courier New", Courier, monospace;

-  font-size: 110%;

-}
\ No newline at end of file
+/*
+* Copyright 2002-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.
+*/
+/**
+ * General
+ */
+
+img { border: 0; }
+
+#content table {
+  border: 0;
+  width: 100%;
+}
+#content th,
+#content td {
+  margin: 0;
+  padding: 0;
+  vertical-align: top;
+}
+
+.clearboth {
+  clear: both;
+}
+
+.frame {
+  border: solid black 1px;
+  margin: 1em 3em;
+}
+
+.frame .label {
+  background: #369;
+  color: white;
+  font-weight: bold;
+  padding: 5px 10px;
+}
+.frame .content {
+  padding: 5px 10px;
+  background: #F0F0FF;
+  color: black;
+  line-height: 120%;
+  font-size: 90%;
+}
+.warning .label {
+  background: #C00;
+  color: white;
+}
+.warning .content {
+  background: #FFF0F0;
+  color: black;
+}
+.fixme .label {
+  background: #C6C600;
+}
+
+/**
+ * Typography
+ */
+
+body {
+  font-family: verdana, "Trebuchet MS", arial, helvetica, sans-serif;
+  font-size: 100%;
+}
+
+#content {
+  font-family: Georgia, Palatino, Times, serif;
+  font-size: 95%;
+}
+#tabs {
+  font-size: 70%;
+}
+#menu {
+  font-size: 80%;
+}
+#footer {
+  font-size: 70%;
+}
+
+h1, h2, h3, h4, h5, h6 {
+  font-family: "Trebuchet MS", verdana, arial, helvetica, sans-serif;
+  font-weight: bold;
+  margin-top: 1em;
+  margin-bottom: .5em;
+}
+
+h1 {
+    margin-top: 0;
+    margin-bottom: 1em;
+  font-size: 1.4em;
+}
+#content h1 {
+  font-size: 160%;
+  margin-bottom: .5em;
+}
+#menu h1 {
+  margin: 0;
+  padding: 10px;
+  background: #336699;
+  color: white;
+}
+h2 { font-size: 120%; }
+h3 { font-size: 100%; }
+h4 { font-size: 90%; }
+h5 { font-size: 80%; }
+h6 { font-size: 75%; }
+
+p {
+  line-height: 120%;
+  text-align: left;
+  margin-top: .5em;
+  margin-bottom: 1em;
+}
+
+#content li,
+#content th,
+#content td {
+  line-height: 110%;  
+  margin-top: .1em;
+  margin-bottom: .1em;
+}
+
+#content .attribution {
+  text-align: right;
+  font-style: italic;
+  font-size: 85%;
+  margin-top: 1em;
+}
+
+.codefrag {
+  font-family: "Courier New", Courier, monospace;
+  font-size: 110%;
+}

Modified: incubator/apollo/site/skin/print.css
Url: http://svn.apache.org/viewcvs/incubator/apollo/site/skin/print.css?view=diff&rev=123137&p1=incubator/apollo/site/skin/print.css&r1=123136&p2=incubator/apollo/site/skin/print.css&r2=123137
==============================================================================
--- incubator/apollo/site/skin/print.css	(original)
+++ incubator/apollo/site/skin/print.css	Wed Dec 22 11:55:11 2004
@@ -1,53 +1,53 @@
-/*

-* Copyright 2002-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.

-*/

-body {

-  font-family: Georgia, Palatino, serif;

-  font-size: 12pt;

-  background: white;

-}

-

-#tabs,

-#menu,

-#content .toc {

-  display: none;

-}

-

-#content {

-  width: auto;

-  padding: 0;

-  float: none !important;

-  color: black;

-  background: transparent;

-}

-

-a:link, a:visited {

-  color: #336699;

-  background: transparent;

-  text-decoration: underline;

-}

-

-#top .logo {

-  padding: 0;

-  margin: 0 0 2em 0;

-}

-

-#footer {

-  margin-top: 4em;

-}

-

-acronym {

-  border: 0;

-}
\ No newline at end of file
+/*
+* Copyright 2002-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.
+*/
+body {
+  font-family: Georgia, Palatino, serif;
+  font-size: 12pt;
+  background: white;
+}
+
+#tabs,
+#menu,
+#content .toc {
+  display: none;
+}
+
+#content {
+  width: auto;
+  padding: 0;
+  float: none !important;
+  color: black;
+  background: transparent;
+}
+
+a:link, a:visited {
+  color: #336699;
+  background: transparent;
+  text-decoration: underline;
+}
+
+#top .logo {
+  padding: 0;
+  margin: 0 0 2em 0;
+}
+
+#footer {
+  margin-top: 4em;
+}
+
+acronym {
+  border: 0;
+}

Modified: incubator/apollo/site/tutorial/callback.html
Url: http://svn.apache.org/viewcvs/incubator/apollo/site/tutorial/callback.html?view=diff&rev=123137&p1=incubator/apollo/site/tutorial/callback.html&r1=123136&p2=incubator/apollo/site/tutorial/callback.html&r2=123137
==============================================================================
--- incubator/apollo/site/tutorial/callback.html	(original)
+++ incubator/apollo/site/tutorial/callback.html	Wed Dec 22 11:55:11 2004
@@ -157,7 +157,7 @@
 <div id="minitoc-area">
 <ul class="minitoc">
 <li>
-<a href="#callbacks">Writing Callback Objects.</a>
+<a href="#intro">Introduction</a>
 </li>
 <li>
 <a href="#refresh">Implementing the ResourcePropertyCallback</a>
@@ -165,17 +165,20 @@
 <li>
 <a href="#setresource">Implementing the SetResourcePropertyCallback</a>
 </li>
+<li>
+<a href="#register">registering</a>
+</li>
 </ul>
 </div>
 		
-<a name="N1000C"></a><a name="callbacks"></a>
-<h2 class="boxed">Writing Callback Objects.</h2>
+<a name="N1000C"></a><a name="intro"></a>
+<h2 class="boxed">Introduction</h2>
 <div class="section">
 <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>
 
@@ -245,6 +248,12 @@
     }
 </pre>
 <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>
+</div>
+		
+<a name="N10069"></a><a name="register"></a>
+<h2 class="boxed">registering</h2>
+<div class="section">
+<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>
 </div>
 	
 </div>

Modified: incubator/apollo/site/tutorial/deploy.html
Url: http://svn.apache.org/viewcvs/incubator/apollo/site/tutorial/deploy.html?view=diff&rev=123137&p1=incubator/apollo/site/tutorial/deploy.html&r1=123136&p2=incubator/apollo/site/tutorial/deploy.html&r2=123137
==============================================================================
--- incubator/apollo/site/tutorial/deploy.html	(original)
+++ incubator/apollo/site/tutorial/deploy.html	Wed Dec 22 11:55:11 2004
@@ -5,7 +5,7 @@
 <meta content="Apache Forrest" name="Generator">
 <meta name="Forrest-version" content="0.6">
 <meta name="Forrest-skin-name" content="pelt">
-<title></title>
+<title>Deploy the Webapp to Tomcat</title>
 <link type="text/css" href="../skin/basic.css" rel="stylesheet">
 <link media="screen" type="text/css" href="../skin/screen.css" rel="stylesheet">
 <link media="print" type="text/css" href="../skin/print.css" rel="stylesheet">
@@ -152,17 +152,36 @@
     |start content
     +-->
 <div id="content">
-<div id="skinconf-txtlink"></div> 
-    
-<a name="N1000C"></a><a name="+"></a>
-<h2 class="boxed"> 
-</h2>
+<div id="skinconf-txtlink"></div>
+<h1>Deploy the Webapp to Tomcat</h1>
+<div id="minitoc-area">
+<ul class="minitoc">
+<li>
+<a href="#Introduction">Introduction</a>
+</li>
+<li>
+<a href="#deploy">Deploying the WebApp</a>
+</li>
+</ul>
+</div>
+		
+<a name="N1000C"></a><a name="Introduction"></a>
+<h2 class="boxed">Introduction</h2>
+<div class="section">
+<p>This section will discuss how to deploy the webapp into the Tomcat container.</p>
+</div>
+		
+<a name="N10016"></a><a name="deploy"></a>
+<h2 class="boxed">Deploying the WebApp</h2>
 <div class="section">
-<p>
-        TODO
-      </p>
+<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>
+<div class="frame note">
+<div class="label">Note</div>
+<div class="content">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</div>
+</div>
 </div>
-  
+	
 </div>
 <!--+
     |end content

Modified: incubator/apollo/site/tutorial/home.html
Url: http://svn.apache.org/viewcvs/incubator/apollo/site/tutorial/home.html?view=diff&rev=123137&p1=incubator/apollo/site/tutorial/home.html&r1=123136&p2=incubator/apollo/site/tutorial/home.html&r2=123137
==============================================================================
--- incubator/apollo/site/tutorial/home.html	(original)
+++ incubator/apollo/site/tutorial/home.html	Wed Dec 22 11:55:11 2004
@@ -5,7 +5,7 @@
 <meta content="Apache Forrest" name="Generator">
 <meta name="Forrest-version" content="0.6">
 <meta name="Forrest-skin-name" content="pelt">
-<title></title>
+<title>Writing a Home class</title>
 <link type="text/css" href="../skin/basic.css" rel="stylesheet">
 <link media="screen" type="text/css" href="../skin/screen.css" rel="stylesheet">
 <link media="print" type="text/css" href="../skin/print.css" rel="stylesheet">
@@ -152,17 +152,88 @@
     |start content
     +-->
 <div id="content">
-<div id="skinconf-txtlink"></div> 
-    
-<a name="N1000C"></a><a name="+"></a>
-<h2 class="boxed"> 
-</h2>
+<div id="skinconf-txtlink"></div>
+<h1>Writing a Home class</h1>
+<div id="minitoc-area">
+<ul class="minitoc">
+<li>
+<a href="#intro">Introduction</a>
+</li>
+<li>
+<a href="#class-declaration">Class Declaration</a>
+</li>
+<li>
+<a href="#ops">Operations</a>
+</li>
+</ul>
+</div>
+		
+<a name="N1000C"></a><a name="intro"></a>
+<h2 class="boxed">Introduction</h2>
+<div class="section">
+<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>
+</div>
+		
+<a name="N10016"></a><a name="class-declaration"></a>
+<h2 class="boxed">Class Declaration</h2>
+<div class="section">
+<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>
+<pre class="code">public class FileSystemHome
+        extends AbstractResourceHome
+        implements Serializable</pre>
+</div>
+	
+<a name="N1002A"></a><a name="ops"></a>
+<h2 class="boxed">Operations</h2>
 <div class="section">
-<p>
-        TODO
-      </p>
+<p>If you extend AbstractResourceHome, the only required operation you will need to invoke is:</p>
+<pre class="code">public Resource getInstance( ResourceContext resourceContext )</pre>
+<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>
+<pre class="code">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;
+    }</pre>
+<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>
+<div class="frame note">
+<div class="label">Note</div>
+<div class="content">Many of the operations in the AbstractResourceHome may be overridden in your extension home class, if you have a need to extend its functionality.</div>
+</div>
 </div>
-  
+	
 </div>
 <!--+
     |end content

Modified: incubator/apollo/site/tutorial/index.html
Url: http://svn.apache.org/viewcvs/incubator/apollo/site/tutorial/index.html?view=diff&rev=123137&p1=incubator/apollo/site/tutorial/index.html&r1=123136&p2=incubator/apollo/site/tutorial/index.html&r2=123137
==============================================================================
--- incubator/apollo/site/tutorial/index.html	(original)
+++ incubator/apollo/site/tutorial/index.html	Wed Dec 22 11:55:11 2004
@@ -180,7 +180,7 @@
 </li>
         
 <li>
-<a href="resource.html">Create the resource class which will maintain state for a particular filesystem resource instance</a>
+<a href="resource.html">Create the resource class which will maintain state for a resource instance</a>
 </li>        
         
 <li>

Added: incubator/apollo/site/tutorial/requests/Copy of QueryResourceProperties_allProps.soap
Url: http://svn.apache.org/viewcvs/incubator/apollo/site/tutorial/requests/Copy%20of%20QueryResourceProperties_allProps.soap?view=auto&rev=123137
==============================================================================
--- (empty file)
+++ incubator/apollo/site/tutorial/requests/Copy of QueryResourceProperties_allProps.soap	Wed Dec 22 11:55:11 2004
@@ -0,0 +1,15 @@
+<Envelope xmlns="http://schemas.xmlsoap.org/soap/envelope/" 
+          xmlns:fs="http://ws.apache.org/resource/example/sysprops">
+
+   <Header xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/03/addressing">
+      <wsa:To mustUnderstand="1">http://localhost:8080/wsrf/services/sysprops</wsa:To>
+      <wsa:Action mustUnderstand="1">http://ws.apache.org/resource/example/sysprops/FileSystemPortType/yourWsdlRequestName</wsa:Action>
+   </Header>
+
+   <Body>
+      <wsrp:QueryResourceProperties xmlns:wsrp="http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceProperties-1.2-draft-01.xsd">
+         <wsrp:QueryExpression Dialect="http://www.w3.org/TR/1999/REC-xpath-19991116">*</wsrp:QueryExpression>
+      </wsrp:QueryResourceProperties>
+   </Body>
+
+</Envelope>

Modified: incubator/apollo/site/tutorial/resource.html
Url: http://svn.apache.org/viewcvs/incubator/apollo/site/tutorial/resource.html?view=diff&rev=123137&p1=incubator/apollo/site/tutorial/resource.html&r1=123136&p2=incubator/apollo/site/tutorial/resource.html&r2=123137
==============================================================================
--- incubator/apollo/site/tutorial/resource.html	(original)
+++ incubator/apollo/site/tutorial/resource.html	Wed Dec 22 11:55:11 2004
@@ -157,7 +157,7 @@
 <div id="minitoc-area">
 <ul class="minitoc">
 <li>
-<a href="#write-resource">Writing a Resource Class</a>
+<a href="#intro">Introduction</a>
 </li>
 <li>
 <a href="#class-declaration">Class Declaration</a>
@@ -171,8 +171,8 @@
 </ul>
 </div>
 		
-<a name="N1000C"></a><a name="write-resource"></a>
-<h2 class="boxed">Writing a Resource Class</h2>
+<a name="N1000C"></a><a name="intro"></a>
+<h2 class="boxed">Introduction</h2>
 <div class="section">
 <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.
@@ -185,28 +185,33 @@
 <a name="N1001F"></a><a name="class-declaration"></a>
 <h2 class="boxed">Class Declaration</h2>
 <div class="section">
-<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>
+<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>
 <div class="frame note">
 <div class="label">Note</div>
 <div class="content">The resource id is a custom WS-Addressing header element which you will define in your configuration information for your service.</div>
 </div>
 <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>
-<pre class="code">public class FileSystemResource
-      implements Resource,
-      ScheduledResourceTerminationResource</pre>
+<pre class="code">public class FileSystemResource extends
+      AbstractFileSystemResource</pre>
+<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>
 </div>
 
-<a name="N10035"></a><a name="classvars"></a>
+<a name="N1003B"></a><a name="classvars"></a>
 <h2 class="boxed">Class Variables</h2>
 <div class="section">
-<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>
+<div class="frame note">
+<div class="label">Note</div>
+<div class="content">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.</div>
+</div>
 </div>
 		
-<a name="N1003F"></a><a name="ops"></a>
+<a name="N10048"></a><a name="ops"></a>
 <h2 class="boxed">Operations</h2>
 <div class="section">
-<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>
+<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>
 <div class="frame note">
 <div class="label">Note</div>
 <div class="content">The use of ResourcePropertyUtils is purely optional and is meant to help the implementor.</div>

Modified: incubator/apollo/site/tutorial/service.html
Url: http://svn.apache.org/viewcvs/incubator/apollo/site/tutorial/service.html?view=diff&rev=123137&p1=incubator/apollo/site/tutorial/service.html&r1=123136&p2=incubator/apollo/site/tutorial/service.html&r2=123137
==============================================================================
--- incubator/apollo/site/tutorial/service.html	(original)
+++ incubator/apollo/site/tutorial/service.html	Wed Dec 22 11:55:11 2004
@@ -157,10 +157,10 @@
 <div id="minitoc-area">
 <ul class="minitoc">
 <li>
-<a href="#write-service">Writing a Service Class</a>
+<a href="#intro">Introduction</a>
 </li>
 <li>
-<a href="#intro">What files will need to be written?</a>
+<a href="#what-files">What files will need to be written?</a>
 <ul class="minitoc">
 <li>
 <a href="#abstract">The AbstractService class.</a>
@@ -187,8 +187,8 @@
 </ul>
 </div>
 		
-<a name="N1000C"></a><a name="write-service"></a>
-<h2 class="boxed">Writing a Service Class</h2>
+<a name="N1000C"></a><a name="intro"></a>
+<h2 class="boxed">Introduction</h2>
 <div class="section">
 <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.
@@ -197,7 +197,7 @@
 <p>Initially, you should model your service off of the included FileSystemService example.  This will ensure you will write a working service.</p>
 </div>
 		
-<a name="N1001C"></a><a name="intro"></a>
+<a name="N1001C"></a><a name="what-files"></a>
 <h2 class="boxed">What files will need to be written?</h2>
 <div class="section">
 <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>

Modified: incubator/apollo/site/tutorial/src/example/filesystem/FileSystemHome.java
Url: http://svn.apache.org/viewcvs/incubator/apollo/site/tutorial/src/example/filesystem/FileSystemHome.java?view=diff&rev=123137&p1=incubator/apollo/site/tutorial/src/example/filesystem/FileSystemHome.java&r1=123136&p2=incubator/apollo/site/tutorial/src/example/filesystem/FileSystemHome.java&r2=123137
==============================================================================
--- incubator/apollo/site/tutorial/src/example/filesystem/FileSystemHome.java	(original)
+++ incubator/apollo/site/tutorial/src/example/filesystem/FileSystemHome.java	Wed Dec 22 11:55:11 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/site/tutorial/src/example/sysprops/JavaSysPropsHome.java
Url: http://svn.apache.org/viewcvs/incubator/apollo/site/tutorial/src/example/sysprops/JavaSysPropsHome.java?view=diff&rev=123137&p1=incubator/apollo/site/tutorial/src/example/sysprops/JavaSysPropsHome.java&r1=123136&p2=incubator/apollo/site/tutorial/src/example/sysprops/JavaSysPropsHome.java&r2=123137
==============================================================================
--- incubator/apollo/site/tutorial/src/example/sysprops/JavaSysPropsHome.java	(original)
+++ incubator/apollo/site/tutorial/src/example/sysprops/JavaSysPropsHome.java	Wed Dec 22 11:55:11 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/site/tutorial/test.html
Url: http://svn.apache.org/viewcvs/incubator/apollo/site/tutorial/test.html?view=diff&rev=123137&p1=incubator/apollo/site/tutorial/test.html&r1=123136&p2=incubator/apollo/site/tutorial/test.html&r2=123137
==============================================================================
--- incubator/apollo/site/tutorial/test.html	(original)
+++ incubator/apollo/site/tutorial/test.html	Wed Dec 22 11:55:11 2004
@@ -5,7 +5,7 @@
 <meta content="Apache Forrest" name="Generator">
 <meta name="Forrest-version" content="0.6">
 <meta name="Forrest-skin-name" content="pelt">
-<title></title>
+<title>Testing Your Service</title>
 <link type="text/css" href="../skin/basic.css" rel="stylesheet">
 <link media="screen" type="text/css" href="../skin/screen.css" rel="stylesheet">
 <link media="print" type="text/css" href="../skin/print.css" rel="stylesheet">
@@ -152,17 +152,64 @@
     |start content
     +-->
 <div id="content">
-<div id="skinconf-txtlink"></div> 
-    
-<a name="N1000C"></a><a name="+"></a>
-<h2 class="boxed"> 
-</h2>
+<div id="skinconf-txtlink"></div>
+<h1>Testing Your Service</h1>
+<div id="minitoc-area">
+<ul class="minitoc">
+<li>
+<a href="#intro">Introduction</a>
+</li>
+<li>
+<a href="#start">Starting Tomcat</a>
+</li>
+<li>
+<a href="#testing">Testing the FileSystem Service</a>
+</li>
+<li>
+<a href="#your-own">Using the Provided Scripts to Invoke Your Service</a>
+</li>
+</ul>
+</div>
+		
+<a name="N1000C"></a><a name="intro"></a>
+<h2 class="boxed">Introduction</h2>
 <div class="section">
+<p>This section will describe how to test your service running in the Tomcat container.</p>
+</div>
+		
+<a name="N10016"></a><a name="start"></a>
+<h2 class="boxed">Starting Tomcat</h2>
+<div class="section">
+<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 class="external" href="http://localhost:8080/wsrf">http://localhost:8080/wsrf</a> to view the deployed services in the webapp.</p>
+<div class="frame note">
+<div class="label">Note</div>
+<div class="content">Please refer to the Tomcat documentation for more details.</div>
+</div>
+</div>
+		
+<a name="N1002A"></a><a name="testing"></a>
+<h2 class="boxed">Testing the FileSystem Service</h2>
+<div class="section">
+<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>
-        TODO
-      </p>
+<strong>&gt;ant sendRequest -Dxml=./requests/QueryResourceProperties_allProps.soap</strong>
+</p>
+</div>
+		
+<a name="N1003B"></a><a name="your-own"></a>
+<h2 class="boxed">Using the Provided Scripts to Invoke Your Service</h2>
+<div class="section">
+<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>&gt;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>
+<div class="frame note">
+<div class="label">Note</div>
+<div class="content">You may also add an entry to build.properties for "url" which will alleviate the need to specify it on the command line.</div>
+</div>
 </div>
-  
+	
 </div>
 <!--+
     |end content

Modified: incubator/apollo/site/tutorial/webapp.html
Url: http://svn.apache.org/viewcvs/incubator/apollo/site/tutorial/webapp.html?view=diff&rev=123137&p1=incubator/apollo/site/tutorial/webapp.html&r1=123136&p2=incubator/apollo/site/tutorial/webapp.html&r2=123137
==============================================================================
--- incubator/apollo/site/tutorial/webapp.html	(original)
+++ incubator/apollo/site/tutorial/webapp.html	Wed Dec 22 11:55:11 2004
@@ -5,7 +5,7 @@
 <meta content="Apache Forrest" name="Generator">
 <meta name="Forrest-version" content="0.6">
 <meta name="Forrest-skin-name" content="pelt">
-<title></title>
+<title>Deploy the service to the Apollo webapp</title>
 <link type="text/css" href="../skin/basic.css" rel="stylesheet">
 <link media="screen" type="text/css" href="../skin/screen.css" rel="stylesheet">
 <link media="print" type="text/css" href="../skin/print.css" rel="stylesheet">
@@ -152,17 +152,124 @@
     |start content
     +-->
 <div id="content">
-<div id="skinconf-txtlink"></div> 
-    
-<a name="N1000C"></a><a name="+"></a>
-<h2 class="boxed"> 
-</h2>
+<div id="skinconf-txtlink"></div>
+<h1>Deploy the service to the Apollo webapp</h1>
+<div id="minitoc-area">
+<ul class="minitoc">
+<li>
+<a href="#intro">Introduction</a>
+</li>
+<li>
+<a href="#steps">How to manually deploy your service</a>
+</li>
+<li>
+<a href="#filesys">Deploying the FileSystem Example</a>
+</li>
+</ul>
+</div>
+		
+<a name="N1000C"></a><a name="intro"></a>
+<h2 class="boxed">Introduction</h2>
+<div class="section">
+<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>
+</div>
+		
+<a name="N10016"></a><a name="steps"></a>
+<h2 class="boxed">How to manually deploy your service</h2>
+<div class="section">
+<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>
+
+<pre class="code">   &lt;service name="filesystem"&gt;
+      &lt;resource name="home" type="example.filesystem.FileSystemHome"&gt;
+         &lt;resourceParams&gt;
+            &lt;parameter&gt;
+               &lt;name&gt;serviceClassName&lt;/name&gt;
+               &lt;value&gt;example.filesystem.FileSystemService&lt;/value&gt;
+            &lt;/parameter&gt;
+            &lt;parameter&gt;
+               &lt;name&gt;resourceClassName&lt;/name&gt;
+               &lt;value&gt;example.filesystem.FileSystemResource&lt;/value&gt;
+            &lt;/parameter&gt;
+            &lt;parameter&gt;
+               &lt;name&gt;wsdlTargetNamespace&lt;/name&gt;
+               &lt;value&gt;http://ws.apache.org/resource/example/filesystem&lt;/value&gt;
+            &lt;/parameter&gt;
+            &lt;parameter&gt;
+               &lt;name&gt;resourceKeyName&lt;/name&gt;
+               &lt;value&gt;{http://ws.apache.org/resource/example/filesystem}ResourceId&lt;/value&gt;
+            &lt;/parameter&gt;
+         &lt;/resourceParams&gt;
+      &lt;/resource&gt;
+   &lt;/service&gt;</pre>
+   
+<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>
+
+<pre class="code">    &lt;service name="filesystem" provider="java:WSRF" style="document" use="literal"&gt;
+      &lt;wsdlFile&gt;/wsdl/FileSystem.wsdl&lt;/wsdlFile&gt;      
+      &lt;requestFlow&gt;
+         &lt;handler type="java:org.apache.axis.handlers.JAXRPCHandler"&gt;
+            &lt;parameter name="className" value="org.apache.axis.message.addressing.handler.AxisServerSideAddressingHandler"/&gt;
+            &lt;parameter name="referencePropertyNames" value="*"/&gt;
+         &lt;/handler&gt;
+      &lt;/requestFlow&gt;      
+   &lt;/service&gt;</pre>
+   
+<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>
+</div>
+		
+<a name="N1005D"></a><a name="filesys"></a>
+<h2 class="boxed">Deploying the FileSystem Example</h2>
 <div class="section">
+<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>
-        TODO
-      </p>
+<strong>&gt;ant generate compile deploy</strong>
+</p>
+<p>This will do all the necessary tasks.</p>
+<div class="frame note">
+<div class="label">Note</div>
+<div class="content">This step assumes you have installed Apache's ANT.  If not, you can get it at: <a class="external" href="http://ant.apache.org/">Apache Ant</a>
+</div>
+</div>
 </div>
-  
+	
 </div>
 <!--+
     |end content

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