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 ip...@apache.org on 2004/12/20 23:20:07 UTC

svn commit: r122889 - in incubator/apollo/site/tutorial: . requests src/example/filesystem src/example/filesystem/backend src/example/filesystem/callback src/example/sysprops

Author: ips
Date: Mon Dec 20 14:20:04 2004
New Revision: 122889

URL: http://svn.apache.org/viewcvs?view=rev&rev=122889
Log:

Added:
   incubator/apollo/site/tutorial/SysProps.wsdl
   incubator/apollo/site/tutorial/src/example/filesystem/AbstractFileSystemResource.java
   incubator/apollo/site/tutorial/src/example/filesystem/resource.cfg
   incubator/apollo/site/tutorial/src/example/sysprops/
   incubator/apollo/site/tutorial/src/example/sysprops/AbstractJavaSysPropsResource.java
   incubator/apollo/site/tutorial/src/example/sysprops/AbstractJavaSysPropsService.java
   incubator/apollo/site/tutorial/src/example/sysprops/JavaSysPropsHome.java
   incubator/apollo/site/tutorial/src/example/sysprops/JavaSysPropsResource.java
   incubator/apollo/site/tutorial/src/example/sysprops/JavaSysPropsService.java
   incubator/apollo/site/tutorial/src/example/sysprops/resource.cfg
Modified:
   incubator/apollo/site/tutorial/build.xml
   incubator/apollo/site/tutorial/callback.html
   incubator/apollo/site/tutorial/requests/Destroy.soap
   incubator/apollo/site/tutorial/requests/GetMultipleResourceProperties.soap
   incubator/apollo/site/tutorial/requests/GetResourceProperty_invalidProp.soap
   incubator/apollo/site/tutorial/requests/GetResourceProperty_validProp.soap
   incubator/apollo/site/tutorial/requests/QueryResourceProperties_allProps.soap
   incubator/apollo/site/tutorial/requests/QueryResourceProperties_oneProp.soap
   incubator/apollo/site/tutorial/requests/SetResourceProperties_deleteCommentProp.soap
   incubator/apollo/site/tutorial/requests/SetResourceProperties_insertCommentProp.soap
   incubator/apollo/site/tutorial/requests/SetResourceProperties_updateBackupFreqProp.soap
   incubator/apollo/site/tutorial/requests/SetResourceProperties_updateCommentProp.soap
   incubator/apollo/site/tutorial/requests/SetResourceProperties_updateFsckPassNumProp.soap
   incubator/apollo/site/tutorial/requests/SetResourceProperties_updateMountPointProp.soap
   incubator/apollo/site/tutorial/requests/SetResourceProperties_updateOptionsProp.soap
   incubator/apollo/site/tutorial/requests/SetTerminationTime.soap
   incubator/apollo/site/tutorial/requests/_TEMPLATE.soap
   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/filesystem/FileSystemResource.java
   incubator/apollo/site/tutorial/src/example/filesystem/backend/UnixFileSystem.java
   incubator/apollo/site/tutorial/src/example/filesystem/callback/OptionsCallback.java
   incubator/apollo/site/tutorial/wsdl2java.html

Added: incubator/apollo/site/tutorial/SysProps.wsdl
Url: http://svn.apache.org/viewcvs/incubator/apollo/site/tutorial/SysProps.wsdl?view=auto&rev=122889
==============================================================================
--- (empty file)
+++ incubator/apollo/site/tutorial/SysProps.wsdl	Mon Dec 20 14:20:04 2004
@@ -0,0 +1,106 @@
+<?xml version="1.0"?>
+<definitions name="JavaSystemPropertiesResourceDefinition" targetNamespace="http://ws.apache.org/resource/example/sysprops" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:tns="http://ws.apache.org/resource/example/sysprops" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:wsrp="http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceProperties-1.2-draft-01.xsd" xmlns:wsrpw="http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceProperties-1.2-draft-01.wsdl">
+	<import namespace="http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceProperties-1.2-draft-01.wsdl" location="../spec/wsrf/WS-ResourceProperties-1_2.wsdl"/>
+	<types>
+		<schema elementFormDefault="qualified" targetNamespace="http://ws.apache.org/resource/example/sysprops" xmlns="http://www.w3.org/2001/XMLSchema">
+			<!-- Resource Properties Document Schema -->
+			<element name="JavaSystemProperties">
+				<complexType>
+        				<sequence>
+						<any minOccurs="0" maxOccurs="unbounded" namespace="##other" processContents="lax"/>
+				      </sequence>
+				</complexType>
+			</element>
+			<!-- ====== Message Types for Custom Operations  ======= -->
+		</schema>
+	</types>
+	<!-- ============= Message Definitions for Custom Operations ============= -->
+	<portType name="JavaSystemPropertiesPortType" wsrp:ResourceProperties="tns:JavaSystemProperties">
+		<!-- wsrp:* operations -->
+		<operation name="GetResourceProperty">
+			<input name="GetResourcePropertyRequest" message="wsrpw:GetResourcePropertyRequest"/>
+			<output name="GetResourcePropertyResponse" message="wsrpw:GetResourcePropertyResponse"/>
+			<fault name="ResourceUnknownFault" message="wsrpw:ResourceUnknownFault"/>
+			<fault name="InvalidResourcePropertyQNameFault" message="wsrpw:InvalidResourcePropertyQNameFault"/>
+		</operation>
+		<operation name="GetMultipleResourceProperties">
+			<input name="GetMultipleResourcePropertiesRequest" message="wsrpw:GetMultipleResourcePropertiesRequest"/>
+			<output name="GetMultipleResourcePropertiesResponse" message="wsrpw:GetMultipleResourcePropertiesResponse"/>
+			<fault name="ResourceUnknownFault" message="wsrpw:ResourceUnknownFault"/>
+			<fault name="InvalidResourcePropertyQNameFault" message="wsrpw:InvalidResourcePropertyQNameFault"/>
+		</operation>
+		<operation name="QueryResourceProperties">
+			<input name="QueryResourcePropertiesRequest" message="wsrpw:QueryResourcePropertiesRequest"/>
+			<output name="QueryResourcePropertiesResponse" message="wsrpw:QueryResourcePropertiesResponse"/>
+			<fault name="ResourceUnknownFault" message="wsrpw:ResourceUnknownFault"/>
+			<fault name="InvalidResourcePropertyQNameFault" message="wsrpw:InvalidResourcePropertyQNameFault"/>
+			<fault name="UnknownQueryExpressionDialectFault" message="wsrpw:UnknownQueryExpressionDialectFault"/>
+			<fault name="InvalidQueryExpressionFault" message="wsrpw:InvalidQueryExpressionFault"/>
+			<fault name="QueryEvaluationErrorFault" message="wsrpw:QueryEvaluationErrorFault"/>
+		</operation>
+	</portType>
+	<binding name="JavaSystemPropertiesSoapHttpBinding" type="tns:JavaSystemPropertiesPortType">
+		<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
+		<!-- wsrp:* operations -->
+		<operation name="GetResourceProperty">
+			<soap:operation style="document"/>
+			<input>
+				<soap:body use="literal"/>
+			</input>
+			<output>
+				<soap:body use="literal"/>
+			</output>
+			<fault name="ResourceUnknownFault">
+				<soap:fault name="ResourceUnknownFault" use="literal"/>
+			</fault>
+			<fault name="InvalidResourcePropertyQNameFault">
+				<soap:fault name="InvalidResourcePropertyQNameFault" use="literal"/>
+			</fault>
+		</operation>
+		<operation name="GetMultipleResourceProperties">
+			<soap:operation style="document"/>
+			<input>
+				<soap:body use="literal"/>
+			</input>
+			<output>
+				<soap:body use="literal"/>
+			</output>
+			<fault name="ResourceUnknownFault">
+				<soap:fault name="ResourceUnknownFault" use="literal"/>
+			</fault>
+			<fault name="InvalidResourcePropertyQNameFault">
+				<soap:fault name="InvalidResourcePropertyQNameFault" use="literal"/>
+			</fault>
+		</operation>
+		<operation name="QueryResourceProperties">
+			<soap:operation style="document"/>
+			<input>
+				<soap:body use="literal"/>
+			</input>
+			<output>
+				<soap:body use="literal"/>
+			</output>
+			<fault name="ResourceUnknownFault">
+				<soap:fault name="ResourceUnknownFault" use="literal"/>
+			</fault>
+			<fault name="InvalidResourcePropertyQNameFault">
+				<soap:fault name="InvalidResourcePropertyQNameFault" use="literal"/>
+			</fault>
+			<fault name="UnknownQueryExpressionDialectFault">
+				<soap:fault name="UnknownQueryExpressionDialectFault" use="literal"/>
+			</fault>
+			<fault name="InvalidQueryExpressionFault">
+				<soap:fault name="InvalidQueryExpressionFault" use="literal"/>
+			</fault>
+			<fault name="QueryEvaluationErrorFault">
+				<soap:fault name="QueryEvaluationErrorFault" use="literal"/>
+			</fault>
+		</operation>
+	</binding>
+	<service name="JavaSystemPropertiesService">
+		<!-- Note: the port name becomes the service name in the wsdd generated by Axis Wsdl2Java -->
+		<port name="sysprops" binding="tns:JavaSystemPropertiesSoapHttpBinding">
+			<soap:address location="http://localhost:8080/wsrf/services/sysprops"/>
+		</port>
+	</service>
+</definitions>

Modified: incubator/apollo/site/tutorial/build.xml
Url: http://svn.apache.org/viewcvs/incubator/apollo/site/tutorial/build.xml?view=diff&rev=122889&p1=incubator/apollo/site/tutorial/build.xml&r1=122888&p2=incubator/apollo/site/tutorial/build.xml&r2=122889
==============================================================================
--- incubator/apollo/site/tutorial/build.xml	(original)
+++ incubator/apollo/site/tutorial/build.xml	Mon Dec 20 14:20:04 2004
@@ -15,6 +15,7 @@
    <property name="classes.dir"           location="build/classes"/>
    <property name="src.dir"               location="src" />
    <property name="filesystem.wsdl"       location="FileSystem.wsdl" />
+   <property name="sysprop.wsdl"       	  location="SysProps.wsdl" />
    <property name="url"                   value="${base.url}/filesystem" />
    <property name="xml.basedir"           location="${basedir}" />
 
@@ -58,6 +59,15 @@
                 proxyHost="${http.proxyHost}"
                 proxyPort="${http.proxyPort}"
                 nonProxyHosts="${http.nonProxyHosts}" /> 
