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 jr...@apache.org on 2005/06/23 20:01:17 UTC

svn commit: r193192 [1/2] - in /incubator/apollo/trunk/src/examples/filesystem: ./ lib/ requests/ src/ src/java/ src/java/example/ src/java/example/filesystem/ src/java/example/filesystem/backend/ src/java/example/filesystem/callback/ src/java/org/ src...

Author: jruzzi
Date: Thu Jun 23 11:01:15 2005
New Revision: 193192

URL: http://svn.apache.org/viewcvs?rev=193192&view=rev
Log:
prestine version of filesystem example

Added:
    incubator/apollo/trunk/src/examples/filesystem/
    incubator/apollo/trunk/src/examples/filesystem/build.properties
    incubator/apollo/trunk/src/examples/filesystem/build.xml
    incubator/apollo/trunk/src/examples/filesystem/lib/
    incubator/apollo/trunk/src/examples/filesystem/lib/FileSystem-xbeans.jar   (with props)
    incubator/apollo/trunk/src/examples/filesystem/requests/
    incubator/apollo/trunk/src/examples/filesystem/requests/Destroy.soap
    incubator/apollo/trunk/src/examples/filesystem/requests/GetMultipleResourceProperties.soap
    incubator/apollo/trunk/src/examples/filesystem/requests/GetResourceProperty_invalidProp.soap
    incubator/apollo/trunk/src/examples/filesystem/requests/GetResourceProperty_validProp.soap
    incubator/apollo/trunk/src/examples/filesystem/requests/QueryResourceProperties_allProps.soap
    incubator/apollo/trunk/src/examples/filesystem/requests/QueryResourceProperties_oneProp.soap
    incubator/apollo/trunk/src/examples/filesystem/requests/SetResourceProperties_deleteCommentProp.soap
    incubator/apollo/trunk/src/examples/filesystem/requests/SetResourceProperties_insertCommentProp.soap
    incubator/apollo/trunk/src/examples/filesystem/requests/SetResourceProperties_updateBackupFreqProp.soap
    incubator/apollo/trunk/src/examples/filesystem/requests/SetResourceProperties_updateCommentProp.soap
    incubator/apollo/trunk/src/examples/filesystem/requests/SetResourceProperties_updateFsckPassNumProp.soap
    incubator/apollo/trunk/src/examples/filesystem/requests/SetResourceProperties_updateMountPointProp.soap
    incubator/apollo/trunk/src/examples/filesystem/requests/SetResourceProperties_updateOptionsProp.soap
    incubator/apollo/trunk/src/examples/filesystem/requests/SetTerminationTime.soap
    incubator/apollo/trunk/src/examples/filesystem/requests/_TEMPLATE.soap
    incubator/apollo/trunk/src/examples/filesystem/soapclient.xml
    incubator/apollo/trunk/src/examples/filesystem/src/
    incubator/apollo/trunk/src/examples/filesystem/src/java/
    incubator/apollo/trunk/src/examples/filesystem/src/java/example/
    incubator/apollo/trunk/src/examples/filesystem/src/java/example/filesystem/
    incubator/apollo/trunk/src/examples/filesystem/src/java/example/filesystem/backend/
    incubator/apollo/trunk/src/examples/filesystem/src/java/example/filesystem/backend/FileSystem.java
    incubator/apollo/trunk/src/examples/filesystem/src/java/example/filesystem/backend/UnixFileSystem.java
    incubator/apollo/trunk/src/examples/filesystem/src/java/example/filesystem/callback/
    incubator/apollo/trunk/src/examples/filesystem/src/java/example/filesystem/callback/BackupFrequencyCallback.java
    incubator/apollo/trunk/src/examples/filesystem/src/java/example/filesystem/callback/CommentCallback.java
    incubator/apollo/trunk/src/examples/filesystem/src/java/example/filesystem/callback/FsckPassNumberCallback.java
    incubator/apollo/trunk/src/examples/filesystem/src/java/example/filesystem/callback/MountPointCallback.java
    incubator/apollo/trunk/src/examples/filesystem/src/java/example/filesystem/callback/OptionsCallback.java
    incubator/apollo/trunk/src/examples/filesystem/src/java/org/
    incubator/apollo/trunk/src/examples/filesystem/src/java/org/apache/
    incubator/apollo/trunk/src/examples/filesystem/src/java/org/apache/ws/
    incubator/apollo/trunk/src/examples/filesystem/src/java/org/apache/ws/resource/
    incubator/apollo/trunk/src/examples/filesystem/src/java/org/apache/ws/resource/example/
    incubator/apollo/trunk/src/examples/filesystem/src/java/org/apache/ws/resource/example/filesystem/
    incubator/apollo/trunk/src/examples/filesystem/src/java/org/apache/ws/resource/example/filesystem/AbstractFilesystemResource.java
    incubator/apollo/trunk/src/examples/filesystem/src/java/org/apache/ws/resource/example/filesystem/AbstractFilesystemService.java
    incubator/apollo/trunk/src/examples/filesystem/src/java/org/apache/ws/resource/example/filesystem/FilesystemCustomOperationsPortType.java
    incubator/apollo/trunk/src/examples/filesystem/src/java/org/apache/ws/resource/example/filesystem/FilesystemHome.java
    incubator/apollo/trunk/src/examples/filesystem/src/java/org/apache/ws/resource/example/filesystem/FilesystemPropertyQNames.java
    incubator/apollo/trunk/src/examples/filesystem/src/java/org/apache/ws/resource/example/filesystem/FilesystemResource.java
    incubator/apollo/trunk/src/examples/filesystem/src/java/org/apache/ws/resource/example/filesystem/FilesystemService.java
    incubator/apollo/trunk/src/examples/filesystem/src/java/org/apache/ws/resource/example/filesystem/Filesystem_deploy.wsdd
    incubator/apollo/trunk/src/examples/filesystem/src/java/org/apache/ws/resource/example/filesystem/Filesystem_jndi-config.xml
    incubator/apollo/trunk/src/examples/filesystem/src/java/org/apache/ws/resource/example/filesystem/MountDeviceBusyFaultException.java
    incubator/apollo/trunk/src/examples/filesystem/src/wsdl/
    incubator/apollo/trunk/src/examples/filesystem/src/wsdl/FileSystem.wsdl

Added: incubator/apollo/trunk/src/examples/filesystem/build.properties
URL: http://svn.apache.org/viewcvs/incubator/apollo/trunk/src/examples/filesystem/build.properties?rev=193192&view=auto
==============================================================================
--- incubator/apollo/trunk/src/examples/filesystem/build.properties (added)
+++ incubator/apollo/trunk/src/examples/filesystem/build.properties Thu Jun 23 11:01:15 2005
@@ -0,0 +1,13 @@
+# **** NOTE: This file will not be overwritten during generation ****
+
+endpoint.url = http://localhost:8080/wsrf/services/filesystem
+
+# Uncomment and modify the below lines if you would like to deploy to a
+# webapp located somewhere other than the default location of
+# ../webapps/wsrf (e.g. \${env.CATALINA_HOME}/webapps/wsrf )
+wsrf.webapp.dir=${env.CATALINA_HOME}/webapps/wsrf
+
+# Uncomment and modify the below lines if you require a proxy to connect to external web sites
+#http.proxyHost = proxy.xyz.com
+#http.proxyPort = 8088
+#http.nonProxyHosts = localhost 

Added: incubator/apollo/trunk/src/examples/filesystem/build.xml
URL: http://svn.apache.org/viewcvs/incubator/apollo/trunk/src/examples/filesystem/build.xml?rev=193192&view=auto
==============================================================================
--- incubator/apollo/trunk/src/examples/filesystem/build.xml (added)
+++ incubator/apollo/trunk/src/examples/filesystem/build.xml Thu Jun 23 11:01:15 2005
@@ -0,0 +1,97 @@
+<?xml version="1.0"?>
+
+<!-- **** WARNING: This file will be overwritten during generation **** -->
+
+<project name="Filesystem_buildfile" default="usage" basedir=".">
+
+   <property environment="env" />   
+   <property file="build.properties" />
+   <property file="../../build.properties" />
+   <property file="../build.properties" />
+
+   <!-- workaround for those IDEs that dont set ant.home as per the ant script -->
+   <property name="ant.home" value="env.ANT_HOME"/>
+   
+   <property name="classes.dir"  location="classes" />
+   <property name="jar.dir"      location="lib" />
+   <property name="src.dir"      location="src/java" />
+   <property name="wsdl.file"    location="src/wsdl/FileSystem.wsdl" />
+
+   <target name="init" unless="Filesystem.classpath">
+             
+     <fail message="Please set the location of the wsrf.webapp.dir in build.properties" unless="wsrf.webapp.dir" />
+     <echo>Using webapp dir: ${wsrf.webapp.dir}</echo>
+     <path id="Filesystem.classpath.id">
+       <pathelement location="${wsrf.webapp.dir}/WEB-INF/classes" />
+       <fileset dir="${wsrf.webapp.dir}/WEB-INF/lib" includes="*.jar" />
+       <fileset dir="${jar.dir}" />
+       <pathelement location="${activation.jar}" />
+       <pathelement location="${mail.jar}" />
+     </path>
+     <property name="Filesystem.classpath" refid="Filesystem.classpath.id" />
+   
+   </target>   
+
+   <target name="compile"
+           depends="init"
+           description="compile all classes below classes directory">  
+      <mkdir dir="${classes.dir}" />
+      <javac srcdir="${src.dir}"
+             destdir="${classes.dir}"           
+             classpathref="Filesystem.classpath.id"
+             debug="on" 
+             excludes="xmlbeans/**"/>         
+      <copy todir="${classes.dir}">
+         <fileset dir="${src.dir}" excludes="**/*.java,**/package.html" />
+      </copy>
+   </target>
+           
+   <target name="deploy"
+           depends="init"
+           description="deploys the filesystem service to the ${wsrf.webapp.dir} webapp">
+          
+       <copy file="${wsdl.file}" todir="${wsrf.webapp.dir}/WEB-INF/classes/wsdl" overwrite="true" verbose="true" />       
+       <echo>Deploying filesystem classes to ${wsrf.webapp.dir}/WEB-INF/classes/...</echo>
+       <copy todir="${wsrf.webapp.dir}/WEB-INF/classes">
+         <fileset dir="${classes.dir}" />        
+       </copy>
+
+       <copy file="${jar.dir}/FileSystem-xbeans.jar" todir="${wsrf.webapp.dir}/WEB-INF/lib" />
+       <!--  update server-config.wsdd using WsddUpdater -->
+       <taskdef name="wsddUpdater" classname="org.apache.ws.util.platform.axis.tool.WsddUpdater" classpathref="Filesystem.classpath.id" />
+       <property name="config.wsdd" location="${wsrf.webapp.dir}/WEB-INF/server-config.wsdd" />  <!-- normalize path -->       
+       <wsddUpdater configWsdd="${config.wsdd}">   
+          <wsddPaths dir="${src.dir}" includes="**/Filesystem_deploy.wsdd" />          
+       </wsddUpdater>   
+       
+       <!-- update jndi-config.wsdd using JndiConfigUpdater -->
+       <taskdef name="jndiUpdater" classname="org.apache.ws.util.jndi.tools.JndiConfigUpdater" classpathref="Filesystem.classpath.id" />
+       <property name="jndi.config" location="${wsrf.webapp.dir}/WEB-INF/classes/jndi-config.xml" />  <!-- normalize path -->       
+       <jndiUpdater jndiConfig="${jndi.config}">   
+           <jndiConfigPaths dir="${src.dir}" includes="**/Filesystem_jndi-config.xml" />          
+       </jndiUpdater>
+       
+   </target>
+        
+   <target name="sendRequest"
+           description="sends a request to the filesystem service">      
+        
+     <ant antfile="soapclient.xml">
+       <property name="url" value="${endpoint.url}" />
+     </ant>
+   
+   </target>
+   
+   <target name="clean" description="delete the generated source and class files">
+       <delete dir="${classes.dir}" />
+   </target>
+   
+   <target name="usage">      
+      <java classname="org.apache.tools.ant.Main">
+         <arg value="-buildfile" />
+         <arg value="${ant.file}" />
+         <arg value="-projecthelp" />
+      </java>
+   </target>   
+
+</project>

