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 wi...@apache.org on 2005/10/11 20:03:44 UTC

svn commit: r312926 - in /webservices/muse/trunk/client: ./ src/test/org/apache/ws/client/muse/client/impl/ src/test/org/apache/ws/client/muse/client/impl/notification/ src/test/org/apache/ws/service/testresource/ src/wsdl/resource/

Author: wire
Date: Tue Oct 11 11:03:34 2005
New Revision: 312926

URL: http://svn.apache.org/viewcvs?rev=312926&view=rev
Log:
Updated for Relationships

Modified:
    webservices/muse/trunk/client/.classpath
    webservices/muse/trunk/client/src/test/org/apache/ws/client/muse/client/impl/ManageableResourceImplTest.java
    webservices/muse/trunk/client/src/test/org/apache/ws/client/muse/client/impl/notification/NotifyableResourceTest.java
    webservices/muse/trunk/client/src/test/org/apache/ws/service/testresource/AbstractTestResourceResource.java
    webservices/muse/trunk/client/src/test/org/apache/ws/service/testresource/AbstractTestResourceService.java
    webservices/muse/trunk/client/src/test/org/apache/ws/service/testresource/TestResourcePropertyQNames.java
    webservices/muse/trunk/client/src/test/org/apache/ws/service/testresource/TestResourceResource.java
    webservices/muse/trunk/client/src/test/org/apache/ws/service/testresource/TestResource_jndi-config.xml
    webservices/muse/trunk/client/src/wsdl/resource/testresource.wsdl

Modified: webservices/muse/trunk/client/.classpath
URL: http://svn.apache.org/viewcvs/webservices/muse/trunk/client/.classpath?rev=312926&r1=312925&r2=312926&view=diff
==============================================================================
--- webservices/muse/trunk/client/.classpath (original)
+++ webservices/muse/trunk/client/.classpath Tue Oct 11 11:03:34 2005
@@ -52,6 +52,6 @@
 			<accessrule kind="accessible" pattern="**"/>
 		</accessrules>
 	</classpathentry>
-	<classpathentry kind="lib" path="src/resource/target/.xmlbeans/lib/testresource-xbeans.jar"/>
+	<classpathentry kind="var" path="MAVEN_REPO/museclient/jars/testresource-xbeans-SNAPSHOT.jar"/>
 	<classpathentry kind="output" path="target/classes"/>
 </classpath>

Modified: webservices/muse/trunk/client/src/test/org/apache/ws/client/muse/client/impl/ManageableResourceImplTest.java
URL: http://svn.apache.org/viewcvs/webservices/muse/trunk/client/src/test/org/apache/ws/client/muse/client/impl/ManageableResourceImplTest.java?rev=312926&r1=312925&r2=312926&view=diff
==============================================================================
--- webservices/muse/trunk/client/src/test/org/apache/ws/client/muse/client/impl/ManageableResourceImplTest.java (original)
+++ webservices/muse/trunk/client/src/test/org/apache/ws/client/muse/client/impl/ManageableResourceImplTest.java Tue Oct 11 11:03:34 2005
@@ -9,12 +9,15 @@
 
 import org.apache.ws.client.muse.client.impl.exceptions.FaultException;
 import org.apache.ws.client.muse.client.impl.exceptions.UnexpectedServerResponseException;
+import org.apache.ws.client.muse.client.impl.relationships.Participant;
+import org.apache.ws.client.muse.client.impl.relationships.Relationship;
 import org.apache.ws.client.muse.client.model.PropertiesList;
 import org.apache.ws.muws.v1_0.impl.advertiser.ResourceAdvertiserPropertyQNames;
 import org.apache.ws.service.testresource.TestResourcePropertyQNames;
 import org.apache.ws.util.test.axis.MuseClientTestCase;
 import org.apache.xmlbeans.XmlException;
 import org.apache.xmlbeans.XmlObject;
+import org.oasisOpen.docs.wsdm.x2004.x12.muws.wsdmMuwsPart2.impl.RelationshipTypeImpl;
 
 public class ManageableResourceImplTest extends MuseClientTestCase {
 	private static String id="0001";
@@ -23,6 +26,9 @@
 	private ManageableResourceImpl testImpl;
   	String dialect1 = "http://www.w3.org/TR/1999/REC-xpath-19991116";
   	String dialect2 = "http://www.w3.org/TR/2003/WD-xpath20-20031112";
+  	private static final QName RELATIONSHIP_QNAME=new QName("http://docs.oasis-open.org/wsdm/2004/12/muws/wsdm-muws-part2.xsd","Relationship");
+  	private static final QName RELATIONSHIP_CONTAINS=new QName("http://ws.apache.org/service/testresource","Contains");
+  	
 	
 	protected void setUp() throws Exception {
 		super.setUp();
@@ -454,9 +460,37 @@
 
     }
 
-	// TODO Calling Operations on Resources
+	public void testGetAllRelationships() throws FaultException, URISyntaxException, IOException, XmlException, UnexpectedServerResponseException{
+		XmlObject[] relationships = testImpl.getProperty(RELATIONSHIP_QNAME);
+		assertNotNull(relationships);
+		assertEquals(2,relationships.length);
+		assertTrue(relationships[0] instanceof RelationshipTypeImpl );
+		assertTrue(relationships[1] instanceof RelationshipTypeImpl );
+		
+		// And the simple way
+		Relationship[] relations = testImpl.getRelationships();
+		assertEquals(2,relations.length);
+		
+		// Do some light testing of support classes
+		//assertNotNull(relations[0].getName());
+		assertNotNull(relations[0].getType());
+		Participant[] participants = relations[0].getParicipants();
+		assertNotNull(participants);
+		assertTrue(participants.length>0);
+
+		Participant participant = participants[0];
+		assertNotNull(participant.getResourceId());
+		assertNotNull(participant.getResources());
+	}
+	
+	public void testQueryRelationshipByType() throws URISyntaxException, IOException, XmlException, UnexpectedServerResponseException, FaultException{
+		Relationship[] results = testImpl.queryRelationshipsByType(RELATIONSHIP_CONTAINS);
+		assertNotNull(results);
+		assertTrue(results.length>1);		
+	}
+    
+    // TODO Calling Operations on Resources
+	
 	
-	// TODO Next try the create and destroys.
 	
-	// TODO Notifications
 }