+     <copy file="${sysprop.wsdl}" todir="${tmp.dir}" overwrite="true" />     
+     <wsdl2Java wsdl="${tmp.dir}/SysProps.wsdl"
+	     srcOutputDir="${generated.src.dir}"
+	     classesOutputDir="${classes.dir}"  
+	     classpath="${apollo.classpath}"
+	     debug="off"
+	     proxyHost="${http.proxyHost}"
+	     proxyPort="${http.proxyPort}"
+	nonProxyHosts="${http.nonProxyHosts}" /> 
      <delete dir="${tmp.dir}" />
                
    </target>
@@ -83,7 +93,8 @@
            description="deploys the filesystem service to the wsrf webapp">
           
        <copy file="${filesystem.wsdl}" todir="${wsrf.webapp.dir}/WEB-INF/classes/wsdl" overwrite="true" verbose="true" />
-       <echo>Deploying filesystem service classes to ${wsrf.webapp.dir}/WEB-INF/classes/...</echo>
+       <copy file="${sysprop.wsdl}" todir="${wsrf.webapp.dir}/WEB-INF/classes/wsdl" overwrite="true" verbose="true" />
+       <echo>Deploying filesystem and sysprop service classes to ${wsrf.webapp.dir}/WEB-INF/classes/...</echo>
        <copy todir="${wsrf.webapp.dir}/WEB-INF/classes">
          <fileset dir="${classes.dir}" />        
        </copy>
@@ -109,7 +120,14 @@
      </ant>
    
    </target>
-   
+   <target name="sendSysRequest"
+              description="sends a request to the filesystem service">      
+           
+   <ant antfile="soapclient.xml">
+    <property name="url" value="${base.url}/sysprops" />
+   </ant>
+      
+   </target>
    <target name="clean" description="delete the generated source and class files">
        <delete dir="generated" />
    </target>

Modified: incubator/apollo/site/tutorial/callback.html
Url: http://svn.apache.org/viewcvs/incubator/apollo/site/tutorial/callback.html?view=diff&rev=122889&p1=incubator/apollo/site/tutorial/callback.html&r1=122888&p2=incubator/apollo/site/tutorial/callback.html&r2=122889
==============================================================================
--- incubator/apollo/site/tutorial/callback.html	(original)
+++ incubator/apollo/site/tutorial/callback.html	Mon Dec 20 14:20:04 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 Callback Objects.</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,101 @@
     |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 Callback Objects.</h1>
+<div id="minitoc-area">
+<ul class="minitoc">
+<li>
+<a href="#callbacks">Writing Callback Objects.</a>
+</li>
+<li>
+<a href="#refresh">Implementing the ResourcePropertyCallback</a>
+</li>
+<li>
+<a href="#setresource">Implementing the SetResourcePropertyCallback</a>
+</li>
+</ul>
+</div>
+		
+<a name="N1000C"></a><a name="callbacks"></a>
+<h2 class="boxed">Writing Callback Objects.</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.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>
+</div>
+		
+<a name="N10025"></a><a name="refresh"></a>
+<h2 class="boxed">Implementing the ResourcePropertyCallback</h2>
+<div class="section">
+<p>The ResourcePropertyCallback is a way for you to synchronize the front-end resource properties with the backend.  The interface defines one method:</p>
+<pre class="code">ResourceProperty refreshProperty( ResourceProperty prop );</pre>
+<p>Notice the operation is passed a ResourceProperty.  The ResourceProperty contains methods for pulling the values out of the property.  You can get an iterator, in the case of a list, or can retrieve via an index: ResourceProperty.get(i)</p>
+<p>The returned property will be an XmlBean type.  What "type" will depend on your method description in your wsdl.  If the type is a schema-defined type (string, int etc.), XmlBeans provides objects specific to those types.  In the BackupFrequencyCallback we see that BackupFrequency was an xsd:int and so the XmlBean type is XmlInt:</p>
+<pre class="code">public ResourceProperty refreshProperty(ResourceProperty prop)
+    {
+        XmlInt xInt = (XmlInt) prop.get( 0 );
+        xInt.setIntValue( m_fileSystem.getBackupFrequency() );
+        return prop;
+    }</pre>
+<p>In the case of complex types, XmlBeans will generate a type and that is what will be passed to the operation.  We can see an example of this in OptionsCallback:</p>
+<pre class="code">   public ResourceProperty refreshProperty( ResourceProperty prop )
+   {
+      Iterator iterator = prop.iterator(  );
+      while ( iterator.hasNext(  ) )
+      { 
+         OptionsDocument.Options o = (OptionsDocument.Options) iterator.next(  );
+         clearOptionsFromProperty( o );
+
+         //add current options...
+         List options = m_fileSystem.getOptions(  );
+         for ( int i = 0; i &lt; options.size(  ); i++ )
+         {
+            o.addOption( options.get( i ).toString(  ) );
+         }
+      }
+
+      return prop;
+   }</pre>
+<p>In both cases the objects (XmlInt and Options) all extend XmlObject as a common class, however it is useful to utilize the defined class' operations directly.</p>
+<p>Once you have a handle on the passed-in object, you will need to set the equivalent value, from the current state of your backend, on the passed-in object.</p>
+<p>The refreshProperty method is called before GetResourceProperty, GetMultipleResourceProperties and QueryResourceProperties requests.</p>
+</div>
+		
+<a name="N1004C"></a><a name="setresource"></a>
+<h2 class="boxed">Implementing the SetResourcePropertyCallback</h2>
 <div class="section">
-<p>
-        TODO
-      </p>
+<p>The SetResourcePropertyCallback is a way for the backend to be changed via requests to the front-end resource properties.  The SetResourcePropertyCallback interface defines three methods:</p>
+<pre class="code">void deleteProperty( QName propQName );
+void insertProperty( Object[] prop );
+void updateProperty( Object[] prop );</pre>
+<p>The operations will follow the same semantics as are defined in the specification and will be restricted to the bounds of you schema.  If you define an element with a maxOccurs="1", and attempt to add (insertProperty) another item to it, Apollo will generate a fault.</p>
+<p>The CommentCallback illustrates how these methods <em>may</em> be implemented:</p>
+<pre class="code">    public void deleteProperty( QName propQName )
+    {
+        return; // no need to implement - Apollo will never call delete for a prop whose minOccurs != 0
+    }
+
+    public void insertProperty( Object[] propElems )
+    {
+        XmlString xString = (XmlString) propElems[0];
+        m_fileSystem.setComment( xString.getStringValue() );
+    }
+
+    public void updateProperty( Object[] prop )
+    {
+        insertProperty( prop );
+    }
+</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>
-  
+	
 </div>
 <!--+
     |end content

Modified: incubator/apollo/site/tutorial/requests/Destroy.soap
Url: http://svn.apache.org/viewcvs/incubator/apollo/site/tutorial/requests/Destroy.soap?view=diff&rev=122889&p1=incubator/apollo/site/tutorial/requests/Destroy.soap&r1=122888&p2=incubator/apollo/site/tutorial/requests/Destroy.soap&r2=122889
==============================================================================
--- incubator/apollo/site/tutorial/requests/Destroy.soap	(original)
+++ incubator/apollo/site/tutorial/requests/Destroy.soap	Mon Dec 20 14:20:04 2004
@@ -4,7 +4,7 @@
    <Header xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/03/addressing">
       <wsa:To mustUnderstand="1">http://localhost:8080/wsrf/services/filesystem</wsa:To>
       <wsa:Action mustUnderstand="1">http://ws.apache.org/resource/example/filesystem/FileSystemPortType/yourWsdlRequestName</wsa:Action>
-      <fs:ResourceId mustUnderstand="1">1234</fs:ResourceId>
+      <fs:ResourceId mustUnderstand="1">/dev/vg00/lvol1</fs:ResourceId>
    </Header>
 
    <Body>

Modified: incubator/apollo/site/tutorial/requests/GetMultipleResourceProperties.soap
Url: http://svn.apache.org/viewcvs/incubator/apollo/site/tutorial/requests/GetMultipleResourceProperties.soap?view=diff&rev=122889&p1=incubator/apollo/site/tutorial/requests/GetMultipleResourceProperties.soap&r1=122888&p2=incubator/apollo/site/tutorial/requests/GetMultipleResourceProperties.soap&r2=122889
==============================================================================
--- incubator/apollo/site/tutorial/requests/GetMultipleResourceProperties.soap	(original)
+++ incubator/apollo/site/tutorial/requests/GetMultipleResourceProperties.soap	Mon Dec 20 14:20:04 2004
@@ -4,7 +4,7 @@
    <Header xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/03/addressing">
       <wsa:To mustUnderstand="1">http://localhost:8080/wsrf/services/filesystem</wsa:To>
       <wsa:Action mustUnderstand="1">http://ws.apache.org/resource/example/filesystem/FileSystemPortType/yourWsdlRequestName</wsa:Action>
-      <fs:ResourceId mustUnderstand="1">1234</fs:ResourceId>
+      <fs:ResourceId mustUnderstand="1">/dev/vg00/lvol1</fs:ResourceId>
    </Header>
 
    <Body>

Modified: incubator/apollo/site/tutorial/requests/GetResourceProperty_invalidProp.soap
Url: http://svn.apache.org/viewcvs/incubator/apollo/site/tutorial/requests/GetResourceProperty_invalidProp.soap?view=diff&rev=122889&p1=incubator/apollo/site/tutorial/requests/GetResourceProperty_invalidProp.soap&r1=122888&p2=incubator/apollo/site/tutorial/requests/GetResourceProperty_invalidProp.soap&r2=122889
==============================================================================
--- incubator/apollo/site/tutorial/requests/GetResourceProperty_invalidProp.soap	(original)
+++ incubator/apollo/site/tutorial/requests/GetResourceProperty_invalidProp.soap	Mon Dec 20 14:20:04 2004
@@ -4,7 +4,7 @@
    <Header xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/03/addressing">
       <wsa:To mustUnderstand="1">http://localhost:8080/wsrf/services/filesystem</wsa:To>
       <wsa:Action mustUnderstand="1">http://ws.apache.org/resource/example/filesystem/FileSystemPortType/GetResourcePropertyRequest</wsa:Action>
-      <fs:ResourceId mustUnderstand="1">1234</fs:ResourceId>
+      <fs:ResourceId mustUnderstand="1">/dev/vg00/lvol1</fs:ResourceId>
    </Header>
 
    <Body>

