You are viewing a plain text version of this content. The canonical link for it is here.
Posted to muse-dev@ws.apache.org by ip...@apache.org on 2005/08/04 21:32:28 UTC
svn commit: r227452 - in /webservices/muse/trunk/src:
java/org/apache/ws/muws/ java/org/apache/ws/muws/v1_0/impl/advertiser/
site/content/xdocs/dev_guide/
Author: ips
Date: Thu Aug 4 12:32:23 2005
New Revision: 227452
URL: http://svn.apache.org/viewcvs?rev=227452&view=rev
Log:
fixed a couple bugs in advertiser service & docs
Modified:
webservices/muse/trunk/src/java/org/apache/ws/muws/MuwsUtils.java
webservices/muse/trunk/src/java/org/apache/ws/muws/v1_0/impl/advertiser/ResourceAdvertiserHome.java
webservices/muse/trunk/src/java/org/apache/ws/muws/v1_0/impl/advertiser/ResourceAdvertiserResource.java
webservices/muse/trunk/src/site/content/xdocs/dev_guide/advertiser.xml
Modified: webservices/muse/trunk/src/java/org/apache/ws/muws/MuwsUtils.java
URL: http://svn.apache.org/viewcvs/webservices/muse/trunk/src/java/org/apache/ws/muws/MuwsUtils.java?rev=227452&r1=227451&r2=227452&view=diff
==============================================================================
--- webservices/muse/trunk/src/java/org/apache/ws/muws/MuwsUtils.java (original)
+++ webservices/muse/trunk/src/java/org/apache/ws/muws/MuwsUtils.java Thu Aug 4 12:32:23 2005
@@ -29,7 +29,7 @@
import org.apache.ws.resource.properties.ResourceProperty;
import org.apache.ws.resource.properties.ResourcePropertySet;
import org.oasisOpen.docs.wsdm.x2004.x12.muws.wsdmMuwsPart1.ResourceIdDocument;
-import javax.xml.namespace.QName;
+
import java.io.UnsupportedEncodingException;
import java.net.URI;
import java.net.URISyntaxException;
Modified: webservices/muse/trunk/src/java/org/apache/ws/muws/v1_0/impl/advertiser/ResourceAdvertiserHome.java
URL: http://svn.apache.org/viewcvs/webservices/muse/trunk/src/java/org/apache/ws/muws/v1_0/impl/advertiser/ResourceAdvertiserHome.java?rev=227452&r1=227451&r2=227452&view=diff
==============================================================================
--- webservices/muse/trunk/src/java/org/apache/ws/muws/v1_0/impl/advertiser/ResourceAdvertiserHome.java (original)
+++ webservices/muse/trunk/src/java/org/apache/ws/muws/v1_0/impl/advertiser/ResourceAdvertiserHome.java Thu Aug 4 12:32:23 2005
@@ -15,12 +15,8 @@
*=============================================================================*/
package org.apache.ws.muws.v1_0.impl.advertiser;
-import org.apache.ws.resource.Resource;
-import org.apache.ws.resource.ResourceContext;
-import org.apache.ws.resource.ResourceContextException;
-import org.apache.ws.resource.ResourceException;
-import org.apache.ws.resource.ResourceUnknownException;
import org.apache.ws.resource.impl.AbstractResourceHome;
+
import javax.xml.namespace.QName;
import java.io.Serializable;
import java.util.Map;
@@ -29,127 +25,109 @@
* Home for ResourceAdvertiser WS-Resources.
*/
public class ResourceAdvertiserHome
- extends AbstractResourceHome
- implements Serializable
+ extends AbstractResourceHome
+ implements Serializable
{
- /** The service endpoint name as registered with the SOAP Platform. This is useful for building EPR's. **/
- public static final QName SERVICE_NAME =
- javax.xml.namespace.QName.valueOf( "{http://ws.apache.org/muws/advertiser/base/service/}ResourceAdvertiser" );
-
- /** The management PortType associated with this resource. This is useful for building EPR's.**/
- public static final QName PORT_TYPE =
- javax.xml.namespace.QName.valueOf( "{http://ws.apache.org/muws/advertiser/base/service/}AdvertiserPortType" );
-
- /** The WSDL Port name associated with the resource. This is useful for building EPR's. **/
- public static final String PORT_NAME = "ResourceAdvertiser";
-
- /** The name of the resource key for this resource. **/
- public static final QName RESOURCE_KEY_NAME =
- javax.xml.namespace.QName.valueOf( "{${resourcekey.NamespaceURI}}${resourcekey.LocalPart}" );
-
- /**
- * A NamespaceVerionHolder which maintains the QNames of Spec Wsdls
- */
- public static final org.apache.ws.muws.v1_0.impl.WsdmNamespaceVersionHolderImpl SPEC_NAMESPACE_SET =
- new org.apache.ws.muws.v1_0.impl.WsdmNamespaceVersionHolderImpl( );
-
- /** A constant for the JNDI Lookup name for this home. **/
- public static final String HOME_LOCATION =
- org.apache.ws.resource.JndiConstants.CONTEXT_NAME_SERVICES + "/" + SERVICE_NAME.getLocalPart( ) + "/"
- + org.apache.ws.resource.JndiConstants.ATOMIC_NAME_HOME;
-
- /**
- * Map containing all FilesystemResource instances - this map <em>must</em> be static for
- * compatibility with certain JNDI providers.
- */
- private static Map s_resources;
- private ResourceAdvertiserResource m_resource;
-
- /**
- *
- * @param resourceContext
- *
- * @return A Resource
- *
- * @throws ResourceException
- * @throws ResourceContextException
- * @throws ResourceUnknownException
- */
- public Resource getInstance( ResourceContext resourceContext )
- throws ResourceException,
- ResourceContextException,
- ResourceUnknownException
- {
- if ( m_resource == null )
- {
- m_resource = new ResourceAdvertiserResource( );
- m_resource.init( );
- }
-
- return m_resource;
- }
-
- /**
- * DOCUMENT_ME
- *
- * @return DOCUMENT_ME
- */
- public org.apache.ws.resource.properties.NamespaceVersionHolder getNamespaceVersionHolder( )
- {
- return SPEC_NAMESPACE_SET;
- }
-
- /**
- * DOCUMENT_ME
- *
- * @return DOCUMENT_ME
- */
- public QName getPortType( )
- {
- return PORT_TYPE;
- }
-
- /**
- * DOCUMENT_ME
- *
- * @return DOCUMENT_ME
- */
- public QName getResourceKeyNameQName( )
- {
- return RESOURCE_KEY_NAME;
- }
-
- /**
- * DOCUMENT_ME
- *
- * @return DOCUMENT_ME
- */
- public QName getServiceName( )
- {
- return SERVICE_NAME;
- }
-
- /**
- * DOCUMENT_ME
- *
- * @return DOCUMENT_ME
- */
- public String getServicePortName( )
- {
- return PORT_NAME;
- }
-
- /**
- * Returns a map of all FilesystemResource instances. Used by the {@link AbstractResourceHome}
- * superclass.
- */
- protected final synchronized Map getResourceMap( )
- {
- if ( s_resources == null )
- {
- s_resources = AbstractResourceHome.createResourceMap( m_resourceIsPersistent );
- }
-
- return s_resources;
- }
-}
\ No newline at end of file
+
+ /**
+ * The service endpoint name as registered with the SOAP Platform. This is useful for building EPR's. *
+ */
+ public static final QName SERVICE_NAME =
+ javax.xml.namespace.QName.valueOf(
+ "{http://ws.apache.org/muws/advertiser/base/service/}ResourceAdvertiser" );
+
+ /**
+ * The management PortType associated with this resource. This is useful for building EPR's.*
+ */
+ public static final QName PORT_TYPE =
+ javax.xml.namespace.QName.valueOf(
+ "{http://ws.apache.org/muws/advertiser/base/service/}AdvertiserPortType" );
+
+ /**
+ * The WSDL Port name associated with the resource. This is useful for building EPR's. *
+ */
+ public static final String PORT_NAME = "ResourceAdvertiser";
+
+ /**
+ * A NamespaceVerionHolder which maintains the QNames of Spec Wsdls
+ */
+ public static final org.apache.ws.muws.v1_0.impl.WsdmNamespaceVersionHolderImpl SPEC_NAMESPACE_SET =
+ new org.apache.ws.muws.v1_0.impl.WsdmNamespaceVersionHolderImpl();
+
+ /**
+ * A constant for the JNDI Lookup name for this home. *
+ */
+ public static final String HOME_LOCATION =
+ org.apache.ws.resource.JndiConstants.CONTEXT_NAME_SERVICES + "/" + SERVICE_NAME.getLocalPart() + "/"
+ + org.apache.ws.resource.JndiConstants.ATOMIC_NAME_HOME;
+
+ /**
+ * Map containing all ResourceAdvertiserResource instances - this map <em>must</em> be static for compatibility with
+ * certain JNDI providers.
+ */
+ private static Map s_resources;
+
+ public synchronized void init() throws Exception
+ {
+ if ( !isInitialized() )
+ {
+ super.init();
+ ResourceAdvertiserResource resourceAdvertiser = new ResourceAdvertiserResource();
+ resourceAdvertiser.init();
+ add( resourceAdvertiser );
+ }
+ }
+
+ /**
+ * DOCUMENT_ME
+ *
+ * @return DOCUMENT_ME
+ */
+ public org.apache.ws.resource.properties.NamespaceVersionHolder getNamespaceVersionHolder()
+ {
+ return SPEC_NAMESPACE_SET;
+ }
+
+ /**
+ * DOCUMENT_ME
+ *
+ * @return DOCUMENT_ME
+ */
+ public QName getPortType()
+ {
+ return PORT_TYPE;
+ }
+
+ /**
+ * DOCUMENT_ME
+ *
+ * @return DOCUMENT_ME
+ */
+ public QName getServiceName()
+ {
+ return SERVICE_NAME;
+ }
+
+ /**
+ * DOCUMENT_ME
+ *
+ * @return DOCUMENT_ME
+ */
+ public String getServicePortName()
+ {
+ return PORT_NAME;
+ }
+
+ /**
+ * Returns a map of all FilesystemResource instances. Used by the {@link AbstractResourceHome} superclass.
+ */
+ protected final synchronized Map getResourceMap()
+ {
+ if ( s_resources == null )
+ {
+ s_resources = AbstractResourceHome.createResourceMap( m_resourceIsPersistent );
+ }
+ return s_resources;
+ }
+
+}
Modified: webservices/muse/trunk/src/java/org/apache/ws/muws/v1_0/impl/advertiser/ResourceAdvertiserResource.java
URL: http://svn.apache.org/viewcvs/webservices/muse/trunk/src/java/org/apache/ws/muws/v1_0/impl/advertiser/ResourceAdvertiserResource.java?rev=227452&r1=227451&r2=227452&view=diff
==============================================================================
--- webservices/muse/trunk/src/java/org/apache/ws/muws/v1_0/impl/advertiser/ResourceAdvertiserResource.java (original)
+++ webservices/muse/trunk/src/java/org/apache/ws/muws/v1_0/impl/advertiser/ResourceAdvertiserResource.java Thu Aug 4 12:32:23 2005
@@ -18,10 +18,14 @@
import org.apache.ws.muws.v1_0.MuwsConstants;
import org.apache.ws.muws.v1_0.capability.AdvertisementCapability;
import org.apache.ws.muws.v1_0.topics.impl.XmlBeansAdvertisementTopicImpl;
+import org.apache.ws.muws.MuwsUtils;
import org.apache.ws.notification.topics.Topic;
import org.apache.ws.notification.topics.TopicSpace;
import org.apache.ws.notification.topics.impl.TopicSpaceImpl;
+import org.apache.ws.resource.ResourceCreationListener;
+import org.apache.ws.resource.ResourceDestructionListener;
import org.apache.ws.resource.impl.AbstractResourceHome;
+
import javax.naming.Binding;
import javax.naming.Context;
import javax.naming.InitialContext;
@@ -36,137 +40,137 @@
* NOTE: This class is generated but IS meant to be modified.
*/
public class ResourceAdvertiserResource
- extends AbstractResourceAdvertiserResource
+ extends AbstractResourceAdvertiserResource
{
- /**
- * A NamespaceVerionHolder which maintains the QNames of Spec Wsdls
- */
- public static final org.apache.ws.muws.v1_0.impl.WsdmNamespaceVersionHolderImpl SPEC_NAMESPACE_SET =
- new org.apache.ws.muws.v1_0.impl.WsdmNamespaceVersionHolderImpl( );
-
- /**
- * Creates a new {@link ResourceAdvertiserResource} object.
- */
- public ResourceAdvertiserResource( )
- {
- //init();
- }
-
- /**
- * Locates the JNDI-deployed homes and returns a list containing their lookup strings
- *
- * @param ctx
- * @param list
- * @param fullname
- *
- * @return A list of homes.
- *
- * @throws NamingException
- */
- public List findHomes( Context ctx,
- List list,
- String fullname )
- throws NamingException
- {
- NamingEnumeration namingEnumeration = ctx.listBindings( "" );
- while ( namingEnumeration.hasMore( ) )
- {
- Binding o = (Binding) namingEnumeration.next( );
- String name = o.getName( );
- Object value = o.getObject( );
-
- if ( name.equals( "home" ) )
- {
- list.add( fullname + "/home" );
- }
- else if ( value instanceof Context )
- {
- findHomes( (Context) value, list, fullname + "/" + name );
- }
- else
- {
- fullname = "";
- }
- }
-
- return list;
- }
-
- /**
- * Initializes this resource's state (properties, etc.).
- */
- public void init( )
- {
- super.init( );
-
- /**
- * The ResourcePropertySet which contains all the defined ResourceProperties
- */
- org.apache.ws.resource.properties.ResourcePropertySet resourcePropertySet = getResourcePropertySet( );
- org.apache.ws.resource.properties.ResourceProperty resourceProperty = null;
-
- try
- {
- // init the {http://docs.oasis-open.org/wsdm/2004/12/muws/wsdm-muws-part1.xsd}ManageabilityCapability Resource Property
- resourceProperty = resourcePropertySet.get( ResourceAdvertiserPropertyQNames.MANAGEABILITYCAPABILITY );
- org.oasisOpen.docs.wsdm.x2004.x12.muws.wsdmMuwsPart1.ManageabilityCapabilityDocument prop_manageabilitycapability =
- org.oasisOpen.docs.wsdm.x2004.x12.muws.wsdmMuwsPart1.ManageabilityCapabilityDocument.Factory
- .newInstance( );
- prop_manageabilitycapability.setManageabilityCapability( AdvertisementCapability.URI );
- resourceProperty.add( prop_manageabilitycapability );
-
- // init the {http://docs.oasis-open.org/wsdm/2004/12/muws/wsdm-muws-part1.xsd}ResourceId Resource Property
- resourceProperty = resourcePropertySet.get( ResourceAdvertiserPropertyQNames.RESOURCEID );
- org.oasisOpen.docs.wsdm.x2004.x12.muws.wsdmMuwsPart1.ResourceIdDocument prop_resourceid =
- org.oasisOpen.docs.wsdm.x2004.x12.muws.wsdmMuwsPart1.ResourceIdDocument.Factory.newInstance( );
- prop_resourceid.setResourceId( " " ); //singleton
- resourceProperty.add( prop_resourceid );
-
- org.apache.ws.notification.topics.TopicSpaceSet topicSpaceSet = getTopicSpaceSet( );
- TopicSpace topicSpace =
- new TopicSpaceImpl( MuwsConstants.NSURI_MUWS_PART2_TOPICS );
-
- Topic manageabilityEndpointCreation =
- new XmlBeansAdvertisementTopicImpl( AdvertisementCapability.TOPIC_MANAGEABILITY_ENPOINT_CREATION_NAME,
- false );
- Topic manageabilityEndpointDestruction =
- new XmlBeansAdvertisementTopicImpl( AdvertisementCapability.TOPIC_MANAGEABILITY_ENPOINT_DESTRUCTION_NAME,
- false );
-
- XmlBeansAdvertisementTopicImpl manageableResourceCreation =
- new XmlBeansAdvertisementTopicImpl( AdvertisementCapability.TOPIC_MANAGEABLE_RESOURCE_CREATION_NAME );
- XmlBeansAdvertisementTopicImpl manageableResourceDestruction =
- new XmlBeansAdvertisementTopicImpl( AdvertisementCapability.TOPIC_MANAGEABLE_RESOURCE_DESTRUCTION_NAME );
-
- InitialContext ctx = new InitialContext( );
- List homes = findHomes( ctx,
- new ArrayList( ),
- "" );
- for ( int i = 0; i < homes.size( ); i++ )
- {
- String home = (String) homes.get( i );
- if ( !home.equals( ResourceAdvertiserHome.HOME_LOCATION ) ) //do not register its own home
+ /**
+ * A NamespaceVerionHolder which maintains the QNames of Spec Wsdls
+ */
+ public static final org.apache.ws.muws.v1_0.impl.WsdmNamespaceVersionHolderImpl SPEC_NAMESPACE_SET =
+ new org.apache.ws.muws.v1_0.impl.WsdmNamespaceVersionHolderImpl();
+
+ /**
+ * Creates a new {@link ResourceAdvertiserResource} object.
+ */
+ public ResourceAdvertiserResource()
+ {
+ setID( null ); // singleton
+ }
+
+ /**
+ * Initializes this resource's state (properties, etc.).
+ */
+ public void init()
+ {
+ super.init();
+
+ /**
+ * The ResourcePropertySet which contains all the defined ResourceProperties
+ */
+ org.apache.ws.resource.properties.ResourcePropertySet resourcePropertySet = getResourcePropertySet();
+ org.apache.ws.resource.properties.ResourceProperty resourceProperty = null;
+
+ try
+ {
+ // init the {http://docs.oasis-open.org/wsdm/2004/12/muws/wsdm-muws-part1.xsd}ManageabilityCapability Resource Property
+ resourceProperty = resourcePropertySet.get( ResourceAdvertiserPropertyQNames.MANAGEABILITYCAPABILITY );
+ org.oasisOpen.docs.wsdm.x2004.x12.muws.wsdmMuwsPart1.ManageabilityCapabilityDocument prop_manageabilitycapability =
+ org.oasisOpen.docs.wsdm.x2004.x12.muws.wsdmMuwsPart1.ManageabilityCapabilityDocument.Factory
+ .newInstance();
+ prop_manageabilitycapability.setManageabilityCapability( AdvertisementCapability.URI );
+ resourceProperty.add( prop_manageabilitycapability );
+
+ // init the {http://docs.oasis-open.org/wsdm/2004/12/muws/wsdm-muws-part1.xsd}ResourceId Resource Property
+ MuwsUtils.initResourceIdProperty( this );
+
+ org.apache.ws.notification.topics.TopicSpaceSet topicSpaceSet = getTopicSpaceSet();
+ TopicSpace topicSpace =
+ new TopicSpaceImpl( MuwsConstants.NSURI_MUWS_PART2_TOPICS );
+
+ Topic manageabilityEndpointCreationTopic =
+ new XmlBeansAdvertisementTopicImpl(
+ AdvertisementCapability.TOPIC_MANAGEABILITY_ENPOINT_CREATION_NAME,
+ false );
+ Topic manageabilityEndpointDestructionTopic =
+ new XmlBeansAdvertisementTopicImpl(
+ AdvertisementCapability.TOPIC_MANAGEABILITY_ENPOINT_DESTRUCTION_NAME,
+ false );
+
+ XmlBeansAdvertisementTopicImpl manageableResourceCreationTopic =
+ new XmlBeansAdvertisementTopicImpl(
+ AdvertisementCapability.TOPIC_MANAGEABLE_RESOURCE_CREATION_NAME );
+ XmlBeansAdvertisementTopicImpl manageableResourceDestructionTopic =
+ new XmlBeansAdvertisementTopicImpl(
+ AdvertisementCapability.TOPIC_MANAGEABLE_RESOURCE_DESTRUCTION_NAME );
+
+ manageabilityEndpointCreationTopic.addTopic( manageableResourceCreationTopic );
+ manageabilityEndpointDestructionTopic.addTopic( manageableResourceDestructionTopic );
+ topicSpace.addTopic( manageabilityEndpointCreationTopic );
+ topicSpace.addTopic( manageabilityEndpointDestructionTopic );
+ topicSpaceSet.addTopicSpace( topicSpace );
+
+ List homeNames = findHomes( new InitialContext(),
+ new ArrayList(),
+ null );
+ addResourceLifecycleListenersToHomes( homeNames, manageableResourceCreationTopic,
+ manageableResourceDestructionTopic );
+
+ }
+ catch ( Exception e )
+ {
+ throw new RuntimeException( "There was a problem in initializing your resource properties. Please check your init() method. Cause: "
+ + e.getLocalizedMessage() );
+ }
+ }
+
+ /**
+ * Locates the JNDI-deployed homes and returns a list containing their lookup strings. Calls itself recursively.
+ *
+ * @param context
+ * @param homes
+ * @param fullName
+ *
+ * @return A list of homes.
+ *
+ * @throws NamingException
+ */
+ private List findHomes( Context context,
+ List homes,
+ String fullName )
+ throws NamingException
+ {
+ NamingEnumeration bindingEnum = context.listBindings( "" );
+ while ( bindingEnum.hasMore() )
+ {
+ Binding binding = (Binding) bindingEnum.next();
+ String name = binding.getName();
+ Object value = binding.getObject();
+ if ( name.equals( "home" ) )
+ {
+ homes.add( fullName == null ? name : fullName + "/" + name );
+ }
+ else if ( value instanceof Context )
+ {
+ findHomes( (Context) value, homes, fullName == null ? name : fullName + "/" + name );
+ }
+ }
+ return homes;
+ }
+
+ private void addResourceLifecycleListenersToHomes( List homeNames,
+ ResourceCreationListener resourceCreationListener,
+ ResourceDestructionListener resourceDestructionListener )
+ throws NamingException
+ {
+ for ( int i = 0; i < homeNames.size(); i++ )
+ {
+ String homeName = (String) homeNames.get( i );
+ if ( !homeName.equals( ResourceAdvertiserHome.HOME_LOCATION ) ) // do not register its own home
{
- AbstractResourceHome absHome = (AbstractResourceHome) ctx.lookup( home );
- absHome.addResourceCreationListener( manageableResourceCreation );
- absHome.addResourceDestructionListener( manageableResourceDestruction );
+ AbstractResourceHome home = (AbstractResourceHome) new InitialContext().lookup( homeName );
+ home.addResourceCreationListener( resourceCreationListener );
+ home.addResourceDestructionListener( resourceDestructionListener );
}
- }
+ }
+ }
- manageabilityEndpointCreation.addTopic( manageableResourceCreation );
- manageabilityEndpointDestruction.addTopic( manageableResourceDestruction );
- topicSpace.addTopic( manageabilityEndpointCreation );
- topicSpace.addTopic( manageabilityEndpointDestruction );
- topicSpaceSet.addTopicSpace( topicSpace );
- }
- catch ( Exception e )
- {
- throw new javax.xml.rpc.JAXRPCException( "There was a problem in initializing your resource properties. Please check your init() method. Cause: "
- + e.getLocalizedMessage( ) );
- }
-
- // Resource Property {http://docs.oasis-open.org/wsn/2004/06/wsn-WS-BaseNotification-1.2-draft-01.xsd}FixedTopicSet is implemented by the framework.
- // Resource Property {http://docs.oasis-open.org/wsn/2004/06/wsn-WS-BaseNotification-1.2-draft-01.xsd}Topic is implemented by the framework.
- // Resource Property {http://docs.oasis-open.org/wsn/2004/06/wsn-WS-BaseNotification-1.2-draft-01.xsd}TopicExpressionDialects is implemented by the framework.
- }
-}
\ No newline at end of file
+}
Modified: webservices/muse/trunk/src/site/content/xdocs/dev_guide/advertiser.xml
URL: http://svn.apache.org/viewcvs/webservices/muse/trunk/src/site/content/xdocs/dev_guide/advertiser.xml?rev=227452&r1=227451&r2=227452&view=diff
==============================================================================
--- webservices/muse/trunk/src/site/content/xdocs/dev_guide/advertiser.xml (original)
+++ webservices/muse/trunk/src/site/content/xdocs/dev_guide/advertiser.xml Thu Aug 4 12:32:23 2005
@@ -37,36 +37,29 @@
<code>GetMultipleResourceProperties</code> messages. These operations are defined in the WS-ResourceProperties specification and implemented in Apache
WSRF.
</p>
- <p>The below requests demonstrate the message to Subscribe to resource creation and destruction topics as well as a message to get the current notification for
- a resource.
+ <p>The below requests demonstrate how to subscribe to the resource creation and destruction topics. The requests would be sent to the advertiser service (e.g. http://localhost:8080/muse/services/ResourceAdvertiser
</p>
- <p>uses a selector to narrow it down to a specific resource. the selector is returned with the request.</p>
+ <p>A selector can optionally be included in the subscribe requests to indicate that you are only interested in the creation or destruction of resources of a particular type.</p>
<section>
<title>Subscribe to Creation Notifications</title>
<source><![CDATA[
-<Envelope xmlns="http://schemas.xmlsoap.org/soap/envelope/"
- xmlns:fs="http://ws.apache.org/resource/example/filesystem"
- 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:muws-p2-xs="http://docs.oasis-open.org/wsdm/2004/12/muws/wsdm-muws-part2.xsd">
+<Envelope xmlns="http://schemas.xmlsoap.org/soap/envelope/"
+ xmlns:wsa03="http://schemas.xmlsoap.org/ws/2003/03/addressing">
<Header>
- <wsa:To mustUnderstand="1">http://localhost:8080/muse/services/ResourceAdvertiser</wsa:To>
- <wsa:Action mustUnderstand="1">http://ws.apache.org/resource/example/filesystem/FileSystemPortType/yourWsdlRequestName</wsa:Action>
- <fs:ResourceIdentifier mustUnderstand="1">/dev/vg00/lvol1</fs:ResourceIdentifier>
+ <wsa03:To mustUnderstand="1">http://localhost:8080/muse/services/ResourceAdvertiser</wsa03:To>
+ <wsa03:Action mustUnderstand="1">http://docs.oasis-open.org/wsn/2004/06/WS-BaseNotification/Subscribe</wsa03:Action>
</Header>
<Body>
- <wsnt:Subscribe>
+ <wsnt:Subscribe xmlns:wsnt="http://docs.oasis-open.org/wsn/2004/06/wsn-WS-BaseNotification-1.2-draft-01.xsd">
<wsnt:ConsumerReference>
- <wsa:Address>http://localhost:8080/muse/services/filesystem</wsa:Address>
- <wsa:ReferenceProperties/>
+ <wsa03:Address>http://localhost:909/services/consumer</wsa03:Address>
</wsnt:ConsumerReference>
- <wsnt:TopicExpression Dialect="http://docs.oasis-open.org/wsn/2004/06/TopicExpression/Simple">muws-p2-xs:ManageableResourceCreation</wsnt:TopicExpression>
-
- <wsnt:UseNotify>true</wsnt:UseNotify>
+ <wsnt:TopicExpression Dialect="http://docs.oasis-open.org/wsn/2004/06/TopicExpression/Concrete"
+ xmlns:muws-p2-topics="http://docs.oasis-open.org/wsdm/2004/12/muws/wsdm-muws-part2-events.xml">muws-p2-topics:ManageabilityEndpointCreation/ManageableResourceCreation</wsnt:TopicExpression>
</wsnt:Subscribe>
</Body>
@@ -76,53 +69,25 @@
<section>
<title>Subscribe to Destruction Notifications</title>
<source><![CDATA[
-<Envelope xmlns="http://schemas.xmlsoap.org/soap/envelope/"
- xmlns:fs="http://ws.apache.org/resource/example/filesystem"
- 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:muws-p2-xs="http://docs.oasis-open.org/wsdm/2004/12/muws/wsdm-muws-part2.xsd">
+<Envelope xmlns="http://schemas.xmlsoap.org/soap/envelope/"
+ xmlns:wsa03="http://schemas.xmlsoap.org/ws/2003/03/addressing">
<Header>
- <wsa:To mustUnderstand="1">http://localhost:8080/muse/services/ResourceAdvertiser</wsa:To>
- <wsa:Action mustUnderstand="1">http://ws.apache.org/resource/example/filesystem/FileSystemPortType/yourWsdlRequestName</wsa:Action>
- <fs:ResourceIdentifier mustUnderstand="1">/dev/vg00/lvol1</fs:ResourceIdentifier>
+ <wsa03:To mustUnderstand="1">http://localhost:8080/muse/services/ResourceAdvertiser</wsa03:To>
+ <wsa03:Action mustUnderstand="1">http://docs.oasis-open.org/wsn/2004/06/WS-BaseNotification/Subscribe</wsa03:Action>
</Header>
<Body>
- <wsnt:Subscribe>
+ <wsnt:Subscribe xmlns:wsnt="http://docs.oasis-open.org/wsn/2004/06/wsn-WS-BaseNotification-1.2-draft-01.xsd">
<wsnt:ConsumerReference>
- <wsa:Address>http://localhost:8080/muse/services/filesystem</wsa:Address>
- <wsa:ReferenceProperties/>
+ <wsa03:Address>http://localhost:909/services/consumer</wsa03:Address>
</wsnt:ConsumerReference>
- <wsnt:TopicExpression Dialect="http://docs.oasis-open.org/wsn/2004/06/TopicExpression/Simple">muws-p2-xs:ManageableResourceDestruction</wsnt:TopicExpression>
-
- <wsnt:UseNotify>true</wsnt:UseNotify>
+ <wsnt:TopicExpression Dialect="http://docs.oasis-open.org/wsn/2004/06/TopicExpression/Concrete"
+ xmlns:muws-p2-topics="http://docs.oasis-open.org/wsdm/2004/12/muws/wsdm-muws-part2-events.xml">muws-p2-topics:ManageabilityEndpointDestruction/ManageableResourceDestruction</wsnt:TopicExpression>
</wsnt:Subscribe>
- </Body>
-
-</Envelope>]]></source>
- </section>
- <section>
- <title>GetCurrentMessage</title>
- <source><![CDATA[
-<Envelope xmlns="http://schemas.xmlsoap.org/soap/envelope/"
- xmlns:fs="http://ws.apache.org/resource/example/filesystem"
- xmlns:wsnt="http://docs.oasis-open.org/wsn/2004/06/wsn-WS-BaseNotification-1.2-draft-01.xsd"
- xmlns:muws-topics="http://docs.oasis-open.org/wsdm/2004/12/muws/wsdm-muws-part2-events.xml">
-
- <Header xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/03/addressing">
- <wsa:To mustUnderstand="1">http://localhost:8080/pubscribe/services/filesystem</wsa:To>
- <wsa:Action mustUnderstand="1">http://ws.apache.org/resource/example/filesystem/FileSystemPortType/yourWsdlRequestName</wsa:Action>
- <fs:ResourceIdentifier mustUnderstand="1">/dev/vg00/lvol1</fs:ResourceIdentifier>
- </Header>
-
- <Body>
- <wsnt:GetCurrentMessage>
- <wsnt:Topic Dialect="http://docs.oasis-open.org/wsn/2004/06/TopicExpression/Simple">muws-topics:OperationalStatusCapability</wsnt:Topic>
- </wsnt:GetCurrentMessage>
</Body>
</Envelope>]]></source>
---------------------------------------------------------------------
To unsubscribe, e-mail: muse-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: muse-dev-help@ws.apache.org