Modified: webservices/muse/trunk/client/src/test/org/apache/ws/client/muse/client/impl/notification/NotifyableResourceTest.java
URL: http://svn.apache.org/viewcvs/webservices/muse/trunk/client/src/test/org/apache/ws/client/muse/client/impl/notification/NotifyableResourceTest.java?rev=312926&r1=312925&r2=312926&view=diff
==============================================================================
--- webservices/muse/trunk/client/src/test/org/apache/ws/client/muse/client/impl/notification/NotifyableResourceTest.java (original)
+++ webservices/muse/trunk/client/src/test/org/apache/ws/client/muse/client/impl/notification/NotifyableResourceTest.java Tue Oct 11 11:03:34 2005
@@ -96,6 +96,7 @@
 		// force a notification to be sent
 		notificationRecived=null;
 		SetPropertiesRequestImpl props = new SetPropertiesRequestImpl();
+		
 		props.addUpdateRequest(TestResourcePropertyQNames.TESTMETRIC,new String[]{"30"});
 		testResource.setProperties(props);
 		

Modified: webservices/muse/trunk/client/src/test/org/apache/ws/service/testresource/AbstractTestResourceResource.java
URL: http://svn.apache.org/viewcvs/webservices/muse/trunk/client/src/test/org/apache/ws/service/testresource/AbstractTestResourceResource.java?rev=312926&r1=312925&r2=312926&view=diff
==============================================================================
--- webservices/muse/trunk/client/src/test/org/apache/ws/service/testresource/AbstractTestResourceResource.java (original)
+++ webservices/muse/trunk/client/src/test/org/apache/ws/service/testresource/AbstractTestResourceResource.java Tue Oct 11 11:03:34 2005
@@ -10,7 +10,7 @@
  * This class is generated by Wsdl2Java and is NOT meant to be modified. 
  * It will be overwritten by subsequent runs of Wsdl2Java. 
  */