Modified: incubator/apollo/site/tutorial/requests/GetResourceProperty_validProp.soap
Url: http://svn.apache.org/viewcvs/incubator/apollo/site/tutorial/requests/GetResourceProperty_validProp.soap?view=diff&rev=122889&p1=incubator/apollo/site/tutorial/requests/GetResourceProperty_validProp.soap&r1=122888&p2=incubator/apollo/site/tutorial/requests/GetResourceProperty_validProp.soap&r2=122889
==============================================================================
--- incubator/apollo/site/tutorial/requests/GetResourceProperty_validProp.soap	(original)
+++ incubator/apollo/site/tutorial/requests/GetResourceProperty_validProp.soap	Mon Dec 20 14:20:04 2004
@@ -4,7 +4,7 @@
    <Header xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/03/addressing">
       <wsa:To mustUnderstand="1">http://localhost:8080/wsrf/services/filesystem</wsa:To>
       <wsa:Action mustUnderstand="1">http://ws.apache.org/resource/example/filesystem/FileSystemPortType/GetResourcePropertyRequest</wsa:Action>
-      <fs:ResourceId mustUnderstand="1">1234</fs:ResourceId>
+      <fs:ResourceId mustUnderstand="1">/dev/vg00/lvol1</fs:ResourceId>
    </Header>
 
    <Body>

Modified: incubator/apollo/site/tutorial/requests/QueryResourceProperties_allProps.soap
Url: http://svn.apache.org/viewcvs/incubator/apollo/site/tutorial/requests/QueryResourceProperties_allProps.soap?view=diff&rev=122889&p1=incubator/apollo/site/tutorial/requests/QueryResourceProperties_allProps.soap&r1=122888&p2=incubator/apollo/site/tutorial/requests/QueryResourceProperties_allProps.soap&r2=122889
==============================================================================
--- incubator/apollo/site/tutorial/requests/QueryResourceProperties_allProps.soap	(original)
+++ incubator/apollo/site/tutorial/requests/QueryResourceProperties_allProps.soap	Mon Dec 20 14:20:04 2004
@@ -4,7 +4,7 @@
    <Header xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/03/addressing">
       <wsa:To mustUnderstand="1">http://localhost:8080/wsrf/services/filesystem</wsa:To>
       <wsa:Action mustUnderstand="1">http://ws.apache.org/resource/example/filesystem/FileSystemPortType/yourWsdlRequestName</wsa:Action>
-      <fs:ResourceId mustUnderstand="1">1234</fs:ResourceId>
+      <fs:ResourceId mustUnderstand="1">/dev/vg00/lvol1</fs:ResourceId>
    </Header>
 
    <Body>

Modified: incubator/apollo/site/tutorial/requests/QueryResourceProperties_oneProp.soap
Url: http://svn.apache.org/viewcvs/incubator/apollo/site/tutorial/requests/QueryResourceProperties_oneProp.soap?view=diff&rev=122889&p1=incubator/apollo/site/tutorial/requests/QueryResourceProperties_oneProp.soap&r1=122888&p2=incubator/apollo/site/tutorial/requests/QueryResourceProperties_oneProp.soap&r2=122889
==============================================================================
--- incubator/apollo/site/tutorial/requests/QueryResourceProperties_oneProp.soap	(original)
+++ incubator/apollo/site/tutorial/requests/QueryResourceProperties_oneProp.soap	Mon Dec 20 14:20:04 2004
@@ -4,7 +4,7 @@
    <Header xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/03/addressing">
       <wsa:To mustUnderstand="1">http://localhost:8080/wsrf/services/filesystem</wsa:To>
       <wsa:Action mustUnderstand="1">http://ws.apache.org/resource/example/filesystem/FileSystemPortType/yourWsdlRequestName</wsa:Action>
-      <fs:ResourceId mustUnderstand="1">1234</fs:ResourceId>
+      <fs:ResourceId mustUnderstand="1">/dev/vg00/lvol1</fs:ResourceId>
    </Header>
 
    <Body>

Modified: incubator/apollo/site/tutorial/requests/SetResourceProperties_deleteCommentProp.soap
Url: http://svn.apache.org/viewcvs/incubator/apollo/site/tutorial/requests/SetResourceProperties_deleteCommentProp.soap?view=diff&rev=122889&p1=incubator/apollo/site/tutorial/requests/SetResourceProperties_deleteCommentProp.soap&r1=122888&p2=incubator/apollo/site/tutorial/requests/SetResourceProperties_deleteCommentProp.soap&r2=122889
==============================================================================
--- incubator/apollo/site/tutorial/requests/SetResourceProperties_deleteCommentProp.soap	(original)
+++ incubator/apollo/site/tutorial/requests/SetResourceProperties_deleteCommentProp.soap	Mon Dec 20 14:20:04 2004
@@ -4,7 +4,7 @@
    <Header xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/03/addressing">
       <wsa:To mustUnderstand="1">http://localhost:8080/wsrf/services/filesystem</wsa:To>
       <wsa:Action mustUnderstand="1">http://ws.apache.org/resource/example/filesystem/FileSystemPortType/yourWsdlRequestName</wsa:Action>
-      <fs:ResourceId mustUnderstand="1">1234</fs:ResourceId>
+      <fs:ResourceId mustUnderstand="1">/dev/vg00/lvol1</fs:ResourceId>
    </Header>
 
    <Body>

Modified: incubator/apollo/site/tutorial/requests/SetResourceProperties_insertCommentProp.soap
Url: http://svn.apache.org/viewcvs/incubator/apollo/site/tutorial/requests/SetResourceProperties_insertCommentProp.soap?view=diff&rev=122889&p1=incubator/apollo/site/tutorial/requests/SetResourceProperties_insertCommentProp.soap&r1=122888&p2=incubator/apollo/site/tutorial/requests/SetResourceProperties_insertCommentProp.soap&r2=122889
==============================================================================
--- incubator/apollo/site/tutorial/requests/SetResourceProperties_insertCommentProp.soap	(original)
+++ incubator/apollo/site/tutorial/requests/SetResourceProperties_insertCommentProp.soap	Mon Dec 20 14:20:04 2004
@@ -4,7 +4,7 @@
    <Header xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/03/addressing">
       <wsa:To mustUnderstand="1">http://localhost:8080/wsrf/services/filesystem</wsa:To>
       <wsa:Action mustUnderstand="1">http://ws.apache.org/resource/example/filesystem/FileSystemPortType/yourWsdlRequestName</wsa:Action>
-      <fs:ResourceId mustUnderstand="1">1234</fs:ResourceId>
+      <fs:ResourceId mustUnderstand="1">/dev/vg00/lvol1</fs:ResourceId>
    </Header>
 
    <Body>

Modified: incubator/apollo/site/tutorial/requests/SetResourceProperties_updateBackupFreqProp.soap
Url: http://svn.apache.org/viewcvs/incubator/apollo/site/tutorial/requests/SetResourceProperties_updateBackupFreqProp.soap?view=diff&rev=122889&p1=incubator/apollo/site/tutorial/requests/SetResourceProperties_updateBackupFreqProp.soap&r1=122888&p2=incubator/apollo/site/tutorial/requests/SetResourceProperties_updateBackupFreqProp.soap&r2=122889
==============================================================================
--- incubator/apollo/site/tutorial/requests/SetResourceProperties_updateBackupFreqProp.soap	(original)
+++ incubator/apollo/site/tutorial/requests/SetResourceProperties_updateBackupFreqProp.soap	Mon Dec 20 14:20:04 2004
@@ -4,7 +4,7 @@
    <Header xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/03/addressing">
       <wsa:To mustUnderstand="1">http://localhost:8080/wsrf/services/filesystem</wsa:To>
       <wsa:Action mustUnderstand="1">http://ws.apache.org/resource/example/filesystem/FileSystemPortType/yourWsdlRequestName</wsa:Action>
-      <fs:ResourceId mustUnderstand="1">1234</fs:ResourceId>
+      <fs:ResourceId mustUnderstand="1">/dev/vg00/lvol1</fs:ResourceId>
    </Header>
 
    <Body>

Modified: incubator/apollo/site/tutorial/requests/SetResourceProperties_updateCommentProp.soap
Url: http://svn.apache.org/viewcvs/incubator/apollo/site/tutorial/requests/SetResourceProperties_updateCommentProp.soap?view=diff&rev=122889&p1=incubator/apollo/site/tutorial/requests/SetResourceProperties_updateCommentProp.soap&r1=122888&p2=incubator/apollo/site/tutorial/requests/SetResourceProperties_updateCommentProp.soap&r2=122889
==============================================================================
--- incubator/apollo/site/tutorial/requests/SetResourceProperties_updateCommentProp.soap	(original)
+++ incubator/apollo/site/tutorial/requests/SetResourceProperties_updateCommentProp.soap	Mon Dec 20 14:20:04 2004
@@ -4,7 +4,7 @@
    <Header xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/03/addressing">
       <wsa:To mustUnderstand="1">http://localhost:8080/wsrf/services/filesystem</wsa:To>
       <wsa:Action mustUnderstand="1">http://ws.apache.org/resource/example/filesystem/FileSystemPortType/yourWsdlRequestName</wsa:Action>
-      <fs:ResourceId mustUnderstand="1">1234</fs:ResourceId>
+      <fs:ResourceId mustUnderstand="1">/dev/vg00/lvol1</fs:ResourceId>
    </Header>
 
    <Body>

Modified: incubator/apollo/site/tutorial/requests/SetResourceProperties_updateFsckPassNumProp.soap
Url: http://svn.apache.org/viewcvs/incubator/apollo/site/tutorial/requests/SetResourceProperties_updateFsckPassNumProp.soap?view=diff&rev=122889&p1=incubator/apollo/site/tutorial/requests/SetResourceProperties_updateFsckPassNumProp.soap&r1=122888&p2=incubator/apollo/site/tutorial/requests/SetResourceProperties_updateFsckPassNumProp.soap&r2=122889
==============================================================================
--- incubator/apollo/site/tutorial/requests/SetResourceProperties_updateFsckPassNumProp.soap	(original)
+++ incubator/apollo/site/tutorial/requests/SetResourceProperties_updateFsckPassNumProp.soap	Mon Dec 20 14:20:04 2004
@@ -4,7 +4,7 @@
    <Header xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/03/addressing">
       <wsa:To mustUnderstand="1">http://localhost:8080/wsrf/services/filesystem</wsa:To>
       <wsa:Action mustUnderstand="1">http://ws.apache.org/resource/example/filesystem/FileSystemPortType/yourWsdlRequestName</wsa:Action>
-      <fs:ResourceId mustUnderstand="1">1234</fs:ResourceId>
+      <fs:ResourceId mustUnderstand="1">/dev/vg00/lvol1</fs:ResourceId>
    </Header>
 
    <Body>