Added: incubator/apollo/trunk/src/examples/filesystem/lib/FileSystem-xbeans.jar
URL: http://svn.apache.org/viewcvs/incubator/apollo/trunk/src/examples/filesystem/lib/FileSystem-xbeans.jar?rev=193192&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/apollo/trunk/src/examples/filesystem/lib/FileSystem-xbeans.jar
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/apollo/trunk/src/examples/filesystem/requests/Destroy.soap
URL: http://svn.apache.org/viewcvs/incubator/apollo/trunk/src/examples/filesystem/requests/Destroy.soap?rev=193192&view=auto
==============================================================================
--- incubator/apollo/trunk/src/examples/filesystem/requests/Destroy.soap (added)
+++ incubator/apollo/trunk/src/examples/filesystem/requests/Destroy.soap Thu Jun 23 11:01:15 2005
@@ -0,0 +1,14 @@
+<Envelope xmlns="http://schemas.xmlsoap.org/soap/envelope/" 
+          xmlns:fs="http://ws.apache.org/resource/example/filesystem">
+
+   <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:ResourceIdentifier mustUnderstand="1">/dev/vg00/lvol1</fs:ResourceIdentifier>
+   </Header>
+
+   <Body>
+      <wsrl:Destroy xmlns:wsrl="http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceLifetime-1.2-draft-01.xsd" />
+   </Body>
+
+</Envelope>

Added: incubator/apollo/trunk/src/examples/filesystem/requests/GetMultipleResourceProperties.soap
URL: http://svn.apache.org/viewcvs/incubator/apollo/trunk/src/examples/filesystem/requests/GetMultipleResourceProperties.soap?rev=193192&view=auto
==============================================================================
--- incubator/apollo/trunk/src/examples/filesystem/requests/GetMultipleResourceProperties.soap (added)
+++ incubator/apollo/trunk/src/examples/filesystem/requests/GetMultipleResourceProperties.soap Thu Jun 23 11:01:15 2005
@@ -0,0 +1,18 @@
+<Envelope xmlns="http://schemas.xmlsoap.org/soap/envelope/" 
+          xmlns:fs="http://ws.apache.org/resource/example/filesystem">
+
+   <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:ResourceIdentifier mustUnderstand="1">/dev/vg00/lvol1</fs:ResourceIdentifier>
+   </Header>
+
+   <Body>
+      <wsrp:GetMultipleResourceProperties xmlns:wsrp="http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceProperties-1.2-draft-01.xsd"
+                                          xmlns:fs="http://ws.apache.org/resource/example/filesystem">
+         <wsrp:ResourceProperty>fs:MountPointDirectory</wsrp:ResourceProperty>
+         <wsrp:ResourceProperty>fs:Type</wsrp:ResourceProperty>
+      </wsrp:GetMultipleResourceProperties>
+   </Body>
+
+</Envelope>

Added: incubator/apollo/trunk/src/examples/filesystem/requests/GetResourceProperty_invalidProp.soap
URL: http://svn.apache.org/viewcvs/incubator/apollo/trunk/src/examples/filesystem/requests/GetResourceProperty_invalidProp.soap?rev=193192&view=auto
==============================================================================
--- incubator/apollo/trunk/src/examples/filesystem/requests/GetResourceProperty_invalidProp.soap (added)
+++ incubator/apollo/trunk/src/examples/filesystem/requests/GetResourceProperty_invalidProp.soap Thu Jun 23 11:01:15 2005
@@ -0,0 +1,17 @@
+<Envelope xmlns="http://schemas.xmlsoap.org/soap/envelope/" 
+          xmlns:fs="http://ws.apache.org/resource/example/filesystem">
+
+   <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:ResourceIdentifier mustUnderstand="1">/dev/vg00/lvol1</fs:ResourceIdentifier>
+   </Header>
+
+   <Body>
+      <wsrp:GetResourceProperty xmlns:wsrp="http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceProperties-1.2-draft-01.xsd"
+                                xmlns:fs="http://ws.apache.org/resource/example/filesystem">
+         fs:NanuNanu
+      </wsrp:GetResourceProperty>
+   </Body>
+
+</Envelope>

Added: incubator/apollo/trunk/src/examples/filesystem/requests/GetResourceProperty_validProp.soap
URL: http://svn.apache.org/viewcvs/incubator/apollo/trunk/src/examples/filesystem/requests/GetResourceProperty_validProp.soap?rev=193192&view=auto
==============================================================================
--- incubator/apollo/trunk/src/examples/filesystem/requests/GetResourceProperty_validProp.soap (added)
+++ incubator/apollo/trunk/src/examples/filesystem/requests/GetResourceProperty_validProp.soap Thu Jun 23 11:01:15 2005
@@ -0,0 +1,17 @@
+<Envelope xmlns="http://schemas.xmlsoap.org/soap/envelope/" 
+          xmlns:fs="http://ws.apache.org/resource/example/filesystem">
+
+   <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:ResourceIdentifier mustUnderstand="1">/dev/vg00/lvol1</fs:ResourceIdentifier>
+   </Header>
+
+   <Body>
+      <wsrp:GetResourceProperty xmlns:wsrp="http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceProperties-1.2-draft-01.xsd"
+                                xmlns:fs="http://ws.apache.org/resource/example/filesystem">
+         fs:Comment
+      </wsrp:GetResourceProperty>
+   </Body>
+
+</Envelope>

Added: incubator/apollo/trunk/src/examples/filesystem/requests/QueryResourceProperties_allProps.soap
URL: http://svn.apache.org/viewcvs/incubator/apollo/trunk/src/examples/filesystem/requests/QueryResourceProperties_allProps.soap?rev=193192&view=auto
==============================================================================
--- incubator/apollo/trunk/src/examples/filesystem/requests/QueryResourceProperties_allProps.soap (added)
+++ incubator/apollo/trunk/src/examples/filesystem/requests/QueryResourceProperties_allProps.soap Thu Jun 23 11:01:15 2005
@@ -0,0 +1,16 @@
+<Envelope xmlns="http://schemas.xmlsoap.org/soap/envelope/" 
+          xmlns:fs="http://ws.apache.org/resource/example/filesystem">
+
+   <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:ResourceIdentifier mustUnderstand="1">/dev/vg00/lvol1</fs:ResourceIdentifier>
+   </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>

Added: incubator/apollo/trunk/src/examples/filesystem/requests/QueryResourceProperties_oneProp.soap
URL: http://svn.apache.org/viewcvs/incubator/apollo/trunk/src/examples/filesystem/requests/QueryResourceProperties_oneProp.soap?rev=193192&view=auto
==============================================================================
--- incubator/apollo/trunk/src/examples/filesystem/requests/QueryResourceProperties_oneProp.soap (added)
+++ incubator/apollo/trunk/src/examples/filesystem/requests/QueryResourceProperties_oneProp.soap Thu Jun 23 11:01:15 2005
@@ -0,0 +1,16 @@
+<Envelope xmlns="http://schemas.xmlsoap.org/soap/envelope/" 
+          xmlns:fs="http://ws.apache.org/resource/example/filesystem">
+
+   <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:ResourceIdentifier mustUnderstand="1">/dev/vg00/lvol1</fs:ResourceIdentifier>
+   </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">*[local-name()="Comment" and . = "set via wsrp:Update"]</wsrp:QueryExpression>
+      </wsrp:QueryResourceProperties>
+   </Body>
+
+</Envelope>

Added: incubator/apollo/trunk/src/examples/filesystem/requests/SetResourceProperties_deleteCommentProp.soap
URL: http://svn.apache.org/viewcvs/incubator/apollo/trunk/src/examples/filesystem/requests/SetResourceProperties_deleteCommentProp.soap?rev=193192&view=auto
==============================================================================
--- incubator/apollo/trunk/src/examples/filesystem/requests/SetResourceProperties_deleteCommentProp.soap (added)
+++ incubator/apollo/trunk/src/examples/filesystem/requests/SetResourceProperties_deleteCommentProp.soap Thu Jun 23 11:01:15 2005
@@ -0,0 +1,17 @@
+<Envelope xmlns="http://schemas.xmlsoap.org/soap/envelope/" 
+          xmlns:fs="http://ws.apache.org/resource/example/filesystem">
+
+   <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:ResourceIdentifier mustUnderstand="1">/dev/vg00/lvol1</fs:ResourceIdentifier>
+   </Header>
+
+   <Body>
+      <wsrp:SetResourceProperties xmlns:wsrp="http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceProperties-1.2-draft-01.xsd"
+                                  xmlns:fs="http://ws.apache.org/resource/example/filesystem">
+         <wsrp:Delete ResourceProperty="fs:Comment" />
+      </wsrp:SetResourceProperties>
+   </Body>
+
+</Envelope>

Added: incubator/apollo/trunk/src/examples/filesystem/requests/SetResourceProperties_insertCommentProp.soap
URL: http://svn.apache.org/viewcvs/incubator/apollo/trunk/src/examples/filesystem/requests/SetResourceProperties_insertCommentProp.soap?rev=193192&view=auto
==============================================================================
--- incubator/apollo/trunk/src/examples/filesystem/requests/SetResourceProperties_insertCommentProp.soap (added)
+++ incubator/apollo/trunk/src/examples/filesystem/requests/SetResourceProperties_insertCommentProp.soap Thu Jun 23 11:01:15 2005
@@ -0,0 +1,19 @@
+<Envelope xmlns="http://schemas.xmlsoap.org/soap/envelope/" 
+          xmlns:fs="http://ws.apache.org/resource/example/filesystem">
+
+   <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:ResourceIdentifier mustUnderstand="1">/dev/vg00/lvol1</fs:ResourceIdentifier>
+   </Header>
+
+   <Body>
+      <wsrp:SetResourceProperties xmlns:wsrp="http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceProperties-1.2-draft-01.xsd"
+                                  xmlns:fs="http://ws.apache.org/resource/example/filesystem">
+         <wsrp:Insert>
+            <fs:Comment>set via wsrp:Insert</fs:Comment>
+         </wsrp:Insert>
+      </wsrp:SetResourceProperties>
+   </Body>
+
+</Envelope>

