You are viewing a plain text version of this content. The canonical link for it is here.
Posted to muse-commits@ws.apache.org by sc...@apache.org on 2006/06/02 19:33:13 UTC

svn commit: r411218 [2/34] - in /webservices/muse: branches/1.0/ branches/1.0/src/examples/broker/ branches/1.0/src/examples/broker/WEB-INF/ branches/1.0/src/examples/consumer/ branches/1.0/src/examples/consumer/epr/ branches/1.0/src/examples/consumer/...

Added: webservices/muse/branches/1.0/src/examples/broker/WEB-INF/server-config_wse.wsdd
URL: http://svn.apache.org/viewvc/webservices/muse/branches/1.0/src/examples/broker/WEB-INF/server-config_wse.wsdd?rev=411218&view=auto
==============================================================================
--- webservices/muse/branches/1.0/src/examples/broker/WEB-INF/server-config_wse.wsdd (added)
+++ webservices/muse/branches/1.0/src/examples/broker/WEB-INF/server-config_wse.wsdd Fri Jun  2 10:32:46 2006
@@ -0,0 +1,61 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<deployment xmlns="http://xml.apache.org/axis/wsdd/" xmlns:java="http://xml.apache.org/axis/wsdd/providers/java">
+ <globalConfiguration>
+  <parameter name="adminPassword" value="admin"/>
+  <parameter name="disablePrettyXML" value="true"/>
+  <parameter name="sendXsiTypes" value="true"/>
+  <parameter name="sendMultiRefs" value="true"/>
+  <parameter name="sendXMLDeclaration" value="true"/>
+  <requestFlow>
+   <handler type="java:org.apache.axis.message.addressing.handler.AddressingHandler"/>
+  </requestFlow>
+  <responseFlow>
+   <handler type="java:org.apache.axis.message.addressing.handler.AddressingHandler"/>
+  </responseFlow>
+ </globalConfiguration>
+ <handler name="LocalResponder" type="java:org.apache.axis.transport.local.LocalResponder"/>
+ <handler name="URLMapper" type="java:org.apache.axis.handlers.http.URLMapper"/>
+ <handler name="Authenticate" type="java:org.apache.axis.handlers.SimpleAuthenticationHandler"/>
+
+ <service name="AdminService" provider="java:MSG">
+  <parameter name="allowedMethods" value="AdminService"/>
+  <parameter name="enableRemoteAdmin" value="false"/>
+  <parameter name="className" value="org.apache.axis.utils.Admin"/>
+  <namespace>http://xml.apache.org/axis/wsdd/</namespace>
+  <namespace>http://xml.apache.org/axis/wsdd/</namespace>
+ </service>
+
+ <service name="Version" provider="java:RPC">
+  <parameter name="allowedMethods" value="getVersion"/>
+  <parameter name="className" value="org.apache.axis.Version"/>
+ </service>
+
+ <service name="NotificationProducer" provider="java:WSRF" style="document" use="literal">
+ </service>
+
+ <service name="SubscriptionManager" provider="java:WSRF" style="document" use="literal">
+</service>
+
+ <service name="NotificationPort" provider="java:MSG" style="message" use="literal">
+  <parameter name="className" value="org.apache.ws.eventing.services.BrokerService"/>
+  <parameter name="allowedMethods" value="filter"/>
+ </service>
+
+ <transport name="http">
+  <requestFlow>
+   <handler type="URLMapper"/>
+   <handler type="java:org.apache.axis.handlers.http.HTTPAuthHandler"/>
+  </requestFlow>
+  <parameter name="qs:list" value="org.apache.axis.transport.http.QSListHandler"/>
+  <parameter name="qs:wsdl" value="org.apache.axis.transport.http.QSWSDLHandler"/>
+  <parameter name="qs.list" value="org.apache.axis.transport.http.QSListHandler"/>
+  <parameter name="qs.method" value="org.apache.axis.transport.http.QSMethodHandler"/>
+  <parameter name="qs:method" value="org.apache.axis.transport.http.QSMethodHandler"/>
+  <parameter name="qs.wsdl" value="org.apache.axis.transport.http.QSWSDLHandler"/>
+ </transport>
+ <transport name="local">
+  <responseFlow>
+   <handler type="LocalResponder"/>
+  </responseFlow>
+ </transport>
+</deployment>

Added: webservices/muse/branches/1.0/src/examples/broker/WEB-INF/server-config_wsn.wsdd
URL: http://svn.apache.org/viewvc/webservices/muse/branches/1.0/src/examples/broker/WEB-INF/server-config_wsn.wsdd?rev=411218&view=auto
==============================================================================
--- webservices/muse/branches/1.0/src/examples/broker/WEB-INF/server-config_wsn.wsdd (added)
+++ webservices/muse/branches/1.0/src/examples/broker/WEB-INF/server-config_wsn.wsdd Fri Jun  2 10:32:46 2006
@@ -0,0 +1,61 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<deployment xmlns="http://xml.apache.org/axis/wsdd/" xmlns:java="http://xml.apache.org/axis/wsdd/providers/java">
+ <globalConfiguration>
+  <parameter name="adminPassword" value="admin"/>
+  <parameter name="disablePrettyXML" value="true"/>
+  <parameter name="sendXsiTypes" value="true"/>
+  <parameter name="sendMultiRefs" value="true"/>
+  <parameter name="sendXMLDeclaration" value="true"/>
+  <requestFlow>
+   <handler type="java:org.apache.axis.message.addressing.handler.AddressingHandler"/>
+  </requestFlow>
+  <responseFlow>
+   <handler type="java:org.apache.axis.message.addressing.handler.AddressingHandler"/>
+  </responseFlow>
+ </globalConfiguration>
+ <handler name="LocalResponder" type="java:org.apache.axis.transport.local.LocalResponder"/>
+ <handler name="URLMapper" type="java:org.apache.axis.handlers.http.URLMapper"/>
+ <handler name="Authenticate" type="java:org.apache.axis.handlers.SimpleAuthenticationHandler"/>
+
+ <service name="AdminService" provider="java:MSG">
+  <parameter name="allowedMethods" value="AdminService"/>
+  <parameter name="enableRemoteAdmin" value="false"/>
+  <parameter name="className" value="org.apache.axis.utils.Admin"/>
+  <namespace>http://xml.apache.org/axis/wsdd/</namespace>
+  <namespace>http://xml.apache.org/axis/wsdd/</namespace>
+ </service>
+
+ <service name="Version" provider="java:RPC">
+  <parameter name="allowedMethods" value="getVersion"/>
+  <parameter name="className" value="org.apache.axis.Version"/>
+ </service>
+
+ <service name="NotificationProducer" provider="java:WSRF" style="document" use="literal">
+ </service>
+
+ <service name="SubscriptionManager" provider="java:WSRF" style="document" use="literal">
+</service>
+
+ <service name="NotificationPort" provider="java:RPC" style="document" use="literal">
+  <parameter name="className" value="org.apache.ws.notification.base.impl.BrokerService"/>
+  <parameter name="allowedMethods" value="notify"/>
+ </service>
+
+ <transport name="http">
+  <requestFlow>
+   <handler type="URLMapper"/>
+   <handler type="java:org.apache.axis.handlers.http.HTTPAuthHandler"/>
+  </requestFlow>
+  <parameter name="qs:list" value="org.apache.axis.transport.http.QSListHandler"/>
+  <parameter name="qs:wsdl" value="org.apache.axis.transport.http.QSWSDLHandler"/>
+  <parameter name="qs.list" value="org.apache.axis.transport.http.QSListHandler"/>
+  <parameter name="qs.method" value="org.apache.axis.transport.http.QSMethodHandler"/>
+  <parameter name="qs:method" value="org.apache.axis.transport.http.QSMethodHandler"/>
+  <parameter name="qs.wsdl" value="org.apache.axis.transport.http.QSWSDLHandler"/>
+ </transport>
+ <transport name="local">
+  <responseFlow>
+   <handler type="LocalResponder"/>
+  </responseFlow>
+ </transport>
+</deployment>

Added: webservices/muse/branches/1.0/src/examples/broker/build.properties
URL: http://svn.apache.org/viewvc/webservices/muse/branches/1.0/src/examples/broker/build.properties?rev=411218&view=auto
==============================================================================
--- webservices/muse/branches/1.0/src/examples/broker/build.properties (added)
+++ webservices/muse/branches/1.0/src/examples/broker/build.properties Fri Jun  2 10:32:46 2006
@@ -0,0 +1,11 @@
+base.url=http://localhost:8080/pubscribe/services
+
+# Uncomment and modify the below lines if you would like to deploy to a
+# Pubscribe webapp located somewhere other than the default location of
+# ../webapps/pubscribe (e.g. ${env.CATALINA_HOME}/webapps/pubscribe)
+pubscribe.webapp.dir=
+
+# Uncomment and modify the below lines if you require a proxy to connect to external web sites
+#http.proxyHost=proxy.xyz.com
+#http.proxyPort=8088
+#http.nonProxyHosts=localhost 