Modified: incubator/apollo/site/tutorial/requests/SetResourceProperties_updateMountPointProp.soap
Url: http://svn.apache.org/viewcvs/incubator/apollo/site/tutorial/requests/SetResourceProperties_updateMountPointProp.soap?view=diff&rev=122889&p1=incubator/apollo/site/tutorial/requests/SetResourceProperties_updateMountPointProp.soap&r1=122888&p2=incubator/apollo/site/tutorial/requests/SetResourceProperties_updateMountPointProp.soap&r2=122889
==============================================================================
--- incubator/apollo/site/tutorial/requests/SetResourceProperties_updateMountPointProp.soap	(original)
+++ incubator/apollo/site/tutorial/requests/SetResourceProperties_updateMountPointProp.soap	Mon Dec 20 14:20:04 2004
@@ -4,7 +4,7 @@
    <Header xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/03/addressing">
       <wsa:To mustUnderstand="1">http://localhost:8080/wsrf/services/filesystem</wsa:To>
       <wsa:Action mustUnderstand="1">http://ws.apache.org/resource/example/filesystem/FileSystemPortType/yourWsdlRequestName</wsa:Action>
-      <fs:ResourceId mustUnderstand="1">1234</fs:ResourceId>
+      <fs:ResourceId mustUnderstand="1">/dev/vg00/lvol1</fs:ResourceId>
    </Header>
 
    <Body>

Modified: incubator/apollo/site/tutorial/requests/SetResourceProperties_updateOptionsProp.soap
Url: http://svn.apache.org/viewcvs/incubator/apollo/site/tutorial/requests/SetResourceProperties_updateOptionsProp.soap?view=diff&rev=122889&p1=incubator/apollo/site/tutorial/requests/SetResourceProperties_updateOptionsProp.soap&r1=122888&p2=incubator/apollo/site/tutorial/requests/SetResourceProperties_updateOptionsProp.soap&r2=122889
==============================================================================
--- incubator/apollo/site/tutorial/requests/SetResourceProperties_updateOptionsProp.soap	(original)
+++ incubator/apollo/site/tutorial/requests/SetResourceProperties_updateOptionsProp.soap	Mon Dec 20 14:20:04 2004
@@ -4,7 +4,7 @@
    <Header xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/03/addressing">
       <wsa:To mustUnderstand="1">http://localhost:8080/wsrf/services/filesystem</wsa:To>
       <wsa:Action mustUnderstand="1">http://ws.apache.org/resource/example/filesystem/FileSystemPortType/yourWsdlRequestName</wsa:Action>
-      <fs:ResourceId mustUnderstand="1">1234</fs:ResourceId>
+      <fs:ResourceId mustUnderstand="1">/dev/vg00/lvol1</fs:ResourceId>
    </Header>
 
    <Body>

Modified: incubator/apollo/site/tutorial/requests/SetTerminationTime.soap
Url: http://svn.apache.org/viewcvs/incubator/apollo/site/tutorial/requests/SetTerminationTime.soap?view=diff&rev=122889&p1=incubator/apollo/site/tutorial/requests/SetTerminationTime.soap&r1=122888&p2=incubator/apollo/site/tutorial/requests/SetTerminationTime.soap&r2=122889
==============================================================================
--- incubator/apollo/site/tutorial/requests/SetTerminationTime.soap	(original)
+++ incubator/apollo/site/tutorial/requests/SetTerminationTime.soap	Mon Dec 20 14:20:04 2004
@@ -4,7 +4,7 @@
    <Header xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/03/addressing">
       <wsa:To mustUnderstand="1">http://localhost:8080/wsrf/services/filesystem</wsa:To>
       <wsa:Action mustUnderstand="1">http://ws.apache.org/resource/example/filesystem/FileSystemPortType/SetTerminationTimeRequest</wsa:Action>
-      <fs:ResourceId mustUnderstand="1">1234</fs:ResourceId>
+      <fs:ResourceId mustUnderstand="1">/dev/vg00/lvol1</fs:ResourceId>
    </Header>
 
    <Body>

Modified: incubator/apollo/site/tutorial/requests/_TEMPLATE.soap
Url: http://svn.apache.org/viewcvs/incubator/apollo/site/tutorial/requests/_TEMPLATE.soap?view=diff&rev=122889&p1=incubator/apollo/site/tutorial/requests/_TEMPLATE.soap&r1=122888&p2=incubator/apollo/site/tutorial/requests/_TEMPLATE.soap&r2=122889
==============================================================================
--- incubator/apollo/site/tutorial/requests/_TEMPLATE.soap	(original)
+++ incubator/apollo/site/tutorial/requests/_TEMPLATE.soap	Mon Dec 20 14:20:04 2004
@@ -4,7 +4,7 @@
    <Header xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/03/addressing">
       <wsa:To mustUnderstand="1">http://localhost:8080/wsrf/services/filesystem</wsa:To>
       <wsa:Action mustUnderstand="1">http://ws.apache.org/resource/example/filesystem/FileSystemPortType/yourWsdlRequestName</wsa:Action>
-      <fs:ResourceId mustUnderstand="1">1234</fs:ResourceId>
+      <fs:ResourceId mustUnderstand="1">/dev/vg00/lvol1</fs:ResourceId>
    </Header>
 
    <Body>

Modified: incubator/apollo/site/tutorial/resource.html
Url: http://svn.apache.org/viewcvs/incubator/apollo/site/tutorial/resource.html?view=diff&rev=122889&p1=incubator/apollo/site/tutorial/resource.html&r1=122888&p2=incubator/apollo/site/tutorial/resource.html&r2=122889
==============================================================================
--- incubator/apollo/site/tutorial/resource.html	(original)
+++ incubator/apollo/site/tutorial/resource.html	Mon Dec 20 14:20:04 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 Resource 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,67 @@
     |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 Resource Class</h1>
+<div id="minitoc-area">
+<ul class="minitoc">
+<li>
+<a href="#write-resource">Writing a Resource Class</a>
+</li>
+<li>
+<a href="#class-declaration">Class Declaration</a>
+</li>
+<li>
+<a href="#classvars">Class Variables</a>
+</li>
+<li>
+<a href="#ops">Operations</a>
+</li>
+</ul>
+</div>
+		
+<a name="N1000C"></a><a name="write-resource"></a>
+<h2 class="boxed">Writing a Resource Class</h2>
 <div class="section">
 <p>
-        TODO
-      </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>
+<p>When a request is made for a Web service it is expected to contain a WS-Addressing header which has an entry for the resource id.  When Apollo receives the request it will use the resource id to "identify" the correct instance of a Web Service for use when "servicing" a request.</p>
+<p>This section will discuss how to write a resource 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 this class by hand.</p>
+<p>Initially, you should model your resource off of the included FileSystemResource example.  This will ensure you will write a working resource class.</p>
+</div>
+		
+<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>
+<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>
+</div>
+
+<a name="N10035"></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>
+</div>
+		
+<a name="N1003F"></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>
+<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>
+</div>
 </div>
-  
+	
 </div>
 <!--+
     |end content

Modified: incubator/apollo/site/tutorial/service.html
Url: http://svn.apache.org/viewcvs/incubator/apollo/site/tutorial/service.html?view=diff&rev=122889&p1=incubator/apollo/site/tutorial/service.html&r1=122888&p2=incubator/apollo/site/tutorial/service.html&r2=122889
==============================================================================
--- incubator/apollo/site/tutorial/service.html	(original)
+++ incubator/apollo/site/tutorial/service.html	Mon Dec 20 14:20:04 2004
@@ -194,7 +194,7 @@
         			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 FileSystem example.  This will ensure you will write a working service.</p>
+<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>
@@ -251,10 +251,14 @@
               ScheduledResourceTerminationPortType</strong>
 					
 </pre>
-<p>You should notice that the class implements WsrfService (described above) and various *PortType inerfaces.  Each PortType interface is a Java representation of a specification's WSDL portType declaration.  By implementing the PortType interface corresponding to the specification's/portTypes you are interested in, you will ensure you get the correct method signature for the method call.</p>
+<p>You should notice that the class implements WsrfService (described above) and various *PortType inerfaces.  Each PortType interface is a Java representation of a specification's WSDL portType declaration.  By implementing the PortType interface corresponding to the specification's/portTypes you are interested in, you will ensure you get the correct method signature for the method call. </p>
+<div class="frame note">
+<div class="label">Note</div>
+<div class="content">As per the Web Services Resource 1.2 specification, a resource must expose resource properties and if you expose properties you MUST, at least, implement GetResourceProperty.  This means your service must implement the GetResourcePropertyPortType.</div>
+</div>
 <p>The packages: <strong>org.apache.ws.resource.properties.porttype</strong> and <strong>org.apache.ws.resource.lifetime.porttype</strong> contain the interfaces for the specifications.  You should refer to these packages when selecting the operations you'd like to support. 
 		</p>
