You are viewing a plain text version of this content. The canonical link for it is here.
Posted to pubscribe-dev@ws.apache.org by sc...@apache.org on 2005/03/18 18:07:50 UTC

svn commit: r158104 - in incubator/hermes/trunk: ./ src/java/org/apache/ws/eventing/ src/java/org/apache/ws/notification/base/ src/java/org/apache/ws/notification/base/impl/ src/java/org/apache/ws/notification/base/v1_2/impl/ src/java/org/apache/ws/notification/tool/ src/java/org/apache/ws/notification/tool/v1_2/ src/java/org/apache/ws/notification/topics/impl/ src/java/org/apache/ws/notification/topics/util/ src/site/content/tutorial/ src/templates/ src/test/org/apache/ws/notification/topics/ wsn-xbeans/src/wsdl/wsn/

Author: scamp
Date: Fri Mar 18 09:07:45 2005
New Revision: 158104

URL: http://svn.apache.org/viewcvs?view=rev&rev=158104
Log:
updated for resourceterminitation changes and templating

Added:
    incubator/hermes/trunk/changing versions.txt
    incubator/hermes/trunk/src/java/org/apache/ws/notification/base/WsnNamespaceVersionHolder.java
    incubator/hermes/trunk/src/java/org/apache/ws/notification/base/v1_2/impl/WsnNamespaceVersionHolderImpl.java
    incubator/hermes/trunk/src/java/org/apache/ws/notification/topics/impl/ResourceTerminationTopicImpl.java
    incubator/hermes/trunk/wsn-xbeans/src/wsdl/wsn/WS-BaseNotification-1_2-Draft_01.wsdl
    incubator/hermes/trunk/wsn-xbeans/src/wsdl/wsn/WS-BaseNotification-1_2-Draft_01.xsd
Removed:
    incubator/hermes/trunk/wsn-xbeans/src/wsdl/wsn/WS-BaseNotification-1_2.wsdl
    incubator/hermes/trunk/wsn-xbeans/src/wsdl/wsn/WS-BaseNotification-1_2.xsd
Modified:
    incubator/hermes/trunk/project.xml
    incubator/hermes/trunk/src/java/org/apache/ws/eventing/AbstractSubscription.java
    incubator/hermes/trunk/src/java/org/apache/ws/eventing/RemoteSubscription.java
    incubator/hermes/trunk/src/java/org/apache/ws/notification/base/impl/AbstractSubscription.java
    incubator/hermes/trunk/src/java/org/apache/ws/notification/base/v1_2/impl/Subscription1_2Resource.java
    incubator/hermes/trunk/src/java/org/apache/ws/notification/tool/WsnWsdl2Java.java
    incubator/hermes/trunk/src/java/org/apache/ws/notification/tool/v1_2/NotificationConsumerPortType2JavaInfo.java
    incubator/hermes/trunk/src/java/org/apache/ws/notification/tool/v1_2/NotificationProducerPortType2JavaInfo.java
    incubator/hermes/trunk/src/java/org/apache/ws/notification/tool/v1_2/SubscriptionManagerPortType2JavaInfo.java
    incubator/hermes/trunk/src/java/org/apache/ws/notification/topics/util/TopicUtils.java
    incubator/hermes/trunk/src/site/content/tutorial/FileSystem.wsdl
    incubator/hermes/trunk/src/templates/NotificationProducer-Resource_init.txt
    incubator/hermes/trunk/src/test/org/apache/ws/notification/topics/SimpleSubscriptionTopicListenerTest.java

Added: incubator/hermes/trunk/changing versions.txt
URL: http://svn.apache.org/viewcvs/incubator/hermes/trunk/changing%20versions.txt?view=auto&rev=158104
==============================================================================
--- incubator/hermes/trunk/changing versions.txt (added)
+++ incubator/hermes/trunk/changing versions.txt Fri Mar 18 09:07:45 2005
@@ -0,0 +1,3 @@
+
+1. WsnWsdl2Java ..buildServiceProperties - add checks/different versions of NamespaceVersionHolderr
+check usages of ResourceDefinition.implementsResourceCapability in all wsdl2java extensions for spec version checks
\ No newline at end of file

Modified: incubator/hermes/trunk/project.xml
URL: http://svn.apache.org/viewcvs/incubator/hermes/trunk/project.xml?view=diff&r1=158103&r2=158104
==============================================================================
--- incubator/hermes/trunk/project.xml (original)
+++ incubator/hermes/trunk/project.xml Fri Mar 18 09:07:45 2005
@@ -112,7 +112,7 @@
         <dependency>
             <groupId>apollo</groupId>
             <artifactId>apollo-incubating</artifactId>
-            <version>1.0-alpha2</version>
+            <version>1.0-alpha3-SNAPSHOT</version>
             <url>http://incubator.apache.org/apollo/</url>
             <properties>
                 <license>ApacheLicense-2.0.txt</license>

Modified: incubator/hermes/trunk/src/java/org/apache/ws/eventing/AbstractSubscription.java
URL: http://svn.apache.org/viewcvs/incubator/hermes/trunk/src/java/org/apache/ws/eventing/AbstractSubscription.java?view=diff&r1=158103&r2=158104
==============================================================================
--- incubator/hermes/trunk/src/java/org/apache/ws/eventing/AbstractSubscription.java (original)
+++ incubator/hermes/trunk/src/java/org/apache/ws/eventing/AbstractSubscription.java Fri Mar 18 09:07:45 2005
@@ -26,6 +26,7 @@
 import java.util.Calendar;
 import org.apache.ws.resource.ResourceHome;
 import org.apache.ws.resource.ResourceKey;
