You are viewing a plain text version of this content. The canonical link for it is here.
Posted to muse-dev@ws.apache.org by jr...@apache.org on 2005/07/21 23:58:58 UTC

svn commit: r220193 - in /webservices/muse/trunk/src/examples/filesystem: ./ requests/ src/ src/java/ src/java/example/ src/java/example/filesystem/ src/java/example/filesystem/backend/ src/java/example/filesystem/callback/ src/wsdl/

Author: jruzzi
Date: Thu Jul 21 14:58:56 2005
New Revision: 220193

URL: http://svn.apache.org/viewcvs?rev=220193&view=rev
Log:
new example for tutorial

Added:
    webservices/muse/trunk/src/examples/filesystem/requests/
    webservices/muse/trunk/src/examples/filesystem/soapclient.xml
    webservices/muse/trunk/src/examples/filesystem/src/
    webservices/muse/trunk/src/examples/filesystem/src/java/
    webservices/muse/trunk/src/examples/filesystem/src/java/example/
    webservices/muse/trunk/src/examples/filesystem/src/java/example/filesystem/
    webservices/muse/trunk/src/examples/filesystem/src/java/example/filesystem/backend/
    webservices/muse/trunk/src/examples/filesystem/src/java/example/filesystem/backend/FileSystem.java
    webservices/muse/trunk/src/examples/filesystem/src/java/example/filesystem/backend/UnixFileSystem.java
    webservices/muse/trunk/src/examples/filesystem/src/java/example/filesystem/callback/
    webservices/muse/trunk/src/examples/filesystem/src/java/example/filesystem/callback/BackupFrequencyCallback.java
    webservices/muse/trunk/src/examples/filesystem/src/java/example/filesystem/callback/CommentCallback.java
    webservices/muse/trunk/src/examples/filesystem/src/java/example/filesystem/callback/FsckPassNumberCallback.java
    webservices/muse/trunk/src/examples/filesystem/src/java/example/filesystem/callback/MountPointCallback.java
    webservices/muse/trunk/src/examples/filesystem/src/java/example/filesystem/callback/OptionsCallback.java
    webservices/muse/trunk/src/examples/filesystem/src/wsdl/
    webservices/muse/trunk/src/examples/filesystem/src/wsdl/FileSystem.wsdl