-<a name="N10076"></a><a name="wsrfservice"></a>
+<a name="N10078"></a><a name="wsrfservice"></a>
 <h4>WsrfService Interface</h4>
 <p>All services in Apollo need to implement the WsrfService interface.  The interface provides operation "hooks" which will allow Apollo to interact with your service.  There are currenty three operations defined by the interface:</p>
 <pre class="code">   /**
@@ -279,14 +283,17 @@
 <p>The getMethodNameMap() returns a SoapMethodNameMap implementation which contains mappings of WSDL operation QNames to Java method names.  If you have custom operations you will need to create an instance of ServiceSoapMethodName and add mappings for you operations.</p>
 <p>The getResourceContext() operation returns the ResourceContext associated with this service.  This method may be left abstract in this class and later implemented in the Service extension of your abstract class.</p>
 <p>The init() method is provided to give you an opportunity to initialize members for your Service (i.e. ServiceSoapMethodName )</p>
-<a name="N1008D"></a><a name="classvars"></a>
+<a name="N1008F"></a><a name="classvars"></a>
 <h4>Class Variables</h4>
 <p>The class variables which should be defined are:</p>
 <ol>
+						
 <li>
+							
 <strong>TARGET_NSURI</strong> - The target namespace of your sevice's WSDL file.</li>
 						
 <li>
+							
 <strong>TARGET_NSPREFIX</strong> - The target prefix to be associated with your service's namespace.</li>
 					
 </ol>
@@ -295,7 +302,7 @@
 public static final String TARGET_NSPREFIX = "fs";</pre>
 <p>Notice the fields are "public static final" since they should not change and are easily accessible. 
 					</p>
-<a name="N100AD"></a><a name="ops"></a>
+<a name="N100B2"></a><a name="ops"></a>
 <h4>Operations</h4>
 <p>The operations which are defined in the abstract class should be operations which typically should not need to be touched.  The specification operations are a prime example.  Upon looking at the AbstractFileSystem class, we see the operations defined for methods like: getMultipleResourceProperties(..).  The body of these methods are similar in that they hand the invocation off to a Provider class:</p>
 <pre class="code">public GetMultipleResourcePropertiesResponseDocument getMultipleResourceProperties( GetMultipleResourcePropertiesDocument requestDoc )
@@ -305,9 +312,10 @@
 <p>Notice the GetMultipleResourcePropertiesProvider class being used.  Providers are used to handle the specification method calls.  It provides a way to encapsulate the functionalty needed to handle a method call for a specific specification.  Each specification operation will have an equivalent *Provider class to handle a particular class.</p>
 <p>The packages: <strong>org.apache.ws.resource.properties.porttype.impl</strong> and <strong>org.apache.ws.resource.lifetime.porttype.impl</strong> contain the Providers for the methods of the specifications.  You should refer to these packages when implementing the specification operations. 
 		</p>
-<a name="N100C8"></a><a name="service"></a>
+<a name="N100CD"></a><a name="service"></a>
 <h3 class="boxed">The Service class.</h3>
-<p>The service class is the extension of the abstract class we previously outlined.  Aside from the required method getResourceContext(), this class should contain any custom operations as were defined in the WSDL for the service.  The safest way to handle the parameters and return type of the methods is to simply use XmlObject:</p>
+<p>The service class is the extension of the abstract class we previously outlined.  Because of the extension you will need to implement the required method getResourceContext().  The ResourceContext should be passed in the constructor to the class and be maintained as a class variable.  The ResourceContext will be passed, upon construction, to the Service via the Home class.  </p>
+<p>The Service class should contain any custom operations as were defined in the WSDL for the service.  The safest way to handle the parameters and return type of the methods is to simply use XmlObject:</p>
 <pre class="code">   public XmlObject mount( XmlObject requestDoc )
    {
       try

Added: incubator/apollo/site/tutorial/src/example/filesystem/AbstractFileSystemResource.java
Url: http://svn.apache.org/viewcvs/incubator/apollo/site/tutorial/src/example/filesystem/AbstractFileSystemResource.java?view=auto&rev=122889
==============================================================================
--- (empty file)
+++ incubator/apollo/site/tutorial/src/example/filesystem/AbstractFileSystemResource.java	Mon Dec 20 14:20:04 2004
@@ -0,0 +1,153 @@
+/*=============================================================================*
+ *  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.PropertiesResource;
+import org.apache.ws.resource.Resource;
+import org.apache.ws.resource.example.filesystem.FileSystemPropertiesDocument;
+import org.apache.ws.resource.lifetime.ResourceLifetime1_2Constants;
+import org.apache.ws.resource.lifetime.ScheduledResourceTerminationResource;
+import org.apache.ws.resource.lifetime.callback.CurrentTimeCallback;
+import org.apache.ws.resource.properties.ResourceProperty;
+import org.apache.ws.resource.properties.ResourcePropertySet;
+import org.apache.ws.resource.properties.XmlBeansResourcePropertyUtils;
+import org.apache.ws.resource.properties.impl.XmlBeansResourceProperty;
+import org.apache.ws.resource.properties.impl.XmlBeansResourcePropertySet;
+import org.oasisOpen.docs.wsrf.x2004.x06.wsrfWSResourceLifetime12Draft01.CurrentTimeDocument;
+import org.oasisOpen.docs.wsrf.x2004.x06.wsrfWSResourceLifetime12Draft01.TerminationTimeDocument;
+
+import java.util.Calendar;
+
+/**
+ * An abstract filesystem WS-Resource.
+ * <p/>
+ * NOTE: This class is generated and is NOT meant to be modified.
+ *
+ * @author Ian P. Springer
+ * @author Sal Campana
+ */
+public abstract class AbstractFileSystemResource implements Resource, PropertiesResource, ScheduledResourceTerminationResource
+{
+    /**
+     * The resource ID of the instance.
+     */
+    protected String m_id;
+
+    /**
+     * The ResourceProperty Set containing the resource props.
+     */
+    protected ResourcePropertySet m_propSet;
+
+    /**
+     * Returns the current time from the prop set.
+     *
+     * @return Calendar
+     */
+    public Calendar getCurrentTime()
+    {
+        return XmlBeansResourcePropertyUtils.getDateTimePropertyValue( (XmlBeansResourceProperty) m_propSet.get( ResourceLifetime1_2Constants.PROP_QNAME_CURRENT_TIME ) );
+    }
+
+    /**
+     * DOCUMENT_ME
+     *
+     * @param id DOCUMENT_ME
+     */
+    public void setID( Object id )
+    {
+        if ( m_id != null )
+        {
+            throw new IllegalStateException( "This resource's ID has already been set." );
+        }
+
+        try
+        {
+            m_id = (String) id;
+        }
+        catch ( ClassCastException cce )
+        {
+            throw new IllegalArgumentException( "Specified ID is not a String." );
+        }
+    }
+
+    /**
+     * DOCUMENT_ME
+     *
+     * @return DOCUMENT_ME
+     */
+    public Object getID()
+    {
+        return m_id;
+    }
+
+    /**
+     * @see org.apache.ws.resource.PropertiesResource#setResourcePropertySet(org.apache.ws.resource.properties.ResourcePropertySet)
+     */
+    public void setResourcePropertySet( ResourcePropertySet propSet )
+    {
+        m_propSet = propSet;
+    }
+
+    /**
+     * @see org.apache.ws.resource.PropertiesResource#getResourcePropertySet()
+     */
+    public ResourcePropertySet getResourcePropertySet()
+    {
+        return m_propSet;
+    }
+
+    /**
+     * DOCUMENT_ME
+     *
+     * @param time DOCUMENT_ME
+     */
+    public void setTerminationTime( Calendar time )
+    {
+        XmlBeansResourcePropertyUtils.setDateTimePropertyValue( (XmlBeansResourceProperty) getResourcePropertySet().get( ResourceLifetime1_2Constants.PROP_QNAME_TERMINATION_TIME ),
+                time );
+    }
+
+    /**
+     * DOCUMENT_ME
+     *
+     * @return DOCUMENT_ME
+     */
+    public Calendar getTerminationTime()
+    {
+        return XmlBeansResourcePropertyUtils.getDateTimePropertyValue( (XmlBeansResourceProperty) m_propSet.get( ResourceLifetime1_2Constants.PROP_QNAME_TERMINATION_TIME ) );
+    }
+
+    public void destroy()
+    {
+        return;
+    }
+
+    public void init()
+    {
+        FileSystemPropertiesDocument propsDoc = FileSystemPropertiesDocument.Factory.newInstance();
+        m_propSet = new XmlBeansResourcePropertySet( propsDoc );
+
+        ResourceProperty prop = m_propSet.get( ResourceLifetime1_2Constants.PROP_QNAME_CURRENT_TIME );
+        CurrentTimeDocument currTime = CurrentTimeDocument.Factory.newInstance();
+        currTime.setCurrentTime( Calendar.getInstance() );
+        prop.add( currTime );
+        prop.setCallback( new CurrentTimeCallback() );
+
+        prop = m_propSet.get( ResourceLifetime1_2Constants.PROP_QNAME_TERMINATION_TIME );
+        TerminationTimeDocument termTime = TerminationTimeDocument.Factory.newInstance();
+        termTime.setNilTerminationTime();
+    }
+}

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=122889&p1=incubator/apollo/site/tutorial/src/example/filesystem/FileSystemHome.java&r1=122888&p2=incubator/apollo/site/tutorial/src/example/filesystem/FileSystemHome.java&r2=122889
==============================================================================
--- incubator/apollo/site/tutorial/src/example/filesystem/FileSystemHome.java	(original)
+++ incubator/apollo/site/tutorial/src/example/filesystem/FileSystemHome.java	Mon Dec 20 14:20:04 2004
@@ -57,7 +57,6 @@
         implements ResourceFactory,
         Serializable
 {
-    private FileSystem m_fileSystem = new UnixFileSystem();
 
     /**
      * DOCUMENT_ME
@@ -84,14 +83,14 @@
         catch ( ResourceException re )
         {
             Object id = key.getValue();
-            if ( id.equals( "1234" ) || id.equals( "5678" ) )
+            /**
+             * Determine if the passed-in key is, in fact, something we expect.
+             */
+            if ( id.equals( "/dev/vg00/lvol1" ) || id.equals( "/dev/vg00/lvol2" ) )
             {
                 try
                 {
-                    FileSystemPropertiesDocument propDoc = FileSystemPropertiesDocument.Factory.newInstance();
-                    ResourcePropertySet propSet = new XmlBeansResourcePropertySet( propDoc );
-                    initProperties( propSet );
-                    resource = createInstance( key, propSet );
+                    resource = createInstance( key);
                 }
                 catch ( Exception e )
                 {
@@ -106,60 +105,6 @@
             }
         }
         return resource;
-    }
-
-    /**
-     * Method to initialize the ResourceProperies with the values from the backend.
-     *
-     * @param propSet
-     */
-    private void initProperties( ResourcePropertySet propSet )
-    {
-        ResourceProperty prop = propSet.get( FileSystemPropertyQNames.DEVICE_SPECIAL_FILE );
-        DeviceSpecialFileDocument deviceDocXBean = DeviceSpecialFileDocument.Factory.newInstance();
-        deviceDocXBean.setDeviceSpecialFile( m_fileSystem.getDeviceSpecialFile() );
-        prop.add( deviceDocXBean );
-
-        prop = propSet.get( FileSystemPropertyQNames.TYPE );
-        TypeDocument typeDocXBean = TypeDocument.Factory.newInstance();
-        typeDocXBean.setType( m_fileSystem.getType() );
-        prop.add( typeDocXBean );
-
-        BackupFrequencyDocument backupDocXBean = BackupFrequencyDocument.Factory.newInstance();
-        backupDocXBean.setBackupFrequency( m_fileSystem.getBackupFrequency() );
-        prop = propSet.get( FileSystemPropertyQNames.BACKUP_FREQUENCY );
-        prop.add( backupDocXBean );
-        prop.setCallback( new BackupFrequencyCallback( m_fileSystem ) );
-
-        CommentDocument commentDocXBean = CommentDocument.Factory.newInstance();
-        commentDocXBean.setComment( m_fileSystem.getComment() );
-        prop = propSet.get( FileSystemPropertyQNames.COMMENT );
-        prop.add( commentDocXBean );
-        prop.setCallback( new CommentCallback( m_fileSystem ) );
-
-        FsckPassNumberDocument fsckDocXBean = FsckPassNumberDocument.Factory.newInstance();
-        fsckDocXBean.setFsckPassNumber( m_fileSystem.getFsckPassNumber() );
-        prop = propSet.get( FileSystemPropertyQNames.FSCK_PASS_NUMBER );
-        prop.add( fsckDocXBean );
-        prop.setCallback( new FsckPassNumberCallback( m_fileSystem ) );
-
-        MountPointDirectoryDocument mountPointDocXBean = MountPointDirectoryDocument.Factory.newInstance();
-        mountPointDocXBean.setMountPointDirectory( m_fileSystem.getMountPoint() );
-        prop = propSet.get( FileSystemPropertyQNames.MOUNT_POINT_DIR );
-        prop.add( mountPointDocXBean );
-        prop.setCallback( new MountPointCallback( m_fileSystem ) );
-
-        OptionsDocument optionsDocXBean = OptionsDocument.Factory.newInstance();
-        org.apache.ws.resource.example.filesystem.OptionsDocument.Options options = optionsDocXBean.addNewOptions();
-        List backendOptions = m_fileSystem.getOptions();
-        for ( int i = 0; i < backendOptions.size(); i++ )
-        {
-            options.addOption( (String) backendOptions.get( i ) );
-        }
-        prop = propSet.get( FileSystemPropertyQNames.OPTIONS );
-        prop.add( optionsDocXBean );
-        prop.setCallback( new OptionsCallback( m_fileSystem ) );
-
     }
 
 }