Added: incubator/apollo/trunk/src/examples/filesystem/requests/SetResourceProperties_updateBackupFreqProp.soap
URL: http://svn.apache.org/viewcvs/incubator/apollo/trunk/src/examples/filesystem/requests/SetResourceProperties_updateBackupFreqProp.soap?rev=193192&view=auto
==============================================================================
--- incubator/apollo/trunk/src/examples/filesystem/requests/SetResourceProperties_updateBackupFreqProp.soap (added)
+++ incubator/apollo/trunk/src/examples/filesystem/requests/SetResourceProperties_updateBackupFreqProp.soap Thu Jun 23 11:01:15 2005
@@ -0,0 +1,19 @@
+<Envelope xmlns="http://schemas.xmlsoap.org/soap/envelope/" 
+          xmlns:fs="http://ws.apache.org/resource/example/filesystem">
+
+   <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:ResourceIdentifier mustUnderstand="1">/dev/vg00/lvol1</fs:ResourceIdentifier>
+   </Header>
+
+   <Body>
+      <wsrp:SetResourceProperties xmlns:wsrp="http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceProperties-1.2-draft-01.xsd"
+                                  xmlns:fs="http://ws.apache.org/resource/example/filesystem">
+         <wsrp:Update>
+            <fs:BackupFrequency>24</fs:BackupFrequency>
+         </wsrp:Update>
+      </wsrp:SetResourceProperties>
+   </Body>
+
+</Envelope>

Added: incubator/apollo/trunk/src/examples/filesystem/requests/SetResourceProperties_updateCommentProp.soap
URL: http://svn.apache.org/viewcvs/incubator/apollo/trunk/src/examples/filesystem/requests/SetResourceProperties_updateCommentProp.soap?rev=193192&view=auto
==============================================================================
--- incubator/apollo/trunk/src/examples/filesystem/requests/SetResourceProperties_updateCommentProp.soap (added)
+++ incubator/apollo/trunk/src/examples/filesystem/requests/SetResourceProperties_updateCommentProp.soap Thu Jun 23 11:01:15 2005
@@ -0,0 +1,19 @@
+<Envelope xmlns="http://schemas.xmlsoap.org/soap/envelope/" 
+          xmlns:fs="http://ws.apache.org/resource/example/filesystem">
+
+   <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:ResourceIdentifier mustUnderstand="1">/dev/vg00/lvol1</fs:ResourceIdentifier>
+   </Header>
+
+   <Body>
+      <wsrp:SetResourceProperties xmlns:wsrp="http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceProperties-1.2-draft-01.xsd"
+                                  xmlns:fs="http://ws.apache.org/resource/example/filesystem">
+         <wsrp:Update>
+            <fs:Comment>set via wsrp:Update</fs:Comment>
+         </wsrp:Update>
+      </wsrp:SetResourceProperties>
+   </Body>
+
+</Envelope>

Added: incubator/apollo/trunk/src/examples/filesystem/requests/SetResourceProperties_updateFsckPassNumProp.soap
URL: http://svn.apache.org/viewcvs/incubator/apollo/trunk/src/examples/filesystem/requests/SetResourceProperties_updateFsckPassNumProp.soap?rev=193192&view=auto
==============================================================================
--- incubator/apollo/trunk/src/examples/filesystem/requests/SetResourceProperties_updateFsckPassNumProp.soap (added)
+++ incubator/apollo/trunk/src/examples/filesystem/requests/SetResourceProperties_updateFsckPassNumProp.soap Thu Jun 23 11:01:15 2005
@@ -0,0 +1,19 @@
+<Envelope xmlns="http://schemas.xmlsoap.org/soap/envelope/" 
+          xmlns:fs="http://ws.apache.org/resource/example/filesystem">
+
+   <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:ResourceIdentifier mustUnderstand="1">/dev/vg00/lvol1</fs:ResourceIdentifier>
+   </Header>
+
+   <Body>
+      <wsrp:SetResourceProperties xmlns:wsrp="http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceProperties-1.2-draft-01.xsd"
+                                  xmlns:fs="http://ws.apache.org/resource/example/filesystem">
+         <wsrp:Update>
+            <fs:FsckPassNumber>202</fs:FsckPassNumber>
+         </wsrp:Update>
+      </wsrp:SetResourceProperties>
+   </Body>
+
+</Envelope>

Added: incubator/apollo/trunk/src/examples/filesystem/requests/SetResourceProperties_updateMountPointProp.soap
URL: http://svn.apache.org/viewcvs/incubator/apollo/trunk/src/examples/filesystem/requests/SetResourceProperties_updateMountPointProp.soap?rev=193192&view=auto
==============================================================================
--- incubator/apollo/trunk/src/examples/filesystem/requests/SetResourceProperties_updateMountPointProp.soap (added)
+++ incubator/apollo/trunk/src/examples/filesystem/requests/SetResourceProperties_updateMountPointProp.soap Thu Jun 23 11:01:15 2005
@@ -0,0 +1,19 @@
+<Envelope xmlns="http://schemas.xmlsoap.org/soap/envelope/" 
+          xmlns:fs="http://ws.apache.org/resource/example/filesystem">
+
+   <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:ResourceIdentifier mustUnderstand="1">/dev/vg00/lvol1</fs:ResourceIdentifier>
+   </Header>
+
+   <Body>
+      <wsrp:SetResourceProperties xmlns:wsrp="http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceProperties-1.2-draft-01.xsd"
+                                  xmlns:fs="http://ws.apache.org/resource/example/filesystem">
+         <wsrp:Update>
+            <fs:MountPointDirectory>/var/tmp/apollo</fs:MountPointDirectory>
+         </wsrp:Update>
+      </wsrp:SetResourceProperties>
+   </Body>
+
+</Envelope>

Added: incubator/apollo/trunk/src/examples/filesystem/requests/SetResourceProperties_updateOptionsProp.soap
URL: http://svn.apache.org/viewcvs/incubator/apollo/trunk/src/examples/filesystem/requests/SetResourceProperties_updateOptionsProp.soap?rev=193192&view=auto
==============================================================================
--- incubator/apollo/trunk/src/examples/filesystem/requests/SetResourceProperties_updateOptionsProp.soap (added)
+++ incubator/apollo/trunk/src/examples/filesystem/requests/SetResourceProperties_updateOptionsProp.soap Thu Jun 23 11:01:15 2005
@@ -0,0 +1,24 @@
+<Envelope xmlns="http://schemas.xmlsoap.org/soap/envelope/" 
+          xmlns:fs="http://ws.apache.org/resource/example/filesystem">
+
+   <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:ResourceIdentifier mustUnderstand="1">/dev/vg00/lvol1</fs:ResourceIdentifier>
+   </Header>
+
+   <Body>
+      <wsrp:SetResourceProperties xmlns:wsrp="http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceProperties-1.2-draft-01.xsd"
+                                  xmlns:fs="http://ws.apache.org/resource/example/filesystem">
+         <wsrp:Update>
+            <fs:Options>
+            <fs:Option>Should we test this?</fs:Option>
+            <fs:Option>Should we go to lunch?</fs:Option>
+            <fs:Option>yes?</fs:Option>
+            <fs:Option>no?</fs:Option>
+            </fs:Options>
+         </wsrp:Update>
+      </wsrp:SetResourceProperties>
+   </Body>
+
+</Envelope>

Added: incubator/apollo/trunk/src/examples/filesystem/requests/SetTerminationTime.soap
URL: http://svn.apache.org/viewcvs/incubator/apollo/trunk/src/examples/filesystem/requests/SetTerminationTime.soap?rev=193192&view=auto
==============================================================================
--- incubator/apollo/trunk/src/examples/filesystem/requests/SetTerminationTime.soap (added)
+++ incubator/apollo/trunk/src/examples/filesystem/requests/SetTerminationTime.soap Thu Jun 23 11:01:15 2005
@@ -0,0 +1,16 @@
+<Envelope xmlns="http://schemas.xmlsoap.org/soap/envelope/" 
+          xmlns:fs="http://ws.apache.org/resource/example/filesystem">
+
+   <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:ResourceIdentifier mustUnderstand="1">/dev/vg00/lvol1</fs:ResourceIdentifier>
+   </Header>
+
+   <Body>
+      <wsrl:SetTerminationTime xmlns:wsrl="http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceLifetime-1.2-draft-01.xsd">
+         <wsrl:RequestedTerminationTime>2004-11-01T14:06:00</wsrl:RequestedTerminationTime>
+      </wsrl:SetTerminationTime>      
+   </Body>
+
+</Envelope>

Added: incubator/apollo/trunk/src/examples/filesystem/requests/_TEMPLATE.soap
URL: http://svn.apache.org/viewcvs/incubator/apollo/trunk/src/examples/filesystem/requests/_TEMPLATE.soap?rev=193192&view=auto
==============================================================================
--- incubator/apollo/trunk/src/examples/filesystem/requests/_TEMPLATE.soap (added)
+++ incubator/apollo/trunk/src/examples/filesystem/requests/_TEMPLATE.soap Thu Jun 23 11:01:15 2005
@@ -0,0 +1,14 @@
+<Envelope xmlns="http://schemas.xmlsoap.org/soap/envelope/" 
+          xmlns:fs="http://ws.apache.org/resource/example/filesystem">
+
+   <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:ResourceIdentifier mustUnderstand="1">/dev/vg00/lvol1</fs:ResourceIdentifier>
+   </Header>
+
+   <Body>
+      <!-- yourRequest -->
+   </Body>
+
+</Envelope>