+import org.apache.ws.resource.lifetime.ResourceTerminationListener;
 
 public abstract class AbstractSubscription implements org.apache.ws.pubsub.Subscription, org.apache.ws.resource.Resource {
     
@@ -105,6 +106,11 @@
     
     public java.util.Calendar getTerminationTime(){
         return m_terminationTime;
+    }
+
+    public void addTerminationListener(ResourceTerminationListener resourceTerminationListener)
+    {
+        ;//this is a no op  todo Stefan I need to know if you want to leverege this
     }
     public boolean isPaused(){return false;}
     

Modified: incubator/hermes/trunk/src/java/org/apache/ws/eventing/RemoteSubscription.java
URL: http://svn.apache.org/viewcvs/incubator/hermes/trunk/src/java/org/apache/ws/eventing/RemoteSubscription.java?view=diff&r1=158103&r2=158104
==============================================================================
--- incubator/hermes/trunk/src/java/org/apache/ws/eventing/RemoteSubscription.java (original)
+++ incubator/hermes/trunk/src/java/org/apache/ws/eventing/RemoteSubscription.java Fri Mar 18 09:07:45 2005
@@ -21,7 +21,8 @@
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import java.util.Calendar;
-import org.apache.ws.resource.lifetime.ScheduledResourceTerminationResource; 
+import org.apache.ws.resource.lifetime.ScheduledResourceTerminationResource;
+import org.apache.ws.resource.lifetime.ResourceTerminationListener;
 
 import org.xmlsoap.schemas.ws.x2004.x08.eventing.SubscriptionEndDocument;
 import org.xmlsoap.schemas.ws.x2004.x08.eventing.SubscriptionEndDocument.SubscriptionEnd;
@@ -84,8 +85,8 @@
     
     public void init() {
         LOG.info("init");
-    }    
-    
+    }
+
     public void setTerminationTime(java.util.Calendar terminationTime) {
         LOG.info("Remote setTerminationTime "+terminationTime);
         m_terminationTime = terminationTime;        

Added: incubator/hermes/trunk/src/java/org/apache/ws/notification/base/WsnNamespaceVersionHolder.java
URL: http://svn.apache.org/viewcvs/incubator/hermes/trunk/src/java/org/apache/ws/notification/base/WsnNamespaceVersionHolder.java?view=auto&rev=158104
==============================================================================
--- incubator/hermes/trunk/src/java/org/apache/ws/notification/base/WsnNamespaceVersionHolder.java (added)
+++ incubator/hermes/trunk/src/java/org/apache/ws/notification/base/WsnNamespaceVersionHolder.java Fri Mar 18 09:07:45 2005
@@ -0,0 +1,13 @@
+package org.apache.ws.notification.base;
+
+import org.apache.ws.resource.properties.NamespaceVersionHolder;
+
+/**
+ * @author Sal Campana
+ */
+public interface WsnNamespaceVersionHolder extends NamespaceVersionHolder
+{
+    String getTopicsXsdNamespace();
+    String getBaseNotificationXsdNamespace();
+    String getBrokeredNotificationXsdNamespace();
+}

Modified: incubator/hermes/trunk/src/java/org/apache/ws/notification/base/impl/AbstractSubscription.java
URL: http://svn.apache.org/viewcvs/incubator/hermes/trunk/src/java/org/apache/ws/notification/base/impl/AbstractSubscription.java?view=diff&r1=158103&r2=158104
==============================================================================
--- incubator/hermes/trunk/src/java/org/apache/ws/notification/base/impl/AbstractSubscription.java (original)
+++ incubator/hermes/trunk/src/java/org/apache/ws/notification/base/impl/AbstractSubscription.java Fri Mar 18 09:07:45 2005
@@ -17,12 +17,14 @@
 
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
+import org.apache.ws.addressing.EndpointReference;
 import org.apache.ws.notification.base.NotificationProducerResource;
 import org.apache.ws.notification.base.Subscription;
 import org.apache.ws.notification.topics.TopicExpression;
 import org.apache.ws.notification.topics.TopicListener;
 import org.apache.ws.notification.topics.TopicListenerList;
 import org.apache.ws.notification.topics.TopicSpaceSet;
+import org.apache.ws.notification.topics.TopicSpace;
 import org.apache.ws.notification.topics.impl.SimpleSubscriptionTopicListener;
 import org.apache.ws.pubsub.Filter;
 import org.apache.ws.pubsub.NotificationConsumer;
@@ -32,18 +34,22 @@
 import org.apache.ws.resource.ResourceException;
 import org.apache.ws.resource.ResourceHome;
 import org.apache.ws.resource.ResourceKey;
+import org.apache.ws.resource.lifetime.ResourceTerminationEvent;
+import org.apache.ws.resource.lifetime.ResourceTerminationListener;
+import org.apache.ws.resource.lifetime.impl.ResourceTerminationEventImpl;
 import org.apache.ws.resource.properties.ResourcePropertySet;
 import org.apache.ws.resource.properties.query.QueryExpression;
 import org.apache.ws.util.uuid.UuidGenerator;
 import org.apache.ws.util.uuid.UuidGeneratorFactory;
-import org.apache.ws.addressing.EndpointReference;
 
 import javax.naming.Context;
 import javax.naming.InitialContext;
 import java.net.URI;
+import java.util.ArrayList;
 import java.util.Calendar;
 import java.util.Collection;
 import java.util.Iterator;
+import java.util.List;
 
 /**
  * TODO
@@ -77,6 +83,11 @@
     private NotificationConsumer m_notificationConsumer;
     private NotificationProducer m_notificationProducer;
 
+   /**
+    * A list of termination listeners to be notified when the resource is terminated.
+    */
+   private List m_terminationListeners = new ArrayList();
+
     public ResourcePropertySet getResourcePropertySet()
     {
         return m_propSet;
@@ -213,16 +224,17 @@
         m_id = (String) o;
     }
 
-    public void remove() throws ResourceException
+
+    public void destroy()
     {
-        Resource producerResource = null;
+         Resource producerResource = null;
         try
         {
             producerResource = getResource();
         }
         catch ( Exception e )
         {
-            throw new ResourceException( "", e );
+            ;
         }
 
         if ( !( producerResource instanceof NotificationProducerResource ) )
@@ -234,27 +246,41 @@
         Collection topics = null;
         try
         {                      //todo fix!
-          //  topics = topicSpace.getTopics( new XmlBeansTopicExpression( m_topicExpression ) );
+            //TopicSpace topicSpace = topicSpaceSet.getTopicSpace();
+            //topics = topicSpace.getTopics( m_topicExpression );
         }
         catch ( Exception e )
         {
-            throw new ResourceException( "", e );
+            ;
         }
 
         synchronized ( producerResource )
         {
+            //removes listeners from the topics
             boolean removed = removeListener( topics );
+
+            //persists the resource
             if ( removed && producerResource instanceof PersistenceCallback )
             {
-                ( (PersistenceCallback) producerResource ).store();
+                try
+                {
+                    ( (PersistenceCallback) producerResource ).store();
+                }
+                catch (ResourceException e)
+                {
+                    ;
+                }
             }
         }
-    }
 
-    public void destroy()
-    {
-        // TODO
-        return;
+        //notify listeners that this subscription expired.
+        ResourceTerminationEvent rte = new ResourceTerminationEventImpl(getID(), "Subscription Destroyed");
+        for (int i = 0; i < m_terminationListeners.size(); i++)
+        {
+            ResourceTerminationListener resourceTerminationListener = (ResourceTerminationListener) m_terminationListeners.get(i);
+            resourceTerminationListener.terminationOccurred(rte);
+        }
+
     }
 
     private boolean removeListener( Collection topics )
@@ -341,5 +367,8 @@
     {
         m_notificationProducer = notificationProducer;
     }
-    
+     public void addTerminationListener(ResourceTerminationListener resourceTerminationListener)
+    {
+        m_terminationListeners.add(resourceTerminationListener);
+    }
 }

Modified: incubator/hermes/trunk/src/java/org/apache/ws/notification/base/v1_2/impl/Subscription1_2Resource.java
URL: http://svn.apache.org/viewcvs/incubator/hermes/trunk/src/java/org/apache/ws/notification/base/v1_2/impl/Subscription1_2Resource.java?view=diff&r1=158103&r2=158104
==============================================================================
--- incubator/hermes/trunk/src/java/org/apache/ws/notification/base/v1_2/impl/Subscription1_2Resource.java (original)
+++ incubator/hermes/trunk/src/java/org/apache/ws/notification/base/v1_2/impl/Subscription1_2Resource.java Fri Mar 18 09:07:45 2005
@@ -24,6 +24,7 @@
 import org.apache.ws.resource.ResourceKey;
 import org.apache.ws.resource.lifetime.callback.CurrentTimeCallback;
 import org.apache.ws.resource.lifetime.v1_2_draft01.porttype.ScheduledResourceTerminationPortType;
+import org.apache.ws.resource.lifetime.ResourceTerminationListener;
 import org.apache.ws.resource.properties.ResourceProperty;
 import org.apache.ws.resource.properties.ResourcePropertySetMetaData;
 import org.apache.ws.resource.properties.impl.XmlBeansResourcePropertySet;
@@ -46,6 +47,8 @@
 
 import javax.xml.namespace.QName;
 import java.util.Calendar;