Modified: incubator/apollo/site/tutorial/src/example/filesystem/FileSystemResource.java
Url: http://svn.apache.org/viewcvs/incubator/apollo/site/tutorial/src/example/filesystem/FileSystemResource.java?view=diff&rev=122889&p1=incubator/apollo/site/tutorial/src/example/filesystem/FileSystemResource.java&r1=122888&p2=incubator/apollo/site/tutorial/src/example/filesystem/FileSystemResource.java&r2=122889
==============================================================================
--- incubator/apollo/site/tutorial/src/example/filesystem/FileSystemResource.java	(original)
+++ incubator/apollo/site/tutorial/src/example/filesystem/FileSystemResource.java	Mon Dec 20 14:20:04 2004
@@ -15,129 +15,107 @@
  *=============================================================================*/
 package example.filesystem;
 
-import org.apache.ws.resource.ResourceIdentifier;
-import org.apache.ws.resource.lifetime.ResourceLifetime1_2Constants;
-import org.apache.ws.resource.lifetime.ScheduledResourceTerminationResource;
-import org.apache.ws.resource.properties.PropertiesResource;
-import org.apache.ws.resource.properties.ResourcePropertySet;
-import org.apache.ws.resource.properties.ResourcePropertyUtils;
+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.MountPointCallback;
+import example.filesystem.callback.OptionsCallback;
+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.properties.ResourceProperty;
 
-import java.util.Calendar;
+import java.util.List;
 
 /**
  * A filesystem WS-Resource.
  * <p/>
- * NOTE: This class is generated and is NOT meant to be modified.
+ * NOTE: This class is generated.
  *
  * @author Ian P. Springer
  * @author Sal Campana
  */
-public class FileSystemResource
-      implements ResourceIdentifier,
-      PropertiesResource,
-      ScheduledResourceTerminationResource
+public class FileSystemResource extends AbstractFileSystemResource
+
 {
+    /**
+     * This bean represents the "backend" managed resource for this WS-Resource.
+     */
+    private FileSystem m_fileSystem;
+
+    /**
+     * DOCUMENT_ME
+     */
+    public void init()
+    {
+
+        super.init();
+
+        /*
+         * This is where you should associate the backend instance with
+         * the resource instance for a given id.
+         */
+        m_fileSystem = new UnixFileSystem( m_id );
+
+        /*
+         * Initialize each of our properties by calling prop.add(propElem) and/or prop.setCallback(callback)...
+         */
+        ResourceProperty prop = m_propSet.get( FileSystemPropertyQNames.DEVICE_SPECIAL_FILE );
+        DeviceSpecialFileDocument deviceDocXBean = DeviceSpecialFileDocument.Factory.newInstance();
+        deviceDocXBean.setDeviceSpecialFile( m_fileSystem.getDeviceSpecialFile() );
+        prop.add( deviceDocXBean );
+
+        prop = m_propSet.get( FileSystemPropertyQNames.TYPE );
+        TypeDocument typeDocXBean = TypeDocument.Factory.newInstance();
+        typeDocXBean.setType( m_fileSystem.getType() );
+        prop.add( typeDocXBean );
+
+        BackupFrequencyDocument backupDocXBean = BackupFrequencyDocument.Factory.newInstance();
+        backupDocXBean.setBackupFrequency( m_fileSystem.getBackupFrequency() );
+        prop = m_propSet.get( FileSystemPropertyQNames.BACKUP_FREQUENCY );
+        prop.add( backupDocXBean );
+        prop.setCallback( new BackupFrequencyCallback( m_fileSystem ) );
+
+        CommentDocument commentDocXBean = CommentDocument.Factory.newInstance();
+        commentDocXBean.setComment( m_fileSystem.getComment() );
+        prop = m_propSet.get( FileSystemPropertyQNames.COMMENT );
+        prop.add( commentDocXBean );
+        prop.setCallback( new CommentCallback( m_fileSystem ) );
+
+        FsckPassNumberDocument fsckDocXBean = FsckPassNumberDocument.Factory.newInstance();
+        fsckDocXBean.setFsckPassNumber( m_fileSystem.getFsckPassNumber() );
+        prop = m_propSet.get( FileSystemPropertyQNames.FSCK_PASS_NUMBER );
+        prop.add( fsckDocXBean );
+        prop.setCallback( new FsckPassNumberCallback( m_fileSystem ) );
+
+        MountPointDirectoryDocument mountPointDocXBean = MountPointDirectoryDocument.Factory.newInstance();
+        mountPointDocXBean.setMountPointDirectory( m_fileSystem.getMountPoint() );
+        prop = m_propSet.get( FileSystemPropertyQNames.MOUNT_POINT_DIR );
+        prop.add( mountPointDocXBean );
+        prop.setCallback( new MountPointCallback( m_fileSystem ) );
+
+        OptionsDocument optionsDocXBean =
+                OptionsDocument.Factory.newInstance();
+        org.apache.ws.resource.example.filesystem.OptionsDocument.Options options =
+                optionsDocXBean.addNewOptions();
+        List backendOptions =
+                m_fileSystem.getOptions();
+        for ( int i = 0; i < backendOptions.size(); i++ )
+        {
+            options.addOption( (String) backendOptions.get( i ) );
+        }
+
+        prop = m_propSet.get( FileSystemPropertyQNames.OPTIONS );
+        prop.add( optionsDocXBean );
+        prop.setCallback( new OptionsCallback( m_fileSystem ) );
 
+    }
 
-   /**
-    * The resource ID of the instance.
-    */
-   String m_id;
-
-   /**
-    * The ResourceProperty Set containing the resource props.
-    */
-   ResourcePropertySet m_propSet;
-
-   /**
-    * Returns the current time from the prop set.
-    *
-    * @return Calendar
-    */
-   public Calendar getCurrentTime()
-   {
-      return ResourcePropertyUtils.getDateTimeProperty( getResourcePropertySet(),
-            ResourceLifetime1_2Constants.PROP_QNAME_CURRENT_TIME );
-   }
-
-   /**
-    * DOCUMENT_ME
-    *
-    * @param id DOCUMENT_ME
-    */
-   public void setID( Object id )
-   {
-      if ( m_id != null )
-      {
-         throw new IllegalStateException( "This resource's ID has already been set." );
-      }
-
-      try
-      {
-         m_id = (String) id;
-      }
-      catch ( ClassCastException cce )
-      {
-         throw new IllegalArgumentException( "Specified ID is not a String." );
-      }
-   }
-
-   /**
-    * DOCUMENT_ME
-    *
-    * @return DOCUMENT_ME
-    */
-   public Object getID()
-   {
-      return m_id;
-   }
-
-   /**
-    * @see org.apache.ws.resource.properties.PropertiesResource#getResourcePropertySet()
-    */
-   public ResourcePropertySet getResourcePropertySet()
-   {
-      return m_propSet;
-   }
-
-   /**
-    * @see PropertiesResource#setResourcePropertySet(org.apache.ws.resource.properties.ResourcePropertySet)
-    */
-   public void setResourcePropertySet( ResourcePropertySet propSet )
-   {
-      m_propSet = propSet;
-   }
-
-   /**
-    * DOCUMENT_ME
-    *
-    * @param time DOCUMENT_ME
-    */
-   public void setTerminationTime( Calendar time )
-   {
-      ResourcePropertyUtils.setDateTimeProperty( getResourcePropertySet(),
-            ResourceLifetime1_2Constants.PROP_QNAME_TERMINATION_TIME,
-            time );
-   }
-
-   /**
-    * DOCUMENT_ME
-    *
-    * @return DOCUMENT_ME
-    */
-   public Calendar getTerminationTime()
-   {
-      return ResourcePropertyUtils.getDateTimeProperty( getResourcePropertySet(),
-            ResourceLifetime1_2Constants.PROP_QNAME_TERMINATION_TIME );
-   }
-
-   /**
-    * DOCUMENT_ME
-    */
-   public void refreshCurrentTime()
-   {
-      ResourcePropertyUtils.setDateTimeProperty( getResourcePropertySet(),
-            ResourceLifetime1_2Constants.PROP_QNAME_CURRENT_TIME,
-            Calendar.getInstance() );
-   }
 }

Modified: incubator/apollo/site/tutorial/src/example/filesystem/backend/UnixFileSystem.java
Url: http://svn.apache.org/viewcvs/incubator/apollo/site/tutorial/src/example/filesystem/backend/UnixFileSystem.java?view=diff&rev=122889&p1=incubator/apollo/site/tutorial/src/example/filesystem/backend/UnixFileSystem.java&r1=122888&p2=incubator/apollo/site/tutorial/src/example/filesystem/backend/UnixFileSystem.java&r2=122889
==============================================================================
--- incubator/apollo/site/tutorial/src/example/filesystem/backend/UnixFileSystem.java	(original)
+++ incubator/apollo/site/tutorial/src/example/filesystem/backend/UnixFileSystem.java	Mon Dec 20 14:20:04 2004
@@ -20,8 +20,9 @@
     private String m_comment="user files";
     private String m_deviceSpecialFile = "/dev/vg00/lvol7";
 