Added: incubator/apollo/trunk/src/examples/filesystem/soapclient.xml
URL: http://svn.apache.org/viewcvs/incubator/apollo/trunk/src/examples/filesystem/soapclient.xml?rev=193192&view=auto
==============================================================================
--- incubator/apollo/trunk/src/examples/filesystem/soapclient.xml (added)
+++ incubator/apollo/trunk/src/examples/filesystem/soapclient.xml Thu Jun 23 11:01:15 2005
@@ -0,0 +1,63 @@
+<?xml version="1.0"?>
+
+<project name="soapClient" default="sendRequest" basedir=".">
+
+   <property environment="env" />   
+   <property file="build.properties" />
+   <property file="../build.properties" />
+
+   <!-- workaround for those IDEs that dont set ant.home as per the ant script -->
+   <property name="ant.home" value="env.ANT_HOME"/>
+   
+
+   <target name="init">
+          
+     <available file="../../webapps/wsrf" type="dir" property="dist.wsrf.webapp.dir" value="../../webapps/wsrf" />         
+     <condition property="wsrf.webapp.dir" value="${dist.wsrf.webapp.dir}">
+        <isset property="dist.wsrf.webapp.dir"/>
+     </condition>          
+     <fail unless="wsrf.webapp.dir" message="webapp dir ../../webapps/wsrf does not exist." />    
+     <echo>Using webapp dir: ${wsrf.webapp.dir}</echo>         
+     
+     <path id="apollo.classpath.id">
+       <pathelement location="${wsrf.webapp.dir}/WEB-INF/classes" />
+       <fileset dir="${wsrf.webapp.dir}/WEB-INF/lib" includes="*.jar" />
+       <pathelement location="${activation.jar}" />
+       <pathelement location="${mail.jar}" />
+     </path>
+     <property name="apollo.classpath" refid="apollo.classpath.id" />
+   
+   </target>
+
+   <target name="sendRequest"
+           depends="init"
+           description="sends a SOAP request">      
+     
+     <fail unless="url" message="Please set the url property via -Durl=... when invoking this script." />  
+     <fail unless="xml" message="Please set the xml property via -Dxml=... when invoking this script." />           
+     <echo>Reading SOAP request from: ${xml} ,,,</echo>
+     <available file="${xml}" property="xml.exists" />
+     <fail unless="xml.exists" message="The specified request XML file ${xml} does not exist." />  
+     <available file="${xml}" type="file" property="xml.is.file" />
+     <fail unless="xml.is.file" message="The specified request XML file ${xml} exists but is not a file." />  
+     
+     <echo>Sending SOAP request to ${url} ...</echo>
+     <echo />
+     <echo>========================== REQUEST  ============================</echo>
+     <concat><path><pathelement location="${xml}" /></path></concat>
+     <echo />
+     <echo>========================== RESPONSE ============================</echo>
+     <taskdef name="soapClient" classname="org.apache.ws.util.soap.SoapClientTask" classpath="${apollo.classpath}" />              
+     <soapClient serviceURL="${url}" requestFile="${xml}" soapAction="${action}" /> 
+               
+   </target>
+   
+   <target name="usage">      
+      <java classname="org.apache.tools.ant.Main">
+         <arg value="-buildfile" />
+         <arg value="${ant.file}" />
+         <arg value="-projecthelp" />
+      </java>
+   </target>   
+
+</project>

Added: incubator/apollo/trunk/src/examples/filesystem/src/java/example/filesystem/backend/FileSystem.java
URL: http://svn.apache.org/viewcvs/incubator/apollo/trunk/src/examples/filesystem/src/java/example/filesystem/backend/FileSystem.java?rev=193192&view=auto
==============================================================================
--- incubator/apollo/trunk/src/examples/filesystem/src/java/example/filesystem/backend/FileSystem.java (added)
+++ incubator/apollo/trunk/src/examples/filesystem/src/java/example/filesystem/backend/FileSystem.java Thu Jun 23 11:01:15 2005
@@ -0,0 +1,33 @@
+package example.filesystem.backend;
+
+import java.util.List;
+
+/**
+ * @author Sal Campana
+ */
+public interface FileSystem
+{
+    String getDeviceSpecialFile();
+
+    String getMountPoint();
+
+    void setMountPoint(String mountDir);
+
+    String getType();
+
+    int getBackupFrequency();
+
+    void setBackupFrequency(int backupFrequency);
+
+    List getOptions();
+
+    void setOptions(List options);
+
+    String getComment();
+
+    void setComment(String comment);
+
+    int getFsckPassNumber();
+
+    void setFsckPassNumber(int fsckPassNumber);
+}

Added: incubator/apollo/trunk/src/examples/filesystem/src/java/example/filesystem/backend/UnixFileSystem.java
URL: http://svn.apache.org/viewcvs/incubator/apollo/trunk/src/examples/filesystem/src/java/example/filesystem/backend/UnixFileSystem.java?rev=193192&view=auto
==============================================================================
--- incubator/apollo/trunk/src/examples/filesystem/src/java/example/filesystem/backend/UnixFileSystem.java (added)
+++ incubator/apollo/trunk/src/examples/filesystem/src/java/example/filesystem/backend/UnixFileSystem.java Thu Jun 23 11:01:15 2005
@@ -0,0 +1,87 @@
+package example.filesystem.backend;
+
+import java.util.List;
+import java.util.ArrayList;
+
+
+/**
+ * This is a mock filesystem to act as the backend for the example FileSystemService
+ *
+ * @author Sal Campana
+ */
+public class UnixFileSystem implements FileSystem
+{
+
+    private String m_mountPoint="/usr";
+    private String m_type = "vxfs";
+    private int m_backupFrequency=0;
+    private int m_fsckPassNumber=2;
+    private List m_options;
+    private String m_comment="user files";
+    private String m_deviceSpecialFile = "/dev/vg00/lvol7";
+
+    public UnixFileSystem(String devicePath)
+    {
+        m_deviceSpecialFile = devicePath;
+        m_options = new ArrayList();
+        m_options.add("delaylog");
+        m_options.add("quota");
+    }
+
+    public String getDeviceSpecialFile()
+    {
+        return m_deviceSpecialFile;
+    }
+    public String getMountPoint()
+    {
+        return m_mountPoint;
+    }
+    public void setMountPoint(String mountDir)
+    {
+        m_mountPoint=mountDir;
+    }
+    public String getType()
+    {
+        return m_type;
+    }
+
+    public int getBackupFrequency()
+    {
+        return m_backupFrequency;
+    }
+
+    public void setBackupFrequency(int backupFrequency)
+    {
+        m_backupFrequency = backupFrequency;
+    }
+
+    public List getOptions()
+    {
+        return m_options;
+    }
+
+    public void setOptions(List options)
+    {
+        m_options = options;
+    }
+
+    public String getComment()
+    {
+        return m_comment;
+    }
+
+    public void setComment(String comment)
+    {
+        m_comment = comment;
+    }
+
+    public int getFsckPassNumber()
+    {
+        return m_fsckPassNumber;
+    }
+
+    public void setFsckPassNumber(int fsckPassNumber)
+    {
+        m_fsckPassNumber = fsckPassNumber;
+    }
+}

Added: incubator/apollo/trunk/src/examples/filesystem/src/java/example/filesystem/callback/BackupFrequencyCallback.java
URL: http://svn.apache.org/viewcvs/incubator/apollo/trunk/src/examples/filesystem/src/java/example/filesystem/callback/BackupFrequencyCallback.java?rev=193192&view=auto
==============================================================================
--- incubator/apollo/trunk/src/examples/filesystem/src/java/example/filesystem/callback/BackupFrequencyCallback.java (added)
+++ incubator/apollo/trunk/src/examples/filesystem/src/java/example/filesystem/callback/BackupFrequencyCallback.java Thu Jun 23 11:01:15 2005
@@ -0,0 +1,48 @@
+package example.filesystem.callback;
+
+import org.apache.ws.resource.properties.SetResourcePropertyCallback;
+import org.apache.ws.resource.properties.ResourceProperty;
+import org.apache.ws.resource.properties.impl.CallbackFailedException;
+import org.apache.ws.resource.example.filesystem.BackupFrequencyDocument;
+import org.apache.xmlbeans.XmlInt;
+
+import javax.xml.namespace.QName;
+
+import example.filesystem.backend.FileSystem;
+
+/**
+ * A callback for the BackupFrequency resource property.
+ */
+public class BackupFrequencyCallback implements SetResourcePropertyCallback
+{
+    FileSystem m_fileSystem;
+
+    public BackupFrequencyCallback(FileSystem fileSystem)
+    {
+        m_fileSystem = fileSystem;
+    }
+
+    public void deleteProperty(QName propQName) throws CallbackFailedException
+    {
+        return; // no need to implement - Apollo will never call delete for a prop whose minOccurs != 0
+    }
+
+    public void insertProperty(Object[] prop) throws CallbackFailedException
+    {
+        return; // no need to implement - Apollo will never call insert for a prop whose minOccurs == its maxOccurs
+    }
+
+    public void updateProperty(Object[] prop) throws CallbackFailedException
+    {
+        // BackupFrequency prop has cardinality of 1, so passed array will always have exactly one element
+        XmlInt xInt = (XmlInt) prop[0];
+        m_fileSystem.setBackupFrequency(xInt.getIntValue());
+    }
+
+    public ResourceProperty refreshProperty(ResourceProperty prop)  throws CallbackFailedException
+    {
+        XmlInt xInt = (XmlInt) prop.get( 0 );
+        xInt.setIntValue( m_fileSystem.getBackupFrequency() );
+        return prop;
+    }
+}

Added: incubator/apollo/trunk/src/examples/filesystem/src/java/example/filesystem/callback/CommentCallback.java
URL: http://svn.apache.org/viewcvs/incubator/apollo/trunk/src/examples/filesystem/src/java/example/filesystem/callback/CommentCallback.java?rev=193192&view=auto
==============================================================================
--- incubator/apollo/trunk/src/examples/filesystem/src/java/example/filesystem/callback/CommentCallback.java (added)
+++ incubator/apollo/trunk/src/examples/filesystem/src/java/example/filesystem/callback/CommentCallback.java Thu Jun 23 11:01:15 2005
@@ -0,0 +1,46 @@
+package example.filesystem.callback;
+
+import example.filesystem.backend.FileSystem;
+import org.apache.ws.resource.properties.ResourceProperty;
+import org.apache.ws.resource.properties.SetResourcePropertyCallback;
+import org.apache.ws.resource.properties.impl.CallbackFailedException;
+import org.apache.xmlbeans.XmlString;
+
+import javax.xml.namespace.QName;
+
+/**
+ * A callback for the Comment resource property.
+ */
+public class CommentCallback implements SetResourcePropertyCallback
+{
+    FileSystem m_fileSystem;
+
+    public CommentCallback( FileSystem fileSystem )
+    {
+        m_fileSystem = fileSystem;
+    }
+
+    public void deleteProperty( QName propQName ) throws CallbackFailedException
+    {
+        return; // no need to implement - Apollo will never call delete for a prop whose minOccurs != 0
+    }
+
+    public void insertProperty( Object[] propElems ) throws CallbackFailedException
+    {
+        // Comment prop has cardinality of 1, so passed array will always have exactly one element 
+        XmlString xString = (XmlString) propElems[0];
+        m_fileSystem.setComment( xString.getStringValue() );
+    }
+
+    public void updateProperty( Object[] prop ) throws CallbackFailedException
+    {
+        insertProperty( prop );
+    }
+
+    public ResourceProperty refreshProperty( ResourceProperty prop )  throws CallbackFailedException
+    {
+        XmlString xString = (XmlString) prop.get( 0 );
+        xString.setStringValue( m_fileSystem.getComment() );
+        return prop;
+    }
+}