Added: webservices/muse/branches/1.0/src/examples/broker/build.xml
URL: http://svn.apache.org/viewvc/webservices/muse/branches/1.0/src/examples/broker/build.xml?rev=411218&view=auto
==============================================================================
--- webservices/muse/branches/1.0/src/examples/broker/build.xml (added)
+++ webservices/muse/branches/1.0/src/examples/broker/build.xml Fri Jun  2 10:32:46 2006
@@ -0,0 +1,57 @@
+<?xml version="1.0"?>
+
+<project name="broker_example" default="usage" basedir=".">
+
+   <property environment="env" />   
+   <property file="build.properties" />
+
+   <!-- workaround for those IDEs that dont set ant.home as per the ant script -->
+   <property name="ant.home" value="env.ANT_HOME"/>
+<property name="base.dir" value="${basedir}"/>    
+   <target name="init">
+     
+     <available file="../../webapps/pubscribe" type="dir" property="dist.pubscribe.webapp.dir" value="../../webapps/pubscribe" />         
+     <condition property="pubscribe.webapp.dir" value="${dist.pubscribe.webapp.dir}">
+        <isset property="dist.pubscribe.webapp.dir"/>
+     </condition>     
+          
+     <fail unless="pubscribe.webapp.dir" message="webapp dir ../../webapps/pubscribe does not exist." />    
+     <echo>Using webapp dir: ${pubscribe.webapp.dir}</echo>    
+
+
+    <mkdir dir="build/classes"/>
+    <copy file="jndi-config.xml" todir="build/classes/"/>
+    <copy file="log4j.properties" todir="build/classes/"/>
+     <path id="pubscribe.classpath.id">
+       <pathelement location="build/classes" />
+       <fileset dir="./lib" includes="*.jar" />
+       <pathelement location="${pubscribe.webapp.dir}/WEB-INF/classes" />
+       <fileset dir="${pubscribe.webapp.dir}/WEB-INF/lib" includes="*.jar" />
+       <pathelement location="${activation.jar}" />
+       <pathelement location="${mail.jar}" />
+     </path>
+     <property name="pubscribe.classpath" refid="pubscribe.classpath.id" />
+         
+      </target>
+  
+   <target name="build" depends="init">
+    <javac srcdir="." destdir="build/classes" classpathref="pubscribe.classpath.id">
+      <include name="*.java"/>
+    </javac>
+  </target>
+  
+  <target name="execute" depends="build">
+       <java classname="Broker" classpathref="pubscribe.classpath.id" fork="true">
+        <arg value="${base.dir}"/>
+              </java>
+  </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/branches/1.0/src/examples/broker/jndi-config.xml
URL: http://svn.apache.org/viewvc/webservices/muse/branches/1.0/src/examples/broker/jndi-config.xml?rev=411218&view=auto
==============================================================================
--- webservices/muse/branches/1.0/src/examples/broker/jndi-config.xml (added)
+++ webservices/muse/branches/1.0/src/examples/broker/jndi-config.xml Fri Jun  2 10:32:46 2006
@@ -0,0 +1,172 @@
+<?xml version="1.0"?>
+
+<jndiConfig xmlns="http://www.apache.org/wsfx/wsrf/jndi/config">
+
+   <global>
+      
+      <resource name="DefaultParameters" type="org.apache.ws.util.jndi.DefaultParameters">
+         <resourceParams>
+            <parameter>
+               <name>factory</name>
+               <value>org.apache.ws.util.jndi.BeanFactory</value>
+            </parameter>           
+            <parameter>
+               <name>resourceKeyClassName</name>
+               <value>org.apache.ws.resource.impl.SimpleTypeResourceKey</value>
+            </parameter>
+         </resourceParams>
+      </resource>
+      
+      <resource name="timer/ContainerTimer" type="org.apache.ws.util.timer.TimerManagerImpl">
+         <resourceParams>
+            <parameter>
+               <name>factory</name>
+               <value>org.apache.ws.util.jndi.BeanFactory</value>
+            </parameter>
+         </resourceParams>
+      </resource>
+      
+      <resource name="topic/eval/simple" type="org.apache.ws.notification.topics.impl.SimpleTopicExpressionEvaluator">
+         <resourceParams>
+	     <parameter>
+		<name>factory</name>
+		<value>org.apache.ws.util.jndi.BeanFactory</value>
+	     </parameter>
+         </resourceParams>
+      </resource>
+      <resource name="topic/eval/concret" type="org.apache.ws.notification.topics.impl.ConcreteTopicExpressionEvaluator">
+         <resourceParams>
+	     <parameter>
+		<name>factory</name>
+		<value>org.apache.ws.util.jndi.BeanFactory</value>
+	     </parameter>
+         </resourceParams>
+      </resource>
+            
+      <resource name="topic/ContainerTopicExpressionEngine" type="org.apache.ws.notification.topics.impl.TopicExpressionEngineImpl">
+         <resourceParams>
+      	     <parameter>
+      		<name>factory</name>
+      		<value>org.apache.ws.util.jndi.BeanFactory</value>
+      	     </parameter>
+         </resourceParams>
+      </resource>          
+      
+   </global>
+
+   <service name="SubscriptionManager">
+      <resource name="home" type="org.apache.ws.eventing.SubscriptionHome">
+         <resourceParams>    
+            <parameter>
+               <name>baseWebappUrl</name>
+               <!-- 
+               	    The baseWebappUrl can contain the following:               
+               	    -the marker $IP_ADDRESS$ in which case we will attempt to determine the IP address at runtime. (Do not use on multi-homed systems)
+               	    -the marker $HOST_NAME$ in which case we will attempt to determine the host name at runtime
+               	    -NO Marker in which case whatever value you add will be static and used.
+               -->
+               <value>http://$IP_ADDRESS$:8080/pubscribe</value>
+	    </parameter>         
+         
+            <parameter>
+               <name>serviceClassName</name>
+               <value>org.apache.ws.eventing.services.BrokerService</value>
+            </parameter>
+            <parameter>
+               <name>resourceClassName</name>
+               <value>org.apache.ws.eventing.Subscription</value>
+            </parameter>
+            <parameter>
+               <name>wsdlTargetNamespace</name>
+               <value>http://ws.apache.org/eventing/services/SubscriptionManager</value>
+            </parameter>            
+            <parameter>
+               <name>resourceIdentifierReferenceParameterName</name>
+               <value>{http://schemas.xmlsoap.org/ws/2004/08/eventing}Identifier</value>
+            </parameter>
+         </resourceParams>
+      </resource>
+      
+      <resource name="metadata" type="org.apache.ws.util.jndi.tools.MetadataConfigImpl">
+         <metadataConfig>
+            <!-- classpath -->
+            <metadata dialect="http://schemas.xmlsoap.org/wsdl/" identifier="http://ws.apache.org/notification/base/service/SubscriptionManager/wsdl">
+               <location>wsdl/SubscriptionManager.wsdl</location>
+            </metadata>                  
+         </metadataConfig>
+       </resource>      
+   </service>
+
+   <service name="NotificationProducer">
+      <resource name="home" type="BrokerHome">
+         <resourceParams>        
+            <parameter>
+               <name>baseWebappUrl</name>
+               <!-- 
+               	    The baseWebappUrl can contain the following:               
+               	    -the marker $IP_ADDRESS$ in which case we will attempt to determine the IP address at runtime. (Do not use on multi-homed systems)
+               	    -the marker $HOST_NAME$ in which case we will attempt to determine the host name at runtime
+               	    -NO Marker in which case whatever value you add will be static and used.
+               -->
+               <value>http://$IP_ADDRESS$:8080/pubscribe</value>
+	    </parameter>         
+         
+            <parameter>
+               <name>serviceClassName</name>
+               <value>org.apache.ws.eventing.services.BrokerService</value>
+            </parameter>
+            <parameter>
+               <name>resourceClassName</name>
+               <value>BrokerResource</value>
+            </parameter>
+            <parameter>
+               <name>wsdlTargetNamespace</name>
+               <value>http://ws.apache.org/eventing/services/EventSourcePort</value>
+            </parameter>            
+            <!--
+            <parameter>
+               <name>resourceIdentifierReferenceParameterName</name>
+               <value>{http://schemas.xmlsoap.org/ws/2004/08/eventing}Identifier</value>
+            </parameter>
+            -->
+         </resourceParams>
+      </resource>
+   </service>
+
+   <service name="NotificationPort">
+      <resource name="home" type="BrokerHome">
+         <resourceParams>
+            <parameter>
+               <name>baseWebappUrl</name>
+               <!-- 
+               	    The baseWebappUrl can contain the following:               
+               	    -the marker $IP_ADDRESS$ in which case we will attempt to determine the IP address at runtime. (Do not use on multi-homed systems)
+               	    -the marker $HOST_NAME$ in which case we will attempt to determine the host name at runtime
+               	    -NO Marker in which case whatever value you add will be static and used.
+               -->
+               <value>http://$IP_ADDRESS$:8080/pubscribe</value>
+	    </parameter>         
+         
+            <parameter>
+               <name>serviceClassName</name>
+               <value>org.apache.ws.eventing.services.BrokerService</value>
+            </parameter>
+            <parameter>
+               <name>resourceClassName</name>
+               <value>BrokerResource</value>
+            </parameter>
+            <parameter>
+               <name>wsdlTargetNamespace</name>
+               <value>http://ws.apache.org/eventing/services/NotificationPort</value>
+            </parameter>            
+            <!--
+            <parameter>
+               <name>resourceIdentifierReferenceParameterName</name>
+               <value>{http://schemas.xmlsoap.org/ws/2004/08/eventing}Identifier</value>
+            </parameter>
+            -->
+         </resourceParams>
+      </resource>
+   </service>
+</jndiConfig>
+    

Added: webservices/muse/branches/1.0/src/examples/broker/jndi-config_wse.xml
URL: http://svn.apache.org/viewvc/webservices/muse/branches/1.0/src/examples/broker/jndi-config_wse.xml?rev=411218&view=auto
==============================================================================
--- webservices/muse/branches/1.0/src/examples/broker/jndi-config_wse.xml (added)
+++ webservices/muse/branches/1.0/src/examples/broker/jndi-config_wse.xml Fri Jun  2 10:32:46 2006
@@ -0,0 +1,161 @@
+<?xml version="1.0"?>
+
+<jndiConfig xmlns="http://www.apache.org/wsfx/wsrf/jndi/config">
+
+   <global>
+      
+      <resource name="DefaultParameters" type="org.apache.ws.util.jndi.DefaultParameters">
+         <resourceParams>
+            <parameter>
+               <name>factory</name>
+               <value>org.apache.ws.util.jndi.BeanFactory</value>
+            </parameter>           
+            <parameter>
+               <name>resourceKeyClassName</name>
+               <value>org.apache.ws.resource.impl.SimpleTypeResourceKey</value>
+            </parameter>
+         </resourceParams>
+      </resource>
+      
+      <resource name="timer/ContainerTimer" type="org.apache.ws.util.timer.TimerManagerImpl">
+         <resourceParams>
+            <parameter>
+               <name>factory</name>
+               <value>org.apache.ws.util.jndi.BeanFactory</value>
+            </parameter>
+         </resourceParams>
+      </resource>
+      
+      <resource name="topic/eval/simple" type="org.apache.ws.notification.topics.impl.SimpleTopicExpressionEvaluator">
+         <resourceParams>
+	     <parameter>
+		<name>factory</name>
+		<value>org.apache.ws.util.jndi.BeanFactory</value>
+	     </parameter>
+         </resourceParams>
+      </resource>
+      
+      <resource name="topic/ContainerTopicExpressionEngine" type="org.apache.ws.notification.topics.impl.TopicExpressionEngineImpl">
+         <resourceParams>
+      	     <parameter>
+      		<name>factory</name>
+      		<value>org.apache.ws.util.jndi.BeanFactory</value>
+      	     </parameter>
+         </resourceParams>
+      </resource>          
+      
+   </global>
+
+   <service name="SubscriptionManager">
+      <resource name="home" type="org.apache.ws.eventing.SubscriptionHome">
+         <resourceParams>    
+            <parameter>
+               <name>baseWebappUrl</name>
+               <!-- 
+               	    The baseWebappUrl can contain the following:               
+               	    -the marker $IP_ADDRESS$ in which case we will attempt to determine the IP address at runtime. (Do not use on multi-homed systems)
+               	    -the marker $HOST_NAME$ in which case we will attempt to determine the host name at runtime
+               	    -NO Marker in which case whatever value you add will be static and used.
+               -->
+               <value>http://$IP_ADDRESS$:8080/pubscribe</value>
+	    </parameter>         
+         
+            <parameter>
+               <name>serviceClassName</name>
+               <value>org.apache.ws.eventing.services.BrokerService</value>
+            </parameter>
+            <parameter>
+               <name>resourceClassName</name>
+               <value>org.apache.ws.eventing.Subscription</value>
+            </parameter>
+            <parameter>
+               <name>wsdlTargetNamespace</name>
+               <value>http://ws.apache.org/eventing/services/SubscriptionManager</value>
+            </parameter>            
+            <parameter>
+               <name>resourceIdentifierReferenceParameterName</name>
+               <value>{http://schemas.xmlsoap.org/ws/2004/08/eventing}Identifier</value>
+            </parameter>
+         </resourceParams>
+      </resource>
+      <resource name="metadata" type="org.apache.ws.util.jndi.tools.MetadataConfigImpl">
+         <metadataConfig>
+            <!-- classpath -->
+            <metadata dialect="http://schemas.xmlsoap.org/wsdl/" identifier="http://ws.apache.org/notification/base/service/SubscriptionManager/wsdl">
+               <location>wsdl/SubscriptionManager.wsdl</location>
+            </metadata>                  
+         </metadataConfig>
+       </resource>      
+   </service>
+
+   <service name="NotificationProducer">
+      <resource name="home" type="BrokerHome">
+         <resourceParams>   
+            <parameter>
+               <name>baseWebappUrl</name>
+               <!-- 
+               	    The baseWebappUrl can contain the following:               
+               	    -the marker $IP_ADDRESS$ in which case we will attempt to determine the IP address at runtime. (Do not use on multi-homed systems)
+               	    -the marker $HOST_NAME$ in which case we will attempt to determine the host name at runtime
+               	    -NO Marker in which case whatever value you add will be static and used.
+               -->
+               <value>http://$IP_ADDRESS$:8080/pubscribe</value>
+	    </parameter>         
+         
+            <parameter>
+               <name>serviceClassName</name>
+               <value>org.apache.ws.eventing.services.BrokerService</value>
+            </parameter>
+            <parameter>
+               <name>resourceClassName</name>
+               <value>BrokerResource</value>
+            </parameter>
+            <parameter>
+               <name>wsdlTargetNamespace</name>
+               <value>http://ws.apache.org/eventing/services/EventSourcePort</value>
+            </parameter>            
+            <!--
+            <parameter>
+               <name>resourceIdentifierReferenceParameterName</name>
+               <value>{http://schemas.xmlsoap.org/ws/2004/08/eventing}Identifier</value>
+            </parameter>
+            -->
+         </resourceParams>
+      </resource>
+   </service>
+
+   <service name="NotificationPort">
+      <resource name="home" type="org.apache.ws.eventing.SubscriptionHome">
+         <resourceParams>
+            <parameter>
+               <name>baseWebappUrl</name>
+               <!-- 
+               	    The baseWebappUrl can contain the following:               
+               	    -the marker $IP_ADDRESS$ in which case we will attempt to determine the IP address at runtime. (Do not use on multi-homed systems)
+               	    -the marker $HOST_NAME$ in which case we will attempt to determine the host name at runtime
+               	    -NO Marker in which case whatever value you add will be static and used.
+               -->
+               <value>http://$IP_ADDRESS$:8080/pubscribe</value>
+	    </parameter>         
+         
+            <parameter>
+               <name>serviceClassName</name>
+               <value>org.apache.ws.eventing.services.BrokerService</value>
+            </parameter>
+            <parameter>
+               <name>resourceClassName</name>
+               <value>org.apache.ws.eventing.Subscription</value>
+            </parameter>
+            <parameter>
+               <name>wsdlTargetNamespace</name>
+               <value>http://ws.apache.org/eventing/services/NotificationPort</value>
+            </parameter>            
+            <parameter>
+               <name>resourceIdentifierReferenceParameterName</name>
+               <value>{http://schemas.xmlsoap.org/ws/2004/08/eventing}Identifier</value>
+            </parameter>
+         </resourceParams>
+      </resource>
+   </service>
+</jndiConfig>
+    

Added: webservices/muse/branches/1.0/src/examples/broker/log4j.properties
URL: http://svn.apache.org/viewvc/webservices/muse/branches/1.0/src/examples/broker/log4j.properties?rev=411218&view=auto
==============================================================================
--- webservices/muse/branches/1.0/src/examples/broker/log4j.properties (added)
+++ webservices/muse/branches/1.0/src/examples/broker/log4j.properties Fri Jun  2 10:32:46 2006
@@ -0,0 +1,9 @@
+# Set root logger level to DEBUG and its only appender to A1.
+log4j.rootLogger=DEBUG, A1
+
+# A1 is set to be a ConsoleAppender.
+log4j.appender.A1=org.apache.log4j.ConsoleAppender
+
+# A1 uses PatternLayout.
+log4j.appender.A1.layout=org.apache.log4j.PatternLayout
+log4j.appender.A1.layout.ConversionPattern=%-4r [%t] %-5p %c %x - %m%n
\ No newline at end of file

Added: webservices/muse/branches/1.0/src/examples/broker/topicspace.xml
URL: http://svn.apache.org/viewvc/webservices/muse/branches/1.0/src/examples/broker/topicspace.xml?rev=411218&view=auto
==============================================================================
--- webservices/muse/branches/1.0/src/examples/broker/topicspace.xml (added)
+++ webservices/muse/branches/1.0/src/examples/broker/topicspace.xml Fri Jun  2 10:32:46 2006
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<wstop:topicSpace name="TopicSpaceExample1"
+targetNamespace="http://example.org/topicSpace/example1"
+xmlns:tns="http://example.org/topicSpace/example1"
+xmlns:xyz="http://example.org/anotherNamespace"
+xmlns:wstop=
+"http://www.ibm.com/xmlns/stdwip/web-services/WS-Topics" >
+<wstop:topic name="t1">
+<wstop:topic name="t2" messageTypes="xyz:m1 tns:m2"/>
+<wstop:topic name="t3" messageTypes="xyz:m3"/>
+</wstop:topic>
+<wstop:topic name="t4">
+<wstop:topic name="t5" messageTypes="tns:m3"/>
+<wstop:topic name="t6">
+</wstop:topic>
+</wstop:topic>
+</wstop:topicSpace>
\ No newline at end of file

Added: webservices/muse/branches/1.0/src/examples/consumer/build.properties
URL: http://svn.apache.org/viewvc/webservices/muse/branches/1.0/src/examples/consumer/build.properties?rev=411218&view=auto
==============================================================================
--- webservices/muse/branches/1.0/src/examples/consumer/build.properties (added)
+++ webservices/muse/branches/1.0/src/examples/consumer/build.properties Fri Jun  2 10:32:46 2006
@@ -0,0 +1,11 @@
+base.url=http://localhost:8080/pubscribe/services
+
+# Uncomment and modify the below lines if you would like to deploy to a
+# pubscribe webapp located somewhere other than the default location of
+# ../webapps/pubscribe (e.g. ${env.CATALINA_HOME}/webapps/pubscribe)
+pubscribe.webapp.dir=${env.CATALINA_HOME}/webapps/pubscribe
+
+# Uncomment and modify the below lines if you require a proxy to connect to external web sites
+#http.proxyHost=proxy.xyz.com
+#http.proxyPort=8088
+#http.nonProxyHosts=localhost 

Added: webservices/muse/branches/1.0/src/examples/consumer/build.xml
URL: http://svn.apache.org/viewvc/webservices/muse/branches/1.0/src/examples/consumer/build.xml?rev=411218&view=auto
==============================================================================
--- webservices/muse/branches/1.0/src/examples/consumer/build.xml (added)
+++ webservices/muse/branches/1.0/src/examples/consumer/build.xml Fri Jun  2 10:32:46 2006
@@ -0,0 +1,78 @@
+<?xml version="1.0"?>
+
+<project name="filesystem_example" default="usage" 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"/>
+   
+   <property name="out.dir"               location="generated"/>
+   <property name="lib.dir"               location="${out.dir}/.xmlbeans/lib"/>
+   <property name="consumer.wsdl"       location="consumer.wsdl" />
+   
+   <target name="init">
+     
+     <available file="../../webapps/pubscribe" type="dir" property="dist.pubscribe.webapp.dir" value="../../webapps/pubscribe" />         
+     <condition property="pubscribe.webapp.dir" value="${dist.pubscribe.webapp.dir}">
+        <isset property="dist.pubscribe.webapp.dir"/>
+     </condition>     
+          
+     <fail unless="pubscribe.webapp.dir" message="webapp dir ../../webapps/pubscribe does not exist." />    
+     <echo>Using webapp dir: ${pubscribe.webapp.dir}</echo>    
+     <mkdir dir="${lib.dir}" />
+     <path id="pubscribe.classpath.id">
+       <pathelement location="${pubscribe.webapp.dir}/WEB-INF/classes" />
+       <fileset dir="${pubscribe.webapp.dir}/WEB-INF/lib" includes="*.jar" />
+       <fileset dir="${lib.dir}" includes="*.jar" />
+       <pathelement location="${activation.jar}" />
+       <pathelement location="${mail.jar}" />
+     </path>
+     <property name="pubscribe.classpath" refid="pubscribe.classpath.id" />
+   
+   </target>
+
+   <target name="generate"
+           depends="init"
+           description="generate Axis service classes and XMLBeans types for the filesystem WSDL">      
+     
+     <property name="tmp.dir" location="${pubscribe.webapp.dir}/_tmp_" />
+     <mkdir dir="${tmp.dir}" />
+     <copy file="${consumer.wsdl}" todir="${tmp.dir}" overwrite="true" />         
+     <taskdef name="wsdl2Java" classname="org.apache.ws.notification.tool.WsnWsdl2JavaTask" classpath="${pubscribe.classpath}" />              
+     
+     <wsdl2Java outputDir="${out.dir}"
+                classpath="${pubscribe.classpath}"
+                debug="off"
+                proxyHost="${http.proxyHost}"
+                proxyPort="${http.proxyPort}"
+                nonProxyHosts="${http.nonProxyHosts}">
+       <wsdls dir="${tmp.dir}"> 
+         <include name="**/*.wsdl" />	  
+       </wsdls>
+     </wsdl2Java>
+          
+     <delete dir="${tmp.dir}" />
+ 
+     <mkdir dir="${out.dir}/consumer/method_impls" />
+     <copy todir="${out.dir}/consumer/method_impls">
+        <fileset dir="${basedir}/method_impls"/>                
+     </copy>
+ 
+     <copy todir="${out.dir}/consumer/src/java">
+         <fileset dir="${basedir}/src"/>                
+     </copy>
+ 
+   </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/branches/1.0/src/examples/consumer/consumer.wsdl
URL: http://svn.apache.org/viewvc/webservices/muse/branches/1.0/src/examples/consumer/consumer.wsdl?rev=411218&view=auto
==============================================================================
--- webservices/muse/branches/1.0/src/examples/consumer/consumer.wsdl (added)
+++ webservices/muse/branches/1.0/src/examples/consumer/consumer.wsdl Fri Jun  2 10:32:46 2006
@@ -0,0 +1,123 @@
+<?xml version="1.0"?>
+
+<definitions name="NotifConsumer"
+             targetNamespace="http://ws.apache.org/resource/example/NotifConsumer"
+             xmlns="http://schemas.xmlsoap.org/wsdl/"
+             xmlns:tns="http://ws.apache.org/resource/example/NotifConsumer"
+             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: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"/>
+
+   <types>
+      <schema elementFormDefault="qualified"
+              targetNamespace="http://ws.apache.org/resource/example/NotifConsumer"
+              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">
+
+         <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-Draft_01.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:complexType name="LastMessageType">
+            <xsd:sequence>
+               <xsd:element name="Occurred"
+                  type="xsd:dateTime"/>
+               <xsd:element name="Notification"
+                  type="xsd:anyType"/>               
+            </xsd:sequence>
+         </xsd:complexType>         
+         
+         <element name="LastMessage" type="tns:LastMessageType" />
+         
+         <!-- Resource Properties Document Schema -->        
+         <element name="ConsumerResourceProperties">
+            <complexType>
+               <sequence>
+                  <element ref="tns:LastMessage" />                                    
+               </sequence>
+            </complexType>
+         </element>
+
+         
+      </schema>
+   </types>   
+   
+   <portType name="ConsumerPortType" wsrp:ResourceProperties="tns:ConsumerResourceProperties">
+         
+      <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="Notify">
+         <input name="Notify" message="wsntw:Notify"/>
+      </operation>
+        
+   
+   </portType>
+
+   <binding name="MySoapHttpBinding" type="tns:ConsumerPortType">
+
+      <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
+   
+      <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="Notify">
+         <soap:operation style="document"/>      
+         <input>
+            <soap:body use="literal"/>         
+         </input>
+      </operation>
+          
+
+   </binding>
+
+   <service name="ConsumerService">
+      <!-- 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="consumer" binding="tns:MySoapHttpBinding">
+         <soap:address location="http://localhost:8080/wsrf/services/consumer" />
+      </port>
+   </service>
+
+</definitions>

Added: webservices/muse/branches/1.0/src/examples/consumer/epr/consumer.txt
URL: http://svn.apache.org/viewvc/webservices/muse/branches/1.0/src/examples/consumer/epr/consumer.txt?rev=411218&view=auto
==============================================================================
--- webservices/muse/branches/1.0/src/examples/consumer/epr/consumer.txt (added)
+++ webservices/muse/branches/1.0/src/examples/consumer/epr/consumer.txt Fri Jun  2 10:32:46 2006
@@ -0,0 +1,6 @@
+<?xml version="1.0"?>
+
+<EndpointReference xmlns="http://schemas.xmlsoap.org/ws/2004/08/addressing">
+   <Address>http://localhost:8080/pubscribe/services/consumer</Address>
+</EndpointReference>
+

Added: webservices/muse/branches/1.0/src/examples/consumer/method_impls/consumer_home_init.txt
URL: http://svn.apache.org/viewvc/webservices/muse/branches/1.0/src/examples/consumer/method_impls/consumer_home_init.txt?rev=411218&view=auto
==============================================================================
--- webservices/muse/branches/1.0/src/examples/consumer/method_impls/consumer_home_init.txt (added)
+++ webservices/muse/branches/1.0/src/examples/consumer/method_impls/consumer_home_init.txt Fri Jun  2 10:32:46 2006
@@ -0,0 +1,6 @@
+    public void init() throws Exception
+    {
+        super.init();
+        add( createInstance( null ) );
+    }
+

Added: webservices/muse/branches/1.0/src/examples/consumer/method_impls/consumer_resource_init.txt
URL: http://svn.apache.org/viewvc/webservices/muse/branches/1.0/src/examples/consumer/method_impls/consumer_resource_init.txt?rev=411218&view=auto
==============================================================================
--- webservices/muse/branches/1.0/src/examples/consumer/method_impls/consumer_resource_init.txt (added)
+++ webservices/muse/branches/1.0/src/examples/consumer/method_impls/consumer_resource_init.txt Fri Jun  2 10:32:46 2006
@@ -0,0 +1,5 @@
+
+    public void init()
+    {
+        super.init();
+    }

Added: webservices/muse/branches/1.0/src/examples/consumer/method_impls/consumer_service_notify.txt
URL: http://svn.apache.org/viewvc/webservices/muse/branches/1.0/src/examples/consumer/method_impls/consumer_service_notify.txt?rev=411218&view=auto
==============================================================================
--- webservices/muse/branches/1.0/src/examples/consumer/method_impls/consumer_service_notify.txt (added)
+++ webservices/muse/branches/1.0/src/examples/consumer/method_impls/consumer_service_notify.txt Fri Jun  2 10:32:46 2006
@@ -0,0 +1,20 @@
+    public void notify(org.oasisOpen.docs.wsn.x2004.x06.wsnWSBaseNotification12Draft01.NotifyDocument notifyDocument)
+    {
+        //get the property set
+        org.apache.ws.resource.properties.ResourcePropertySet resourcePropertySet = ((org.apache.ws.resource.PropertiesResource)getResource()).getResourcePropertySet();
+
+        //get the property
+        org.apache.ws.resource.properties.ResourceProperty resourceProperty = resourcePropertySet.get(ConsumerPropertyQNames.LASTMESSAGE);
+        resourceProperty.clear();//clear old notifs
+        
+        //add the new entry
+        //build the LastMessage type for updating this resoruce property
+        LastMessageDocument lastMessageDocument = LastMessageDocument.Factory.newInstance();
+        org.apache.ws.resource.example.notifConsumer.LastMessageType lastMessageType = lastMessageDocument.addNewLastMessage();
+        lastMessageType.setOccurred(java.util.Calendar.getInstance());
+        org.apache.xmlbeans.XmlObject lastMessageNotif = lastMessageType.addNewNotification();
+        org.apache.ws.util.XmlBeanUtils.addChildElement(lastMessageNotif, notifyDocument);
+
+        //add the LastMessageDocument to the resource property
+        resourceProperty.add(lastMessageDocument);
+    }
\ No newline at end of file

Added: webservices/muse/branches/1.0/src/examples/consumer/notifconsumer.jsp
URL: http://svn.apache.org/viewvc/webservices/muse/branches/1.0/src/examples/consumer/notifconsumer.jsp?rev=411218&view=auto
==============================================================================
--- webservices/muse/branches/1.0/src/examples/consumer/notifconsumer.jsp (added)
+++ webservices/muse/branches/1.0/src/examples/consumer/notifconsumer.jsp Fri Jun  2 10:32:46 2006
@@ -0,0 +1,138 @@
+
+
+
+<%@ page import="org.apache.ws.resource.example.RequestUtils,
+                 org.apache.ws.resource.example.notifConsumer.*"%>
+
+ <%
+  if(request.getParameter("page") == null)
+  {
+%>
+                
+
+<HTML>
+<head>
+<title>Notification Consumer Gui</title>
+</head>
+<BODY>
+<h1>Notification Consumer Gui</h1>
+<FORM METHOD=POST ACTION="notifconsumer.jsp">
+This form will subscribe the ConsumerPortResource for ResourcePropertyChangedNotifications from a NotificationProducer Resource's Property.  
+<P>ConsumerPortService Consumer EPR URL (a file on a URL which contains the 2004/08 EPR XML):  <input type="text" name="consumerurl"  value="http://localhost:8080/pubscribe/epr/consumer.txt" size="100"/></P>
+<P>Notification Producer EPR URL (a file on a URL which contains the 2004/08 EPR XML):  <input type="text" name="subscribeurl"  value="http://localhost:8080/pubscribe/epr/filesystem.txt" size="100"/></P>
+<P>Notification Producer's Simple Topic QName (Note: Must be in format usable from QName.valueOf(..) see example in textfield):  <input type="text" name="topicname"  value="{http://ws.apache.org/resource/example/filesystem}Comment" size="100"/></P>
+<P><INPUT TYPE="SUBMIT" value="SUBSCRIBE"/>
+<INPUT TYPE="hidden" name="page" value="subscribe"/>
+</P>
+</FORM>
+</BODY>
+</HTML>
+<%
+}
+
+else if(request.getParameter("page").equals("subscribe"))
+{
+   boolean bool = org.apache.ws.resource.example.RequestUtils.invokeSubscribe(request.getParameter("consumerurl"), request.getParameter("subscribeurl"), request.getParameter("topicname"));
+%>
+<HTML>
+<head>
+<title>Notification Consumer Gui</title>
+</head>
+<BODY>
+<h1>Notification Consumer Gui</h1>
+<%
+
+   if(bool)
+   {
+       out.println("Subscribe succeeded!");
+%>
+
+<FORM METHOD=POST ACTION="notifconsumer.jsp">
+<P><INPUT TYPE="SUBMIT" value="Go to Get Last Notif Form"/>
+<input type="hidden" name="consumerurl" value="<%= request.getParameter("consumerurl") %>"/>
+<input type="hidden" name="page" value="printnotif"/>
+</P>
+</FORM>
+
+<%
+   }//end if
+
+else
+{
+	out.println("Subscribe failed!");
+	out.println("Please try again");
+%>
+<FORM METHOD=POST ACTION="notifconsumer.jsp">
+<P><INPUT TYPE="SUBMIT" value="Return to Form"/></P>
+</FORM>
+</body>
+</html>
+<%
+   }//end else
+}//end else if
+
+else if(request.getParameter("page").equals("printnotif"))
+{
+%>
+<HTML>
+<head>
+<title>Notification Consumer Gui</title>
+</head>
+<BODY>
+<h1>Notification Consumer Gui</h1>
+<FORM METHOD=POST ACTION="notifconsumer.jsp">
+<P>Check the ConsumerPortResource to see if it has received notifications:</P>
+<P>ConsumerPortService Consumer EPR URL (a file on a URL which contains the 2004/08 EPR XML):  <input type="text" name="consumerurl"  value="<%= request.getParameter("consumerurl") %>" size="100"/></P>
+<P><INPUT TYPE="SUBMIT" value="Get Last Notification"/>
+<INPUT TYPE="hidden" name="page" value="getnotif"/>
+</body></html>
+<%
+}
+
+else if(request.getParameter("page").equals("getnotif"))
+{
+%>
+<HTML>
+<head>
+<title>Notification Consumer Gui</title>
+</head>
+<BODY>
+<h1>Notification Consumer Gui</h1>
+<%
+ //if successfulprint message...elseprint failed and go back to get notif
+  LastMessageType lastMessage = RequestUtils.getLastMessage(request.getParameter("consumerurl"));
+  if(lastMessage == null)
+    {
+       out.println("Notification was null!  Try again!");
+%>
+<FORM METHOD=POST ACTION="notifconsumer.jsp">
+<P><INPUT TYPE="SUBMIT" value="Go to GetLastNotification Form"/>
+<input type="hidden" name="page" value="printnotif"/>
+<input type="hidden" name="consumerurl" value="<%=request.getParameter("consumerurl")  %>"/>
+</P>
+</FORM>
+<%
+}//end if
+else
+{
+ out.println("<strong>The notification was recieved at: " + lastMessage.getOccurred().getTime().toString() + "</strong>");
+%>
+<form METHOD=POST ACTION="notifconsumer.jsp">
+<textarea rows="40" cols="100">
+<%
+ out.println(lastMessage.getNotification().toString());       
+%>
+ </textarea>
+<P>ConsumerPortService Consumer EPR URL (a file on a URL which contains the 2004/08 EPR XML):  <input type="text" name="consumerurl"  value="<%= request.getParameter("consumerurl") %>" size="100"/></P>
+<P><INPUT TYPE="SUBMIT" value="Get Last Notification"/>
+</P>
+<INPUT TYPE="hidden" name="page" value="printnotif"/>
+ </form>
+<%
+    }//end else
+	%>
+	</body></html>
+	<%
+}//end else if
+%>
+

Added: webservices/muse/branches/1.0/src/examples/consumer/readme.txt
URL: http://svn.apache.org/viewvc/webservices/muse/branches/1.0/src/examples/consumer/readme.txt?rev=411218&view=auto
==============================================================================
--- webservices/muse/branches/1.0/src/examples/consumer/readme.txt (added)
+++ webservices/muse/branches/1.0/src/examples/consumer/readme.txt Fri Jun  2 10:32:46 2006
@@ -0,0 +1,26 @@
+
+
+ConsumerResource is a singleton....
+
+1. run ant generate in ../examples/consumer
+
+2. cd to the generated/consumer dir
+
+3. copy method parts from method_impls dir into the generated files
+
+4. Modify the Consumer_jndi-config.xml jndi config file to remove the resourceIdentifierReferenceParameterName parameter...This service is a singleton.
+
+5. run ant compile deploy (in the generated/consumer dir) to deploy to tomcat
+
+6. copy the notifconsumer.jsp and epr directory (from ../examples/consumer) to the root of the pubscribe webapp
+
+7. Make sure you've compiled/deployed the filesystem example.
+
+8. from the filesystem example copy the notifproducer.jsp and the epr directory to the pubscribe webapp
+
+9. Modify the epr txt files as necessary for your environment in the pubscribe webapp/epr directory
+
+10. start tomcat
+
+11. browse to http://localhost:8080/pubscribe/notifconsumer.jsp  and http://localhost:8080/pubscribe/notifproducer.jsp in separate browswers/tabs (urls may need to be modified)
+

Added: webservices/muse/branches/1.0/src/examples/consumer/src/org/apache/ws/resource/example/RequestUtils.java
URL: http://svn.apache.org/viewvc/webservices/muse/branches/1.0/src/examples/consumer/src/org/apache/ws/resource/example/RequestUtils.java?rev=411218&view=auto
==============================================================================
--- webservices/muse/branches/1.0/src/examples/consumer/src/org/apache/ws/resource/example/RequestUtils.java (added)
+++ webservices/muse/branches/1.0/src/examples/consumer/src/org/apache/ws/resource/example/RequestUtils.java Fri Jun  2 10:32:46 2006
@@ -0,0 +1,241 @@
+package org.apache.ws.resource.example;
+
+import org.apache.axis.message.addressing.Constants;
+import org.apache.ws.XmlObjectWrapper;
+import org.apache.ws.addressing.EndpointReference;
+import org.apache.ws.addressing.XmlBeansEndpointReference;
+import org.apache.ws.notification.topics.v2004_06.TopicsConstants;
+import org.apache.ws.resource.example.notifConsumer.ConsumerPropertyQNames;
+import org.apache.ws.resource.example.notifConsumer.LastMessageType;
+import org.apache.ws.util.XmlBeanUtils;
+import org.apache.ws.util.soap.SoapClient;
+import org.apache.xmlbeans.XmlObject;
+import org.oasisOpen.docs.wsn.x2004.x06.wsnWSBaseNotification12Draft01.SubscribeDocument;
+import org.oasisOpen.docs.wsn.x2004.x06.wsnWSBaseNotification12Draft01.SubscribeResponseDocument;
+import org.oasisOpen.docs.wsn.x2004.x06.wsnWSBaseNotification12Draft01.TopicExpressionType;
+import org.oasisOpen.docs.wsrf.x2004.x06.wsrfWSResourceProperties12Draft01.GetResourcePropertyDocument;
+import org.oasisOpen.docs.wsrf.x2004.x06.wsrfWSResourceProperties12Draft01.GetResourcePropertyResponseDocument;
+import org.xmlsoap.schemas.soap.envelope.Envelope;
+import org.xmlsoap.schemas.soap.envelope.EnvelopeDocument;
+import org.xmlsoap.schemas.soap.envelope.Header;
+import org.xmlsoap.schemas.ws.x2004.x08.addressing.EndpointReferenceDocument;
+
+import javax.xml.namespace.QName;
+import java.net.URI;
+import java.net.URL;
+import java.util.Calendar;
+
+
+/**
+ * @author Sal Campana
+ */
+public class RequestUtils
+{
+    public static XmlObject sendRequest(XmlObject requestDoc, String action, EndpointReference epr)
+    {
+        EnvelopeDocument requestEnvelopeDoc = createEnvelope();
+        Envelope requestEnvelope = requestEnvelopeDoc.getEnvelope();
+        addAddressingHeaders(requestEnvelope.getHeader(), action, epr);
+        XmlBeanUtils.addChildElement(requestEnvelope.getBody(), requestDoc);
+        try
+        {
+            URL endpointURL = new URL(epr.getAddress());
+            System.out.println("Sending Request to " + endpointURL.toString());
+            URI actionURI = new URI(action);
+            String response = SoapClient.sendRequest(endpointURL, requestEnvelopeDoc.newInputStream(), actionURI);
+            EnvelopeDocument responseEnvelopeDoc = (EnvelopeDocument) XmlObject.Factory.parse(response);
+            Envelope responseEnvelope = responseEnvelopeDoc.getEnvelope();
+            XmlObject[] responseBodyElems = XmlBeanUtils.getChildElements(responseEnvelope.getBody());
+            System.out.println("Received response from " + endpointURL.toString());
+            System.out.println(responseBodyElems[0].toString());
+            if (responseBodyElems.length == 0)
+            {
+                return null;
+            }
+            else
+            {
+                return responseBodyElems[0];
+            }
+
+        }
+        catch (Exception e)
+        {
+            System.out.println("An Exception Occurred!");
+            e.printStackTrace();
+            throw new RuntimeException(e);
+        }
+    }
+
+    public static boolean invokeSubscribe(String consumerURL, String serviceEPRURL, String topicName)
+    {
+        QName topic = QName.valueOf(topicName);
+        SubscribeDocument requestDoc = SubscribeDocument.Factory.newInstance();
+        SubscribeDocument.Subscribe subscribe = requestDoc.addNewSubscribe();
+        subscribe.setUseNotify(true);
+        Calendar instance = Calendar.getInstance();
+        instance.setTimeInMillis(instance.getTimeInMillis() + 2000000);
+        subscribe.setInitialTerminationTime(instance);
+        org.xmlsoap.schemas.ws.x2003.x03.addressing.EndpointReferenceType consumerRef = subscribe.addNewConsumerReference();
+        org.xmlsoap.schemas.ws.x2003.x03.addressing.AttributedURI address = consumerRef.addNewAddress();
+        address.setStringValue(createEpr(consumerURL).getAddress());
+        TopicExpressionType topicExpr = subscribe.addNewTopicExpression();
+        topicExpr.setDialect(TopicsConstants.TOPIC_EXPR_DIALECT_SIMPLE);
+        XmlBeanUtils.setValueAsQName(topicExpr, topic);
+        XmlObject response = sendRequest(requestDoc, "http://xyz.com/action/Subscribe", createEpr(serviceEPRURL));
+        if (!(response instanceof SubscribeResponseDocument.SubscribeResponse))
+        {
+            return false;
+        }
+        else
+        {
+            return true;
+        }
+    }
+
+    public static XmlObject sendRequest(XmlObject requestDoc, String action, String address)
+    {
+        EnvelopeDocument requestEnvelopeDoc = createEnvelope();
+        Envelope requestEnvelope = requestEnvelopeDoc.getEnvelope();
+        addAddressingHeaders(requestEnvelope.getHeader(), action, address);
+        XmlBeanUtils.addChildElement(requestEnvelope.getBody(), requestDoc);
+        try
+        {
+            System.out.println("Sending request to: " + address);
+            URL endpointURL = new URL(address);
+            URI actionURI = new URI(action);
+            String response = SoapClient.sendRequest(endpointURL, requestEnvelopeDoc.newInputStream(), actionURI);
+            EnvelopeDocument responseEnvelopeDoc = (EnvelopeDocument) XmlObject.Factory.parse(response);
+            Envelope responseEnvelope = responseEnvelopeDoc.getEnvelope();
+            XmlObject[] responseBodyElems = XmlBeanUtils.getChildElements(responseEnvelope.getBody());
+            if (responseBodyElems.length == 0)
+            {
+                return null;
+            }
+            else
+            {
+                return responseBodyElems[0];
+            }
+        }
+        catch (Exception e)
+        {
+            throw new RuntimeException(e);
+        }
+    }
+
+    private static void addAddressingHeaders(Header header, String action, String address)
+    {
+        XmlObject toElem;
+        XmlObject actionElem;
+        org.xmlsoap.schemas.ws.x2004.x08.addressing.ToDocument toDoc = org.xmlsoap.schemas.ws.x2004.x08.addressing.ToDocument.Factory.newInstance();
+        org.xmlsoap.schemas.ws.x2004.x08.addressing.AttributedURI attributedURI = toDoc.addNewTo();
+        attributedURI.setStringValue(address);
+        toElem = toDoc;
+        org.xmlsoap.schemas.ws.x2004.x08.addressing.ActionDocument actionDoc = org.xmlsoap.schemas.ws.x2004.x08.addressing.ActionDocument.Factory.newInstance();
+        org.xmlsoap.schemas.ws.x2004.x08.addressing.AttributedURI actionType = actionDoc.addNewAction();
+        actionType.setStringValue(action);
+        actionElem = actionDoc;
+
+        XmlBeanUtils.addChildElement(header, toElem);
+        XmlBeanUtils.addChildElement(header, actionElem);
+    }
+
+    public static LastMessageType getLastMessage(String serviceURL)
+    {
+
+        GetResourcePropertyDocument getResourcePropertyDocument = GetResourcePropertyDocument.Factory.newInstance();
+        getResourcePropertyDocument.setGetResourceProperty(ConsumerPropertyQNames.LASTMESSAGE);
+        XmlObject xmlObject = sendRequest(getResourcePropertyDocument, "http://getResourceProp", createEpr(serviceURL));
+        if (xmlObject instanceof GetResourcePropertyResponseDocument.GetResourcePropertyResponse)
+        {
+            GetResourcePropertyResponseDocument.GetResourcePropertyResponse getResourcePropertyDocumentResponse = (GetResourcePropertyResponseDocument.GetResourcePropertyResponse) xmlObject;
+            XmlObject[] childElements = XmlBeanUtils.getChildElements(getResourcePropertyDocumentResponse);
+            if (childElements.length > 0)
+            {
+                return (LastMessageType) childElements[0];
+            }
+
+            else
+            {
+                return null;
+            }
+        }
+        else
+        {
+            return null;
+        }
+    }
+
+    private static EndpointReference createEpr(String filesystemUrl)
+    {
+        XmlBeansEndpointReference epr = null;
+        try
+        {
+            EndpointReferenceDocument eprdoc = (EndpointReferenceDocument) XmlObject.Factory.parse(new URL(filesystemUrl));
+            epr = new XmlBeansEndpointReference(eprdoc.getEndpointReference());
+        }
+        catch (Exception e)
+        {
+            e.printStackTrace();
+        }
+
+        return epr;
+    }
+
+    private static EnvelopeDocument createEnvelope()
+    {
+        EnvelopeDocument envelopeDoc = EnvelopeDocument.Factory.newInstance();
+        Envelope envelope = envelopeDoc.addNewEnvelope();
+        envelope.addNewHeader();
+        envelope.addNewBody();
+        return envelopeDoc;
+    }
+
+    private static void addAddressingHeaders(Header header, String action, EndpointReference epr)
+    {
+        XmlObject eprXBean = ((XmlObjectWrapper) epr).getXmlObject();
+        XmlObject toElem;
+        XmlObject actionElem;
+        if (eprXBean.schemaType().getName().getNamespaceURI().equals(Constants.NS_URI_ADDRESSING_2003_03))
+        {
+            org.xmlsoap.schemas.ws.x2003.x03.addressing.ToDocument toDoc = org.xmlsoap.schemas.ws.x2003.x03.addressing.ToDocument.Factory.newInstance();
+            org.xmlsoap.schemas.ws.x2003.x03.addressing.AttributedURI attributedURI = toDoc.addNewTo();
+            attributedURI.setStringValue(epr.getAddress());
+            toElem = toDoc;
+            org.xmlsoap.schemas.ws.x2003.x03.addressing.ActionDocument actionDoc = org.xmlsoap.schemas.ws.x2003.x03.addressing.ActionDocument.Factory.newInstance();
+            org.xmlsoap.schemas.ws.x2003.x03.addressing.AttributedURI actionType = actionDoc.addNewAction();
+            actionType.setStringValue(action);
+            actionElem = actionDoc;
+        }
+        else
+        {
+            org.xmlsoap.schemas.ws.x2004.x08.addressing.ToDocument toDoc = org.xmlsoap.schemas.ws.x2004.x08.addressing.ToDocument.Factory.newInstance();
+            org.xmlsoap.schemas.ws.x2004.x08.addressing.AttributedURI attributedURI = toDoc.addNewTo();
+            attributedURI.setStringValue(epr.getAddress());
+            toElem = toDoc;
+            org.xmlsoap.schemas.ws.x2004.x08.addressing.ActionDocument actionDoc = org.xmlsoap.schemas.ws.x2004.x08.addressing.ActionDocument.Factory.newInstance();
+            org.xmlsoap.schemas.ws.x2004.x08.addressing.AttributedURI actionType = actionDoc.addNewAction();
+            actionType.setStringValue(action);
+            actionElem = actionDoc;
+        }
+        XmlBeanUtils.addChildElement(header, toElem);
+        XmlBeanUtils.addChildElement(header, actionElem);
+        XmlBeansEndpointReference newepr = null;
+        if (eprXBean.schemaType().getName().getNamespaceURI().equals(Constants.NS_URI_ADDRESSING_2003_03))
+        {
+            newepr = new XmlBeansEndpointReference((org.xmlsoap.schemas.ws.x2003.x03.addressing.EndpointReferenceType) eprXBean);
+        }
+        else
+        {
+            newepr = new XmlBeansEndpointReference((org.xmlsoap.schemas.ws.x2004.x08.addressing.EndpointReferenceType) eprXBean);
+        }
+        if (newepr.getReferenceProperties() != null)
+        {
+            XmlObject[] refPropElems = (XmlObject[]) newepr.getReferenceProperties();
+            for (int i = 0; i < refPropElems.length; i++)
+            {
+                XmlBeanUtils.addChildElement(header, refPropElems[i]);
+            }
+        }
+    }
+
+}

Added: webservices/muse/branches/1.0/src/examples/pubsubclient/ConsumerPanel.java
URL: http://svn.apache.org/viewvc/webservices/muse/branches/1.0/src/examples/pubsubclient/ConsumerPanel.java?rev=411218&view=auto
==============================================================================
--- webservices/muse/branches/1.0/src/examples/pubsubclient/ConsumerPanel.java (added)
+++ webservices/muse/branches/1.0/src/examples/pubsubclient/ConsumerPanel.java Fri Jun  2 10:32:46 2006
@@ -0,0 +1,247 @@
+/*
+ * spanel.java
+ *
+ * Created on 24. März 2005, 01:01
+ */
+import java.util.Calendar;
+import javax.swing.JTabbedPane;
+import javax.swing.tree.*;
+
+import org.apache.ws.pubsub.*;
+import org.apache.ws.notification.topics.Topic;
+/**
+ *
+ * @author  Administrator
+ */
+public class ConsumerPanel extends javax.swing.JPanel {
+    private PubSubWSmanager pman;
+    private Calendar time=Calendar.getInstance();
+    
+    private SubscriptionListModel sublistmodel;
+    private NotificationListModel notlistmodel;
+    /** Creates new form spanel */ 
+    public ConsumerPanel(JTabbedPane notebook, PubSubWSmanager _pman) {
+        this.pman=_pman;
+        initComponents();
+        timeSlider.setMinimum(0);
+        timeSlider.setMaximum(100);
+        timeSlider.setValue(0);
+
+        sublistmodel=new SubscriptionListModel();
+        notlistmodel=new NotificationListModel();
+        subs.setModel(sublistmodel);
+        nots.setModel(notlistmodel);
+
+        DefaultTreeCellRenderer renderer2 = new DefaultTreeCellRenderer();
+        renderer2.setOpenIcon(null);
+        renderer2.setClosedIcon(null);
+        renderer2.setLeafIcon(null);
+        tree.setCellRenderer(renderer2);
+            
+        notebook.addTab( "Consumer", this );
+        
+        
+    }
+    
+    /** This method is called from within the constructor to
+     * initialize the form.
+     * WARNING: Do NOT modify this code. The content of this method is
+     * always regenerated by the Form Editor.
+     */
+    private void initComponents() {//GEN-BEGIN:initComponents
+        cXfilter = new javax.swing.JCheckBox();
+        filterstr = new javax.swing.JTextField();
+        cTermtime = new javax.swing.JCheckBox();
+        termtime = new javax.swing.JTextField();
+        cTfilter = new javax.swing.JCheckBox();
+        jList1 = new javax.swing.JList();
+        jButton1 = new javax.swing.JButton();
+        cSubend = new javax.swing.JCheckBox();
+        jScrollPane1 = new javax.swing.JScrollPane();
+        tree = new TopicSpaceTree(pman).getTree();
+
+        jSeparator1 = new javax.swing.JSeparator();
+        jScrollPane2 = new javax.swing.JScrollPane();
+        subs = new javax.swing.JList();
+        jScrollPane3 = new javax.swing.JScrollPane();
+        nots = new javax.swing.JList();
+        renewButton = new javax.swing.JButton();
+        unsubscribeButton = new javax.swing.JButton();
+        jLabel1 = new javax.swing.JLabel();
+        jLabel2 = new javax.swing.JLabel();
+        timeSlider = new javax.swing.JSlider();
+
+        setLayout(null);
+
+        cXfilter.setText("XPath Filter");
+        cXfilter.setToolTipText("If you want to make a XPath Subscription click here");
+        add(cXfilter);
+        cXfilter.setBounds(10, 20, 93, 27);
+
+        filterstr.setText("//a/b");
+        filterstr.addActionListener(new java.awt.event.ActionListener() {
+            public void actionPerformed(java.awt.event.ActionEvent evt) {
+                filterstrActionPerformed(evt);
+            }
+        });
+
+        add(filterstr);
+        filterstr.setBounds(10, 50, 290, 24);
+
+        cTermtime.setText("Termination Time");
+        add(cTermtime);
+        cTermtime.setBounds(10, 80, 130, 27);
+
+        termtime.setText("jTextField2");
+        termtime.setEnabled(false);
+        add(termtime);
+        termtime.setBounds(10, 110, 290, 24);
+
+        cTfilter.setText("jCheckBox3");
+        add(cTfilter);
+        cTfilter.setBounds(340, 20, 150, 27);
+
+        jList1.setBackground(new java.awt.Color(255, 51, 51));
+        add(jList1);
+        jList1.setBounds(70, 280, 0, 0);
+
+        jButton1.setText("Subscribe");
+        jButton1.addActionListener(new java.awt.event.ActionListener() {
+            public void actionPerformed(java.awt.event.ActionEvent evt) {
+                subscribeButton(evt);
+            }
+        });
+
+        add(jButton1);
+        jButton1.setBounds(10, 200, 290, 27);
+
+        cSubend.setText("Subscription End Notification");
+        add(cSubend);
+        cSubend.setBounds(10, 170, 290, 27);
+
+        jScrollPane1.setViewportView(tree);
+
+        add(jScrollPane1);
+        jScrollPane1.setBounds(340, 50, 200, 180);
+
+        add(jSeparator1);
+        jSeparator1.setBounds(10, 240, 530, 2);
+
+        jScrollPane2.setViewportView(subs);
+
+        add(jScrollPane2);
+        jScrollPane2.setBounds(10, 270, 240, 110);
+
+        jScrollPane3.setViewportView(nots);
+
+        add(jScrollPane3);
+        jScrollPane3.setBounds(280, 270, 260, 140);
+
+        renewButton.setText("Renew");
+        renewButton.addActionListener(new java.awt.event.ActionListener() {
+            public void actionPerformed(java.awt.event.ActionEvent evt) {
+                renewButtonActionPerformed(evt);
+            }
+        });
+
+        add(renewButton);
+        renewButton.setBounds(10, 390, 80, 27);
+
+        unsubscribeButton.setText("Unsubscribe");
+        unsubscribeButton.addActionListener(new java.awt.event.ActionListener() {
+            public void actionPerformed(java.awt.event.ActionEvent evt) {
+                unsubscribeEvent(evt);
+            }
+        });
+
+        add(unsubscribeButton);
+        unsubscribeButton.setBounds(140, 390, 110, 27);
+
+        jLabel1.setText("Subscriptions");
+        add(jLabel1);
+        jLabel1.setBounds(10, 250, 170, 18);
+
+        jLabel2.setText("Notifications");
+        add(jLabel2);
+        jLabel2.setBounds(280, 250, 170, 18);
+
+        timeSlider.addChangeListener(new javax.swing.event.ChangeListener() {
+            public void stateChanged(javax.swing.event.ChangeEvent evt) {
+                timeSliderHandler(evt);
+            }
+        });
+
+        add(timeSlider);
+        timeSlider.setBounds(10, 130, 290, 40);
+
+    }//GEN-END:initComponents
+
+    private void unsubscribeEvent(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_unsubscribeEvent
+        if(subs.getSelectedIndex()!=-1){
+            org.apache.ws.pubsub.Subscription s = (org.apache.ws.pubsub.Subscription)sublistmodel.getElementAt(subs.getSelectedIndex());
+            s.unsubscribe();
+        }
+    }//GEN-LAST:event_unsubscribeEvent
+
+    private void timeSliderHandler(javax.swing.event.ChangeEvent evt) {//GEN-FIRST:event_timeSliderHandler
+        time = Calendar.getInstance();
+        time.add(Calendar.MINUTE,timeSlider.getValue());
+        termtime.setText(time.getTime().toString());
+    }//GEN-LAST:event_timeSliderHandler
+    
+    private void renewButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_renewButtonActionPerformed
+        if(subs.getSelectedIndex()!=-1){
+            org.apache.ws.pubsub.Subscription s = (org.apache.ws.pubsub.Subscription)sublistmodel.getElementAt(subs.getSelectedIndex());
+            s.setTerminationTime(time);
+        }
+    }//GEN-LAST:event_renewButtonActionPerformed
+    
+    private void subscribeButton(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_subscribeButton
+        Topic t=null;
+        String xpath=null;
+        Calendar expire=null;
+        boolean subend = (cSubend.getSelectedObjects()!=null);
+        if(cTfilter.getSelectedObjects()!=null){
+            TreePath[] ts =tree.getSelectionModel().getSelectionPaths();
+            if(ts!=null)
+                t = (org.apache.ws.notification.topics.Topic)((DefaultMutableTreeNode) ts[ts.length-1].getLastPathComponent()).getUserObject();
+        }
+        if(cXfilter.getSelectedObjects()!=null){
+            xpath= filterstr.getText();
+        }
+        if(cTermtime.getSelectedObjects()!=null){
+                expire = time;
+        }
+        Subscription s = pman.subscribe(sublistmodel,notlistmodel,xpath,t, expire,subend);
+        sublistmodel.addData(s);
+    }//GEN-LAST:event_subscribeButton
+    
+    private void filterstrActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_filterstrActionPerformed
+        // TODO add your handling code here:
+    }//GEN-LAST:event_filterstrActionPerformed
+    
+    
+    // Variables declaration - do not modify//GEN-BEGIN:variables
+    private javax.swing.JCheckBox cSubend;
+    private javax.swing.JCheckBox cTermtime;
+    private javax.swing.JCheckBox cTfilter;
+    private javax.swing.JCheckBox cXfilter;
+    private javax.swing.JTextField filterstr;
+    private javax.swing.JButton jButton1;
+    private javax.swing.JLabel jLabel1;
+    private javax.swing.JLabel jLabel2;
+    private javax.swing.JList jList1;
+    private javax.swing.JScrollPane jScrollPane1;
+    private javax.swing.JScrollPane jScrollPane2;
+    private javax.swing.JScrollPane jScrollPane3;
+    private javax.swing.JSeparator jSeparator1;
+    private javax.swing.JList nots;
+    private javax.swing.JButton renewButton;
+    private javax.swing.JList subs;
+    private javax.swing.JTextField termtime;
+    private javax.swing.JSlider timeSlider;
+    private javax.swing.JTree tree;
+    private javax.swing.JButton unsubscribeButton;
+    // End of variables declaration//GEN-END:variables
+    
+}

Added: webservices/muse/branches/1.0/src/examples/pubsubclient/GUIConsumer.java
URL: http://svn.apache.org/viewvc/webservices/muse/branches/1.0/src/examples/pubsubclient/GUIConsumer.java?rev=411218&view=auto
==============================================================================
--- webservices/muse/branches/1.0/src/examples/pubsubclient/GUIConsumer.java (added)
+++ webservices/muse/branches/1.0/src/examples/pubsubclient/GUIConsumer.java Fri Jun  2 10:32:46 2006
@@ -0,0 +1,63 @@
+/*
+ * Copyright 2001-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.
+ */
+
+import org.apache.ws.addressing.EndpointReference;
+import org.apache.ws.addressing.XmlBeansEndpointReference;
+/**
+ *
+ * @author  Stefan Lischke
+ */
+public class GUIConsumer implements org.apache.ws.pubsub.NotificationConsumer{
+    NotificationListModel comp;
+    private EndpointReference epr; 
+   
+    public GUIConsumer(String epr){
+        //TODO decouple epr 
+        org.xmlsoap.schemas.ws.x2004.x08.addressing.EndpointReferenceType e = org.xmlsoap.schemas.ws.x2004.x08.addressing.EndpointReferenceType.Factory.newInstance();
+        org.xmlsoap.schemas.ws.x2004.x08.addressing.AttributedURI auri = org.xmlsoap.schemas.ws.x2004.x08.addressing.AttributedURI.Factory.newInstance(); 
+        //org.xmlsoap.schemas.ws.x2003.x03.addressing.EndpointReferenceType e = org.xmlsoap.schemas.ws.x2003.x03.addressing.EndpointReferenceType.Factory.newInstance();
+        //org.xmlsoap.schemas.ws.x2003.x03.addressing.AttributedURI auri = org.xmlsoap.schemas.ws.x2003.x03.addressing.AttributedURI.Factory.newInstance(); 
+        auri.setStringValue(epr);
+        e.setAddress(auri);    
+        //wrapper
+        this.epr= new XmlBeansEndpointReference(e);
+    }
+    /** Creates a new instance of PopUpConsumer */
+    public GUIConsumer(String epr, NotificationListModel comp) {
+        this(epr);
+        this.comp=comp;
+    }
+    public void notify(org.apache.ws.pubsub.Subscription subscription, Object message ){
+        try{
+//            String m = (String)message;
+//            comp.addData(new notentry(((org.apache.ws.eventing.Subscription)subscription).getID().toString(),m));    
+            comp.addData(message);    
+        }catch(Exception e){
+            e.printStackTrace();
+        }
+    }
+    
+    public void end(org.apache.ws.pubsub.Subscription subscription, java.net.URI status, String reason) {
+        System.out.println("Killed Subscription "+reason);
+        comp.removeData(subscription);
+    }
+    
+    public EndpointReference getEPR() {
+        return this.epr;
+    }
+    
+}
+

Added: webservices/muse/branches/1.0/src/examples/pubsubclient/GUIEndConsumer.java
URL: http://svn.apache.org/viewvc/webservices/muse/branches/1.0/src/examples/pubsubclient/GUIEndConsumer.java?rev=411218&view=auto
==============================================================================
--- webservices/muse/branches/1.0/src/examples/pubsubclient/GUIEndConsumer.java (added)
+++ webservices/muse/branches/1.0/src/examples/pubsubclient/GUIEndConsumer.java Fri Jun  2 10:32:46 2006
@@ -0,0 +1,54 @@
+/*
+ * Copyright 2001-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.
+ */
+
+import org.apache.ws.addressing.EndpointReference;
+import org.apache.ws.addressing.XmlBeansEndpointReference;
+/**
+ *
+ * @author  Stefan Lischke
+ */
+public class GUIEndConsumer implements org.apache.ws.pubsub.SubscriptionEndConsumer{
+    SubscriptionListModel comp;
+    private EndpointReference epr; 
+   
+    public GUIEndConsumer(String epr){
+        //TODO decouple epr 
+        org.xmlsoap.schemas.ws.x2004.x08.addressing.EndpointReferenceType e = org.xmlsoap.schemas.ws.x2004.x08.addressing.EndpointReferenceType.Factory.newInstance();
+        org.xmlsoap.schemas.ws.x2004.x08.addressing.AttributedURI auri = org.xmlsoap.schemas.ws.x2004.x08.addressing.AttributedURI.Factory.newInstance(); 
+        //org.xmlsoap.schemas.ws.x2003.x03.addressing.EndpointReferenceType e = org.xmlsoap.schemas.ws.x2003.x03.addressing.EndpointReferenceType.Factory.newInstance();
+        //org.xmlsoap.schemas.ws.x2003.x03.addressing.AttributedURI auri = org.xmlsoap.schemas.ws.x2003.x03.addressing.AttributedURI.Factory.newInstance(); 
+        auri.setStringValue(epr);
+        e.setAddress(auri);    
+        //wrapper
+        this.epr= new XmlBeansEndpointReference(e);
+    }
+    /** Creates a new instance of PopUpConsumer */
+    public GUIEndConsumer(String epr, SubscriptionListModel comp) {
+        this(epr);
+        this.comp=comp;
+    }
+    
+    public void end(org.apache.ws.pubsub.Subscription subscription, String reason) {
+        System.out.println("Killed Subscription "+reason);
+        comp.removeData(subscription);
+    }
+    
+    public EndpointReference getEPR() {
+        return this.epr;
+    } 
+    
+}
+

Added: webservices/muse/branches/1.0/src/examples/pubsubclient/JettyAxisServer.java
URL: http://svn.apache.org/viewvc/webservices/muse/branches/1.0/src/examples/pubsubclient/JettyAxisServer.java?rev=411218&view=auto
==============================================================================
--- webservices/muse/branches/1.0/src/examples/pubsubclient/JettyAxisServer.java (added)
+++ webservices/muse/branches/1.0/src/examples/pubsubclient/JettyAxisServer.java Fri Jun  2 10:32:46 2006
@@ -0,0 +1,127 @@
+/*
+ * Copyright 2001-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.
+ */
+
+import org.apache.axis.components.logger.LogFactory;
+import org.apache.axis.utils.Messages;
+import org.apache.commons.logging.Log;
+import org.mortbay.http.HttpContext;
+import org.mortbay.http.HttpServer;
+import org.mortbay.http.SocketListener;
+import org.mortbay.http.handler.ResourceHandler;
+import org.mortbay.jetty.servlet.ServletHandler;
+
+public class JettyAxisServer
+{
+    public static Log log =
+            LogFactory.getLog( JettyAxisServer.class.getName() );
+
+    /**
+     * Jetty HTTP Server *
+     */
+    HttpServer server = new HttpServer();
+
+    /**
+     * Socket Listener *
+     */
+    SocketListener listener = new SocketListener();
+
+    /**
+     * HTTP Context
+     */
+    HttpContext context = new HttpContext();
+
+    public JettyAxisServer()
+    {
+        // Create a context
+        context.setContextPath( "/axis/*" );
+        server.addContext( context );
+
+        // Create a servlet container
+        ServletHandler servlets = new ServletHandler();
+        context.addHandler( servlets );
+
+        // Map a servlet onto the container
+        servlets.addServlet( "AdminServlet", "/servlet/AdminServlet",
+                "org.apache.axis.transport.http.AdminServlet" );
+        servlets.addServlet( "AxisServlet", "/servlet/AxisServlet",
+                "org.apache.ws.resource.handler.axis.WsrfAxisServlet" );
+        servlets.addServlet( "AxisServlet", "/services/*",
+                "org.apache.ws.resource.handler.axis.WsrfAxisServlet" );
+        //servlets.addServlet("AxisServlet", "*.jws",
+        //        "org.apache.axis.transport.http.AxisServlet");
+        context.addHandler( new ResourceHandler() );
+    }
+
+    /**
+     * Set the port
+     *
+     * @param port
+     */
+    public void setPort( int port )
+    {
+        listener.setPort( port );
+        server.addListener( listener );
+    }
+
+    /**
+     * Set the resource base
+     *
+     * @param dir
+     */
+    public void setResourceBase( String dir )
+    {
+        context.setResourceBase( dir );
+    }
+
+    /**
+     * Start the server
+     *
+     * @throws Exception
+     */
+    public void start() throws Exception
+    {
+        server.start();
+        log.info( Messages.getMessage( "start00", "JettyAxisServer",
+                new Integer( listener.getServerSocket().getLocalPort() ).toString() ) );
+    }
+
+    /*
+    public static void main(String[] args) {
+        Options opts = null;
+        try {
+            opts = new Options(args);
+        } catch (MalformedURLException e) {
+            log.error(Messages.getMessage("malformedURLException00"), e);
+            return;
+        }
+        JettyAxisServer server = new JettyAxisServer();
+        server.setPort(opts.getPort());
+        String dir = opts.isValueSet('d');
+        if (dir == null) {
+            // Serve static content from the context
+            dir = System.getProperty("jetty.home", ".") + "/webapps/axis/";
+        }
+        server.setResourceBase(dir);
+        
+        // Start the http server
+        try {
+            server.start();
+        } catch (Exception e) {
+            log.error(Messages.getMessage("exception00"), e);
+        }
+    }
+    */
+}
\ No newline at end of file

Added: webservices/muse/branches/1.0/src/examples/pubsubclient/NotificationListModel.java
URL: http://svn.apache.org/viewvc/webservices/muse/branches/1.0/src/examples/pubsubclient/NotificationListModel.java?rev=411218&view=auto
==============================================================================
--- webservices/muse/branches/1.0/src/examples/pubsubclient/NotificationListModel.java (added)
+++ webservices/muse/branches/1.0/src/examples/pubsubclient/NotificationListModel.java Fri Jun  2 10:32:46 2006
@@ -0,0 +1,37 @@
+import javax.swing.AbstractListModel;
+
+class NotificationListModel extends AbstractListModel {
+    private java.util.Vector myData;
+    
+    public NotificationListModel() {
+        myData=new java.util.Vector();
+    }
+    
+    public int  getSize() { return myData.size();}
+    public Object getElementAt(int i) { return myData.elementAt(i);}
+    
+    public void addData(Object obj) {
+        myData.add(obj);    //Add data to the vector.
+        fireContentsChanged(this,0,myData.size()-1);    //fire event so that List updates itself.
+    }
+    
+    public void removeData(Object obj) {
+        myData.remove(obj);    //Add data to the vector.
+        fireContentsChanged(this,0,myData.size()-1);    //fire event so that List updates itself.
+    }
+    /*
+    public class notentry{
+        public String id;
+        public String content;
+        public notentry(String id, Object message)throws Exception{
+            this.id=id;
+            this.content=((org.apache.axis.message.SOAPEnvelope)message).getBody().toString();
+        }
+        
+        public String toString(){
+            return id;//+" "+content;
+        }
+        
+    }
+    */
+}



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