-    public UnixFileSystem()
+    public UnixFileSystem(String devicePath)
     {
+        m_deviceSpecialFile = devicePath;
         m_options = new ArrayList();
         m_options.add("delaylog");
         m_options.add("quota");

Modified: incubator/apollo/site/tutorial/src/example/filesystem/callback/OptionsCallback.java
Url: http://svn.apache.org/viewcvs/incubator/apollo/site/tutorial/src/example/filesystem/callback/OptionsCallback.java?view=diff&rev=122889&p1=incubator/apollo/site/tutorial/src/example/filesystem/callback/OptionsCallback.java&r1=122888&p2=incubator/apollo/site/tutorial/src/example/filesystem/callback/OptionsCallback.java&r2=122889
==============================================================================
--- incubator/apollo/site/tutorial/src/example/filesystem/callback/OptionsCallback.java	(original)
+++ incubator/apollo/site/tutorial/src/example/filesystem/callback/OptionsCallback.java	Mon Dec 20 14:20:04 2004
@@ -73,9 +73,8 @@
    {
       Iterator iterator = prop.iterator(  );
       while ( iterator.hasNext(  ) )
-      { //todo not sure if this will return an array of strings or options....
+      {
          OptionsDocument.Options o = (OptionsDocument.Options) iterator.next(  );
-
          clearOptionsFromProperty( o );
 
          //add current options...

Added: incubator/apollo/site/tutorial/src/example/filesystem/resource.cfg
Url: http://svn.apache.org/viewcvs/incubator/apollo/site/tutorial/src/example/filesystem/resource.cfg?view=auto&rev=122889
==============================================================================
--- (empty file)
+++ incubator/apollo/site/tutorial/src/example/filesystem/resource.cfg	Mon Dec 20 14:20:04 2004
@@ -0,0 +1,29 @@
+<?xml version="1.0"?>
+
+<jndiConfig xmlns="http://www.apache.org/wsfx/wsrf/jndi/config">
+
+   <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>
+
+</jndiConfig>
+

Added: incubator/apollo/site/tutorial/src/example/sysprops/AbstractJavaSysPropsResource.java
Url: http://svn.apache.org/viewcvs/incubator/apollo/site/tutorial/src/example/sysprops/AbstractJavaSysPropsResource.java?view=auto&rev=122889
==============================================================================
--- (empty file)
+++ incubator/apollo/site/tutorial/src/example/sysprops/AbstractJavaSysPropsResource.java	Mon Dec 20 14:20:04 2004
@@ -0,0 +1,138 @@
+/*=============================================================================*
+ *  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.sysprops;
+
+import org.apache.ws.resource.PropertiesResource;
+import org.apache.ws.resource.Resource;
+import org.apache.ws.resource.example.sysprops.JavaSystemPropertiesDocument;
+import org.apache.ws.resource.lifetime.ResourceLifetime1_2Constants;
+import org.apache.ws.resource.properties.ResourcePropertySet;
+import org.apache.ws.resource.properties.XmlBeansResourcePropertyUtils;
+import org.apache.ws.resource.properties.impl.XmlBeansResourceProperty;
+import org.apache.ws.resource.properties.impl.XmlBeansResourcePropertySet;
+
+import java.util.Calendar;
+
+/**
+ * An abstract filesystem WS-Resource.
+ * <p/>
+ * NOTE: This class is generated and is NOT meant to be modified.
+ *
+ * @author Ian P. Springer
+ * @author Sal Campana
+ */
+public abstract class AbstractJavaSysPropsResource implements Resource, PropertiesResource
+{
+    /**
+     * The resource ID of the instance.
+     */
+    protected String m_id;
+
+    /**
+     * The ResourceProperty Set containing the resource props.
+     */
+    protected ResourcePropertySet m_propSet;
+
+    /**
+     * Returns the current time from the prop set.
+     *
+     * @return Calendar
+     */
+    public Calendar getCurrentTime()
+    {
+        return XmlBeansResourcePropertyUtils.getDateTimePropertyValue( (XmlBeansResourceProperty) m_propSet.get( ResourceLifetime1_2Constants.PROP_QNAME_CURRENT_TIME ) );
+    }
+
+    /**
+     * DOCUMENT_ME
+     *
+     * @param id DOCUMENT_ME
+     */
+    public void setID( Object id )
+    {
+        if ( m_id != null )
+        {
+            throw new IllegalStateException( "This resource's ID has already been set." );
+        }
+
+        try
+        {
+            m_id = (String) id;
+        }
+        catch ( ClassCastException cce )
+        {
+            throw new IllegalArgumentException( "Specified ID is not a String." );
+        }
+    }
+
+    /**
+     * DOCUMENT_ME
+     *
+     * @return DOCUMENT_ME
+     */
+    public Object getID()
+    {
+        return m_id;
+    }
+
+    /**
+     * @see org.apache.ws.resource.PropertiesResource#setResourcePropertySet(org.apache.ws.resource.properties.ResourcePropertySet)
+     */
+    public void setResourcePropertySet( ResourcePropertySet propSet )
+    {
+        m_propSet = propSet;
+    }
+
+    /**
+     * @see org.apache.ws.resource.PropertiesResource#getResourcePropertySet()
+     */
+    public ResourcePropertySet getResourcePropertySet()
+    {
+        return m_propSet;
+    }
+
+    /**
+     * DOCUMENT_ME
+     *
+     * @param time DOCUMENT_ME
+     */
+    public void setTerminationTime( Calendar time )
+    {
+        XmlBeansResourcePropertyUtils.setDateTimePropertyValue( (XmlBeansResourceProperty) getResourcePropertySet().get( ResourceLifetime1_2Constants.PROP_QNAME_TERMINATION_TIME ),
+                time );
+    }
+
+    /**
+     * DOCUMENT_ME
+     *
+     * @return DOCUMENT_ME
+     */
+    public Calendar getTerminationTime()
+    {
+        return XmlBeansResourcePropertyUtils.getDateTimePropertyValue( (XmlBeansResourceProperty) m_propSet.get( ResourceLifetime1_2Constants.PROP_QNAME_TERMINATION_TIME ) );
+    }
+
+    public void destroy()
+    {
+        return;
+    }
+
+    public void init()
+    {
+        JavaSystemPropertiesDocument propsDoc = JavaSystemPropertiesDocument.Factory.newInstance();
+        m_propSet = new XmlBeansResourcePropertySet( propsDoc );
+    }
+}

Added: incubator/apollo/site/tutorial/src/example/sysprops/AbstractJavaSysPropsService.java
Url: http://svn.apache.org/viewcvs/incubator/apollo/site/tutorial/src/example/sysprops/AbstractJavaSysPropsService.java?view=auto&rev=122889
==============================================================================
--- (empty file)
+++ incubator/apollo/site/tutorial/src/example/sysprops/AbstractJavaSysPropsService.java	Mon Dec 20 14:20:04 2004
@@ -0,0 +1,88 @@
+package example.sysprops;
+
+import org.apache.ws.resource.properties.porttype.QueryResourcePropertiesPortType;
+import org.apache.ws.resource.properties.porttype.GetMultipleResourcePropertiesPortType;
+import org.apache.ws.resource.properties.porttype.GetResourcePropertyPortType;
+import org.apache.ws.resource.properties.porttype.impl.GetResourcePropertyProvider;
+import org.apache.ws.resource.properties.porttype.impl.QueryResourcePropertiesProvider;
+import org.apache.ws.resource.properties.porttype.impl.GetMultipleResourcePropertiesProvider;
+import org.apache.ws.resource.handler.WsrfService;
+import org.apache.ws.resource.handler.SoapMethodNameMap;
+import org.apache.ws.resource.handler.ServiceSoapMethodNameMap;
+import org.apache.ws.resource.ResourceContext;
+import org.oasisOpen.docs.wsrf.x2004.x06.wsrfWSResourceProperties12Draft01.GetResourcePropertyResponseDocument;
+import org.oasisOpen.docs.wsrf.x2004.x06.wsrfWSResourceProperties12Draft01.GetResourcePropertyDocument;
+import org.oasisOpen.docs.wsrf.x2004.x06.wsrfWSResourceProperties12Draft01.GetMultipleResourcePropertiesResponseDocument;
+import org.oasisOpen.docs.wsrf.x2004.x06.wsrfWSResourceProperties12Draft01.GetMultipleResourcePropertiesDocument;
+import org.oasisOpen.docs.wsrf.x2004.x06.wsrfWSResourceProperties12Draft01.QueryResourcePropertiesResponseDocument;
+import org.oasisOpen.docs.wsrf.x2004.x06.wsrfWSResourceProperties12Draft01.QueryResourcePropertiesDocument;
+
+
+/**
+ * @author Sal Campana
+ */
+public abstract class AbstractJavaSysPropsService  implements WsrfService,
+                                                     GetResourcePropertyPortType,
+                                                     GetMultipleResourcePropertiesPortType,
+                                                     QueryResourcePropertiesPortType
+{
+
+    public static final String TARGET_NSURI = "http://ws.apache.org/resource/example/sysprops";
+    public static final String TARGET_NSPREFIX = "sp";
+
+       /**
+        * DOCUMENT_ME
+        */
+    private ServiceSoapMethodNameMap m_methodNameMap;
+
+    public SoapMethodNameMap getMethodNameMap()
+    {
+        return m_methodNameMap;
+    }
+
+    public abstract ResourceContext getResourceContext();
+
+    public void init()
+    {
+        m_methodNameMap = new ServiceSoapMethodNameMap(getResourceContext());
+    }
+
+    /**
+       * DOCUMENT_ME
+       *
+       * @param requestDoc DOCUMENT_ME
+       *
+       * @return DOCUMENT_ME
+       */
+      public GetMultipleResourcePropertiesResponseDocument getMultipleResourceProperties( GetMultipleResourcePropertiesDocument requestDoc )
+      {
+         return new GetMultipleResourcePropertiesProvider( getResourceContext(  ) ).getMultipleResourceProperties( requestDoc );
+      }
+
+
+      /**
+       * DOCUMENT_ME
+       *
+       * @param requestDoc DOCUMENT_ME
+       *
+       * @return DOCUMENT_ME
+       */
+      public GetResourcePropertyResponseDocument getResourceProperty( GetResourcePropertyDocument requestDoc )
+      {
+         return new GetResourcePropertyProvider( getResourceContext(  ) ).getResourceProperty( requestDoc );
+      }
+
+
+      /**
+       * DOCUMENT_ME
+       *
+       * @param requestDoc DOCUMENT_ME
+       *
+       * @return DOCUMENT_ME
+       */
+      public QueryResourcePropertiesResponseDocument queryResourceProperties( QueryResourcePropertiesDocument requestDoc )
+      {
+         return new QueryResourcePropertiesProvider( getResourceContext(  ) ).queryResourceProperties( requestDoc );
+      }
+
+}

Added: 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=auto&rev=122889
==============================================================================
--- (empty file)
+++ incubator/apollo/site/tutorial/src/example/sysprops/JavaSysPropsHome.java	Mon Dec 20 14:20:04 2004
@@ -0,0 +1,79 @@
+/*=============================================================================*
+ *  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.sysprops;
+
+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.impl.AbstractResourceHome;
+import org.apache.ws.resource.impl.ResourceFactory;
+import javax.xml.namespace.QName;
+import java.io.Serializable;
+
+/**
+ * @author Sal Campana
+ */
+public class JavaSysPropsHome
+   extends AbstractResourceHome
+   implements ResourceFactory,
+              Serializable
+{
+   /**
+    * DOCUMENT_ME
+    *
+    * @param resourceContext DOCUMENT_ME
+    *
+    * @return DOCUMENT_ME
+    *
+    * @throws ResourceException DOCUMENT_ME
+    * @throws ResourceContextException DOCUMENT_ME
+    * @throws ResourceUnknownException DOCUMENT_ME
+    */
+   public Resource getInstance( ResourceContext resourceContext )
+   throws ResourceException, 
+          ResourceContextException, 
+          ResourceUnknownException
+   { //todo not sure what should happen in here yet....for singleton
+      ResourceKey key      = resourceContext.getResourceKey(  );
+      Resource    resource = null;
+      try
+      {
+         resource = find( key );
+      }
+      catch ( ResourceException re )
+      {
+      }
+
+      if ( resource == null )
+      {
+         try
+         {
+            resource = createInstance( key );
+         }
+         catch ( Exception e )
+         {
+            throw new ResourceException( e );
+         }
+
+         add( key, resource );
+      }
+
+      return resource;
+   }
+}
\ No newline at end of file

Added: incubator/apollo/site/tutorial/src/example/sysprops/JavaSysPropsResource.java
Url: http://svn.apache.org/viewcvs/incubator/apollo/site/tutorial/src/example/sysprops/JavaSysPropsResource.java?view=auto&rev=122889
==============================================================================
--- (empty file)
+++ incubator/apollo/site/tutorial/src/example/sysprops/JavaSysPropsResource.java	Mon Dec 20 14:20:04 2004
@@ -0,0 +1,53 @@
+package example.sysprops;
+
+import org.apache.ws.resource.properties.ResourceProperty;
+import org.apache.ws.resource.properties.ResourcePropertyMetaData;
+import org.apache.ws.resource.properties.impl.AnyResourcePropertyMetaData;
+import org.apache.ws.resource.properties.impl.XmlBeansResourceProperty;
+import org.apache.ws.resource.properties.impl.XmlBeansResourcePropertySet;
+import org.apache.xmlbeans.XmlException;
+import org.apache.xmlbeans.XmlObject;
+
+import javax.xml.namespace.QName;
+import java.util.Iterator;
+import java.util.Properties;
+
+/**
+ * @author Sal Campana
+ */
+public class JavaSysPropsResource extends AbstractJavaSysPropsResource
+{
+
+    private static final String ELEM_NAME_PROPERTY = "property";
+
+    public void init()
+    {
+        super.init();
+        //create a resource metadata and resource property
+        ResourcePropertyMetaData propMetaData = new AnyResourcePropertyMetaData( new QName( JavaSysPropsService.TARGET_NSURI, ELEM_NAME_PROPERTY ) );
+        ResourceProperty prop = new XmlBeansResourceProperty( propMetaData, (XmlBeansResourcePropertySet) m_propSet );
+        //add the property to the prop set
+        m_propSet.add( prop );
+
+        //get the current sys properties
+        Properties sysProps = System.getProperties();
+        Iterator iterator = sysProps.keySet().iterator();
+        //iterate the sysprops and add to property set
+        while ( iterator.hasNext() )
+        {
+            String sysPropKey = (String) iterator.next();
+            String sysPropValue = sysProps.getProperty( sysPropKey );
+            try
+            {
+                //build an arbitrary XmlObject out of the sysprop data
+                XmlObject propElem = XmlObject.Factory.parse( "<" + JavaSysPropsService.TARGET_NSPREFIX + ":" + ELEM_NAME_PROPERTY + " name=\"" + sysPropKey + "\" value=\"" + sysPropValue + "\" xmlns:" + JavaSysPropsService.TARGET_NSPREFIX + "=\"" + JavaSysPropsService.TARGET_NSURI + "\"/>" );
+                prop.add( propElem );
+            }
+            catch ( XmlException e )
+            {
+                e.printStackTrace();
+            }
+        }
+    }
+
+}

Added: incubator/apollo/site/tutorial/src/example/sysprops/JavaSysPropsService.java
Url: http://svn.apache.org/viewcvs/incubator/apollo/site/tutorial/src/example/sysprops/JavaSysPropsService.java?view=auto&rev=122889
==============================================================================
--- (empty file)
+++ incubator/apollo/site/tutorial/src/example/sysprops/JavaSysPropsService.java	Mon Dec 20 14:20:04 2004
@@ -0,0 +1,48 @@
+/*=============================================================================*
+ *  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.sysprops;
+
+import org.apache.ws.resource.ResourceContext;
+
+/**
+ * @author Sal Campana
+ */
+public class JavaSysPropsService
+   extends AbstractJavaSysPropsService
+{
+   private ResourceContext m_resourceContext;
+
+   /**
+    * Creates a new {@link JavaSysPropsService} object.
+    *
+    * @param ctx DOCUMENT_ME
+    */
+   public JavaSysPropsService( ResourceContext ctx )
+   {
+      m_resourceContext = ctx;
+      init(  );
+   }
+
+   /**
+    * DOCUMENT_ME
+    *
+    * @return DOCUMENT_ME
+    */
+   public ResourceContext getResourceContext(  )
+   {
+      return m_resourceContext;
+   }
+}
\ No newline at end of file

Added: incubator/apollo/site/tutorial/src/example/sysprops/resource.cfg
Url: http://svn.apache.org/viewcvs/incubator/apollo/site/tutorial/src/example/sysprops/resource.cfg?view=auto&rev=122889
==============================================================================
--- (empty file)
+++ incubator/apollo/site/tutorial/src/example/sysprops/resource.cfg	Mon Dec 20 14:20:04 2004
@@ -0,0 +1,25 @@
+<?xml version="1.0"?>
+
+<jndiConfig xmlns="http://www.apache.org/wsfx/wsrf/jndi/config">
+
+   <service name="sysprops">
+      <resource name="home" type="example.sysprops.JavaSysPropsHome">
+         <resourceParams>
+            <parameter>
+               <name>serviceClassName</name>
+               <value>example.sysprops.JavaSysPropsService</value>
+            </parameter>
+            <parameter>
+               <name>resourceClassName</name>
+               <value>example.sysprops.JavaSysPropsResource</value>
+            </parameter>
+            <parameter>
+               <name>wsdlTargetNamespace</name>
+               <value>http://ws.apache.org/resource/example/sysprops</value>
+            </parameter>
+         </resourceParams>
+      </resource>
+   </service>
+
+</jndiConfig>
+

Modified: incubator/apollo/site/tutorial/wsdl2java.html
Url: http://svn.apache.org/viewcvs/incubator/apollo/site/tutorial/wsdl2java.html?view=diff&rev=122889&p1=incubator/apollo/site/tutorial/wsdl2java.html&r1=122888&p2=incubator/apollo/site/tutorial/wsdl2java.html&r2=122889
==============================================================================
--- incubator/apollo/site/tutorial/wsdl2java.html	(original)
+++ incubator/apollo/site/tutorial/wsdl2java.html	Mon Dec 20 14:20:04 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>Runing Apollo's Wsdl2Java tool on a WSRF WSDL</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,16 +152,88 @@
     |start content
     +-->
 <div id="content">
-<div id="skinconf-txtlink"></div> 
+<div id="skinconf-txtlink"></div>
+<h1>Runing Apollo's Wsdl2Java tool on a WSRF WSDL</h1>
+<div id="minitoc-area">
+<ul class="minitoc">
+<li>
+<a href="#Introduction">Introduction</a>
+</li>
+<li>
+<a href="#Using+the+Wsdl2Java+Ant+Task">Using the Wsdl2Java Ant Task</a>
+</li>
+</ul>
+</div> 
     
-<a name="N1000C"></a><a name="+"></a>
-<h2 class="boxed"> 
-</h2>
+<a name="N1000C"></a><a name="Introduction"></a>
+<h2 class="boxed">Introduction</h2>
 <div class="section">
 <p>
-        TODO
+        Apollo's Wsdl2Java file takes a WSRF WSDL file as its input and generates the following artifacts:
       </p>
+<ul>
+        
+<li>XMLBeans for all XML Schema types and elements defined in the types section of the WSDL</li>
+        
+<li>an abstract base Resource class</li>
+        
+<li>a Resource class - described <a href="resource.html">here</a>
+</li>
+        
+<li>an abstract base Service class</li>
+        
+<li>a Service class - described <a href="service.html">here</a>
+</li>
+        
+<li>Callback classes for each resource property</li>
+        
+<li>a Home class - described <a href="home.html">here</a>
+</li>
+        
+<li>a CustomOperationsPortType interface</li>
+        
+<li>a PropertyQNames interface</li>
+        
+<li>an Axis deploy.wsdd file</li>
+        
+<li>a resource.cfg file</li>
+      
+</ul>
+<div class="frame note">
+<div class="label">Note</div>
+<div class="content">The abstract classes and interfaces should NOT be modified.</div>
+</div>
 </div>
+
+    
+<a name="N10046"></a><a name="Using+the+Wsdl2Java+Ant+Task"></a>
+<h2 class="boxed">Using the Wsdl2Java Ant Task</h2>
+<div class="section">
+<p>Apollo Wsdl2Java is invoked via an Ant task, as shown by the following example:</p>
+<pre class="code">
+      
+        &lt;property name="wsrf.webapp.dir" location="${apollo.home}/webapps/wsrf" /&gt;
+
+        &lt;path id="apollo.classpath.id"&gt;
+          &lt;pathelement location="${wsrf.webapp.dir}/WEB-INF/classes" /&gt;
+          &lt;fileset dir="${wsrf.webapp.dir}/WEB-INF/lib" includes="*.jar" /&gt;
+        &lt;/path&gt;
+
+        &lt;taskdef name="wsdl2Java" classname="org.apache.ws.resource.Wsdl2JavaTask" classpathref="apollo.classpath.id" /&gt;
+
+        &lt;wsdl2Java wsdl="your.wsdl"
+                   srcOutputDir="generated/src"
+                   classesOutputDir="generated/classes"
+                   classpathref="apollo.classpath.id" /&gt;
+      
+      </pre>
+<div class="frame note">
+<div class="label">Note</div>
+<div class="content">The apollo.home Ant property used above has to be set to the Apollo installation
+            directory (e.g. /opt/apollo-1.0beta).</div>
+</div>
+</div>
+    
   
 </div>
 <!--+

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