Added: incubator/apollo/trunk/src/examples/filesystem/src/java/example/filesystem/callback/FsckPassNumberCallback.java
URL: http://svn.apache.org/viewcvs/incubator/apollo/trunk/src/examples/filesystem/src/java/example/filesystem/callback/FsckPassNumberCallback.java?rev=193192&view=auto
==============================================================================
--- incubator/apollo/trunk/src/examples/filesystem/src/java/example/filesystem/callback/FsckPassNumberCallback.java (added)
+++ incubator/apollo/trunk/src/examples/filesystem/src/java/example/filesystem/callback/FsckPassNumberCallback.java Thu Jun 23 11:01:15 2005
@@ -0,0 +1,49 @@
+package example.filesystem.callback;
+
+import org.apache.ws.resource.properties.SetResourcePropertyCallback;
+import org.apache.ws.resource.properties.ResourceProperty;
+import org.apache.ws.resource.properties.impl.CallbackFailedException;
+import org.apache.ws.resource.example.filesystem.FsckPassNumberDocument;
+import org.apache.xmlbeans.XmlInt;
+
+import javax.xml.namespace.QName;
+
+import example.filesystem.backend.FileSystem;
+
+
+/**
+ * A callback for the FsckPassNumber resource property.
+ */
+public class FsckPassNumberCallback implements SetResourcePropertyCallback
+{
+    FileSystem m_fileSystem;
+
+    public FsckPassNumberCallback(FileSystem fileSystem)
+    {
+        m_fileSystem = fileSystem;
+    }
+
+    public void deleteProperty(QName propQName) throws CallbackFailedException
+    {
+        return; // no need to implement - Apollo will never call delete for a prop whose minOccurs != 0
+    }
+
+    public void insertProperty(Object[] propElems) throws CallbackFailedException
+    {
+        return; // no need to implement - Apollo will never call insert for a prop whose minOccurs == its maxOccurs
+    }
+
+    public void updateProperty(Object[] propElems) throws CallbackFailedException
+    {
+        // FsckPassNumber prop has cardinality of 1, so passed array will always have exactly one element
+        XmlInt xInt = (XmlInt) propElems[0];
+        m_fileSystem.setFsckPassNumber(xInt.getIntValue());
+    }
+
+    public ResourceProperty refreshProperty(ResourceProperty prop)  throws CallbackFailedException
+    {
+        XmlInt xInt = (XmlInt) prop.get( 0 );
+        xInt.setIntValue( m_fileSystem.getFsckPassNumber() );
+        return prop;
+    }
+}

Added: incubator/apollo/trunk/src/examples/filesystem/src/java/example/filesystem/callback/MountPointCallback.java
URL: http://svn.apache.org/viewcvs/incubator/apollo/trunk/src/examples/filesystem/src/java/example/filesystem/callback/MountPointCallback.java?rev=193192&view=auto
==============================================================================
--- incubator/apollo/trunk/src/examples/filesystem/src/java/example/filesystem/callback/MountPointCallback.java (added)
+++ incubator/apollo/trunk/src/examples/filesystem/src/java/example/filesystem/callback/MountPointCallback.java Thu Jun 23 11:01:15 2005
@@ -0,0 +1,28 @@
+package example.filesystem.callback;
+
+import org.apache.ws.resource.properties.ResourcePropertyCallback;
+import org.apache.ws.resource.properties.ResourceProperty;
+import org.apache.ws.resource.properties.impl.CallbackFailedException;
+import org.apache.ws.resource.example.filesystem.MountPointDirectoryDocument;
+import org.apache.xmlbeans.XmlString;
+import example.filesystem.backend.FileSystem;
+
+/**
+ * A callback for the MountPoint resource property.
+ */
+public class MountPointCallback  implements ResourcePropertyCallback
+{
+    FileSystem m_fileSystem;
+
+    public MountPointCallback(FileSystem fileSystem)
+    {
+        m_fileSystem = fileSystem;
+    }
+
+    public ResourceProperty refreshProperty(ResourceProperty prop)  throws CallbackFailedException
+    {
+        XmlString xString = (XmlString) prop.get( 0 );
+        xString.setStringValue( m_fileSystem.getMountPoint() );
+        return prop;
+    }
+}

Added: incubator/apollo/trunk/src/examples/filesystem/src/java/example/filesystem/callback/OptionsCallback.java
URL: http://svn.apache.org/viewcvs/incubator/apollo/trunk/src/examples/filesystem/src/java/example/filesystem/callback/OptionsCallback.java?rev=193192&view=auto
==============================================================================
--- incubator/apollo/trunk/src/examples/filesystem/src/java/example/filesystem/callback/OptionsCallback.java (added)
+++ incubator/apollo/trunk/src/examples/filesystem/src/java/example/filesystem/callback/OptionsCallback.java Thu Jun 23 11:01:15 2005
@@ -0,0 +1,120 @@
+/*=============================================================================*
+ *  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.callback;
+
+import example.filesystem.backend.FileSystem;
+import org.apache.ws.resource.example.filesystem.OptionsDocument;
+import org.apache.ws.resource.properties.ResourceProperty;
+import org.apache.ws.resource.properties.SetResourcePropertyCallback;
+import org.apache.ws.resource.properties.impl.CallbackFailedException;
+
+import javax.xml.namespace.QName;
+import java.util.Iterator;
+import java.util.List;
+
+/**
+ * A callback for the Options resource property.
+ */
+public class OptionsCallback
+        implements SetResourcePropertyCallback
+{
+    /**
+     * DOCUMENT_ME
+     */
+    FileSystem m_fileSystem;
+
+    /**
+     * Creates a new {@link OptionsCallback} object.
+     *
+     * @param fileSystem DOCUMENT_ME
+     */
+    public OptionsCallback( FileSystem fileSystem )
+    {
+        m_fileSystem = fileSystem;
+    }
+
+    /**
+     * DOCUMENT_ME
+     *
+     * @param propQName DOCUMENT_ME
+     */
+    public void deleteProperty( QName propQName )  throws CallbackFailedException
+    {
+        return; // no need to implement - Apollo will never call delete for a prop whose minOccurs != 0
+    }
+
+    /**
+     * DOCUMENT_ME
+     *
+     * @param prop DOCUMENT_ME
+     */
+    public void insertProperty( Object[] prop )  throws CallbackFailedException
+    {
+        return; // no need to implement - Apollo will never call insert for a prop whose minOccurs == its maxOccurs
+    }
+
+    /**
+     * DOCUMENT_ME
+     *
+     * @param prop DOCUMENT_ME
+     *
+     * @return DOCUMENT_ME
+     */
+    public ResourceProperty refreshProperty( ResourceProperty prop )  throws CallbackFailedException
+    {
+        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 < options.size(); i++ )
+            {
+                o.addOption( options.get( i ).toString() );
+            }
+        }
+
+        return prop;
+    }
+
+    /**
+     * DOCUMENT_ME
+     *
+     * @param prop DOCUMENT_ME
+     */
+    public void updateProperty( Object[] prop )  throws CallbackFailedException
+    {
+        List backendOptions = m_fileSystem.getOptions();
+        // Options prop has cardinality of 1, so passed array will always have exactly one element
+        OptionsDocument.Options o = (OptionsDocument.Options) prop[0];
+        String[] optionArray = o.getOptionArray();
+        for ( int j = 0; j < optionArray.length; j++ )
+        {
+            backendOptions.add( optionArray[j] );
+        }
+    }
+
+    private void clearOptionsFromProperty( OptionsDocument.Options o )
+    {
+        //remove the options...
+        for ( int i = 0; i < o.sizeOfOptionArray(); i++ )
+        {
+            o.removeOption( i );
+        }
+    }
+}
\ No newline at end of file