+import java.util.List;
+import java.util.ArrayList;
 
 /**
  * TODO
@@ -60,6 +63,8 @@
                 SubscriptionManagerPortType.PROP_QNAME_CREATION_TIME
             };
 
+
+
     public Subscription1_2Resource( EndpointReference consumerReference, EndpointReference producerReference,
                                     Calendar initialTerminationTime, Object policy, QueryExpression precondition,
                                     QueryExpression selector, ResourceKey producerKey, String producerHomeLocation,
@@ -109,4 +114,6 @@
         UseNotifyDocument useNotifyDoc = UseNotifyDocument.Factory.newInstance();
         useNotifyDoc.setUseNotify( m_useNotify );
     }
+
+
 }

Added: incubator/hermes/trunk/src/java/org/apache/ws/notification/base/v1_2/impl/WsnNamespaceVersionHolderImpl.java
URL: http://svn.apache.org/viewcvs/incubator/hermes/trunk/src/java/org/apache/ws/notification/base/v1_2/impl/WsnNamespaceVersionHolderImpl.java?view=auto&rev=158104
==============================================================================
--- incubator/hermes/trunk/src/java/org/apache/ws/notification/base/v1_2/impl/WsnNamespaceVersionHolderImpl.java (added)
+++ incubator/hermes/trunk/src/java/org/apache/ws/notification/base/v1_2/impl/WsnNamespaceVersionHolderImpl.java Fri Mar 18 09:07:45 2005
@@ -0,0 +1,30 @@
+package org.apache.ws.notification.base.v1_2.impl;
+
+import org.apache.ws.notification.base.WsnNamespaceVersionHolder;
+import org.apache.ws.notification.base.v1_2.BaseNotification1_2Constants;
+import org.apache.ws.notification.topics.v1_2.Topics1_2Constants;
+import org.apache.ws.resource.properties.v1_2_draft01.impl.NamespaceVersionHolderImpl;
+
+
+/**
+ * @author Sal Campana
+ */
+public class WsnNamespaceVersionHolderImpl extends NamespaceVersionHolderImpl implements WsnNamespaceVersionHolder
+{
+
+
+    public String getTopicsXsdNamespace()
+    {
+        return Topics1_2Constants.NSURI_WSTOP_SCHEMA;
+    }
+
+    public String getBaseNotificationXsdNamespace()
+    {
+        return BaseNotification1_2Constants.NSURI_WSNT_SCHEMA;
+    }
+
+    public String getBrokeredNotificationXsdNamespace()
+    {
+        return "http://docs.oasis-open.org/wsn/2004/06/wsn-WS-BrokeredNotification-1.2-draft-01.xsd";
+    }
+}

Modified: incubator/hermes/trunk/src/java/org/apache/ws/notification/tool/WsnWsdl2Java.java
URL: http://svn.apache.org/viewcvs/incubator/hermes/trunk/src/java/org/apache/ws/notification/tool/WsnWsdl2Java.java?view=diff&r1=158103&r2=158104
==============================================================================
--- incubator/hermes/trunk/src/java/org/apache/ws/notification/tool/WsnWsdl2Java.java (original)
+++ incubator/hermes/trunk/src/java/org/apache/ws/notification/tool/WsnWsdl2Java.java Fri Mar 18 09:07:45 2005
@@ -18,7 +18,11 @@
 import org.apache.ws.notification.tool.v1_2.NotificationConsumerPortType2JavaInfo;
 import org.apache.ws.notification.tool.v1_2.NotificationProducerPortType2JavaInfo;
 import org.apache.ws.notification.tool.v1_2.SubscriptionManagerPortType2JavaInfo;
+import org.apache.ws.notification.base.v1_2.impl.WsnNamespaceVersionHolderImpl;
 import org.apache.ws.resource.tool.Wsdl2Java;
+import org.apache.ws.resource.tool.velocity.ServiceProperties;
+import org.apache.ws.resource.ResourceDefinition;
+import org.apache.velocity.VelocityContext;
 
 import java.io.File;
 
@@ -44,4 +48,52 @@
         addPortType2JavaInfo( new SubscriptionManagerPortType2JavaInfo() );
     }
 
+    protected ServiceProperties buildServiceProperties(ResourceDefinition resourceDefinition, File file, File file1)
+    {
+        ServiceProperties serviceProperties = super.buildServiceProperties(resourceDefinition, file, file1);
+        serviceProperties.setNamespaceVersionHolder(WsnNamespaceVersionHolderImpl.class);//make sure to add different ones as new versions comeout
+        return serviceProperties;
+    }
+
+    protected VelocityContext updateVelociyContext(VelocityContext velocityContext, ResourceDefinition resourceDef)
+    {
+        super.updateVelociyContext(velocityContext,resourceDef);
+
+        if(hasPropChange(resourceDef))
+        {
+           velocityContext.put("propChange","true");
+        }
+
+        if(hasResourceTermination(resourceDef))
+        {
+            velocityContext.put("resourceTermination","true");
+        }
+
+        return velocityContext;
+    }
+
+    private boolean hasResourceTermination(ResourceDefinition resourceDef)
+    {
+        if(resourceDef.implementsResourceCapability(org.apache.ws.resource.lifetime.v1_2_draft01.porttype.ImmediateResourceTerminationPortType.NAME)
+            || resourceDef.implementsResourceCapability(org.apache.ws.resource.lifetime.v1_2_draft01.porttype.ScheduledResourceTerminationPortType.NAME)
+            || resourceDef.implementsResourceCapability(org.apache.ws.resource.lifetime.v1_2_draft04.porttype.ImmediateResourceTerminationPortType.NAME)
+            || resourceDef.implementsResourceCapability(org.apache.ws.resource.lifetime.v1_2_draft04.porttype.ScheduledResourceTerminationPortType.NAME) )
+        {
+            return true;
+        }
+        return false;
+    }
+
+    private boolean hasPropChange(ResourceDefinition resourceDef)
+    {
+        if(resourceDef.implementsResourceCapability(org.apache.ws.resource.properties.v1_2_draft01.porttype.SetResourcePropertiesPortType.NAME)
+            || resourceDef.implementsResourceCapability(org.apache.ws.resource.properties.v1_2_draft05.porttype.DeleteResourcePropertiesPortType.NAME)
+            || resourceDef.implementsResourceCapability(org.apache.ws.resource.properties.v1_2_draft05.porttype.InsertResourcePropertiesPortType.NAME)
+            || resourceDef.implementsResourceCapability(org.apache.ws.resource.properties.v1_2_draft05.porttype.SetResourcePropertiesPortType.NAME)
+            || resourceDef.implementsResourceCapability(org.apache.ws.resource.properties.v1_2_draft05.porttype.UpdateResourcePropertiesPortType.NAME))
+        {
+            return true;
+        }
+        return false;
+    }
 }

Modified: incubator/hermes/trunk/src/java/org/apache/ws/notification/tool/v1_2/NotificationConsumerPortType2JavaInfo.java
URL: http://svn.apache.org/viewcvs/incubator/hermes/trunk/src/java/org/apache/ws/notification/tool/v1_2/NotificationConsumerPortType2JavaInfo.java?view=diff&r1=158103&r2=158104
==============================================================================
--- incubator/hermes/trunk/src/java/org/apache/ws/notification/tool/v1_2/NotificationConsumerPortType2JavaInfo.java (original)
+++ incubator/hermes/trunk/src/java/org/apache/ws/notification/tool/v1_2/NotificationConsumerPortType2JavaInfo.java Fri Mar 18 09:07:45 2005
@@ -40,7 +40,7 @@
 
     public String getServiceTemplateFileName()
     {
-        return "templates/NotificationConsumerPortType.txt";
+        return "templates/1_2_draft01/NotificationConsumerPortType.txt";
     }
 
 }

Modified: incubator/hermes/trunk/src/java/org/apache/ws/notification/tool/v1_2/NotificationProducerPortType2JavaInfo.java
URL: http://svn.apache.org/viewcvs/incubator/hermes/trunk/src/java/org/apache/ws/notification/tool/v1_2/NotificationProducerPortType2JavaInfo.java?view=diff&r1=158103&r2=158104
==============================================================================
--- incubator/hermes/trunk/src/java/org/apache/ws/notification/tool/v1_2/NotificationProducerPortType2JavaInfo.java (original)
+++ incubator/hermes/trunk/src/java/org/apache/ws/notification/tool/v1_2/NotificationProducerPortType2JavaInfo.java Fri Mar 18 09:07:45 2005
@@ -46,7 +46,7 @@
 
     public String getServiceTemplateFileName()
     {
-        return "templates/NotificationProducerPortType.txt";
+        return "templates/1_2_draft01/NotificationProducerPortType.txt";
     }
 
     public String getResourceTemplateFileName()