-public abstract class AbstractTestResourceResource  implements org.apache.ws.resource.lifetime.ScheduledResourceTerminationResource, org.apache.ws.resource.PropertiesResource, org.apache.ws.notification.base.NotificationProducerResource {
+public abstract class AbstractTestResourceResource  implements org.apache.ws.resource.PropertiesResource, org.apache.ws.resource.lifetime.ScheduledResourceTerminationResource, org.apache.ws.notification.base.NotificationProducerResource {
     
     /**
      * The resource ID of the instance.
@@ -113,7 +113,21 @@
 
     org.apache.ws.resource.properties.ResourceProperty topicExpressionDialectsProp = getResourcePropertySet().get( org.apache.ws.notification.base.v2004_06.porttype.NotificationProducerPortType.PROP_QNAME_TOPIC_EXPRESSION_DIALECTS );
     topicExpressionDialectsProp.setCallback( new org.apache.ws.notification.base.TopicExpressionDialectsResourcePropertyCallback() );
-                  
+                         /**
+      * Add a specialized version of the Relationship ResourceProperty that will automatically publish
+      * RelationshipCreated/Deleted events when elements are added to or removed from the ResourceProperty.
+      */
+     org.apache.ws.muws.MuwsUtils.updateRelationshipResourceProperty( m_propSet, this );
+     /**
+      * Add the MUWS RelationshipCreated/Deleted topics to our topic set.
+      *
+      * NOTE: IF ADDING additional Topics to the Muws2 TopicSpace AFTER this method call, make sure to use
+      * the returned muws2topics TopicSpace. Anytime a TopicSpace is added to a TopicSpaceSet, the set returns
+      * the active handle to that TopicSpace and INVALIDATES the previous handle.
+      */
+     org.apache.ws.notification.topics.TopicSpace muws2topics = org.apache.ws.muws.MuwsUtils.addRelationshipTopics( getTopicSpaceSet() );
+     
+              
     }
     
    /**
@@ -142,6 +156,20 @@
     
 
     /**
+     * @see org.apache.ws.resource.PropertiesResource#setResourcePropertySet(org.apache.ws.resource.properties.ResourcePropertySet)
+     */
+    public void setResourcePropertySet( org.apache.ws.resource.properties.ResourcePropertySet propSet )
+    {
+        m_propSet = propSet;
+    }
+
+    /**
+     * @see org.apache.ws.resource.PropertiesResource#getResourcePropertySet()
+     */
+    public org.apache.ws.resource.properties.ResourcePropertySet getResourcePropertySet()
+    {
+        return m_propSet;
+    }    /**
      * DOCUMENT_ME
      *
      * @param time DOCUMENT_ME
@@ -172,21 +200,7 @@
     {
         return org.apache.ws.resource.properties.XmlBeansResourcePropertyUtils.getDateTimePropertyValue( (org.apache.ws.resource.properties.impl.XmlBeansResourceProperty) m_propSet.get( org.apache.ws.resource.lifetime.v2004_06.porttype.ScheduledResourceTerminationPortType.PROP_QNAME_TERMINATION_TIME ) );
     }
-    /**
-     * @see org.apache.ws.resource.PropertiesResource#setResourcePropertySet(org.apache.ws.resource.properties.ResourcePropertySet)
-     */
-    public void setResourcePropertySet( org.apache.ws.resource.properties.ResourcePropertySet propSet )
-    {
-        m_propSet = propSet;
-    }
-
-    /**
-     * @see org.apache.ws.resource.PropertiesResource#getResourcePropertySet()
-     */
-    public org.apache.ws.resource.properties.ResourcePropertySet getResourcePropertySet()
-    {
-        return m_propSet;
-    }	
+	
 	org.apache.ws.notification.topics.TopicSpaceSet m_topicSpaceSet = new org.apache.ws.notification.topics.impl.TopicSpaceSetImpl(true);
 	
 	public org.apache.ws.notification.topics.TopicSpaceSet getTopicSpaceSet() 

Modified: webservices/muse/trunk/client/src/test/org/apache/ws/service/testresource/AbstractTestResourceService.java
URL: http://svn.apache.org/viewcvs/webservices/muse/trunk/client/src/test/org/apache/ws/service/testresource/AbstractTestResourceService.java?rev=312926&r1=312925&r2=312926&view=diff
==============================================================================
--- webservices/muse/trunk/client/src/test/org/apache/ws/service/testresource/AbstractTestResourceService.java (original)
+++ webservices/muse/trunk/client/src/test/org/apache/ws/service/testresource/AbstractTestResourceService.java Tue Oct 11 11:03:34 2005
@@ -16,7 +16,7 @@
  * It will be overwritten by subsequent runs of Wsdl2Java. 
  */
 public abstract class AbstractTestResourceService extends AbstractPortType
-    implements org.apache.ws.resource.handler.WsrfService, org.apache.ws.resource.properties.v2004_06.porttype.QueryResourcePropertiesPortType, org.apache.ws.resource.properties.v2004_06.porttype.SetResourcePropertiesPortType, org.apache.ws.resource.properties.v2004_06.porttype.GetMultipleResourcePropertiesPortType, org.apache.ws.resource.lifetime.v2004_06.porttype.ScheduledResourceTerminationPortType, org.apache.ws.resource.properties.v2004_06.porttype.GetResourcePropertyPortType, org.apache.ws.resource.lifetime.v2004_06.porttype.ImmediateResourceTerminationPortType, org.apache.ws.notification.base.v2004_06.porttype.NotificationProducerPortType {
+    implements org.apache.ws.resource.handler.WsrfService, org.apache.ws.resource.properties.v2004_06.porttype.QueryResourcePropertiesPortType, org.apache.ws.resource.properties.v2004_06.porttype.SetResourcePropertiesPortType, org.apache.ws.resource.properties.v2004_06.porttype.GetMultipleResourcePropertiesPortType, org.apache.ws.resource.properties.v2004_06.porttype.GetResourcePropertyPortType, org.apache.ws.resource.lifetime.v2004_06.porttype.ScheduledResourceTerminationPortType, org.apache.ws.notification.base.v2004_06.porttype.NotificationProducerPortType, org.apache.ws.resource.lifetime.v2004_06.porttype.ImmediateResourceTerminationPortType, org.apache.ws.muws.v1_0.capability.RelationshipsCapability {
 
    public static final String TARGET_NSURI = "http://ws.apache.org/service/testresource";
    public static final String TARGET_NSPREFIX = "testresource";
@@ -117,17 +117,6 @@
    }
 
    /**
-    * DOCUMENT_ME
-    *
-    * @param requestDoc DOCUMENT_ME
-    *
-    * @return DOCUMENT_ME
-    */
-   public org.oasisOpen.docs.wsrf.x2004.x06.wsrfWSResourceLifetime12Draft01.SetTerminationTimeResponseDocument setTerminationTime( org.oasisOpen.docs.wsrf.x2004.x06.wsrfWSResourceLifetime12Draft01.SetTerminationTimeDocument requestDoc )
-   {
-      return new org.apache.ws.resource.lifetime.v2004_06.porttype.impl.ScheduledResourceTerminationPortTypeImpl( getResourceContext(  ) ).setTerminationTime( requestDoc );
-   }
-   /**
     * @see 
     */
    public org.oasisOpen.docs.wsrf.x2004.x06.wsrfWSResourceProperties12Draft01.GetResourcePropertyResponseDocument getResourceProperty( org.oasisOpen.docs.wsrf.x2004.x06.wsrfWSResourceProperties12Draft01.GetResourcePropertyDocument requestDoc )
@@ -142,9 +131,9 @@
     *
     * @return DOCUMENT_ME
     */
-   public org.oasisOpen.docs.wsrf.x2004.x06.wsrfWSResourceLifetime12Draft01.DestroyResponseDocument destroy( org.oasisOpen.docs.wsrf.x2004.x06.wsrfWSResourceLifetime12Draft01.DestroyDocument requestDoc )
+   public org.oasisOpen.docs.wsrf.x2004.x06.wsrfWSResourceLifetime12Draft01.SetTerminationTimeResponseDocument setTerminationTime( org.oasisOpen.docs.wsrf.x2004.x06.wsrfWSResourceLifetime12Draft01.SetTerminationTimeDocument requestDoc )
    {
-      return new org.apache.ws.resource.lifetime.v2004_06.porttype.impl.ImmediateResourceTerminationPortTypeImpl( getResourceContext(  ) ).destroy( requestDoc );
+      return new org.apache.ws.resource.lifetime.v2004_06.porttype.impl.ScheduledResourceTerminationPortTypeImpl( getResourceContext(  ) ).setTerminationTime( requestDoc );
    }
    /**
     * DOCUMENT_ME
@@ -170,6 +159,24 @@
        return new org.apache.ws.notification.base.v2004_06.porttype.impl.NotificationProducerPortTypeImpl( getResourceContext(  ) ).getCurrentMessage( requestDoc );
    }
     
+
+   /**
+    * DOCUMENT_ME
+    *
+    * @param requestDoc DOCUMENT_ME
+    *
+    * @return DOCUMENT_ME
+    */
+   public org.oasisOpen.docs.wsrf.x2004.x06.wsrfWSResourceLifetime12Draft01.DestroyResponseDocument destroy( org.oasisOpen.docs.wsrf.x2004.x06.wsrfWSResourceLifetime12Draft01.DestroyDocument requestDoc )
+   {
+      return new org.apache.ws.resource.lifetime.v2004_06.porttype.impl.ImmediateResourceTerminationPortTypeImpl( getResourceContext(  ) ).destroy( requestDoc );
+   }
+
+public org.oasisOpen.docs.wsdm.x2004.x12.muws.wsdmMuwsPart2.QueryRelationshipsByTypeResponseDocument queryRelationshipsByType( org.oasisOpen.docs.wsdm.x2004.x12.muws.wsdmMuwsPart2.QueryRelationshipsByTypeDocument requestDoc )
+{
+   return new org.apache.ws.muws.v1_0.capability.impl.RelationshipsCapabilityImpl( getResourceContext(  ) ).queryRelationshipsByType( requestDoc );
+}
+
 
 
 }

Modified: webservices/muse/trunk/client/src/test/org/apache/ws/service/testresource/TestResourcePropertyQNames.java
URL: http://svn.apache.org/viewcvs/webservices/muse/trunk/client/src/test/org/apache/ws/service/testresource/TestResourcePropertyQNames.java?rev=312926&r1=312925&r2=312926&view=diff
==============================================================================
--- webservices/muse/trunk/client/src/test/org/apache/ws/service/testresource/TestResourcePropertyQNames.java (original)
+++ webservices/muse/trunk/client/src/test/org/apache/ws/service/testresource/TestResourcePropertyQNames.java Tue Oct 11 11:03:34 2005
@@ -24,10 +24,10 @@
             new QName( "http://docs.oasis-open.org/wsdm/2004/12/muws/wsdm-muws-part1.xsd", "ManageabilityCapability", "muws-p1-xs");        
             QName TERMINATIONTIME =
             new QName( "http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceLifetime-1.2-draft-01.xsd", "TerminationTime", "wsrl");        
-            QName CURRENTTIME2 =
-            new QName( "http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceLifetime-1.2-draft-01.xsd", "CurrentTime", "wsrl");        
             QName PRICE =
             new QName( "http://ws.apache.org/service/testresource", "Price", "tns");        
+            QName CURRENTTIME2 =
+            new QName( "http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceLifetime-1.2-draft-01.xsd", "CurrentTime", "wsrl");        
             QName NAME =
             new QName( "http://ws.apache.org/service/testresource", "Name", "tns");        
             QName OPERATIONALSTATUS =
@@ -36,6 +36,8 @@
             new QName( "http://docs.oasis-open.org/wsn/2004/06/wsn-WS-BaseNotification-1.2-draft-01.xsd", "FixedTopicSet", "wsnt");        
             QName CURRENTTIME =
             new QName( "http://docs.oasis-open.org/wsdm/2004/12/muws/wsdm-muws-part2.xsd", "CurrentTime", "muws-p2-xs");        
+            QName RELATIONSHIP =
+            new QName( "http://docs.oasis-open.org/wsdm/2004/12/muws/wsdm-muws-part2.xsd", "Relationship", "muws-p2-xs");        
             QName TOPIC =
             new QName( "http://docs.oasis-open.org/wsn/2004/06/wsn-WS-BaseNotification-1.2-draft-01.xsd", "Topic", "wsnt");        
     

Modified: webservices/muse/trunk/client/src/test/org/apache/ws/service/testresource/TestResourceResource.java
URL: http://svn.apache.org/viewcvs/webservices/muse/trunk/client/src/test/org/apache/ws/service/testresource/TestResourceResource.java?rev=312926&r1=312925&r2=312926&view=diff
==============================================================================
--- webservices/muse/trunk/client/src/test/org/apache/ws/service/testresource/TestResourceResource.java (original)
+++ webservices/muse/trunk/client/src/test/org/apache/ws/service/testresource/TestResourceResource.java Tue Oct 11 11:03:34 2005
@@ -1,190 +1,324 @@
-
 package org.apache.ws.service.testresource;
 
+
 import java.math.BigDecimal;
 import java.util.Calendar;
 
+import javax.xml.namespace.QName;
+
 import org.apache.ws.muws.v1_0.MuwsConstants;
 import org.apache.ws.muws.v1_0.capability.IdentityCapability;
 import org.apache.ws.muws.v1_0.capability.ManageabilityCharacteristicsCapability;
 import org.apache.ws.muws.v1_0.capability.OperationalStatusCapability;
+import org.apache.ws.muws.v1_0.capability.RelationshipsCapability;
 import org.apache.ws.muws.v1_0.topics.ManagementEventTopic;
 import org.apache.ws.muws.v1_0.topics.impl.XmlBeansManagementEventTopicImpl;
 import org.apache.ws.notification.topics.TopicSpace;
 import org.apache.ws.notification.topics.impl.TopicSpaceImpl;
 import org.apache.ws.service.testresource.AbstractTestResourceResource;
+import org.apache.ws.service.testresource.TestResourceHome;
 import org.apache.ws.service.testresource.TestResourcePropertyQNames;
+import org.apache.ws.util.XmlBeanUtils;
 import org.apache.xmlbeans.GDurationBuilder;
+import org.apache.xmlbeans.XmlException;
+import org.apache.xmlbeans.XmlObject;
 import org.oasisOpen.docs.wsdm.x2004.x12.mows.wsdmMows.DurationMetric;
 import org.oasisOpen.docs.wsdm.x2004.x12.muws.wsdmMuwsPart2.OperationalStatusDocument;
+import org.oasisOpen.docs.wsdm.x2004.x12.muws.wsdmMuwsPart2.RelationshipDocument;
+import org.oasisOpen.docs.wsdm.x2004.x12.muws.wsdmMuwsPart2.RelationshipParticipantType;
+import org.oasisOpen.docs.wsdm.x2004.x12.muws.wsdmMuwsPart2.RelationshipType;
+import org.oasisOpen.docs.wsdm.x2004.x12.muws.wsdmMuwsPart2.RelationshipTypeType;
+import org.apache.ws.resource.properties.ResourceProperty;
+import org.apache.ws.addressing.XmlBeansEndpointReference;
+import org.apache.ws.addressing.v2004_08_10.AddressingConstants;
+import org.xmlsoap.schemas.ws.x2004.x08.addressing.EndpointReferenceType;
 
 /**
  * A TestResource WS-Resource.
  * <p />
- * NOTE: This file is generated, but is meant to be modified.
- *       It will NOT be overwritten by subsequent runs of Wsdl2Java.
+ * NOTE: This file is generated, but is meant to be modified. It will NOT be
+ * overwritten by subsequent runs of Wsdl2Java.
  */
 public class TestResourceResource extends AbstractTestResourceResource
 
 {
+    static QName RELATIONSHIP_RELATION = new QName(TestResourceHome.SERVICE_NAME.getNamespaceURI(), "Contains", "wsdir");
 
-        /**
-     * 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();
-    
-    /**
-     * Initializes this resource's state (properties, etc.).
-     */
-    public void init()
-    {
-        super.init();               
-
-        /**
-		 * The ResourcePropertySet which contains all the defined ResourceProperties
+	/**
+	 * 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();
+
+	/**
+	 * 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{
-		/** TOPICS * */
-		TopicSpace muwsTopicSpace = new TopicSpaceImpl(
-				MuwsConstants.NSURI_MUWS_PART2_TOPICS);
-		getTopicSpaceSet().addTopicSpace(muwsTopicSpace);
-		
-		// identity
-		ManagementEventTopic identityCapability = new XmlBeansManagementEventTopicImpl(
-				IdentityCapability.TOPIC_NAME);
-		muwsTopicSpace.addTopic(identityCapability);
-		// manageability
-		ManagementEventTopic manageabilityCharacteristicsCapability = new XmlBeansManagementEventTopicImpl(
-				ManageabilityCharacteristicsCapability.TOPIC_NAME);
-		muwsTopicSpace.addTopic(manageabilityCharacteristicsCapability);
-		
-		// operational status
-		ManagementEventTopic operationalCapability = new XmlBeansManagementEventTopicImpl(
-				OperationalStatusCapability.TOPIC_NAME);
-		muwsTopicSpace.addTopic(operationalCapability);
-
-		// operational status
-		ManagementEventTopic testMetricCapability = new XmlBeansManagementEventTopicImpl(
-				"TestMetricMonitorChannel");
-		muwsTopicSpace.addTopic(testMetricCapability);
-
-		
-		/** END TOPICS * */
-
-		// DEFINE CAPABILITIES
-		// init the {http://docs.oasis-open.org/wsdm/2004/12/muws/wsdm-muws-part1.xsd}
-		// ManageabilityCapability Resource Property
-		resourceProperty = resourcePropertySet.get(TestResourcePropertyQNames.MANAGEABILITYCAPABILITY);
-		org.oasisOpen.docs.wsdm.x2004.x12.muws.wsdmMuwsPart1.ManageabilityCapabilityDocument prop_manageabilitycapability = org.oasisOpen.docs.wsdm.x2004.x12.muws.wsdmMuwsPart1.ManageabilityCapabilityDocument.Factory.newInstance();
+		try {
+			/** TOPICS * */
+			TopicSpace muwsTopicSpace = new TopicSpaceImpl(
+					MuwsConstants.NSURI_MUWS_PART2_TOPICS);
+			getTopicSpaceSet().addTopicSpace(muwsTopicSpace);
+
+			// identity
+			ManagementEventTopic identityCapability = new XmlBeansManagementEventTopicImpl(
+					IdentityCapability.TOPIC_NAME);
+			muwsTopicSpace.addTopic(identityCapability);
+			// manageability
+			ManagementEventTopic manageabilityCharacteristicsCapability = new XmlBeansManagementEventTopicImpl(
+					ManageabilityCharacteristicsCapability.TOPIC_NAME);
+			muwsTopicSpace.addTopic(manageabilityCharacteristicsCapability);
+
+			// operational status
+			ManagementEventTopic operationalCapability = new XmlBeansManagementEventTopicImpl(
+					OperationalStatusCapability.TOPIC_NAME);
+			muwsTopicSpace.addTopic(operationalCapability);
+
+			// operational status
+			ManagementEventTopic testMetricCapability = new XmlBeansManagementEventTopicImpl(
+					"TestMetricMonitorChannel");
+			muwsTopicSpace.addTopic(testMetricCapability);
+
+            //relationships
+            ManagementEventTopic relationshipCapability = new XmlBeansManagementEventTopicImpl(RelationshipsCapability.TOPIC_NAME);
+            muwsTopicSpace.addTopic(relationshipCapability);
+
+            /** END TOPICS * */
+
+			// DEFINE CAPABILITIES
+			// init the
+			// {http://docs.oasis-open.org/wsdm/2004/12/muws/wsdm-muws-part1.xsd}
+			// ManageabilityCapability Resource Property
+			resourceProperty = resourcePropertySet
+					.get(TestResourcePropertyQNames.MANAGEABILITYCAPABILITY);
+			org.oasisOpen.docs.wsdm.x2004.x12.muws.wsdmMuwsPart1.ManageabilityCapabilityDocument prop_manageabilitycapability = org.oasisOpen.docs.wsdm.x2004.x12.muws.wsdmMuwsPart1.ManageabilityCapabilityDocument.Factory
+					.newInstance();
 
 			// identity capability
 			prop_manageabilitycapability
-			.setManageabilityCapability(IdentityCapability.URI);
+					.setManageabilityCapability(IdentityCapability.URI);
 			resourceProperty.add(prop_manageabilitycapability);
-			
+
 			// operational status capability
 			prop_manageabilitycapability = org.oasisOpen.docs.wsdm.x2004.x12.muws.wsdmMuwsPart1.ManageabilityCapabilityDocument.Factory
-			.newInstance();
+					.newInstance();
 			prop_manageabilitycapability
-			.setManageabilityCapability(OperationalStatusCapability.URI);
+					.setManageabilityCapability(OperationalStatusCapability.URI);
 			resourceProperty.add(prop_manageabilitycapability);
-			
+
+			// relationships
+			prop_manageabilitycapability = org.oasisOpen.docs.wsdm.x2004.x12.muws.wsdmMuwsPart1.ManageabilityCapabilityDocument.Factory
+					.newInstance();
+			prop_manageabilitycapability
+					.setManageabilityCapability(RelationshipsCapability.URI);
+			resourceProperty.add(prop_manageabilitycapability);
+
 			// manageability listener capability
-//			resourceProperty
-//			.addChangeListener(manageabilityCharacteristicsCapability);
+			// resourceProperty
+			// .addChangeListener(manageabilityCharacteristicsCapability);
 
-		// END DEFINE CAPABILITIES
+			// END DEFINE CAPABILITIES
 
-		
-		// DEFINE PROPERTIES
-		// init the {http://docs.oasis-open.org/wsdm/2004/12/muws/wsdm-muws-part1.xsd}
-		// ResourceId Resource Property
-		resourceProperty = resourcePropertySet.get(TestResourcePropertyQNames.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("urn:" + getID());
-		resourceProperty.add(prop_resourceid);
-		resourceProperty.addChangeListener(identityCapability);
-	
-	
-		// init the {http://ws.apache.org/service/testresource}
-		// Name Resource Property
-		resourceProperty = resourcePropertySet.get(TestResourcePropertyQNames.NAME);
-		org.apache.ws.service.testresource.NameDocument prop_name = org.apache.ws.service.testresource.NameDocument.Factory.newInstance();
-		prop_name.setName("UnitTestResource");
-		resourceProperty.add(prop_name);
-		
-		// init the {http://docs.oasis-open.org/wsdm/2004/12/mows/wsdm-mows.xsd}
-		// LastResponseTime Resource Property
-		Calendar resetAt = Calendar.getInstance();
-		resourceProperty = resourcePropertySet.get(TestResourcePropertyQNames.LASTRESPONSETIME);
-		org.oasisOpen.docs.wsdm.x2004.x12.mows.wsdmMows.LastResponseTimeDocument prop_lastresponsetime = org.oasisOpen.docs.wsdm.x2004.x12.mows.wsdmMows.LastResponseTimeDocument.Factory.newInstance();
-		DurationMetric durationMetric = DurationMetric.Factory.newInstance();
-		GDurationBuilder builder = new GDurationBuilder(+1, 1, 2, 3, 4, 5,
-				6, new BigDecimal("0.789"));			
-		durationMetric.setGDurationValue(builder.toGDuration());
-		durationMetric.setLastUpdated(resetAt);
-		durationMetric.setResetAt(resetAt);
-		prop_lastresponsetime.setLastResponseTime(durationMetric);
-		resourceProperty.add(prop_lastresponsetime);
-
-			
-		// init the {http://ws.apache.org/service/testresource}
-		// TestMetric Resource Property
-		resourceProperty = resourcePropertySet.get(TestResourcePropertyQNames.TESTMETRIC);
-		org.apache.ws.service.testresource.TestMetricDocument prop_testmetric = org.apache.ws.service.testresource.TestMetricDocument.Factory.newInstance();
-		
-		org.apache.ws.service.testresource.TestMetricMetricType testMetricMetricType = prop_testmetric
-		.addNewTestMetric();
-		testMetricMetricType.setDoubleValue(100.0);
-		testMetricMetricType.setResetAt(resetAt);
-
-		resourceProperty.add(prop_testmetric);
-		resourceProperty.addChangeListener(testMetricCapability);
-	
-	
-		// init the {http://ws.apache.org/service/testresource}
-		// Price Resource Property
-		resourceProperty = resourcePropertySet.get(TestResourcePropertyQNames.PRICE);
-		org.apache.ws.service.testresource.PriceDocument prop_price = org.apache.ws.service.testresource.PriceDocument.Factory.newInstance();
-		prop_price.setPrice(0.99);
-		resourceProperty.add(prop_price);
-	
-	
-	
-		// init the {http://docs.oasis-open.org/wsdm/2004/12/muws/wsdm-muws-part2.xsd}
-		// OperationalStatus Resource Property
-		resourceProperty = resourcePropertySet.get(TestResourcePropertyQNames.OPERATIONALSTATUS);
-		org.oasisOpen.docs.wsdm.x2004.x12.muws.wsdmMuwsPart2.OperationalStatusDocument prop_operationalstatus = org.oasisOpen.docs.wsdm.x2004.x12.muws.wsdmMuwsPart2.OperationalStatusDocument.Factory.newInstance();
-		prop_operationalstatus
-		.setOperationalStatus(OperationalStatusDocument.OperationalStatus.AVAILABLE);
-		resourceProperty.add(prop_operationalstatus);
-		resourceProperty.addChangeListener(operationalCapability);
-	
-	
-		// init the {http://docs.oasis-open.org/wsdm/2004/12/muws/wsdm-muws-part2.xsd}
-		// CurrentTime Resource Property
-		resourceProperty = resourcePropertySet.get(TestResourcePropertyQNames.CURRENTTIME);
-		org.oasisOpen.docs.wsdm.x2004.x12.muws.wsdmMuwsPart2.CurrentTimeDocument prop_currenttime = org.oasisOpen.docs.wsdm.x2004.x12.muws.wsdmMuwsPart2.CurrentTimeDocument.Factory.newInstance();
-		prop_currenttime.setCurrentTime(Calendar.getInstance());
-		// TODO: Initialize the prop_currenttime by calling its operations.
-		//also could call resourceProperty.setCallback(...); to add a custom callback object for this property
-		resourceProperty.add(prop_currenttime);
-	
-	
+			// DEFINE PROPERTIES
+			// init the
+			// {http://docs.oasis-open.org/wsdm/2004/12/muws/wsdm-muws-part1.xsd}
+			// ResourceId Resource Property
+			resourceProperty = resourcePropertySet
+					.get(TestResourcePropertyQNames.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("urn:" + getID());
+			resourceProperty.add(prop_resourceid);
+			resourceProperty.addChangeListener(identityCapability);
+
+			// init the {http://ws.apache.org/service/testresource}
+			// Name Resource Property
+			resourceProperty = resourcePropertySet
+					.get(TestResourcePropertyQNames.NAME);
+			org.apache.ws.service.testresource.NameDocument prop_name = org.apache.ws.service.testresource.NameDocument.Factory
+					.newInstance();
+			prop_name.setName("UnitTestResource");
+			resourceProperty.add(prop_name);
+
+			// init the
+			// {http://docs.oasis-open.org/wsdm/2004/12/mows/wsdm-mows.xsd}
+			// LastResponseTime Resource Property
+			Calendar resetAt = Calendar.getInstance();
+			resourceProperty = resourcePropertySet
+					.get(TestResourcePropertyQNames.LASTRESPONSETIME);
+			org.oasisOpen.docs.wsdm.x2004.x12.mows.wsdmMows.LastResponseTimeDocument prop_lastresponsetime = org.oasisOpen.docs.wsdm.x2004.x12.mows.wsdmMows.LastResponseTimeDocument.Factory
+					.newInstance();
+			DurationMetric durationMetric = DurationMetric.Factory
+					.newInstance();
+			GDurationBuilder builder = new GDurationBuilder(+1, 1, 2, 3, 4, 5,
+					6, new BigDecimal("0.789"));
+			durationMetric.setGDurationValue(builder.toGDuration());
+			durationMetric.setLastUpdated(resetAt);
+			durationMetric.setResetAt(resetAt);
+			prop_lastresponsetime.setLastResponseTime(durationMetric);
+			resourceProperty.add(prop_lastresponsetime);
+
+			// init the {http://ws.apache.org/service/testresource}
+			// TestMetric Resource Property
+			resourceProperty = resourcePropertySet
+					.get(TestResourcePropertyQNames.TESTMETRIC);
+			org.apache.ws.service.testresource.TestMetricDocument prop_testmetric = org.apache.ws.service.testresource.TestMetricDocument.Factory
+					.newInstance();
+
+			org.apache.ws.service.testresource.TestMetricMetricType testMetricMetricType = prop_testmetric
+					.addNewTestMetric();
+			testMetricMetricType.setDoubleValue(100.0);
+			testMetricMetricType.setResetAt(resetAt);
+
+			resourceProperty.add(prop_testmetric);
+			resourceProperty.addChangeListener(testMetricCapability);
+
+			// init the {http://ws.apache.org/service/testresource}
+			// Price Resource Property
+			resourceProperty = resourcePropertySet
+					.get(TestResourcePropertyQNames.PRICE);
+			org.apache.ws.service.testresource.PriceDocument prop_price = org.apache.ws.service.testresource.PriceDocument.Factory
+					.newInstance();
+			prop_price.setPrice(0.99);
+			resourceProperty.add(prop_price);
+
+			// init the
+			// {http://docs.oasis-open.org/wsdm/2004/12/muws/wsdm-muws-part2.xsd}
+			// OperationalStatus Resource Property
+			resourceProperty = resourcePropertySet
+					.get(TestResourcePropertyQNames.OPERATIONALSTATUS);
+			org.oasisOpen.docs.wsdm.x2004.x12.muws.wsdmMuwsPart2.OperationalStatusDocument prop_operationalstatus = org.oasisOpen.docs.wsdm.x2004.x12.muws.wsdmMuwsPart2.OperationalStatusDocument.Factory
+					.newInstance();
+			prop_operationalstatus
+					.setOperationalStatus(OperationalStatusDocument.OperationalStatus.AVAILABLE);
+			resourceProperty.add(prop_operationalstatus);
+			resourceProperty.addChangeListener(operationalCapability);
+
+			// init the
+			// {http://docs.oasis-open.org/wsdm/2004/12/muws/wsdm-muws-part2.xsd}
+			// CurrentTime Resource Property
+			resourceProperty = resourcePropertySet
+					.get(TestResourcePropertyQNames.CURRENTTIME);
+			org.oasisOpen.docs.wsdm.x2004.x12.muws.wsdmMuwsPart2.CurrentTimeDocument prop_currenttime = org.oasisOpen.docs.wsdm.x2004.x12.muws.wsdmMuwsPart2.CurrentTimeDocument.Factory
+					.newInstance();
+			prop_currenttime.setCurrentTime(Calendar.getInstance());
+			// TODO: Initialize the prop_currenttime by calling its operations.
+			// also could call resourceProperty.setCallback(...); to add a
+			// custom callback object for this property
+			resourceProperty.add(prop_currenttime);
+
+			// init the
+			// {http://docs.oasis-open.org/wsdm/2004/12/muws/wsdm-muws-part2.xsd}Relationship
+			// Resource Property
+			resourceProperty = resourcePropertySet
+					.get(TestResourcePropertyQNames.RELATIONSHIP);
+			initRelationships(resourceProperty);
+			resourceProperty.addChangeListener(relationshipCapability);
+
+		} 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());
 		}
-	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.
+
+	}
+
+	/**
+	 * Adds a relationship to this resource with a given epr as the child
+	 * relation
+	 * 
+	 * @param resourceProperty
+	 * @param childEpr
+	 */
+	private void addRelation(ResourceProperty resourceProperty,
+			EndpointReferenceType childEpr,String resourceId) {
+		// define a relationship
+		RelationshipDocument relationshipDocument = RelationshipDocument.Factory
+				.newInstance();
+		RelationshipType relationshipType = createRelationshipType(relationshipDocument
+						.addNewRelationship());
+
+		// add self as a participant
+		RelationshipParticipantType parentRelationshipParticipantType = relationshipType
+				.addNewParticipant();
+		XmlBeansEndpointReference dirEpr = (XmlBeansEndpointReference) getEndpointReference();
+		EndpointReferenceType dirEndpointReferenceType = (EndpointReferenceType) dirEpr
+				.getXmlObject(AddressingConstants.NSURI_ADDRESSING_SCHEMA);
+		parentRelationshipParticipantType
+				.setResourceId("0001");
+		parentRelationshipParticipantType
+				.setRole("urn://parent");// uri
+		parentRelationshipParticipantType
+				.setManageabilityEndpointReferenceArray(new EndpointReferenceType[] { dirEndpointReferenceType });
+
+		// add the new ws as the other participant
+		RelationshipParticipantType childRelationshipParticipantType = relationshipType
+				.addNewParticipant();
+		System.out.println("Getting the Resource ID for the EPR: "
+				+ childEpr.getAddress().getStringValue());
+		//String resourceId = InteropRequestUtils.getResourceId(childEpr);
+		if (resourceId == null) {
+			resourceId = "UNKNOWN";
+		}
+		childRelationshipParticipantType.setResourceId(resourceId);
+		childRelationshipParticipantType
+				.setRole("urn://child");// uri
+		childRelationshipParticipantType
+				.setManageabilityEndpointReferenceArray(new EndpointReferenceType[] { childEpr });
+
+		resourceProperty.add(relationshipDocument);
 	}
-		// 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.
-			
-			
 
-            }
+	/**
+	 * Initializes the default relationships
+	 * 
+	 * @param resourceProperty
+	 * @throws Exception
+	 */
+	private void initRelationships(ResourceProperty resourceProperty)
+			throws Exception {
+		try {
+			XmlBeansEndpointReference epr2 = new XmlBeansEndpointReference("http://localhost:8080/axis/TestResource", "0002");
+			XmlBeansEndpointReference epr3 = new XmlBeansEndpointReference("http://localhost:8080/axis/TestResource", "0003");
+			addRelation(resourceProperty, (EndpointReferenceType) epr2.getXmlObject(org.apache.ws.addressing.v2004_08_10.AddressingConstants.NSURI_ADDRESSING_SCHEMA),"0002");
+			addRelation(resourceProperty,(EndpointReferenceType) epr2.getXmlObject(org.apache.ws.addressing.v2004_08_10.AddressingConstants.NSURI_ADDRESSING_SCHEMA),"0003");
+		} catch (Exception e) {
+			e.printStackTrace();
+		}
+	}
+	   public static RelationshipType createRelationshipType(RelationshipType relationshipType)
+	    {
+	        try
+	        {
+	            //define the relationship type
+	            RelationshipTypeType relationshipTypeType = relationshipType.addNewType();
+	            XmlObject relationType = XmlObject.Factory.parse("<" + RELATIONSHIP_RELATION.getPrefix() + ":" + RELATIONSHIP_RELATION.getLocalPart() + " xmlns:" + RELATIONSHIP_RELATION.getPrefix() + "=" + "\"" +RELATIONSHIP_RELATION.getNamespaceURI() + "\" />");
+	            XmlBeanUtils.addChildElement(relationshipTypeType, relationType);
+	        }
+	        catch (XmlException e)
+	        {
+	            e.printStackTrace();
+	        }
+	        return relationshipType;
+	    }
+
+
 }