Added: incubator/apollo/trunk/src/examples/filesystem/src/java/org/apache/ws/resource/example/filesystem/AbstractFilesystemResource.java
URL: http://svn.apache.org/viewcvs/incubator/apollo/trunk/src/examples/filesystem/src/java/org/apache/ws/resource/example/filesystem/AbstractFilesystemResource.java?rev=193192&view=auto
==============================================================================
--- incubator/apollo/trunk/src/examples/filesystem/src/java/org/apache/ws/resource/example/filesystem/AbstractFilesystemResource.java (added)
+++ incubator/apollo/trunk/src/examples/filesystem/src/java/org/apache/ws/resource/example/filesystem/AbstractFilesystemResource.java Thu Jun 23 11:01:15 2005
@@ -0,0 +1,182 @@
+
+package org.apache.ws.resource.example.filesystem;
+
+import org.apache.ws.addressing.EndpointReference;
+
+/**
+ * **** WARNING: This file will be overwritten during generation **** 
+ *
+ * An abstract Filesystem WS-Resource.
+ * <p/>
+ * NOTE: This class is generated and is NOT meant to be modified. 
+ */
+public abstract class AbstractFilesystemResource  implements org.apache.ws.resource.lifetime.ScheduledResourceTerminationResource, org.apache.ws.resource.PropertiesResource {
+    
+    /**
+     * The resource ID of the instance.
+     */
+    protected String m_id;
+    
+    /** The EndpointReference for this resource **/
+    protected EndpointReference m_endpointReference;
+
+        /**
+     * The set of properties associated with this resource.
+     */
+    protected org.apache.ws.resource.properties.ResourcePropertySet m_propSet;
+            
+    
+    /**
+     * A list of termination listeners to be notified when the resource is terminated.
+     */
+    private java.util.List m_terminationListeners = new java.util.ArrayList(); 
+     
+     
+    /**
+     * 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
+     *
+     * @param listener DOCUMENT_ME
+     */
+    public void addTerminationListener( org.apache.ws.resource.lifetime.ResourceTerminationListener listener)
+    {         
+         m_terminationListeners.add(listener);
+    }
+
+    /**
+     * DOCUMENT_ME
+     *
+     * @return DOCUMENT_ME
+     */
+    public Object getID()
+    {
+        return m_id;
+    }
+
+    public void destroy()
+    {
+	org.apache.ws.resource.lifetime.ResourceTerminationEvent rte = new org.apache.ws.resource.lifetime.impl.ResourceTerminationEventImpl(getID(),"Resource Destroyed");
+	for (int i = 0; i < m_terminationListeners.size(); i++)
+	{
+	    org.apache.ws.resource.lifetime.ResourceTerminationListener resourceTerminationEventListener = (org.apache.ws.resource.lifetime.ResourceTerminationListener) m_terminationListeners.get(i);
+	    resourceTerminationEventListener.terminationOccurred(rte);
+	}     
+        return;
+    }
+
+    public void init()
+    {
+                
+                org.apache.ws.resource.example.filesystem.FileSystemPropertiesDocument propsDoc = org.apache.ws.resource.example.filesystem.FileSystemPropertiesDocument.Factory.newInstance();
+        m_propSet = new org.apache.ws.resource.properties.impl.XmlBeansResourcePropertySet( propsDoc );
+		
+                	// initialize wsrl:CurrentTime property
+	org.apache.ws.resource.properties.ResourceProperty prop = m_propSet.get( org.apache.ws.resource.lifetime.v2004_06.porttype.ScheduledResourceTerminationPortType.PROP_QNAME_CURRENT_TIME );
+	org.oasisOpen.docs.wsrf.x2004.x06.wsrfWSResourceLifetime12Draft01.CurrentTimeDocument currTime = org.oasisOpen.docs.wsrf.x2004.x06.wsrfWSResourceLifetime12Draft01.CurrentTimeDocument.Factory.newInstance();
+	currTime.setCurrentTime( java.util.Calendar.getInstance() );
+	prop.add( currTime );
+	prop.setCallback( new org.apache.ws.resource.lifetime.callback.CurrentTimeCallback() );
+
+	// initialize wsrl:TerminationTime property
+	prop = m_propSet.get( org.apache.ws.resource.lifetime.v2004_06.porttype.ScheduledResourceTerminationPortType.PROP_QNAME_TERMINATION_TIME );
+	org.oasisOpen.docs.wsrf.x2004.x06.wsrfWSResourceLifetime12Draft01.TerminationTimeDocument termTime = org.oasisOpen.docs.wsrf.x2004.x06.wsrfWSResourceLifetime12Draft01.TerminationTimeDocument.Factory.newInstance();
+	termTime.setNilTerminationTime();
+	prop.add( termTime );
+	
+	
+              
+    }
+    
+   /**
+    * Returns the EndpointReference associated with this Resource.
+    *
+    * @return The Resource's EndpointReference or null if the EndpointReference has not been set.
+    * 
+    * Note: It is the responsibility of the Resource creator to set the EndpointReference (i.e. ResourceHome impl)
+    */
+    public EndpointReference getEndpointReference()
+    {
+            return m_endpointReference;        
+    }
+    
+   /**
+    * Sets the EndpointReference associated with this Resource.
+    *
+    * @param epr The Resource's EndpointReference.
+    * 
+    * Note: It is the responsibility of the Resource creator to set the EndpointReference (i.e. ResourceHome impl)
+    */
+    public void setEndpointReference(EndpointReference epr)
+    {
+            m_endpointReference = epr;        
+    }
+    
+
+    /**
+     * DOCUMENT_ME
+     *
+     * @param time DOCUMENT_ME
+     */
+    public void setTerminationTime( java.util.Calendar time )
+    {
+        org.apache.ws.resource.properties.XmlBeansResourcePropertyUtils.setDateTimePropertyValue( (org.apache.ws.resource.properties.impl.XmlBeansResourceProperty) getResourcePropertySet().get( org.apache.ws.resource.lifetime.v2004_06.porttype.ScheduledResourceTerminationPortType.PROP_QNAME_TERMINATION_TIME ),
+                time );
+    }
+
+    /**
+     * Returns the current time from the prop set.
+     *
+     * @return java.util.Calendar
+     */
+     public java.util.Calendar getCurrentTime()
+     {
+         return org.apache.ws.resource.properties.XmlBeansResourcePropertyUtils.getDateTimePropertyValue( (org.apache.ws.resource.properties.impl.XmlBeansResourceProperty) m_propSet.get( org.apache.ws.resource.lifetime.v2004_06.porttype.ScheduledResourceTerminationPortType.PROP_QNAME_CURRENT_TIME ) );
+     }
+
+
+    /**
+     * DOCUMENT_ME
+     *
+     * @return DOCUMENT_ME
+     */
+    public java.util.Calendar getTerminationTime()
+    {
+        return org.apache.ws.resource.properties.XmlBeansResourcePropertyUtils.getDateTimePropertyValue( (org.apache.ws.resource.properties.impl.XmlBeansResourceProperty) m_propSet.get( org.apache.ws.resource.lifetime.v2004_06.porttype.ScheduledResourceTerminationPortType.PROP_QNAME_TERMINATION_TIME ) );
+    }
+    /**
+     * @see org.apache.ws.resource.PropertiesResource#setResourcePropertySet(org.apache.ws.resource.properties.ResourcePropertySet)
+     */
+    public void setResourcePropertySet( org.apache.ws.resource.properties.ResourcePropertySet propSet )
+    {
+        m_propSet = propSet;
+    }
+
+    /**
+     * @see org.apache.ws.resource.PropertiesResource#getResourcePropertySet()
+     */
+    public org.apache.ws.resource.properties.ResourcePropertySet getResourcePropertySet()
+    {
+        return m_propSet;
+    }      
+}

Added: incubator/apollo/trunk/src/examples/filesystem/src/java/org/apache/ws/resource/example/filesystem/AbstractFilesystemService.java
URL: http://svn.apache.org/viewcvs/incubator/apollo/trunk/src/examples/filesystem/src/java/org/apache/ws/resource/example/filesystem/AbstractFilesystemService.java?rev=193192&view=auto
==============================================================================
--- incubator/apollo/trunk/src/examples/filesystem/src/java/org/apache/ws/resource/example/filesystem/AbstractFilesystemService.java (added)
+++ incubator/apollo/trunk/src/examples/filesystem/src/java/org/apache/ws/resource/example/filesystem/AbstractFilesystemService.java Thu Jun 23 11:01:15 2005
@@ -0,0 +1,159 @@
+
+package org.apache.ws.resource.example.filesystem;
+
+import org.apache.ws.resource.ResourceContext;
+import org.apache.ws.resource.handler.SoapMethodNameMap;
+import org.apache.ws.resource.handler.WsrfService;
+import org.apache.ws.resource.AbstractPortType;
+import org.apache.ws.resource.handler.ServiceSoapMethodNameMap;
+import javax.xml.namespace.QName;
+
+/**
+ * **** WARNING: This file will be overwritten during generation ****
+ *
+ * This class should be generated on every "generation" against the WSDL.
+ * This will ensure it is always up-to-date with the WSDL.
+ *
+ * NOTE: This class is generated and is NOT meant to be modified.
+ */
+public abstract class AbstractFilesystemService extends AbstractPortType
+    implements org.apache.ws.resource.handler.WsrfService, org.apache.ws.resource.properties.v2004_06.porttype.QueryResourcePropertiesPortType, org.apache.ws.resource.properties.v2004_06.porttype.SetResourcePropertiesPortType, org.apache.ws.resource.properties.v2004_06.porttype.GetMultipleResourcePropertiesPortType, org.apache.ws.resource.lifetime.v2004_06.porttype.ScheduledResourceTerminationPortType, org.apache.ws.resource.properties.v2004_06.porttype.GetResourcePropertyPortType, org.apache.ws.resource.lifetime.v2004_06.porttype.ImmediateResourceTerminationPortType {
+
+   public static final String TARGET_NSURI = "http://ws.apache.org/resource/example/filesystem";
+   public static final String TARGET_NSPREFIX = "filesystem";
+
+   /**
+    * DOCUMENT_ME
+    */
+   private ServiceSoapMethodNameMap m_methodNameMap;
+
+   /**
+    * DOCUMENT_ME
+    */
+   private boolean m_isInitialized;
+
+   public AbstractFilesystemService( ResourceContext resourceContext )
+   {
+      super(resourceContext);
+   }
+
+   /**
+    * DOCUMENT_ME
+    *
+    * @param requestQname DOCUMENT_ME
+    *
+    * @return DOCUMENT_ME
+    */
+   public String getMethodName( QName requestQname )
+   {
+      if ( !m_isInitialized )
+      {
+         init(  );
+      }
+
+      return m_methodNameMap.getMethodName( requestQname );
+   }
+
+ 
+   /**
+    * DOCUMENT_ME
+    *
+    * @return DOCUMENT_ME
+    */
+   public final SoapMethodNameMap getMethodNameMap(  )
+   {
+      return m_methodNameMap;
+   }
+   
+      /**
+       * DOCUMENT_ME
+       */
+   public void init(  )
+   {
+      m_methodNameMap    = new ServiceSoapMethodNameMap( getResourceContext(  ) );
+      m_methodNameMap.addMapping( javax.xml.namespace.QName.valueOf("{http://ws.apache.org/resource/example/filesystem}Unmount") , "Unmount" );
+      m_methodNameMap.addMapping( javax.xml.namespace.QName.valueOf("{http://ws.apache.org/resource/example/filesystem}Mount") , "Mount" );
+      m_isInitialized      = true;
+   }
+   
+   
+      /**
+       * DOCUMENT_ME
+       *
+       * @return DOCUMENT_ME
+       */
+   protected final boolean isInitialized(  )
+   {
+         return m_isInitialized;
+   }
+
+   /**
+    * DOCUMENT_ME
+    *
+    * @param requestDoc DOCUMENT_ME
+    *
+    * @return DOCUMENT_ME
+    */
+   public org.oasisOpen.docs.wsrf.x2004.x06.wsrfWSResourceProperties12Draft01.QueryResourcePropertiesResponseDocument queryResourceProperties( org.oasisOpen.docs.wsrf.x2004.x06.wsrfWSResourceProperties12Draft01.QueryResourcePropertiesDocument requestDoc )
+   {
+      return new org.apache.ws.resource.properties.v2004_06.porttype.impl.QueryResourcePropertiesPortTypeImpl( getResourceContext(  ) ).queryResourceProperties( requestDoc );
+   }
+   /**
+    * DOCUMENT_ME
+    *
+    * @param requestDoc DOCUMENT_ME
+    *
+    * @return DOCUMENT_ME
+    */
+   public org.oasisOpen.docs.wsrf.x2004.x06.wsrfWSResourceProperties12Draft01.SetResourcePropertiesResponseDocument setResourceProperties( org.oasisOpen.docs.wsrf.x2004.x06.wsrfWSResourceProperties12Draft01.SetResourcePropertiesDocument requestDoc )
+   {
+      return new org.apache.ws.resource.properties.v2004_06.porttype.impl.SetResourcePropertiesPortTypeImpl( getResourceContext(  ) ).setResourceProperties( requestDoc );
+   }
+
+   /**
+    * DOCUMENT_ME
+    *
+    * @param requestDoc DOCUMENT_ME
+    *
+    * @return DOCUMENT_ME
+    */
+   public org.oasisOpen.docs.wsrf.x2004.x06.wsrfWSResourceProperties12Draft01.GetMultipleResourcePropertiesResponseDocument getMultipleResourceProperties( org.oasisOpen.docs.wsrf.x2004.x06.wsrfWSResourceProperties12Draft01.GetMultipleResourcePropertiesDocument requestDoc )
+   {
+      return new org.apache.ws.resource.properties.v2004_06.porttype.impl.GetMultipleResourcePropertiesPortTypeImpl( getResourceContext(  ) ).getMultipleResourceProperties( requestDoc );
+   }
+
+   /**
+    * DOCUMENT_ME
+    *
+    * @param requestDoc DOCUMENT_ME
+    *
+    * @return DOCUMENT_ME
+    */
+   public org.oasisOpen.docs.wsrf.x2004.x06.wsrfWSResourceLifetime12Draft01.SetTerminationTimeResponseDocument setTerminationTime( org.oasisOpen.docs.wsrf.x2004.x06.wsrfWSResourceLifetime12Draft01.SetTerminationTimeDocument requestDoc )
+   {
+      return new org.apache.ws.resource.lifetime.v2004_06.porttype.impl.ScheduledResourceTerminationPortTypeImpl( getResourceContext(  ) ).setTerminationTime( requestDoc );
+   }
+   /**
+    * DOCUMENT_ME
+    *
+    * @param requestDoc DOCUMENT_ME
+    *
+    * @return DOCUMENT_ME
+    */
+   public org.oasisOpen.docs.wsrf.x2004.x06.wsrfWSResourceProperties12Draft01.GetResourcePropertyResponseDocument getResourceProperty( org.oasisOpen.docs.wsrf.x2004.x06.wsrfWSResourceProperties12Draft01.GetResourcePropertyDocument requestDoc )
+   {
+      return new org.apache.ws.resource.properties.v2004_06.porttype.impl.GetResourcePropertyPortTypeImpl( getResourceContext(  ) ).getResourceProperty( requestDoc );
+   }
+   /**
+    * DOCUMENT_ME
+    *
+    * @param requestDoc DOCUMENT_ME
+    *
+    * @return DOCUMENT_ME
+    */
+   public org.oasisOpen.docs.wsrf.x2004.x06.wsrfWSResourceLifetime12Draft01.DestroyResponseDocument destroy( org.oasisOpen.docs.wsrf.x2004.x06.wsrfWSResourceLifetime12Draft01.DestroyDocument requestDoc )
+   {
+      return new org.apache.ws.resource.lifetime.v2004_06.porttype.impl.ImmediateResourceTerminationPortTypeImpl( getResourceContext(  ) ).destroy( requestDoc );
+   }
+
+}