Modified: incubator/hermes/trunk/src/java/org/apache/ws/notification/tool/v1_2/SubscriptionManagerPortType2JavaInfo.java
URL: http://svn.apache.org/viewcvs/incubator/hermes/trunk/src/java/org/apache/ws/notification/tool/v1_2/SubscriptionManagerPortType2JavaInfo.java?view=diff&r1=158103&r2=158104
==============================================================================
--- incubator/hermes/trunk/src/java/org/apache/ws/notification/tool/v1_2/SubscriptionManagerPortType2JavaInfo.java (original)
+++ incubator/hermes/trunk/src/java/org/apache/ws/notification/tool/v1_2/SubscriptionManagerPortType2JavaInfo.java Fri Mar 18 09:07:45 2005
@@ -40,7 +40,7 @@
 
     public String getServiceTemplateFileName()
     {
-        return "templates/SubscriptionManagerPortType.txt";
+        return "templates/1_2_draft01/SubscriptionManagerPortType.txt";
     }
 
 }

Added: incubator/hermes/trunk/src/java/org/apache/ws/notification/topics/impl/ResourceTerminationTopicImpl.java
URL: http://svn.apache.org/viewcvs/incubator/hermes/trunk/src/java/org/apache/ws/notification/topics/impl/ResourceTerminationTopicImpl.java?view=auto&rev=158104
==============================================================================
--- incubator/hermes/trunk/src/java/org/apache/ws/notification/topics/impl/ResourceTerminationTopicImpl.java (added)
+++ incubator/hermes/trunk/src/java/org/apache/ws/notification/topics/impl/ResourceTerminationTopicImpl.java Fri Mar 18 09:07:45 2005
@@ -0,0 +1,45 @@
+package org.apache.ws.notification.topics.impl;
+
+import org.apache.ws.resource.lifetime.ResourceTerminationEvent;
+import org.apache.ws.resource.lifetime.ResourceTerminationListener;
+import org.apache.ws.resource.lifetime.impl.ResourceTerminationEventImpl;
+import org.apache.ws.resource.properties.NamespaceVersionHolder;
+
+
+/**
+ * @author Sal Campana
+ */
+public class ResourceTerminationTopicImpl extends TopicImpl implements ResourceTerminationListener
+{
+    private static final String TOPIC_NAME = "ResourceTermination";
+
+    /**
+     * This provides the version of the topic we are dealing with for use when
+     * creating the notification.
+     */
+    private NamespaceVersionHolder m_namespaceSet;
+
+    /**
+     * Create a topic with the given name
+     *
+     */
+    public ResourceTerminationTopicImpl(NamespaceVersionHolder namespaceSet)
+    {
+        super(TOPIC_NAME);
+        m_namespaceSet = namespaceSet;
+    }
+
+    public void terminationOccurred(ResourceTerminationEvent event)
+    {
+         Object msg = ((ResourceTerminationEventImpl)event).getTerminationNotifDocXmlBean(m_namespaceSet);
+         try
+        {
+            publish( msg );
+        }
+        catch ( Exception e )
+        {
+            // TODO: do we want to throw this and cause the SetRP request to fault?
+            e.printStackTrace();
+        }
+    }
+}

Modified: incubator/hermes/trunk/src/java/org/apache/ws/notification/topics/util/TopicUtils.java
URL: http://svn.apache.org/viewcvs/incubator/hermes/trunk/src/java/org/apache/ws/notification/topics/util/TopicUtils.java?view=diff&r1=158103&r2=158104
==============================================================================
--- incubator/hermes/trunk/src/java/org/apache/ws/notification/topics/util/TopicUtils.java (original)
+++ incubator/hermes/trunk/src/java/org/apache/ws/notification/topics/util/TopicUtils.java Fri Mar 18 09:07:45 2005
@@ -21,8 +21,12 @@
 import org.apache.ws.notification.topics.TopicSpace;
 import org.apache.ws.notification.topics.impl.ResourcePropertyValueChangeTopicImpl;
 import org.apache.ws.notification.topics.impl.TopicSpaceImpl;
+import org.apache.ws.notification.topics.impl.ResourceTerminationTopicImpl;
 import org.apache.ws.resource.properties.ResourceProperty;
 import org.apache.ws.resource.properties.ResourcePropertySet;
+import org.apache.ws.resource.properties.NamespaceVersionHolder;
+import org.apache.ws.resource.Resource;
+import org.apache.ws.resource.lifetime.ResourceTerminationListener;
 
 import java.util.Iterator;
 import java.util.ArrayList;