Modified: webservices/muse/trunk/client/src/test/org/apache/ws/service/testresource/TestResource_jndi-config.xml
URL: http://svn.apache.org/viewcvs/webservices/muse/trunk/client/src/test/org/apache/ws/service/testresource/TestResource_jndi-config.xml?rev=312926&r1=312925&r2=312926&view=diff
==============================================================================
--- webservices/muse/trunk/client/src/test/org/apache/ws/service/testresource/TestResource_jndi-config.xml (original)
+++ webservices/muse/trunk/client/src/test/org/apache/ws/service/testresource/TestResource_jndi-config.xml Tue Oct 11 11:03:34 2005
@@ -15,7 +15,7 @@
                	    -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/muse</value>
+               <value>http://$IP_ADDRESS$:8080/axis</value>
 	    </parameter>            
             <parameter>
                <name>serviceClassName</name>

Modified: webservices/muse/trunk/client/src/wsdl/resource/testresource.wsdl
URL: http://svn.apache.org/viewcvs/webservices/muse/trunk/client/src/wsdl/resource/testresource.wsdl?rev=312926&r1=312925&r2=312926&view=diff
==============================================================================
--- webservices/muse/trunk/client/src/wsdl/resource/testresource.wsdl (original)
+++ webservices/muse/trunk/client/src/wsdl/resource/testresource.wsdl Tue Oct 11 11:03:34 2005
@@ -45,6 +45,7 @@
 						<element ref="mows-xs:LastResponseTime"/>
 						<element ref="wsrl:CurrentTime"/>
 						<element ref="wsrl:TerminationTime" />
