You are viewing a plain text version of this content. The canonical link for it is here.
Posted to pubscribe-commits@ws.apache.org by sc...@apache.org on 2005/07/12 19:42:47 UTC
svn commit: r215985 - in /webservices/pubscribe/trunk: ./
src/examples/consumer/ src/examples/consumer/epr/
src/examples/consumer/method_impls/
src/java/org/apache/ws/notification/topics/util/ src/site/content/tutorial/
src/site/content/tutorial/epr/
Author: scamp
Date: Tue Jul 12 10:42:46 2005
New Revision: 215985
URL: http://svn.apache.org/viewcvs?rev=215985&view=rev
Log:
updated for the notification demo
Added:
webservices/pubscribe/trunk/src/examples/consumer/epr/
webservices/pubscribe/trunk/src/examples/consumer/epr/consumer.txt
webservices/pubscribe/trunk/src/site/content/tutorial/epr/
webservices/pubscribe/trunk/src/site/content/tutorial/epr/filesystem.txt
Modified:
webservices/pubscribe/trunk/maven.xml
webservices/pubscribe/trunk/src/examples/consumer/build.xml
webservices/pubscribe/trunk/src/examples/consumer/method_impls/consumerport_service_notify.txt
webservices/pubscribe/trunk/src/java/org/apache/ws/notification/topics/util/TopicUtils.java
webservices/pubscribe/trunk/src/site/content/tutorial/build.xml
Modified: webservices/pubscribe/trunk/maven.xml
URL: http://svn.apache.org/viewcvs/webservices/pubscribe/trunk/maven.xml?rev=215985&r1=215984&r2=215985&view=diff
==============================================================================
--- webservices/pubscribe/trunk/maven.xml (original)
+++ webservices/pubscribe/trunk/maven.xml Tue Jul 12 10:42:46 2005
@@ -166,6 +166,12 @@
<fileset dir="${maven.war.webapp.dir}" />
</copy>
+
+ <mkdir dir="${maven.dist.bin.assembly.dir}/examples/consumer" />
+ <copy todir="${maven.dist.bin.assembly.dir}/examples/consumer">
+ <fileset dir="${maven.src.dir}/examples/consumer" />
+ </copy>
+
<attainGoal name="website" />
<property name="docs.assembly.dir" location="${maven.dist.bin.assembly.dir}/docs" />
<delete dir="${docs.assembly.dir}" />
Modified: webservices/pubscribe/trunk/src/examples/consumer/build.xml
URL: http://svn.apache.org/viewcvs/webservices/pubscribe/trunk/src/examples/consumer/build.xml?rev=215985&r1=215984&r2=215985&view=diff
==============================================================================
--- webservices/pubscribe/trunk/src/examples/consumer/build.xml (original)
+++ webservices/pubscribe/trunk/src/examples/consumer/build.xml Tue Jul 12 10:42:46 2005
@@ -61,6 +61,10 @@
<fileset dir="${basedir}/method_impls"/>
</copy>
+ <copy todir="${out.dir}/ConsumerPort/src/java">
+ <fileset dir="${basedir}/src"/>
+ </copy>
+
</target>
<target name="usage">
Added: webservices/pubscribe/trunk/src/examples/consumer/epr/consumer.txt
URL: http://svn.apache.org/viewcvs/webservices/pubscribe/trunk/src/examples/consumer/epr/consumer.txt?rev=215985&view=auto
==============================================================================
--- webservices/pubscribe/trunk/src/examples/consumer/epr/consumer.txt (added)
+++ webservices/pubscribe/trunk/src/examples/consumer/epr/consumer.txt Tue Jul 12 10:42:46 2005
@@ -0,0 +1,6 @@
+<?xml version="1.0"?>
+
+<EndpointReference xmlns="http://schemas.xmlsoap.org/ws/2004/08/addressing">
+ <Address>http://localhost:8080/pubscribe/services/ConsumerPort</Address>
+</EndpointReference>
+
Modified: webservices/pubscribe/trunk/src/examples/consumer/method_impls/consumerport_service_notify.txt
URL: http://svn.apache.org/viewcvs/webservices/pubscribe/trunk/src/examples/consumer/method_impls/consumerport_service_notify.txt?rev=215985&r1=215984&r2=215985&view=diff
==============================================================================
--- webservices/pubscribe/trunk/src/examples/consumer/method_impls/consumerport_service_notify.txt (original)
+++ webservices/pubscribe/trunk/src/examples/consumer/method_impls/consumerport_service_notify.txt Tue Jul 12 10:42:46 2005
@@ -1,25 +1,19 @@
- /**
- * This operation accepts the notification and wraps it into a "known"
- * resource property and updates the resource property
- *
- * @param notifyDocument
- */
public void notify(org.oasisOpen.docs.wsn.x2004.x06.wsnWSBaseNotification12Draft01.NotifyDocument notifyDocument)
{
//get the property set
- ResourcePropertySet resourcePropertySet = ((PropertiesResource)getResource()).getResourcePropertySet();
+ org.apache.ws.resource.properties.ResourcePropertySet resourcePropertySet = ((org.apache.ws.resource.PropertiesResource)getResource()).getResourcePropertySet();
//get the property
- ResourceProperty resourceProperty = resourcePropertySet.get(ConsumerPortPropertyQNames.LASTMESSAGE);
+ org.apache.ws.resource.properties.ResourceProperty resourceProperty = resourcePropertySet.get(ConsumerPortPropertyQNames.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(Calendar.getInstance());
+ lastMessageType.setOccurred(java.util.Calendar.getInstance());
org.apache.xmlbeans.XmlObject lastMessageNotif = lastMessageType.addNewNotification();
- XmlBeanUtils.addChildElement(lastMessageNotif, notifyDocument);
+ org.apache.ws.util.XmlBeanUtils.addChildElement(lastMessageNotif, notifyDocument);
//add the LastMessageDocument to the resource property
resourceProperty.add(lastMessageDocument);
Modified: webservices/pubscribe/trunk/src/java/org/apache/ws/notification/topics/util/TopicUtils.java
URL: http://svn.apache.org/viewcvs/webservices/pubscribe/trunk/src/java/org/apache/ws/notification/topics/util/TopicUtils.java?rev=215985&r1=215984&r2=215985&view=diff
==============================================================================
--- webservices/pubscribe/trunk/src/java/org/apache/ws/notification/topics/util/TopicUtils.java (original)
+++ webservices/pubscribe/trunk/src/java/org/apache/ws/notification/topics/util/TopicUtils.java Tue Jul 12 10:42:46 2005
@@ -26,11 +26,13 @@
import org.apache.ws.notification.topics.impl.TopicSpaceImpl;
import org.apache.ws.notification.topics.v2004_06.TopicsConstants;
import org.apache.ws.resource.Resource;
+import org.apache.ws.resource.faults.FaultException;
import org.apache.ws.resource.lifetime.ResourceTerminationListener;
import org.apache.ws.resource.properties.NamespaceVersionHolder;
import org.apache.ws.resource.properties.ResourceProperty;
import org.apache.ws.resource.properties.ResourcePropertySet;
import org.apache.ws.util.XmlBeanUtils;
+import org.apache.ws.Soap1_1Constants;
import org.oasisOpen.docs.wsn.x2004.x06.wsnWSBaseNotification12Draft01.FixedTopicSetDocument;
import org.oasisOpen.docs.wsn.x2004.x06.wsnWSBaseNotification12Draft01.TopicDocument;
import org.oasisOpen.docs.wsn.x2004.x06.wsnWSBaseNotification12Draft01.TopicExpressionDialectsDocument;
@@ -156,6 +158,10 @@
{
//setup the FixedTopicSet property
ResourceProperty resourceProperty = propSet.get(NotificationProducerPortType.PROP_QNAME_FIXED_TOPIC_SET);
+ if(resourceProperty == null)
+ {
+ throw new FaultException(Soap1_1Constants.FAULT_SERVER, "The FixedTopicSet property was null.");
+ }
FixedTopicSetDocument fixedTopicSetDocument = FixedTopicSetDocument.Factory.newInstance();
fixedTopicSetDocument.setFixedTopicSet(topicSpaceSet.isFixed());
resourceProperty.add(fixedTopicSetDocument);
Modified: webservices/pubscribe/trunk/src/site/content/tutorial/build.xml
URL: http://svn.apache.org/viewcvs/webservices/pubscribe/trunk/src/site/content/tutorial/build.xml?rev=215985&r1=215984&r2=215985&view=diff
==============================================================================
--- webservices/pubscribe/trunk/src/site/content/tutorial/build.xml (original)
+++ webservices/pubscribe/trunk/src/site/content/tutorial/build.xml Tue Jul 12 10:42:46 2005
@@ -58,9 +58,10 @@
<copy file="soapclient.xml" todir="${out.dir}/filesystem" />
<mkdir dir="${out.dir}/filesystem/src/java/example/filesystem" />
- <copy todir="${out.dir}/filesystem/src/java/example/filesystem" >
- <fileset dir="${basedir}/src/example/filesystem">
- <include name="**/*.java"/>
+ <copy todir="${out.dir}/filesystem/src/java/example/" >
+ <fileset dir="${basedir}/src/example/">
+ <include name="NotifRequestUtils.java"/>
+ <include name="filesystem/**/*.java"/>
</fileset>
</copy>
Added: webservices/pubscribe/trunk/src/site/content/tutorial/epr/filesystem.txt
URL: http://svn.apache.org/viewcvs/webservices/pubscribe/trunk/src/site/content/tutorial/epr/filesystem.txt?rev=215985&view=auto
==============================================================================
--- webservices/pubscribe/trunk/src/site/content/tutorial/epr/filesystem.txt (added)
+++ webservices/pubscribe/trunk/src/site/content/tutorial/epr/filesystem.txt Tue Jul 12 10:42:46 2005
@@ -0,0 +1,9 @@
+<?xml version="1.0"?>
+
+<EndpointReference xmlns="http://schemas.xmlsoap.org/ws/2004/08/addressing">
+ <Address>http://localhost:9081/pubscribe/services/Filesystem</Address>
+ <ReferenceProperties>
+ <svr:ResourceIdentifier xmlns:svr="http://ws.apache.org/resource/example/filesystem">/dev/vg00/lvol1</svr:ResourceIdentifier>
+ </ReferenceProperties>
+</EndpointReference>
+