Added: incubator/apollo/trunk/src/examples/filesystem/src/java/org/apache/ws/resource/example/filesystem/FilesystemCustomOperationsPortType.java
URL: http://svn.apache.org/viewcvs/incubator/apollo/trunk/src/examples/filesystem/src/java/org/apache/ws/resource/example/filesystem/FilesystemCustomOperationsPortType.java?rev=193192&view=auto
==============================================================================
--- incubator/apollo/trunk/src/examples/filesystem/src/java/org/apache/ws/resource/example/filesystem/FilesystemCustomOperationsPortType.java (added)
+++ incubator/apollo/trunk/src/examples/filesystem/src/java/org/apache/ws/resource/example/filesystem/FilesystemCustomOperationsPortType.java Thu Jun 23 11:01:15 2005
@@ -0,0 +1,18 @@
+
+package org.apache.ws.resource.example.filesystem;
+
+/**
+ * **** WARNING: This file will be overwritten during generation ****
+ *
+ * Custom operations portType.
+ *
+ * NOTE: This class is generated and is NOT meant to be modified.
+ *
+ */
+public interface FilesystemCustomOperationsPortType
+{
+   
+      public org.apache.ws.resource.example.filesystem.UnmountResponseDocument Unmount( org.apache.ws.resource.example.filesystem.UnmountDocument requestDoc ) throws org.apache.ws.resource.example.filesystem.MountDeviceBusyFaultException ;       
+      public org.apache.ws.resource.example.filesystem.MountResponseDocument Mount( org.apache.ws.resource.example.filesystem.MountDocument requestDoc ) throws org.apache.ws.resource.example.filesystem.MountDeviceBusyFaultException ;       
+   
+}

Added: incubator/apollo/trunk/src/examples/filesystem/src/java/org/apache/ws/resource/example/filesystem/FilesystemHome.java
URL: http://svn.apache.org/viewcvs/incubator/apollo/trunk/src/examples/filesystem/src/java/org/apache/ws/resource/example/filesystem/FilesystemHome.java?rev=193192&view=auto
==============================================================================
--- incubator/apollo/trunk/src/examples/filesystem/src/java/org/apache/ws/resource/example/filesystem/FilesystemHome.java (added)
+++ incubator/apollo/trunk/src/examples/filesystem/src/java/org/apache/ws/resource/example/filesystem/FilesystemHome.java Thu Jun 23 11:01:15 2005
@@ -0,0 +1,158 @@
+
+package org.apache.ws.resource.example.filesystem;
+
+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.addressing.EndpointReference;
+
+import javax.xml.namespace.QName;
+
+import java.io.Serializable;
+
+/**
+ * **** NOTE: This file will not be overwritten during generation ****
+ *
+ * Home for Filesystem WS-Resources.
+ */
+public class FilesystemHome
+        extends AbstractResourceHome
+        implements Serializable
+{
+
+    /**  The service endpoint name as registered with the SOAP Platform.  This is useful for building EPR's. **/
+    public static final QName SERVICE_NAME = javax.xml.namespace.QName.valueOf("{http://ws.apache.org/resource/example/filesystem}filesystem");
+
+    /** The management PortType associated with this resource. This is useful for building EPR's.**/
+    public static final QName PORT_TYPE = javax.xml.namespace.QName.valueOf("{http://ws.apache.org/resource/example/filesystem}FileSystemPortType");
+
+    /** The WSDL Port name associated with the resource. This is useful for building EPR's. **/
+    public static final String PORT_NAME = "filesystem";
+
+    /** The name of the resource key for this resource. **/
+    public static final QName RESOURCE_KEY_NAME = javax.xml.namespace.QName.valueOf("{http://ws.apache.org/resource/example/filesystem}ResourceIdentifier");
+
+        /**
+     * A NamespaceVerionHolder which maintains the QNames of Spec Wsdls
+     */
+     public static final org.apache.ws.resource.properties.v2004_06.impl.NamespaceVersionHolderImpl SPEC_NAMESPACE_SET = new org.apache.ws.resource.properties.v2004_06.impl.NamespaceVersionHolderImpl();
+        /** A constant for the JNDI Lookup name for this home. **/
+    public static final String  HOME_LOCATION =
+     org.apache.ws.resource.JndiConstants.CONTEXT_NAME_SERVICES + "/" + SERVICE_NAME.getLocalPart() + "/" + org.apache.ws.resource.JndiConstants.ATOMIC_NAME_HOME;
+
+    /**
+     *
+     * @param resourceContext
+     *
+     * @return A Resource
+     *
+     * @throws ResourceException
+     * @throws ResourceContextException
+     * @throws ResourceUnknownException
+     */
+
+    public Resource getInstance( ResourceContext resourceContext )
+	            throws ResourceException,
+	            ResourceContextException,
+	            ResourceUnknownException
+	    {
+	        ResourceKey key = resourceContext.getResourceKey();
+	        FilesystemResource resource = null;
+	        try
+	        {
+	            resource = (FilesystemResource)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 = (FilesystemResource)createInstance( key);
+	               EndpointReference epr = getEndpointReference(resourceContext.getBaseURL(  ) + "/" + getServiceName().getLocalPart() , key, SPEC_NAMESPACE_SET.getAddressingNamespace());
+	               resource.setEndpointReference(epr);
+	            }
+	            catch ( Exception e )
+	            {
+	               throw new ResourceException( e );
+	            }
+	            add( key, resource );
+	         }
+	         else
+	         {
+	            throw new ResourceUnknownException( id,
+	                  resourceContext.getServiceName() );
+	            }
+	        }
+	        return resource;
+    	}
+
+
+    /**
+    public Resource getInstance( ResourceContext resourceContext )
+            throws ResourceException,
+            ResourceContextException,
+            ResourceUnknownException
+    {
+        ResourceKey key = resourceContext.getResourceKey();
+        Resource resource = null;
+        try
+        {
+            resource = find( key ); //attempt to find from the underlying cache
+        }
+        catch ( ResourceException re )
+        {
+            //TODO add any checking for key validity if you plan to create instances here
+
+            /**
+             * Commented below is an example of creating a resource instance, adding its epr and adding to the cache.
+             * Note: You can set the EndpointReference on your Resource using the setter (not in Resource interface)
+             */
+
+	    /*
+            try
+	    {
+	        FilesystemResource myresource = (FilesystemResource)createInstance(key); //this will create the resource IF it is has default constructor. It also calls init() on the resource.
+		//the next line will create an EPR
+		EndpointReference epr = getEndpointReference(resourceContext.getBaseURL(  ) + "/" + getServiceName().getLocalPart() , key, SPEC_NAMESPACE_SET.getAddressingNamespace());
+		myresource.setEndpointReference(epr); //make sure to set the EPR on your new instance
+		add(key, myresource); //make sure to add your instance to the underlying cache to be found in future requests using find(..)
+	    }
+	    catch (Exception e)
+	    {
+		throw new ResourceException(e);
+	    }
+
+
+        }
+        return resource;
+    }
+    */
+    public QName getServiceName()
+    {
+        return SERVICE_NAME;
+    }
+
+    public QName getPortType()
+    {
+        return PORT_TYPE;
+    }
+
+    public String getServicePortName()
+    {
+        return PORT_NAME;
+    }
+
+    public QName getResourceKeyNameQName()
+    {
+        return RESOURCE_KEY_NAME;
+    }
+}

Added: incubator/apollo/trunk/src/examples/filesystem/src/java/org/apache/ws/resource/example/filesystem/FilesystemPropertyQNames.java
URL: http://svn.apache.org/viewcvs/incubator/apollo/trunk/src/examples/filesystem/src/java/org/apache/ws/resource/example/filesystem/FilesystemPropertyQNames.java?rev=193192&view=auto
==============================================================================
--- incubator/apollo/trunk/src/examples/filesystem/src/java/org/apache/ws/resource/example/filesystem/FilesystemPropertyQNames.java (added)
+++ incubator/apollo/trunk/src/examples/filesystem/src/java/org/apache/ws/resource/example/filesystem/FilesystemPropertyQNames.java Thu Jun 23 11:01:15 2005
@@ -0,0 +1,35 @@
+package org.apache.ws.resource.example.filesystem;
+
+import javax.xml.namespace.QName;
+
+/**
+ * **** WARNING: This file will be overwritten during generation ****
+ *
+ * QNames of the resource properties defined by Filesystem WSDL.
+ * <p/>
+ * NOTE: This class is generated and is NOT meant to be modified.
+ *
+ */
+public interface FilesystemPropertyQNames
+{
+    
+            QName TYPE =
+            new QName( "http://ws.apache.org/resource/example/filesystem", "Type", "tns");        
+            QName OPTIONS =
+            new QName( "http://ws.apache.org/resource/example/filesystem", "Options", "tns");        
+            QName DEVICESPECIALFILE =
+            new QName( "http://ws.apache.org/resource/example/filesystem", "DeviceSpecialFile", "tns");        
+            QName COMMENT =
+            new QName( "http://ws.apache.org/resource/example/filesystem", "Comment", "tns");        
+            QName TERMINATIONTIME =
+            new QName( "http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceLifetime-1.2-draft-01.xsd", "TerminationTime", "wsrl");        
+            QName MOUNTPOINTDIRECTORY =
+            new QName( "http://ws.apache.org/resource/example/filesystem", "MountPointDirectory", "tns");        
+            QName FSCKPASSNUMBER =
+            new QName( "http://ws.apache.org/resource/example/filesystem", "FsckPassNumber", "tns");        
+            QName CURRENTTIME =
+            new QName( "http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceLifetime-1.2-draft-01.xsd", "CurrentTime", "wsrl");        
+            QName BACKUPFREQUENCY =
+            new QName( "http://ws.apache.org/resource/example/filesystem", "BackupFrequency", "tns");        
+    
+}