@@ -35,6 +39,38 @@
 {
 
     /**
+     * Adds the topic for ResoruceTermination....there should be only one of these!
+     *
+     * @param topicSet
+     * @return
+     */
+    public static Topic addResourceTerminationTopic(TopicSpaceSet topicSet, Resource resource, NamespaceVersionHolder namespaces)
+    {
+        //there can be only 1 !
+        String namespace = namespaces.getLifetimeXsdNamespace();
+        Topic topic = null;
+        TopicSpace topicSpace = topicSet.getTopicSpace(namespace);
+        if (topicSpace == null)
+        {
+            topicSpace = new TopicSpaceImpl(namespace);
+            topicSet.addTopicSpace(topicSpace);
+        }
+        if (topicSpace.topicIterator().hasNext())
+        {
+            topic = (Topic) topicSpace.topicIterator().next();
+        }
+        else
+        {
+            //create the topic
+            topic = new ResourceTerminationTopicImpl(namespaces);
+            resource.addTerminationListener((ResourceTerminationListener) topic);
+            topicSpace.addTopic(topic);
+        }
+
+        return topic;
+    }
+
+    /**
      * Adds a topic for the specified property to the specified topic set.
      *
      * @param prop
@@ -48,7 +84,7 @@
             throw new IllegalArgumentException( "Property " + prop.getMetaData().getName() + " is readonly!" );
         }
         ResourcePropertyValueChangeTopic valueChangeTopic = new ResourcePropertyValueChangeTopicImpl( prop );
-        prop.setChangeListener( valueChangeTopic );
+        prop.addChangeListener( valueChangeTopic );
         String topicNsURI = prop.getMetaData().getName().getNamespaceURI();
         TopicSpace topicSpace = topicSet.getTopicSpace( topicNsURI );
         if ( topicSpace == null )

Modified: incubator/hermes/trunk/src/site/content/tutorial/FileSystem.wsdl
URL: http://svn.apache.org/viewcvs/incubator/hermes/trunk/src/site/content/tutorial/FileSystem.wsdl?view=diff&r1=158103&r2=158104
==============================================================================
--- incubator/hermes/trunk/src/site/content/tutorial/FileSystem.wsdl (original)
+++ incubator/hermes/trunk/src/site/content/tutorial/FileSystem.wsdl Fri Mar 18 09:07:45 2005
@@ -18,7 +18,7 @@
       location="../spec/wsrf/WS-ResourceLifetime-1_2.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.wsdl"/>
+           location="../spec/wsn/WS-BaseNotification-1_2-Draft_01.wsdl"/>
 
    <types>
       <schema elementFormDefault="qualified"
@@ -36,7 +36,7 @@
                      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.xsd"/>
+                     schemaLocation="../spec/wsn/WS-BaseNotification-1_2-Draft_01.xsd"/>
 
          <element name="DeviceSpecialFile" type="xsd:string"/>
          <element name="MountPointDirectory" type="xsd:string"/>

Modified: incubator/hermes/trunk/src/templates/NotificationProducer-Resource_init.txt
URL: http://svn.apache.org/viewcvs/incubator/hermes/trunk/src/templates/NotificationProducer-Resource_init.txt?view=diff&r1=158103&r2=158104
==============================================================================
--- incubator/hermes/trunk/src/templates/NotificationProducer-Resource_init.txt (original)
+++ incubator/hermes/trunk/src/templates/NotificationProducer-Resource_init.txt Fri Mar 18 09:07:45 2005
@@ -1,2 +1,21 @@
-	
-	org.apache.ws.notification.topics.util.TopicUtils.addResourcePropertyValueChangeTopics( getResourcePropertySet(), getTopicSpaceSet() );	
+#set( $propchange = $propChange)
+#set( $termination = $resourceTermination)
+
+
+#if($termination )
+   /**
+    * This method enables the ResourceTermination Topic for notifications 
+    * about this resource's termination.  If you would not like this 
+    * behaviour either comment or remove the line of code.
+    */
+   org.apache.ws.notification.topics.util.TopicUtils.addResourceTerminationTopic( getTopicSpaceSet(), this, SPEC_NAMESPACE_SET );   
+#end
+#if($propchange )
+   /**
+    * This method call will make all resource properties be exposed
+    * as Topics.  If you would like to change that behaviour you can 
+    * call TopicUtils.addResourcePropertyValueChangeTopic for each
+    * Topic you'd like to expose property change notifications for.
+    */
+   org.apache.ws.notification.topics.util.TopicUtils.addResourcePropertyValueChangeTopics( getResourcePropertySet(), getTopicSpaceSet() );   
+#end
\ No newline at end of file

Modified: incubator/hermes/trunk/src/test/org/apache/ws/notification/topics/SimpleSubscriptionTopicListenerTest.java
URL: http://svn.apache.org/viewcvs/incubator/hermes/trunk/src/test/org/apache/ws/notification/topics/SimpleSubscriptionTopicListenerTest.java?view=diff&r1=158103&r2=158104
==============================================================================
--- incubator/hermes/trunk/src/test/org/apache/ws/notification/topics/SimpleSubscriptionTopicListenerTest.java (original)
+++ incubator/hermes/trunk/src/test/org/apache/ws/notification/topics/SimpleSubscriptionTopicListenerTest.java Fri Mar 18 09:07:45 2005
@@ -38,7 +38,7 @@
     {
         EndpointReferenceType epr1 = EndpointReferenceType.Factory.newInstance();
         AttributedURI uri = AttributedURI.Factory.newInstance();
-        uri.setStringValue("http://cunsumer");
+        uri.setStringValue("http://consumer");
         epr1.setAddress(uri);
         EndpointReference epr = new XmlBeansEndpointReference(epr1);
         TopicExpressionDocument topicExprType = null;

Added: incubator/hermes/trunk/wsn-xbeans/src/wsdl/wsn/WS-BaseNotification-1_2-Draft_01.wsdl
URL: http://svn.apache.org/viewcvs/incubator/hermes/trunk/wsn-xbeans/src/wsdl/wsn/WS-BaseNotification-1_2-Draft_01.wsdl?view=auto&rev=158104
==============================================================================
--- incubator/hermes/trunk/wsn-xbeans/src/wsdl/wsn/WS-BaseNotification-1_2-Draft_01.wsdl (added)
+++ incubator/hermes/trunk/wsn-xbeans/src/wsdl/wsn/WS-BaseNotification-1_2-Draft_01.wsdl Fri Mar 18 09:07:45 2005
@@ -0,0 +1,500 @@
+<?xml version="1.0"?>
+
+<!-- 
+
+OASIS takes no position regarding the validity or scope of any intellectual property or other rights that might be claimed to pertain to the implementation or use of the technology described in this document or the extent to which any license under such rights might or might not be available; neither does it represent that it has made any effort to identify any such rights. Information on OASIS's procedures with respect to rights in OASIS specifications can be found at the OASIS website. Copies of claims of rights made available for publication and any assurances of licenses to be made available, or the result of an attempt made to obtain a general license or permission for the use of such proprietary rights by implementors or users of this specification, can be obtained from the OASIS Executive Director.
+
+OASIS invites any interested party to bring to its attention any copyrights, patents or patent applications, or other proprietary rights which may cover technology that may be required to implement this specification. Please address the information to the OASIS Executive Director.
+
+Copyright (C) OASIS Open (2004). All Rights Reserved.
+
+This document and translations of it may be copied and furnished to others, and derivative works that comment on or otherwise explain it or assist in its implementation may be prepared, copied, published and distributed, in whole or in part, without restriction of any kind, provided that the above copyright notice and this paragraph are included on all such copies and derivative works. However, this document itself may not be modified in any way, such as by removing the copyright notice or references to OASIS, except as needed for the purpose of developing OASIS specifications, in which case the procedures for copyrights defined in the OASIS Intellectual Property Rights document must be followed, or as required to translate it into languages other than English. 
+
+The limited permissions granted above are perpetual and will not be revoked by OASIS or its successors or assigns. 
+
+This document and the information contained herein is provided on an "AS IS" basis and OASIS DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
+
+-->
+
+<wsdl:definitions name="WS-BaseNotification"
+   xmlns="http://schemas.xmlsoap.org/wsdl/"
+   xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
+   xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+   xmlns:wsa="http://schemas.xmlsoap.org/ws/2003/03/addressing"
+   xmlns:wsp="http://schemas.xmlsoap.org/ws/2002/12/policy"
+   xmlns:wsnt=
+   "http://docs.oasis-open.org/wsn/2004/06/wsn-WS-BaseNotification-1.2-draft-01.xsd"
+   xmlns:wsntw=
+   "http://docs.oasis-open.org/wsn/2004/06/wsn-WS-BaseNotification-1.2-draft-01.wsdl"
+   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:wsbf=
+   "http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-BaseFaults-1.2-draft-01.xsd"
+   xmlns:wsrl=
+   "http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceLifetime-1.2-draft-01.xsd"
+   xmlns:wsrlw=
+   "http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceLifetime-1.2-draft-01.wsdl"
+   targetNamespace=
+   "http://docs.oasis-open.org/wsn/2004/06/wsn-WS-BaseNotification-1.2-draft-01.wsdl">
+
+   <!-- ========================== Imports =========================== -->
+   <wsdl:import
+      namespace=
+      "http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceProperties-1.2-draft-01.wsdl"
+      location=
+      "../wsrf/WS-ResourceProperties-1_2.wsdl"/>
+
+   <wsdl:import
+      namespace=
+      "http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceLifetime-1.2-draft-01.wsdl"
+      location=
+      "../wsrf/WS-ResourceLifetime-1_2.wsdl"/>
+
+   <!-- ===================== Types Definitions ====================== -->
+   <wsdl:types>
+      <xsd:schema
+         targetNamespace=
+         "http://docs.oasis-open.org/wsn/2004/06/wsn-WS-BaseNotification-1.2-draft-01.xsd"
+         elementFormDefault="qualified">
+
+         <xsd:include schemaLocation="WS-BaseNotification-1_2-Draft_01.xsd"/>
+
+         <xsd:import
+            namespace=
+            "http://schemas.xmlsoap.org/ws/2003/03/addressing"
+            schemaLocation=
+            "../wsa/WS-Addressing-2003_03.xsd"
+            />
+
+         <xsd:import
+            namespace=
+            "http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-BaseFaults-1.2-draft-01.xsd"
+            schemaLocation=
+            "../wsrf/WS-BaseFaults-1_2.xsd"
+            />
+
+         <xsd:import namespace=
+  "http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceProperties-1.2-draft-01.xsd"
+            schemaLocation=
+            "../wsrf/WS-ResourceProperties-1_2.xsd"
+            />
+         <xsd:import
+            namespace=
+            "http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceLifetime-1.2-draft-01.xsd"
+            schemaLocation=
+            "../wsrf/WS-ResourceLifetime-1_2.xsd"
+            />
+
+         <!-- =============== Resource Property Related  =================== -->
+         <!-- ======== Resource Properties for NotificationProducer ======== -->
+         <xsd:element name="NotificationProducerRP">
+            <xsd:complexType>
+               <xsd:sequence>
+                  <xsd:element ref="wsnt:Topic"
+                     minOccurs="1" maxOccurs="unbounded"/>
+                  <xsd:element ref="wsnt:FixedTopicSet"
+                     minOccurs="1" maxOccurs="1"/>
+                  <xsd:element ref="wsnt:TopicExpressionDialects"
+                     minOccurs="1" maxOccurs="unbounded"/>
+               </xsd:sequence>
+            </xsd:complexType>
+         </xsd:element>
+
+         <!-- ======== Resource Properties for SubscriptionManager ========= -->
+         <xsd:element name="SubscriptionManagerRP">
+            <xsd:complexType>
+               <xsd:sequence>
+                  <!-- From WS-ResourceLifetime ScheduledResourceTermination -->
+                  <xsd:element ref="wsrl:CurrentTime"
+                     minOccurs="1" maxOccurs="1"/>
+                  <xsd:element ref="wsrl:TerminationTime"
+                     minOccurs="1" maxOccurs="1"/>
+
+                  <!-- SubscriptionManager specific  -->
+                  <xsd:element ref="wsnt:ConsumerReference"
+                     minOccurs="1" maxOccurs="1"/>
+                  <xsd:element ref="wsnt:TopicExpression"
+                     minOccurs="1" maxOccurs="1"/>
+                  <xsd:element ref="wsnt:UseNotify"
+                     minOccurs="1" maxOccurs="1"/>
+                  <xsd:element ref="wsnt:Precondition"
+                     minOccurs="0" maxOccurs="1"/>
+                  <xsd:element ref="wsnt:Selector"
+                     minOccurs="0" maxOccurs="1"/>
+                  <xsd:element ref="wsnt:SubscriptionPolicy"
+                     minOccurs="0" maxOccurs="1"/>
+                  <xsd:element ref="wsnt:CreationTime"
+                     minOccurs="0" maxOccurs="1"/>
+               </xsd:sequence>
+            </xsd:complexType>
+         </xsd:element>
+
+         <!-- ================== Message Helper Types  ===================== -->
+         <xsd:complexType name="NotificationMessageHolderType">
+            <xsd:sequence>
+               <xsd:element name="Topic"
+                  type="wsnt:TopicExpressionType"
+                  minOccurs="1" maxOccurs="1"/>
+               <xsd:element name="ProducerReference"
+                  type="wsa:EndpointReferenceType"
+                  minOccurs="0" maxOccurs="1"/>
+               <xsd:element name="Message" type="xsd:anyType"
+                  minOccurs="1" maxOccurs="1"/>
+            </xsd:sequence>
+         </xsd:complexType>
+
+         <!-- ========== Message Types for NotificationConsumer  =========== -->
+         <xsd:element name="Notify">
+            <xsd:complexType>
+               <xsd:sequence>
+                  <xsd:element name="NotificationMessage"
+                     type="wsnt:NotificationMessageHolderType"
+                     minOccurs="1" maxOccurs="unbounded"/>
+               </xsd:sequence>
+            </xsd:complexType>
+         </xsd:element>
+
+         <!-- ========== Message Types for NotificationProducer  =========== -->
+         <xsd:element name="Subscribe">
+            <xsd:complexType>
+               <xsd:sequence>
+                  <xsd:element name="ConsumerReference"
+                     type="wsa:EndpointReferenceType"
+                     minOccurs="1" maxOccurs="1"/>
+                  <xsd:element name="TopicExpression"
+                     type="wsnt:TopicExpressionType"
+                     minOccurs="1" maxOccurs="1"/>
+                  <xsd:element name="UseNotify"
+                     type="xsd:boolean" default="true"
+                     minOccurs="0" maxOccurs="1"/>
+                  <xsd:element name="Precondition"
+                     type="wsrp:QueryExpressionType"
+                     minOccurs="0" maxOccurs="1"/>
+                  <xsd:element name="Selector"
+                     type="wsrp:QueryExpressionType"
+                     minOccurs="0" maxOccurs="1"/>
+                  <xsd:element name="SubscriptionPolicy"
+                     type="xsd:anyType"
+                     minOccurs="0" maxOccurs="1"/>
+                  <xsd:element name="InitialTerminationTime"
+                     type="xsd:dateTime"
+                     minOccurs="0" maxOccurs="1"/>
+               </xsd:sequence>
+            </xsd:complexType>
+         </xsd:element>
+
+         <xsd:element name="SubscribeResponse">
+            <xsd:complexType>
+               <xsd:sequence>
+                  <xsd:element name="SubscriptionReference"
+                     type="wsa:EndpointReferenceType"
+                     minOccurs="0" maxOccurs="1"/>
+               </xsd:sequence>
+            </xsd:complexType>
+         </xsd:element>
+
+         <xsd:element name="GetCurrentMessage">
+            <xsd:complexType>
+               <xsd:sequence>
+                  <xsd:element name="Topic"
+                     type="wsnt:TopicExpressionType"/>
+               </xsd:sequence>
+            </xsd:complexType>
+         </xsd:element>
+
+         <xsd:element name="GetCurrentMessageResponse">
+            <xsd:complexType>
+               <xsd:sequence>
+                  <xsd:any/>
+               </xsd:sequence>
+            </xsd:complexType>
+         </xsd:element>
+
+         <xsd:complexType name="ResourceUnknownFaultType">
+            <xsd:complexContent>
+               <xsd:extension base="wsbf:BaseFaultType"/>
+            </xsd:complexContent>
+         </xsd:complexType>
+         <xsd:element name="ResourceUnknownFault"
+            type="wsnt:ResourceUnknownFaultType"/>
+
+         <xsd:complexType name="SubscribeCreationFailedFaultType">
+            <xsd:complexContent>
+               <xsd:extension base="wsbf:BaseFaultType"/>
+            </xsd:complexContent>
+         </xsd:complexType>
+         <xsd:element name="SubscribeCreationFailedFault"
+            type="wsnt:SubscribeCreationFailedFaultType"/>
+
+         <xsd:complexType name="TopicPathDialectUnknownFaultType">
+            <xsd:complexContent>
+               <xsd:extension base="wsbf:BaseFaultType"/>
+            </xsd:complexContent>
+         </xsd:complexType>
+         <xsd:element name="TopicPathDialectUnknownFault"
+            type="wsnt:TopicPathDialectUnknownFaultType"/>
+
+         <xsd:complexType name="InvalidTopicExpressionFaultType">
+            <xsd:complexContent>
+               <xsd:extension base="wsbf:BaseFaultType"/>
+            </xsd:complexContent>
+         </xsd:complexType>
+         <xsd:element name="InvalidTopicExpressionFault"
+            type="wsnt:InvalidTopicExpressionFaultType"/>
+
+         <xsd:complexType name="TopicNotSupportedFaultType">
+            <xsd:complexContent>
+               <xsd:extension base="wsbf:BaseFaultType"/>
+            </xsd:complexContent>
+         </xsd:complexType>
+         <xsd:element name="TopicNotSupportedFault"
+            type="wsnt:TopicNotSupportedFaultType"/>
+
+         <xsd:complexType name="NoCurrentMessageOnTopicFaultType">
+            <xsd:complexContent>
+               <xsd:extension base="wsbf:BaseFaultType"/>
+            </xsd:complexContent>
+         </xsd:complexType>
+         <xsd:element name="NoCurrentMessageOnTopicFault"
+            type="wsnt:NoCurrentMessageOnTopicFaultType"/>
+
+
+         <!-- ========== Message Types for SubscriptionManager  =========== -->
+
+         <xsd:element name="PauseSubscription"/>
+
+         <xsd:element name="PauseSubscriptionResponse"/>
+
+         <xsd:element name="ResumeSubscription"/>
+
+         <xsd:element name="ResumeSubscriptionResponse"/>
+
+         <xsd:complexType name="PauseFailedFaultType">
+            <xsd:complexContent>
+               <xsd:extension base="wsbf:BaseFaultType"/>
+            </xsd:complexContent>
+         </xsd:complexType>
+         <xsd:element name="PauseFailedFault"
+            type="wsnt:PauseFailedFaultType"/>
+
+         <xsd:complexType name="ResumeFailedFaultType">
+            <xsd:complexContent>
+               <xsd:extension base="wsbf:BaseFaultType"/>
+            </xsd:complexContent>
+         </xsd:complexType>
+         <xsd:element name="ResumeFailedFault"
+            type="wsnt:ResumeFailedFaultType"/>
+
+      </xsd:schema>
+   </wsdl:types>
+
+   <!-- ================ NotificationConsumer::Notify ================
+     Notify(
+       NotificationMessage
+         (TopicExpression, ProducerReference, Message)*
+     returns: n/a (one way)
+   -->
+   <wsdl:message name="Notify">
+      <wsdl:part name="Notify" element="wsnt:Notify"/>
+   </wsdl:message>
+
+   <!-- ============== NotificationProducer::Subscribe ===============
+     Subscribe(
+      (ConsumerEndpointReference, TopicExpression, [UseNotify],
+      [Precondition], [Selector], [SubscriptionPolicy],
+      [InitialTerminationTime])
+     returns: WS-Resource qualified EPR to a Subscription
+   -->
+   <wsdl:message name="SubscribeRequest">
+      <wsdl:part name="SubscribeRequest"
+         element="wsnt:Subscribe"/>
+   </wsdl:message>
+
+   <wsdl:message name="SubscribeResponse">
+      <wsdl:part name="SubscribeResponse"
+         element="wsnt:SubscribeResponse"/>
+   </wsdl:message>
+
+   <wsdl:message name="ResourceUnknownFault">
+      <part name="ResourceUnknownFault"
+         element="wsnt:ResourceUnknownFault"/>
+   </wsdl:message>
+
+   <wsdl:message name="SubscribeCreationFailedFault">
+      <part name="SubscribeCreationFailedFault"
+         element="wsnt:SubscribeCreationFailedFault"/>
+   </wsdl:message>
+
+   <wsdl:message name="TopicPathDialectUnknownFault">
+      <part name="TopicPathDialectUnknownFault"
+         element="wsnt:TopicPathDialectUnknownFault"/>
+   </wsdl:message>
+
+   <!-- ========== NotificationProducer::GetCurrentMessage ===========
+     GetCurrentMessage(topicExpression)
+     returns: a NotificationMessage (xsd:any)
+   -->
+   <wsdl:message name="GetCurrentMessageRequest">
+      <wsdl:part name="GetCurrentMessageRequest"
+         element="wsnt:GetCurrentMessage"/>
+   </wsdl:message>
+
+   <wsdl:message name="GetCurrentMessageResponse">
+      <wsdl:part name="GetCurrentMessageResponse"
+         element="wsnt:GetCurrentMessageResponse"/>
+   </wsdl:message>
+
+   <wsdl:message name="InvalidTopicExpressionFault">
+      <part name="InvalidTopicExpressionFault"
+         element="wsnt:InvalidTopicExpressionFault"/>
+   </wsdl:message>
+
+   <wsdl:message name="TopicNotSupportedFault">
+      <part name="TopicNotSupportedFault"
+         element="wsnt:TopicNotSupportedFault"/>
+   </wsdl:message>
+
+   <wsdl:message name="NoCurrentMessageOnTopicFault">
+      <part name="NoCurrentMessageOnTopicFault"
+         element="wsnt:NoCurrentMessageOnTopicFault"/>
+   </wsdl:message>
+
+   <!-- ========== SubscriptionManager::PauseSubscription ============
+      PauseSubscription()
+      returns: empty
+   -->
+   <wsdl:message name="PauseSubscriptionRequest">
+      <wsdl:part name="PauseSubscriptionRequest"
+         element="wsnt:PauseSubscription"/>
+   </wsdl:message>
+
+   <wsdl:message name="PauseSubscriptionResponse">
+      <wsdl:part name="PauseSubscriptionResponse"
+         element="wsnt:PauseSubscriptionResponse"/>
+   </wsdl:message>
+
+   <wsdl:message name="PauseFailedFault">
+      <part name="PauseFailedFault"
+         element="wsnt:PauseFailedFault"/>
+   </wsdl:message>
+
+   <!-- ========= SubscriptionManager::ResumeSubscription ============
+      ResumeSubscription()
+      returns: empty
+   -->
+   <wsdl:message name="ResumeSubscriptionRequest">
+      <wsdl:part name="ResumeSubscriptionRequest"
+         element="wsnt:ResumeSubscription"/>
+   </wsdl:message>
+
+   <wsdl:message name="ResumeSubscriptionResponse">
+      <wsdl:part name="ResumeSubscriptionResponse"
+         element="wsnt:ResumeSubscriptionResponse"/>
+   </wsdl:message>
+
+   <wsdl:message name="ResumeFailedFault">
+      <part name="ResumeFailedFault"
+         element="wsnt:ResumeFailedFault"/>
+   </wsdl:message>
+
+   <!-- =================== PortType Definitions ===================== -->
+   <!-- ========= NotificationConsumer PortType Definition =========== -->
+   <wsdl:portType name="NotificationConsumer">
+
+      <wsdl:operation name="Notify">
+         <wsdl:input message="wsntw:Notify"/>
+      </wsdl:operation>
+
+   </wsdl:portType>
+
+   <!-- ========= NotificationProducer PortType Definition =========== -->
+   <wsdl:portType name="NotificationProducer"
+                  wsrp:ResourceProperties="wsnt:NotificationProducerRP">
+
+      <!-- ========== extends wsrpw:ResourceProperties ============= -->
+      <wsdl:operation name="GetResourceProperty">
+         <wsdl:input name="GetResourcePropertyRequest" message="wsrpw:GetResourcePropertyRequest"/>
+         <wsdl:output name="GetResourcePropertyResponse" message="wsrpw:GetResourcePropertyResponse"/>
+         <wsdl:fault name="ResourceUnknownFault" message="wsrpw:ResourceUnknownFault"/>
+         <wsdl:fault name="InvalidResourcePropertyQNameFault" message="wsrpw:InvalidResourcePropertyQNameFault"/>
+      </wsdl:operation>
+
+      <!-- =========== NotificationProducer Specific ============== -->
+      <wsdl:operation name="Subscribe">
+         <wsdl:input message="wsntw:SubscribeRequest"/>
+         <wsdl:output message="wsntw:SubscribeResponse"/>
+         <wsdl:fault name="ResourceUnknownFault" message="wsntw:ResourceUnknownFault"/>
+         <wsdl:fault name="SubscribeCreationFailedFault" message="wsntw:SubscribeCreationFailedFault"/>
+         <wsdl:fault name="TopicPathDialectUnknownFault" message="wsntw:TopicPathDialectUnknownFault"/>
+      </wsdl:operation>
+
+      <wsdl:operation name="GetCurrentMessage">
+         <wsdl:input message="wsntw:GetCurrentMessageRequest"/>
+         <wsdl:output message="wsntw:GetCurrentMessageResponse"/>
+         <wsdl:fault name="ResourceUnknownFault" message="wsntw:ResourceUnknownFault"/>
+         <wsdl:fault name="InvalidTopicExpressionFault" message="wsntw:InvalidTopicExpressionFault"/>
+         <wsdl:fault name="TopicNotSupportedFault" message="wsntw:TopicNotSupportedFault"/>
+         <wsdl:fault name="NoCurrentMessageOnTopicFault" message="wsntw:NoCurrentMessageOnTopicFault"/>
+      </wsdl:operation>
+
+   </wsdl:portType>
+
+   <!-- ========== SubscriptionManager PortType Definition =========== -->
+   <wsdl:portType name="SubscriptionManager"
+                  wsrp:ResourceProperties="wsnt:SubscriptionManagerRP">
+
+      <!-- ========== extends wsrpw:ResourceProperties ============= -->
+      <wsdl:operation name="GetResourceProperty">
+         <wsdl:input name="GetResourcePropertyRequest"
+            message="wsrpw:GetResourcePropertyRequest"/>
+         <wsdl:output name="GetResourcePropertyResponse"
+            message="wsrpw:GetResourcePropertyResponse"/>
+         <wsdl:fault name="ResourceUnknownFault"
+            message="wsrpw:ResourceUnknownFault"/>
+         <wsdl:fault name="InvalidResourcePropertyQNameFault"
+            message="wsrpw:InvalidResourcePropertyQNameFault"/>
+      </wsdl:operation>
+      
+      <!-- === extends wsrlw:ImmediateResourceTermination ========== -->
+      <wsdl:operation name="Destroy">
+         <wsdl:input message="wsrlw:DestroyRequest"/>
+         <wsdl:output message="wsrlw:DestroyResponse"/>
+         <wsdl:fault name="ResourceUnknownFault"
+            message="wsrlw:ResourceUnknownFault"/>
+         <wsdl:fault name="ResourceNotDestroyedFault"
+            message="wsrlw:ResourceNotDestroyedFault"/>
+      </wsdl:operation>
+
+      <!-- === extends wsrl:ScheduledResourceTermination ========== -->
+      <wsdl:operation name="SetTerminationTime">
+         <wsdl:input message="wsrlw:SetTerminationTimeRequest"/>
+         <wsdl:output message="wsrlw:SetTerminationTimeResponse"/>
+         <wsdl:fault name="ResourceUnknownFault"
+            message="wsrlw:ResourceUnknownFault"/>
+         <wsdl:fault name="UnableToSetTerminationTimeFault"
+            message="wsrlw:UnableToSetTerminationTimeFault"/>
+         <wsdl:fault name="TerminationTimeChangeRejectedFault"
+            message="wsrlw:TerminationTimeChangeRejectedFault"/>
+      </wsdl:operation>
+
+      <!-- ========= SubscriptionManager specific operations ====== -->
+      <wsdl:operation name="PauseSubscription">
+         <wsdl:input message="wsntw:PauseSubscriptionRequest"/>
+         <wsdl:output message="wsntw:PauseSubscriptionResponse"/>
+         <wsdl:fault name="ResourceUnknownFault" message="wsntw:ResourceUnknownFault"/>
+         <wsdl:fault name="PauseFailedFault" message="wsntw:PauseFailedFault"/>
+      </wsdl:operation>
+
+      <wsdl:operation name="ResumeSubscription">
+         <wsdl:input message="wsntw:ResumeSubscriptionRequest"/>
+         <wsdl:output message="wsntw:ResumeSubscriptionResponse"/>
+         <wsdl:fault name="ResourceUnknownFault" message="wsntw:ResourceUnknownFault"/>
+         <wsdl:fault name="ResumeFailedFault" message="wsntw:ResumeFailedFault"/>
+      </wsdl:operation>
+
+   </wsdl:portType>
+
+</wsdl:definitions>

Added: incubator/hermes/trunk/wsn-xbeans/src/wsdl/wsn/WS-BaseNotification-1_2-Draft_01.xsd
URL: http://svn.apache.org/viewcvs/incubator/hermes/trunk/wsn-xbeans/src/wsdl/wsn/WS-BaseNotification-1_2-Draft_01.xsd?view=auto&rev=158104
==============================================================================
--- incubator/hermes/trunk/wsn-xbeans/src/wsdl/wsn/WS-BaseNotification-1_2-Draft_01.xsd (added)
+++ incubator/hermes/trunk/wsn-xbeans/src/wsdl/wsn/WS-BaseNotification-1_2-Draft_01.xsd Fri Mar 18 09:07:45 2005
@@ -0,0 +1,75 @@
+<?xml version="1.0"?>
+
+<!-- 
+
+OASIS takes no position regarding the validity or scope of any intellectual property or other rights that might be claimed to pertain to the implementation or use of the technology described in this document or the extent to which any license under such rights might or might not be available; neither does it represent that it has made any effort to identify any such rights. Information on OASIS's procedures with respect to rights in OASIS specifications can be found at the OASIS website. Copies of claims of rights made available for publication and any assurances of licenses to be made available, or the result of an attempt made to obtain a general license or permission for the use of such proprietary rights by implementors or users of this specification, can be obtained from the OASIS Executive Director.
+
+OASIS invites any interested party to bring to its attention any copyrights, patents or patent applications, or other proprietary rights which may cover technology that may be required to implement this specification. Please address the information to the OASIS Executive Director.
+
+Copyright (C) OASIS Open (2004). All Rights Reserved.
+
+This document and translations of it may be copied and furnished to others, and derivative works that comment on or otherwise explain it or assist in its implementation may be prepared, copied, published and distributed, in whole or in part, without restriction of any kind, provided that the above copyright notice and this paragraph are included on all such copies and derivative works. However, this document itself may not be modified in any way, such as by removing the copyright notice or references to OASIS, except as needed for the purpose of developing OASIS specifications, in which case the procedures for copyrights defined in the OASIS Intellectual Property Rights document must be followed, or as required to translate it into languages other than English. 
+
+The limited permissions granted above are perpetual and will not be revoked by OASIS or its successors or assigns. 
+
+This document and the information contained herein is provided on an "AS IS" basis and OASIS DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
+
+-->
+
+<xsd:schema
+   xmlns="http://www.w3.org/2001/XMLSchema"
+   xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+   xmlns:wsa="http://schemas.xmlsoap.org/ws/2003/03/addressing"
+   xmlns:wsnt="http://docs.oasis-open.org/wsn/2004/06/wsn-WS-BaseNotification-1.2-draft-01.xsd"
+   xmlns:wsrp="http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceProperties-1.2-draft-01.xsd"
+   targetNamespace="http://docs.oasis-open.org/wsn/2004/06/wsn-WS-BaseNotification-1.2-draft-01.xsd"
+   elementFormDefault="qualified">
+
+   <!-- ======================== Imports  ============================ -->
+
+   <xsd:import namespace=
+     "http://schemas.xmlsoap.org/ws/2003/03/addressing"
+      schemaLocation=
+      "../wsa/WS-Addressing-2003_03.xsd"
+      />
+
+   <xsd:import namespace=
+     "http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceProperties-1.2-draft-01.xsd"
+      schemaLocation=
+      "../wsrf/WS-ResourceProperties-1_2.xsd"
+      />
+
+   <!-- ================= Topic Expression Container ================= -->
+   <xsd:complexType name="TopicExpressionType" mixed="true">
+      <xsd:sequence>
+         <xsd:any minOccurs="0" maxOccurs="1" processContents="lax"/>
+      </xsd:sequence>
+      <xsd:attribute name="Dialect" type="xsd:anyURI"/>
+   </xsd:complexType>
+
+   <xsd:element name="TopicExpression"
+      type="wsnt:TopicExpressionType"/>
+
+   <!-- =============== Resource Property Related  =================== -->
+   <!-- ======== Resource Properties for NotificationProducer ======== -->
+   <xsd:element name="Topic" type="wsnt:TopicExpressionType"/>
+
+   <xsd:element name="FixedTopicSet" type="xsd:boolean"/>
+
+   <xsd:element name="TopicExpressionDialects" type="xsd:anyURI"/>
+
+   <!-- ======== Resource Properties for SubscriptionManager ========= -->
+   <xsd:element name="ConsumerReference"
+      type="wsa:EndpointReferenceType"/>
+   <xsd:element name="UseNotify"
+      type="xsd:boolean"/>
+   <xsd:element name="Precondition"
+      type="wsrp:QueryExpressionType"/>
+   <xsd:element name="Selector"
+      type="wsrp:QueryExpressionType"/>
+   <xsd:element name="SubscriptionPolicy"
+      type="xsd:anyType"/>
+   <xsd:element name="CreationTime"
+      type="xsd:dateTime"/>
+
+</xsd:schema>



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