+						<element ref="muws-p2-xs:Relationship" minOccurs="0" maxOccurs="unbounded"/>						
 					</sequence>
 				</complexType>
 			</element>
@@ -95,7 +96,6 @@
 			<fault name="InvalidQueryExpressionFault" message="wsrpw:InvalidQueryExpressionFault"/>
 			<fault name="QueryEvaluationErrorFault" message="wsrpw:QueryEvaluationErrorFault"/>
 		</operation>
-		
 		<operation name="Subscribe">
 			<input message="wsntw:SubscribeRequest"/>
 			<output message="wsntw:SubscribeResponse"/>
@@ -121,13 +121,18 @@
 			<fault name="ResourceUnknownFault" message="wsrlw:ResourceUnknownFault"/>
 			<fault name="ResourceNotDestroyedFault" message="wsrlw:ResourceNotDestroyedFault"/>
 		</operation>
-	      <operation name="SetTerminationTime">
-		 <input message="wsrlw:SetTerminationTimeRequest"/>
-		 <output message="wsrlw:SetTerminationTimeResponse"/>
-		 <fault name="ResourceUnknownFault" message="wsrlw:ResourceUnknownFault"/>
-		 <fault name="UnableToSetTerminationTimeFault" message="wsrlw:UnableToSetTerminationTimeFault"/>
-		 <fault name="TerminationTimeChangeRejectedFault" message="wsrlw:TerminationTimeChangeRejectedFault"/>
-	      </operation>		
+	    <operation name="SetTerminationTime">
+			 <input message="wsrlw:SetTerminationTimeRequest"/>
+			 <output message="wsrlw:SetTerminationTimeResponse"/>
+			 <fault name="ResourceUnknownFault" message="wsrlw:ResourceUnknownFault"/>
+			 <fault name="UnableToSetTerminationTimeFault" message="wsrlw:UnableToSetTerminationTimeFault"/>
+			 <fault name="TerminationTimeChangeRejectedFault" message="wsrlw:TerminationTimeChangeRejectedFault"/>
+	    </operation>
+	    <operation name="QueryRelationshipsByType">
+	      <input message="muws-p2-wsdl:QueryRelationshipsByTypeRequest"/>
+    	  <output message="muws-p2-wsdl:QueryRelationshipsByTypeResponse"/>
+    	</operation>
+	    
 	</portType>
 	<binding name="TestResourceSoapHttpBinding" type="tns:TestResourcePortType">
 		<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
@@ -185,7 +190,6 @@
 	            <soap:fault name="SetResourcePropertyRequestFailedFault" use="literal"/>
 	         </fault>
 	      </operation>
-
 		<operation name="QueryResourceProperties">
 			<soap:operation style="document"/>
 			<input>
@@ -292,7 +296,18 @@
 		 <fault name="TerminationTimeChangeRejectedFault">
 		    <soap:fault name="TerminationTimeChangeRejectedFault" use="literal"/>
 		 </fault>
-	      </operation>		
+	      </operation>	
+	      
+	          <operation name="QueryRelationshipsByType">
+      <soap:operation style="document"/>
+      <input>
+        <soap:body use="literal"/>
+      </input>
+      <output>
+        <soap:body use="literal"/>
+      </output>
+    </operation>
+	      	
 	</binding>
 	<service name="TestResourceService">
 		<port name="TestResource" binding="tns:TestResourceSoapHttpBinding">