Added: webservices/muse/trunk/src/examples/filesystem/soapclient.xml
URL: http://svn.apache.org/viewcvs/webservices/muse/trunk/src/examples/filesystem/soapclient.xml?rev=220193&view=auto
==============================================================================
--- webservices/muse/trunk/src/examples/filesystem/soapclient.xml (added)
+++ webservices/muse/trunk/src/examples/filesystem/soapclient.xml Thu Jul 21 14:58:56 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="wsrf.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="wsrf.classpath" refid="wsrf.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="${wsrf.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: webservices/muse/trunk/src/examples/filesystem/src/java/example/filesystem/backend/FileSystem.java
URL: http://svn.apache.org/viewcvs/webservices/muse/trunk/src/examples/filesystem/src/java/example/filesystem/backend/FileSystem.java?rev=220193&view=auto
==============================================================================
--- webservices/muse/trunk/src/examples/filesystem/src/java/example/filesystem/backend/FileSystem.java (added)
+++ webservices/muse/trunk/src/examples/filesystem/src/java/example/filesystem/backend/FileSystem.java Thu Jul 21 14:58:56 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: webservices/muse/trunk/src/examples/filesystem/src/java/example/filesystem/backend/UnixFileSystem.java
URL: http://svn.apache.org/viewcvs/webservices/muse/trunk/src/examples/filesystem/src/java/example/filesystem/backend/UnixFileSystem.java?rev=220193&view=auto
==============================================================================
--- webservices/muse/trunk/src/examples/filesystem/src/java/example/filesystem/backend/UnixFileSystem.java (added)
+++ webservices/muse/trunk/src/examples/filesystem/src/java/example/filesystem/backend/UnixFileSystem.java Thu Jul 21 14:58:56 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: webservices/muse/trunk/src/examples/filesystem/src/java/example/filesystem/callback/BackupFrequencyCallback.java
URL: http://svn.apache.org/viewcvs/webservices/muse/trunk/src/examples/filesystem/src/java/example/filesystem/callback/BackupFrequencyCallback.java?rev=220193&view=auto
==============================================================================
--- webservices/muse/trunk/src/examples/filesystem/src/java/example/filesystem/callback/BackupFrequencyCallback.java (added)
+++ webservices/muse/trunk/src/examples/filesystem/src/java/example/filesystem/callback/BackupFrequencyCallback.java Thu Jul 21 14:58:56 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: webservices/muse/trunk/src/examples/filesystem/src/java/example/filesystem/callback/CommentCallback.java
URL: http://svn.apache.org/viewcvs/webservices/muse/trunk/src/examples/filesystem/src/java/example/filesystem/callback/CommentCallback.java?rev=220193&view=auto
==============================================================================
--- webservices/muse/trunk/src/examples/filesystem/src/java/example/filesystem/callback/CommentCallback.java (added)
+++ webservices/muse/trunk/src/examples/filesystem/src/java/example/filesystem/callback/CommentCallback.java Thu Jul 21 14:58:56 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: webservices/muse/trunk/src/examples/filesystem/src/java/example/filesystem/callback/FsckPassNumberCallback.java
URL: http://svn.apache.org/viewcvs/webservices/muse/trunk/src/examples/filesystem/src/java/example/filesystem/callback/FsckPassNumberCallback.java?rev=220193&view=auto
==============================================================================
--- webservices/muse/trunk/src/examples/filesystem/src/java/example/filesystem/callback/FsckPassNumberCallback.java (added)
+++ webservices/muse/trunk/src/examples/filesystem/src/java/example/filesystem/callback/FsckPassNumberCallback.java Thu Jul 21 14:58:56 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: webservices/muse/trunk/src/examples/filesystem/src/java/example/filesystem/callback/MountPointCallback.java
URL: http://svn.apache.org/viewcvs/webservices/muse/trunk/src/examples/filesystem/src/java/example/filesystem/callback/MountPointCallback.java?rev=220193&view=auto
==============================================================================
--- webservices/muse/trunk/src/examples/filesystem/src/java/example/filesystem/callback/MountPointCallback.java (added)
+++ webservices/muse/trunk/src/examples/filesystem/src/java/example/filesystem/callback/MountPointCallback.java Thu Jul 21 14:58:56 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: webservices/muse/trunk/src/examples/filesystem/src/java/example/filesystem/callback/OptionsCallback.java
URL: http://svn.apache.org/viewcvs/webservices/muse/trunk/src/examples/filesystem/src/java/example/filesystem/callback/OptionsCallback.java?rev=220193&view=auto
==============================================================================
--- webservices/muse/trunk/src/examples/filesystem/src/java/example/filesystem/callback/OptionsCallback.java (added)
+++ webservices/muse/trunk/src/examples/filesystem/src/java/example/filesystem/callback/OptionsCallback.java Thu Jul 21 14:58:56 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: webservices/muse/trunk/src/examples/filesystem/src/wsdl/FileSystem.wsdl
URL: http://svn.apache.org/viewcvs/webservices/muse/trunk/src/examples/filesystem/src/wsdl/FileSystem.wsdl?rev=220193&view=auto
==============================================================================
--- webservices/muse/trunk/src/examples/filesystem/src/wsdl/FileSystem.wsdl (added)
+++ webservices/muse/trunk/src/examples/filesystem/src/wsdl/FileSystem.wsdl Thu Jul 21 14:58:56 2005
@@ -0,0 +1,524 @@
+<?xml version="1.0"?>
+
+<definitions name="FileSystemResourceDefinition"
+             targetNamespace="http://ws.apache.org/resource/example/filesystem"
+             xmlns="http://schemas.xmlsoap.org/wsdl/"
+             xmlns:tns="http://ws.apache.org/resource/example/filesystem"
+             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"
+             xmlns:wsrlw="http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceLifetime-1.2-draft-01.wsdl"
+             xmlns:wsntw="http://docs.oasis-open.org/wsn/2004/06/wsn-WS-BaseNotification-1.2-draft-01.wsdl"
+             xmlns:muws-p2-wsdl="http://docs.oasis-open.org/wsdm/2004/12/muws/wsdm-muws-part2.wsdl"
+             xmlns:mex="http://schemas.xmlsoap.org/ws/2004/09/mex"
+             xmlns:wsa04="http://schemas.xmlsoap.org/ws/2004/08/addressing">
+
+   <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-Draft_01.wsdl"/>
+
+   <import namespace="http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceLifetime-1.2-draft-01.wsdl"
+           location="../spec/wsrf/WS-ResourceLifetime-1_2-Draft_01.wsdl"/>
+
+   <import namespace="http://docs.oasis-open.org/wsn/2004/06/wsn-WS-BaseNotification-1.2-draft-01.wsdl" 
+           location="../spec/wsn/WS-BaseNotification-1_2-Draft_01.wsdl"/>
+
+   <import namespace="http://docs.oasis-open.org/wsdm/2004/12/muws/wsdm-muws-part2.wsdl" 
+           location="../spec/wsdm/MUWS-Part2-1_0.wsdl"/>
+
+   <types>
+      <schema elementFormDefault="qualified"
+              targetNamespace="http://ws.apache.org/resource/example/filesystem"
+              xmlns="http://www.w3.org/2001/XMLSchema"
+              xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+              xmlns:wsrl="http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceLifetime-1.2-draft-01.xsd"
+              xmlns:wsbf="http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-BaseFaults-1.2-draft-01.xsd"
+              xmlns:wsnt="http://docs.oasis-open.org/wsn/2004/06/wsn-WS-BaseNotification-1.2-draft-01.xsd"
+              xmlns:muws-p1-xs="http://docs.oasis-open.org/wsdm/2004/12/muws/wsdm-muws-part1.xsd"
+              xmlns:muws-p2-xs="http://docs.oasis-open.org/wsdm/2004/12/muws/wsdm-muws-part2.xsd">
+
+         <xsd:import namespace="http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-BaseFaults-1.2-draft-01.xsd"
+                     schemaLocation="../spec/wsrf/WS-BaseFaults-1_2-Draft_01.xsd"/>
+
+         <xsd:import namespace="http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceLifetime-1.2-draft-01.xsd"
+                     schemaLocation="../spec/wsrf/WS-ResourceLifetime-1_2.xsd"/>
+ 
+         <xsd:import namespace="http://docs.oasis-open.org/wsn/2004/06/wsn-WS-BaseNotification-1.2-draft-01.xsd" 
+                     schemaLocation="../spec/wsn/WS-BaseNotification-1_2-Draft_01.xsd"/>
+
+         <xsd:import namespace="http://docs.oasis-open.org/wsdm/2004/12/muws/wsdm-muws-part1.xsd" 
+                     schemaLocation="../spec/wsdm/MUWS-Part1-1_0.xsd"/>
+
+         <xsd:import namespace="http://docs.oasis-open.org/wsdm/2004/12/muws/wsdm-muws-part2.xsd" 
+                     schemaLocation="../spec/wsdm/MUWS-Part2-1_0.xsd"/>
+
+         <element name="DeviceSpecialFile" type="xsd:string"/>
+	 <element name="MountPointDirectory" type="xsd:string"/>
+	 <element name="Type" type="xsd:string"/>
+	 <element name="Options">
+	    <complexType>
+	       <sequence>
+	          <element name="Option" type="xsd:string" minOccurs="0" maxOccurs="unbounded"/>
+	       </sequence>
+	    </complexType>
+	 </element>
+	 <element name="BackupFrequency" type="xsd:int"/>
+	 <element name="FsckPassNumber" type="xsd:int"/>
+         <element name="Comment" type="xsd:string"/>
+         
+         <!-- Resource Properties Document Schema -->
+         
+         <element name="FileSystemProperties">
+            <complexType>
+               <sequence>
+               
+                  <!-- props for wsrl:ScheduledResourceTermination portType -->
+                  
+                  <element ref="wsrl:CurrentTime" />
+                  <element ref="wsrl:TerminationTime" />
+                 
+
+                  <!-- props for wsnt:NotificationProducer portType -->
+                  
+                  <element ref="wsnt:Topic" maxOccurs="unbounded" /> 
+                  <element ref="wsnt:FixedTopicSet" /> 
+                  <element ref="wsnt:TopicExpressionDialects" maxOccurs="unbounded" /> 
+                  
+                  <!-- props for tns:FileSystemPortType portType -->
+                  
+		  <element ref="tns:DeviceSpecialFile"/>
+		  <element ref="tns:MountPointDirectory"/>
+		  <element ref="tns:Type"/>
+		  <element ref="tns:Options"/>
+		  <element ref="tns:BackupFrequency"/>
+		  <element ref="tns:FsckPassNumber"/>
+                  <element ref="tns:Comment" minOccurs="0"/>
+                  
+                  
+                  <!-- props for MUWS  -->
+                  
+		  <element ref="muws-p1-xs:ResourceId"/>
+		  <element ref="muws-p1-xs:ManageabilityCapability" minOccurs="0" maxOccurs="unbounded"/>
+		  <element ref="muws-p2-xs:OperationalStatus"/>
+                  <element ref="muws-p2-xs:Relationship" minOccurs="0" maxOccurs="unbounded"/>
+                  		  		  			
+               </sequence>
+            </complexType>
+         </element>
+
+         <!-- message types for custom operations -->
+         
+         <element name="Mount">
+	    <complexType />
+	 </element>
+	 
+	 <element name="MountResponse">
+	    <complexType />
+	 </element>
+	 
+	 <element name="Unmount">
+	    <complexType />
+	 </element>
+	 
+	 <element name="UnmountResponse">
+	    <complexType />
+	 </element>
+	          
+	 <element name="MountDeviceBusyFault">
+	    <complexType>
+	 	<complexContent>
+	 	    <extension base="wsbf:BaseFaultType" />
+	 	</complexContent>
+	    </complexType>
+         </element>
+      </schema>
+   </types>
+
+   <!-- message definitions for custom operations --> 
+   
+   <message name="MountRequest">
+      <part name="MountRequest" element="tns:Mount"/>
+   </message>
+   
+   <message name="MountResponse">
+      <part name="MountResponse" element="tns:MountResponse"/>
+   </message>
+   
+   <message name="UnmountRequest">
+      <part name="UnmountRequest" element="tns:Unmount"/>
+   </message>
+   
+   <message name="UnmountResponse">
+      <part name="UnmountResponse" element="tns:UnmountResponse"/>
+   </message>
+   
+   <message name="MountDeviceBusyFault">
+      <part name="MountDeviceBusyFault" element="tns:MountDeviceBusyFault"/>
+   </message>
+   
+   <portType name="FileSystemPortType" wsrp:ResourceProperties="tns:FileSystemProperties">
+         
+      <!-- wsrpw:* 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="SetResourceProperties">
+         <input name="SetResourcePropertiesRequest" message="wsrpw:SetResourcePropertiesRequest"/>
+         <output name="SetResourcePropertiesResponse" message="wsrpw:SetResourcePropertiesResponse"/>
+         <fault name="ResourceUnknownFault" message="wsrpw:ResourceUnknownFault"/>
+         <fault name="InvalidResourcePropertyQNameFault" message="wsrpw:InvalidResourcePropertyQNameFault"/>
+         <fault name="InvalidSetResourcePropertiesRequestContentFault" message="wsrpw:InvalidSetResourcePropertiesRequestContentFault"/>
+         <fault name="UnableToModifyResourcePropertyFault" message="wsrpw:UnableToModifyResourcePropertyFault"/>
+         <fault name="SetResourcePropertyRequestFailedFault" message="wsrpw:SetResourcePropertyRequestFailedFault"/>
+      </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>
+     
+
+      <!-- wsrlw:ImmediateResourceTermination operation -->
+      
+      <operation name="Destroy">
+         <input message="wsrlw:DestroyRequest"/>
+         <output message="wsrlw:DestroyResponse"/>
+         <fault name="ResourceUnknownFault" message="wsrlw:ResourceUnknownFault"/>
+         <fault name="ResourceNotDestroyedFault" message="wsrlw:ResourceNotDestroyedFault"/>
+      </operation>
+      
+
+      <!-- wsrlw:ScheduledResourceTermination operation -->
+      
+      <operation name="SetTerminationTime">
+         <input message="wsrlw:SetTerminationTimeRequest"/>
+         <output message="wsrlw:SetTerminationTimeResponse"/>
+         <fault name="ResourceUnknownFault" message="wsrlw:ResourceUnknownFault"/>
+         <fault name="UnableToSetTerminationTimeFault" message="wsrlw:UnableToSetTerminationTimeFault"/>
+         <fault name="TerminationTimeChangeRejectedFault" message="wsrlw:TerminationTimeChangeRejectedFault"/>
+      </operation>
+      
+      
+      <!-- wsntw:NotificationProducer operations -->
+            
+      <operation name="Subscribe">
+         <input message="wsntw:SubscribeRequest" /> 
+         <output message="wsntw:SubscribeResponse" /> 
+         <fault name="ResourceUnknownFault" message="wsntw:ResourceUnknownFault" /> 
+         <fault name="SubscribeCreationFailedFault" message="wsntw:SubscribeCreationFailedFault" /> 
+         <fault name="TopicPathDialectUnknownFault" message="wsntw:TopicPathDialectUnknownFault" /> 
+      </operation>
+      
+      <operation name="GetCurrentMessage">
+         <input message="wsntw:GetCurrentMessageRequest" /> 
+         <output message="wsntw:GetCurrentMessageResponse" /> 
+         <fault name="ResourceUnknownFault" message="wsntw:ResourceUnknownFault" /> 
+         <fault name="InvalidTopicExpressionFault" message="wsntw:InvalidTopicExpressionFault" /> 
+         <fault name="TopicNotSupportedFault" message="wsntw:TopicNotSupportedFault" /> 
+         <fault name="NoCurrentMessageOnTopicFault" message="wsntw:NoCurrentMessageOnTopicFault" /> 
+      </operation>       
+       
+      
+      <!-- muws-p2-wsdl:Relationships operation -->
+                  
+      <operation name="QueryRelationshipsByType">
+         <input message="muws-p2-wsdl:QueryRelationshipsByTypeRequest"/>
+         <output message="muws-p2-wsdl:QueryRelationshipsByTypeResponse"/>         
+      </operation>      
+      
+
+      <!-- mex:MetadataExchange operations block -->
+      
+      <operation name="GetMetadata" >
+         <input message="mex:GetMetadataMsg"
+                wsa04:Action="http://schemas.xmlsoap.org/ws/2004/09/mex/GetMetadata/Request" />
+         <output message="mex:GetMetadataResponseMsg"
+                wsa04:Action="http://schemas.xmlsoap.org/ws/2004/09/mex/GetMetadata/Response" />
+      </operation>
+      <operation name="Get" >
+         <input message="mex:GetMsg"
+                wsa04:Action="http://schemas.xmlsoap.org/ws/2004/09/mex/Get/Request" />
+         <output message="mex:GetResponseMsg"
+                wsa04:Action="http://schemas.xmlsoap.org/ws/2004/09/mex/Get/Response" />
+      </operation>
+      
+      
+      <!-- custom operations --> 
+      
+      <operation name="Mount">
+         <input  name="MountRequest"         message="tns:MountRequest" />
+         <output name="MountResponse"        message="tns:MountResponse" />
+         <fault  name="MountDeviceBusyFault" message="tns:MountDeviceBusyFault" />
+      </operation>      
+      
+      <operation name="Unmount">
+         <input  name="UnmountRequest"       message="tns:UnmountRequest" />
+         <output name="UnmountResponse"      message="tns:UnmountResponse" />
+         <fault  name="MountDeviceBusyFault" message="tns:MountDeviceBusyFault" />
+      </operation>
+
+   </portType>
+
+   <binding name="FileSystemSoapHttpBinding" type="tns:FileSystemPortType">
+
+      <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
+   
+      <!-- wsrpw:* 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="SetResourceProperties">
+         <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="UnableToModifyResourcePropertyFault">
+            <soap:fault name="UnableToModifyResourcePropertyFault" use="literal"/>
+         </fault>
+         <fault name="InvalidSetResourcePropertiesRequestContentFault">
+            <soap:fault name="InvalidSetResourcePropertiesRequestContentFault" use="literal"/>
+         </fault>
+         <fault name="SetResourcePropertyRequestFailedFault">
+            <soap:fault name="SetResourcePropertyRequestFailedFault" 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>
+      
+      
+      <!-- wsrlw:ImmediateResourceTermination operation -->
+           
+      <operation name="Destroy">
+         <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="ResourceNotDestroyedFault">
+            <soap:fault name="ResourceNotDestroyedFault" use="literal"/>
+         </fault>
+      </operation>            
+      
+    
+      <!-- wsrlw:ScheduledResourceTermination operation -->
+                
+      <operation name="SetTerminationTime">
+         <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="UnableToSetTerminationTimeFault">
+            <soap:fault name="UnableToSetTerminationTimeFault" use="literal"/>
+         </fault>
+         <fault name="TerminationTimeChangeRejectedFault">
+            <soap:fault name="TerminationTimeChangeRejectedFault" use="literal"/>
+         </fault>
+      </operation>
+      
+
+      <!-- wsntw:NotificationProducer operations -->
+                     
+      <operation name="Subscribe">
+         <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="SubscribeCreationFailedFault">
+            <soap:fault name="SubscribeCreationFailedFault" use="literal"/>
+         </fault>
+         <fault name="TopicPathDialectUnknownFault">
+            <soap:fault name="TopicPathDialectUnknownFault" use="literal"/>
+         </fault>         
+      </operation>            
+      <operation name="GetCurrentMessage">
+         <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="InvalidTopicExpressionFault">
+            <soap:fault name="InvalidTopicExpressionFault" use="literal"/>
+         </fault>
+         <fault name="TopicNotSupportedFault">
+            <soap:fault name="TopicPathDialectUnknownFault" use="literal"/>
+         </fault>         
+         <fault name="NoCurrentMessageOnTopicFault">
+            <soap:fault name="NoCurrentMessageOnTopicFault" use="literal"/>
+         </fault>         
+      </operation>             
+
+      <!-- muws-p2-wsdl:Relationships operation -->
+           
+      <operation name="QueryRelationshipsByType">
+         <soap:operation style="document"/>
+         <input>
+            <soap:body use="literal"/>
+         </input>
+         <output>
+            <soap:body use="literal"/>
+         </output>
+      </operation>            
+     
+      
+      <!--  mex:MetadataExchange operations -->
+      
+      <operation name="GetMetadata" >
+      	 <soap:operation style="document"/>
+         <input>
+            <soap:body use="literal"/>
+         </input>
+         <output>
+            <soap:body use="literal"/>
+         </output>
+      </operation>
+      <operation name="Get" >
+      	 <soap:operation style="document"/>
+         <input>
+            <soap:body use="literal"/>
+         </input>
+         <output>
+            <soap:body use="literal"/>
+         </output>
+      </operation>
+            
+      
+      <!-- *** custom operations *** -->
+      
+      <operation name="Mount">
+         <soap:operation style="document"/>
+         <input>
+            <soap:body use="literal"/>
+         </input>
+         <output>
+            <soap:body use="literal"/>
+         </output>
+         <fault name="MountDeviceBusyFault">
+            <soap:fault name="MountDeviceBusyFault" use="literal"/>
+         </fault>
+      </operation>
+      
+      <operation name="Unmount">
+         <soap:operation style="document"/>
+         <input>
+            <soap:body use="literal"/>
+         </input>
+         <output>
+            <soap:body use="literal"/>
+         </output>
+         <fault name="MountDeviceBusyFault">
+            <soap:fault name="MountDeviceBusyFault" use="literal"/>
+         </fault>
+      </operation>
+      
+   </binding>
+
+   <service name="FileSystemService">
+      <!-- Note: the port name becomes the service name in the wsdd generated by Wsdl2Java -->
+      <!-- *** Change the port name and the soap:address location below to reflect the desired endpoint URL *** -->
+      <port name="filesystem" binding="tns:FileSystemSoapHttpBinding">
+         <soap:address location="http://localhost:8080/muse/services/filesystem" />
+      </port>
+   </service>
+
+</definitions>



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