Added: incubator/apollo/trunk/src/examples/filesystem/src/java/org/apache/ws/resource/example/filesystem/FilesystemResource.java
URL: http://svn.apache.org/viewcvs/incubator/apollo/trunk/src/examples/filesystem/src/java/org/apache/ws/resource/example/filesystem/FilesystemResource.java?rev=193192&view=auto
==============================================================================
--- incubator/apollo/trunk/src/examples/filesystem/src/java/org/apache/ws/resource/example/filesystem/FilesystemResource.java (added)
+++ incubator/apollo/trunk/src/examples/filesystem/src/java/org/apache/ws/resource/example/filesystem/FilesystemResource.java Thu Jun 23 11:01:15 2005
@@ -0,0 +1,108 @@
+
+package org.apache.ws.resource.example.filesystem;
+
+/**
+ * **** NOTE: This file will not be overwritten during generation ****
+ *
+ * A Filesystem WS-Resource.
+ * <p/>
+ * NOTE: This class is generated but IS meant to be modified.
+ */
+public class FilesystemResource extends AbstractFilesystemResource
+
+{
+
+        /**
+     * A NamespaceVerionHolder which maintains the QNames of Spec Wsdls
+     */
+    public static final org.apache.ws.resource.properties.v2004_06.impl.NamespaceVersionHolderImpl SPEC_NAMESPACE_SET = new org.apache.ws.resource.properties.v2004_06.impl.NamespaceVersionHolderImpl();
+
+    /**
+     * Initializes this resource's state (properties, etc.).
+     */
+   public void init()
+       {
+
+           super.init();
+
+           /**
+   		 * The ResourcePropertySet which contains all the defined ResourceProperties
+   		 */
+   		org.apache.ws.resource.properties.ResourcePropertySet resourcePropertySet = getResourcePropertySet();
+   		org.apache.ws.resource.properties.ResourceProperty resourceProperty = null;
+
+
+   	try{
+
+
+           /*
+            * This is where you should associate the backend instance with
+            * the resource instance for a given id.
+            */
+           example.filesystem.backend.FileSystem m_fileSystem = new example.filesystem.backend.UnixFileSystem( m_id );
+
+           /*
+            * Initialize each of our properties by calling resourceProperty.add(propElem) and/or resourceProperty.setCallback(callback)...
+            */
+           resourceProperty = resourcePropertySet.get( FilesystemPropertyQNames.DEVICESPECIALFILE );
+           DeviceSpecialFileDocument deviceDocXBean = DeviceSpecialFileDocument.Factory.newInstance();
+           deviceDocXBean.setDeviceSpecialFile( m_fileSystem.getDeviceSpecialFile() );
+           resourceProperty.add( deviceDocXBean );
+
+           resourceProperty = resourcePropertySet.get( FilesystemPropertyQNames.TYPE );
+           TypeDocument typeDocXBean = TypeDocument.Factory.newInstance();
+           typeDocXBean.setType( m_fileSystem.getType() );
+           resourceProperty.add( typeDocXBean );
+
+           BackupFrequencyDocument backupDocXBean = BackupFrequencyDocument.Factory.newInstance();
+           backupDocXBean.setBackupFrequency( m_fileSystem.getBackupFrequency() );
+           resourceProperty = resourcePropertySet.get( FilesystemPropertyQNames.BACKUPFREQUENCY );
+           resourceProperty.add( backupDocXBean );
+           resourceProperty.setCallback( new example.filesystem.callback.BackupFrequencyCallback( m_fileSystem ) );
+
+           CommentDocument commentDocXBean = CommentDocument.Factory.newInstance();
+           commentDocXBean.setComment( m_fileSystem.getComment() );
+           resourceProperty = resourcePropertySet.get( FilesystemPropertyQNames.COMMENT );
+           resourceProperty.add( commentDocXBean );
+           resourceProperty.setCallback( new example.filesystem.callback.CommentCallback( m_fileSystem ) );
+
+           FsckPassNumberDocument fsckDocXBean = FsckPassNumberDocument.Factory.newInstance();
+           fsckDocXBean.setFsckPassNumber( m_fileSystem.getFsckPassNumber() );
+           resourceProperty = resourcePropertySet.get( FilesystemPropertyQNames.FSCKPASSNUMBER );
+           resourceProperty.add( fsckDocXBean );
+           resourceProperty.setCallback( new example.filesystem.callback.FsckPassNumberCallback( m_fileSystem ) );
+
+           MountPointDirectoryDocument mountPointDocXBean = MountPointDirectoryDocument.Factory.newInstance();
+           mountPointDocXBean.setMountPointDirectory( m_fileSystem.getMountPoint() );
+           resourceProperty = resourcePropertySet.get( FilesystemPropertyQNames.MOUNTPOINTDIRECTORY );
+           resourceProperty.add( mountPointDocXBean );
+           resourceProperty.setCallback( new example.filesystem.callback.MountPointCallback( m_fileSystem ) );
+
+           OptionsDocument optionsDocXBean =
+                   OptionsDocument.Factory.newInstance();
+           org.apache.ws.resource.example.filesystem.OptionsDocument.Options options =
+                   optionsDocXBean.addNewOptions();
+           java.util.List backendOptions =
+                   m_fileSystem.getOptions();
+           for ( int i = 0; i < backendOptions.size(); i++ )
+           {
+               options.addOption( (String) backendOptions.get( i ) );
+           }
+
+           resourceProperty = resourcePropertySet.get( FilesystemPropertyQNames.OPTIONS );
+           resourceProperty.add( optionsDocXBean );
+           resourceProperty.setCallback( new example.filesystem.callback.OptionsCallback( m_fileSystem ) );
+
+
+   		}
+   	catch (Exception e)
+   	{
+   	   throw new javax.xml.rpc.JAXRPCException("There was a problem in initializing your resource properties.  Please check your init() method. Cause: " + e.getLocalizedMessage());
+   	}
+   		// Resource Property {http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceLifetime-1.2-draft-01.xsd}TerminationTime is implemented by the framework.
+   		// Resource Property {http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceLifetime-1.2-draft-01.xsd}CurrentTime is implemented by the framework.
+
+
+
+    }
+}

Added: incubator/apollo/trunk/src/examples/filesystem/src/java/org/apache/ws/resource/example/filesystem/FilesystemService.java
URL: http://svn.apache.org/viewcvs/incubator/apollo/trunk/src/examples/filesystem/src/java/org/apache/ws/resource/example/filesystem/FilesystemService.java?rev=193192&view=auto
==============================================================================
--- incubator/apollo/trunk/src/examples/filesystem/src/java/org/apache/ws/resource/example/filesystem/FilesystemService.java (added)
+++ incubator/apollo/trunk/src/examples/filesystem/src/java/org/apache/ws/resource/example/filesystem/FilesystemService.java Thu Jun 23 11:01:15 2005
@@ -0,0 +1,75 @@
+package org.apache.ws.resource.example.filesystem;
+
+import org.apache.ws.resource.ResourceContext;
+import org.apache.xmlbeans.XmlObject;
+import org.apache.xmlbeans.XmlException;
+
+import javax.xml.rpc.JAXRPCException;
+
+/**
+ * **** NOTE: This file will not be overwritten during generation ****
+ *
+ * This class should be generated ONCE (and not overwritten) to maintain user-added code.
+ * If there is a change to the WSDL, then the generated implemented interfaces
+ * (representing the "base" portTypes) will change, thus showing a compile error to the
+ * user.
+ *
+ * NOTE: This class is generated. However, it will not be overwritten by subsequent
+ *       calls to the code generator.
+ *
+ */
+public class FilesystemService
+   extends AbstractFilesystemService 
+   implements FilesystemCustomOperationsPortType
+{
+   
+      
+   /**
+    * A NamespaceVerionHolder which maintains the QNames of Spec Wsdls
+    */
+   public static final org.apache.ws.resource.properties.v2004_06.impl.NamespaceVersionHolderImpl SPEC_NAMESPACE_SET = new org.apache.ws.resource.properties.v2004_06.impl.NamespaceVersionHolderImpl();
+    
+   /**
+    * Creates a new {@link FilesystemService } object.
+    *
+    * @param resourceContext DOCUMENT_ME
+    */
+   public FilesystemService( ResourceContext resourceContext )
+   {
+      super(resourceContext);
+      init();
+   }
+   
+      /**
+    * Returns a collection of Spec Namespaces associated with this Service
+    *
+    * @return A NamespaceVersionHolder impl which represents the collection of spec namespaces 
+    *         associated with this service.
+    */
+   protected org.apache.ws.resource.properties.NamespaceVersionHolder getNamespaceSet()
+   {
+      return SPEC_NAMESPACE_SET;
+   }
+   
+      
+   public org.apache.ws.resource.example.filesystem.UnmountResponseDocument Unmount( org.apache.ws.resource.example.filesystem.UnmountDocument requestDoc ) throws org.apache.ws.resource.example.filesystem.MountDeviceBusyFaultException
+   {              
+     	org.apache.ws.resource.example.filesystem.UnmountResponseDocument responseDocument = org.apache.ws.resource.example.filesystem.UnmountResponseDocument.Factory.newInstance();	
+     	org.apache.ws.resource.example.filesystem.UnmountResponseDocument.UnmountResponse  response = responseDocument.addNewUnmountResponse();
+     	//TODO implement method and populate the response object 
+     	return responseDocument;
+   }
+   
+   
+      
+   public org.apache.ws.resource.example.filesystem.MountResponseDocument Mount( org.apache.ws.resource.example.filesystem.MountDocument requestDoc ) throws org.apache.ws.resource.example.filesystem.MountDeviceBusyFaultException
+   {              
+     	org.apache.ws.resource.example.filesystem.MountResponseDocument responseDocument = org.apache.ws.resource.example.filesystem.MountResponseDocument.Factory.newInstance();	
+     	org.apache.ws.resource.example.filesystem.MountResponseDocument.MountResponse  response = responseDocument.addNewMountResponse();
+     	//TODO implement method and populate the response object 
+     	return responseDocument;
+   }
+   
+   
+      
+}