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/09/22 19:23:06 UTC

svn commit: r290990 - in /webservices/muse/trunk/src/examples/client/src/test/org/apache/ws: client/muse/client/impl/ client/muse/client/impl/notification/ service/ service/testresource/ util/

Author: wire
Date: Thu Sep 22 10:23:01 2005
New Revision: 290990

URL: http://svn.apache.org/viewcvs?rev=290990&view=rev
Log:
Added BaseFault support and ability to set properties

Added:
    webservices/muse/trunk/src/examples/client/src/test/org/apache/ws/service/
    webservices/muse/trunk/src/examples/client/src/test/org/apache/ws/service/testresource/
    webservices/muse/trunk/src/examples/client/src/test/org/apache/ws/service/testresource/AbstractTestResourceHome.java
    webservices/muse/trunk/src/examples/client/src/test/org/apache/ws/service/testresource/AbstractTestResourceResource.java
    webservices/muse/trunk/src/examples/client/src/test/org/apache/ws/service/testresource/AbstractTestResourceService.java
    webservices/muse/trunk/src/examples/client/src/test/org/apache/ws/service/testresource/InvalidResourcePropertyQNameFaultException.java
    webservices/muse/trunk/src/examples/client/src/test/org/apache/ws/service/testresource/ResourceUnknownFaultException.java
    webservices/muse/trunk/src/examples/client/src/test/org/apache/ws/service/testresource/TestResourceCustomOperationsPortType.java
    webservices/muse/trunk/src/examples/client/src/test/org/apache/ws/service/testresource/TestResourceHome.java
    webservices/muse/trunk/src/examples/client/src/test/org/apache/ws/service/testresource/TestResourcePropertyQNames.java
    webservices/muse/trunk/src/examples/client/src/test/org/apache/ws/service/testresource/TestResourceResource.java
    webservices/muse/trunk/src/examples/client/src/test/org/apache/ws/service/testresource/TestResourceService.java
    webservices/muse/trunk/src/examples/client/src/test/org/apache/ws/service/testresource/TestResource_deploy.wsdd
    webservices/muse/trunk/src/examples/client/src/test/org/apache/ws/service/testresource/TestResource_jndi-config.xml
Removed:
    webservices/muse/trunk/src/examples/client/src/test/org/apache/ws/util/
Modified:
    webservices/muse/trunk/src/examples/client/src/test/org/apache/ws/client/muse/client/impl/ManageableResourceImplTest.java
    webservices/muse/trunk/src/examples/client/src/test/org/apache/ws/client/muse/client/impl/notification/NotificationImplTest.java
    webservices/muse/trunk/src/examples/client/src/test/org/apache/ws/client/muse/client/impl/notification/NotifyableResourceTest.java

Modified: webservices/muse/trunk/src/examples/client/src/test/org/apache/ws/client/muse/client/impl/ManageableResourceImplTest.java
URL: http://svn.apache.org/viewcvs/webservices/muse/trunk/src/examples/client/src/test/org/apache/ws/client/muse/client/impl/ManageableResourceImplTest.java?rev=290990&r1=290989&r2=290990&view=diff
==============================================================================
--- webservices/muse/trunk/src/examples/client/src/test/org/apache/ws/client/muse/client/impl/ManageableResourceImplTest.java (original)
+++ webservices/muse/trunk/src/examples/client/src/test/org/apache/ws/client/muse/client/impl/ManageableResourceImplTest.java Thu Sep 22 10:23:01 2005
@@ -133,15 +133,16 @@
 	 * @throws IOException 
 	 * @throws URISyntaxException 
 	 * @throws FaultException 
+	 * @throws FaultException 
 	 *
 	 */
-	public void testGetPropertyNames() throws URISyntaxException, IOException, XmlException, UnexpectedServerResponseException{
+	public void testGetPropertyNames() throws URISyntaxException, IOException, XmlException, UnexpectedServerResponseException, FaultException{
 		QName[] infoArry= testImpl.getPropertyQNames();
 		assertNotNull(infoArry);
 		assertEquals(17,infoArry.length);
 	}
 	
-	public void testGetMultipleResourceProperties() throws URISyntaxException, IOException, XmlException, UnexpectedServerResponseException{
+	public void testGetMultipleResourceProperties() throws URISyntaxException, IOException, XmlException, UnexpectedServerResponseException, FaultException{
 		//define list of requested resouces as QName array
 		QName[] requestedResourceProperties = new QName[3];
 		//populate array.

Modified: webservices/muse/trunk/src/examples/client/src/test/org/apache/ws/client/muse/client/impl/notification/NotificationImplTest.java
URL: http://svn.apache.org/viewcvs/webservices/muse/trunk/src/examples/client/src/test/org/apache/ws/client/muse/client/impl/notification/NotificationImplTest.java?rev=290990&r1=290989&r2=290990&view=diff
==============================================================================
--- webservices/muse/trunk/src/examples/client/src/test/org/apache/ws/client/muse/client/impl/notification/NotificationImplTest.java (original)
+++ webservices/muse/trunk/src/examples/client/src/test/org/apache/ws/client/muse/client/impl/notification/NotificationImplTest.java Thu Sep 22 10:23:01 2005
@@ -2,27 +2,26 @@
 
 import java.util.Calendar;
 
+import junit.framework.TestCase;
+
 import org.apache.ws.addressing.EndpointReference;
-import org.apache.ws.client.muse.client.impl.exceptions.UnexpectedServerResponseException;
 import org.apache.ws.client.muse.client.model.Notification;
 import org.apache.ws.client.muse.client.model.TopicExpression;
-import org.apache.xmlbeans.XmlException;
 import org.apache.xmlbeans.XmlObject;
 import org.oasisOpen.docs.wsdm.x2004.x12.muws.wsdmMuwsPart1.ComponentAddressType;
 import org.oasisOpen.docs.wsdm.x2004.x12.muws.wsdmMuwsPart1.ComponentType;
 import org.oasisOpen.docs.wsdm.x2004.x12.muws.wsdmMuwsPart1.impl.ManagementEventTypeImpl;
 
-import junit.framework.TestCase;
-
 public class NotificationImplTest extends TestCase {
 	String message="<?xml version=\"1.0\" encoding=\"UTF-8\"?><soapenv:Envelope xmlns:soapenv=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"><soapenv:Header><wsa03:To soapenv:actor=\"http://schemas.xmlsoap.org/soap/actor/next\" soapenv:mustUnderstand=\"0\" xmlns:wsa03=\"http://schemas.xmlsoap.org/ws/2003/03/addressing\">http://localhost:8089/endpoint/wsmgr?a=/11310</wsa03:To><wsa03:Action soapenv:actor=\"http://schemas.xmlsoap.org/soap/actor/next\" soapenv:mustUnderstand=\"0\" xmlns:wsa03=\"http://schemas.xmlsoap.org/ws/2003/03/addressing\">http://docs.oasis-open.org/wsn/2004/06/wsn-WS-BaseNotification-1.2-draft-01.wsdl/Notify</wsa03:Action></soapenv:Header><soapenv:Body><wsn:Notify xmlns:wsn=\"http://docs.oasis-open.org/wsn/2004/06/wsn-WS-BaseNotification-1.2-draft-01.xsd\"><wsn:NotificationMessage><wsn:Topic xmlns:wsdm=\"http://docs.oasis-open.org/wsdm/2004/12/muws/wsdm-muws-part2-events.xml\" Dialect=\"http://docs.oasis-open.org/wsn/2004/06/TopicExpression/Simple\">wsdm:OperationalStatusCapability</wsn:Topic><wsn:ProducerReference><add:Address xmlns:add=\"http://schemas.xmlsoap.org/ws/2003/03/addressing\">http://192.168.1.241:8080/muse/services/weather-station</add:Address><add:ReferenceProperties xmlns:add=\"http://schemas.xmlsoap.org/ws/2003/03/addressing\"><weat:ResourceIdentifier xmlns:weat=\"http://wsdmdemo.org/service/weather-station\">weather-station-1</weat:ResourceIdentifier></add:ReferenceProperties><add:PortType xmlns:weat=\"http://wsdmdemo.org/service/weather-station\" xmlns:add=\"http://schemas.xmlsoap.org/ws/2003/03/addressing\">weat:WeatherStationPortType</add:PortType><add:ServiceName xmlns:weat=\"http://wsdmdemo.org/service/weather-station\" xmlns:add=\"http://schemas.xmlsoap.org/ws/2003/03/addressing\" PortName=\"weather-station\">weat:weather-station</add:ServiceName></wsn:ProducerReference><wsn:Message><wsdm:ManagementEvent xmlns:wsdm=\"http://docs.oasis-open.org/wsdm/2004/12/muws/wsdm-muws-part1.xsd\" ReportTime=\"2005-09-19T11:50:31.660-04:00\"><wsdm:EventId>40d8345e-7e7f-4a60-b544-67e77c2ea6ad</wsdm:EventId><wsdm:SourceComponent/><wsdm:ReporterComponent/><wsdm:Situation xmlns:wsdm=\"http://docs.oasis-open.org/wsdm/2004/12/muws/wsdm-muws-part2.xsd\"><wsdm:SituationCategory><muws-p2-xs:OtherSituation xmlns:muws-p2-xs=\"http://docs.oasis-open.org/wsdm/2004/12/muws/wsdm-muws-part2.xsd\"/></wsdm:SituationCategory></wsdm:Situation><wsrf:ResourcePropertyValueChangeNotification xmlns:wsrf=\"http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceProperties-1.2-draft-01.xsd\"><wsrf:OldValue><wsdm:OperationalStatus xmlns:wsdm=\"http://docs.oasis-open.org/wsdm/2004/12/muws/wsdm-muws-part2.xsd\">Available</wsdm:OperationalStatus></wsrf:OldValue><wsrf:NewValue><wsdm:OperationalStatus xmlns:wsdm=\"http://docs.oasis-open.org/wsdm/2004/12/muws/wsdm-muws-part2.xsd\">Unavailable</wsdm:OperationalStatus></wsrf:NewValue></wsrf:ResourcePropertyValueChangeNotification></wsdm:ManagementEvent></wsn:Message></wsn:NotificationMessage></wsn:Notify></soapenv:Body></soapenv:Envelope>";
 	private Notification notification;
 	protected void setUp() throws Exception {
 		super.setUp();
-		Notification[] notifications = NotificationImpl.createNotifications(message,null);
-		assertNotNull(notifications);
+		Notification[] notifications=NotificationImpl.create(message,null);
 		assertTrue(notifications.length>0);
-		this.notification=notifications[0];
+		Notification notification = notifications[0];
+		assertNotNull(notification);
+		this.notification=notification;
 	}
 
 	protected void tearDown() throws Exception {

Modified: webservices/muse/trunk/src/examples/client/src/test/org/apache/ws/client/muse/client/impl/notification/NotifyableResourceTest.java
URL: http://svn.apache.org/viewcvs/webservices/muse/trunk/src/examples/client/src/test/org/apache/ws/client/muse/client/impl/notification/NotifyableResourceTest.java?rev=290990&r1=290989&r2=290990&view=diff
==============================================================================
--- webservices/muse/trunk/src/examples/client/src/test/org/apache/ws/client/muse/client/impl/notification/NotifyableResourceTest.java (original)
+++ webservices/muse/trunk/src/examples/client/src/test/org/apache/ws/client/muse/client/impl/notification/NotifyableResourceTest.java Thu Sep 22 10:23:01 2005
@@ -10,7 +10,10 @@
 import org.apache.ws.client.muse.client.NotificationConsumer;
 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.wsrf.SetPropertiesRequestImpl;
+import org.apache.ws.client.muse.client.model.Notification;
 import org.apache.ws.client.muse.client.model.TopicExpression;
+import org.apache.ws.service.testresource.TestResourcePropertyQNames;
 import org.apache.ws.util.test.axis.MuseClientTestCase;
 import org.apache.xmlbeans.XmlException;
 
@@ -68,28 +71,77 @@
 	public void testSimpleSubscribe() throws URISyntaxException, IOException, XmlException, UnexpectedServerResponseException, FaultException{
 		TopicExpression[] topics = testResource.getTopics();
 
+		// Create listener
 		NotificationConsumer testConsumer=new NotificationConsumerImpl(8085,20000);
 		testConsumer.addObserver(this);
 		testConsumer.start();
-		ManageableResource subscriptionResource = testResource.subscribe(topics[0],testConsumer.getEndpointReference());
+		ManageableResource subscriptionResource = testResource.subscribe(topics[3],testConsumer.getEndpointReference());
 		assertNotNull(subscriptionResource);
-
+		
+		// force a notification to be sent
+		notificationRecived=null;
+		SetPropertiesRequestImpl props = new SetPropertiesRequestImpl();
+		props.addUpdateRequest(TestResourcePropertyQNames.TESTMETRIC,new String[]{"30"});
+		testResource.setProperties(props);
+		
 		// Wait for notification
-		unit_test_thread=Thread.currentThread();
-		try {
-			unit_test_thread.wait(10000);
-		} catch (InterruptedException e) {
-			// Wait for notification 
-			e.printStackTrace();
+		if(notificationRecived==null){
+			unit_test_thread=Thread.currentThread();
+			synchronized (unit_test_thread) {
+				try {
+					unit_test_thread.wait(30000);
+				} catch (InterruptedException e) {
+				}
+			}
 		}
+		// Shutdown notifications
 		testConsumer.deleteObserver(this);
-		assertNotNull(notificationRecived);
+		testConsumer.stop();
+		
 
+		assertNotNull("Timeout occured.",notificationRecived);
+		
+		
 	}
 	
 	
-	public void testGetCurrentMessage(){
-		fail("This test cannot complete until a wrapper class for notifications is developed");
+	public void testGetCurrentMessage() throws FaultException, URISyntaxException, IOException, XmlException, UnexpectedServerResponseException{
+		TopicExpression[] topics = testResource.getTopics();
+
+		// Create listener
+		NotificationConsumer testConsumer=new NotificationConsumerImpl(8085,20000);
+		testConsumer.addObserver(this);
+		testConsumer.start();
+		ManageableResource subscriptionResource = testResource.subscribe(topics[3],testConsumer.getEndpointReference());
+		assertNotNull(subscriptionResource);
+		
+		// force a notification to be sent
+		notificationRecived=null;
+		SetPropertiesRequestImpl props = new SetPropertiesRequestImpl();
+		props.addUpdateRequest(TestResourcePropertyQNames.TESTMETRIC,new String[]{"30"});
+		testResource.setProperties(props);
+		
+		// Wait for notification
+		if(notificationRecived==null){
+			unit_test_thread=Thread.currentThread();
+			synchronized (unit_test_thread) {
+				try {
+					unit_test_thread.wait(30000);
+				} catch (InterruptedException e) {
+				}
+			}
+		}
+		assertNotNull("Timeout occured.",notificationRecived);
+		
+		Notification message = testResource.getCurrentMessage(new TopicExpressionImpl(topics[3].getName()));
+		assertNotNull(message);
+
+		
+		// Shutdown notifications
+		testConsumer.deleteObserver(this);
+		testConsumer.stop();		
+		
+		
 	}
 
 	public void update(Observable o, Object arg) {

Added: webservices/muse/trunk/src/examples/client/src/test/org/apache/ws/service/testresource/AbstractTestResourceHome.java
URL: http://svn.apache.org/viewcvs/webservices/muse/trunk/src/examples/client/src/test/org/apache/ws/service/testresource/AbstractTestResourceHome.java?rev=290990&view=auto
==============================================================================
--- webservices/muse/trunk/src/examples/client/src/test/org/apache/ws/service/testresource/AbstractTestResourceHome.java (added)
+++ webservices/muse/trunk/src/examples/client/src/test/org/apache/ws/service/testresource/AbstractTestResourceHome.java Thu Sep 22 10:23:01 2005
@@ -0,0 +1,39 @@
+package org.apache.ws.service.testresource;
+
+import org.apache.ws.resource.impl.AbstractResourceHome;
+import org.apache.commons.collections.map.ReferenceMap;
+import java.util.Map;
+
+/** 
+ * The class acts as an extension of the AbstractResourceHome which
+ * maintains a reference to the STATIC map needed for accessing
+ * resources via JNDI. This ensures the resources will be accessible
+ * when serialized upon lookup from certain JNDI providers.
+ * <p />
+ * ***** WARNING *****
+ * This class is generated by Wsdl2Java and is NOT meant to be modified. 
+ * It will be overwritten by subsequent runs of Wsdl2Java. 
+ */
+abstract class AbstractTestResourceHome extends AbstractResourceHome
+{
+    
+    /**
+     * Map containing all TestResourceResource instances - this map <em>must</em> be static for
+     * compatibility with certain JNDI providers.         
+     */
+    private static Map s_resources;
+
+    /**
+     * Returns a map of all TestResourceResource instances. Called by the {@link AbstractResourceHome}
+     * superclass.
+     */
+    protected synchronized final Map getResourceMap()
+    {
+        if ( s_resources == null )
+        {
+            s_resources = AbstractResourceHome.createResourceMap( m_resourceIsPersistent );
+        }
+        return s_resources;
+    }
+    
+}

Added: webservices/muse/trunk/src/examples/client/src/test/org/apache/ws/service/testresource/AbstractTestResourceResource.java
URL: http://svn.apache.org/viewcvs/webservices/muse/trunk/src/examples/client/src/test/org/apache/ws/service/testresource/AbstractTestResourceResource.java?rev=290990&view=auto
==============================================================================
--- webservices/muse/trunk/src/examples/client/src/test/org/apache/ws/service/testresource/AbstractTestResourceResource.java (added)
+++ webservices/muse/trunk/src/examples/client/src/test/org/apache/ws/service/testresource/AbstractTestResourceResource.java Thu Sep 22 10:23:01 2005
@@ -0,0 +1,152 @@
+
+package org.apache.ws.service.testresource;
+
+import org.apache.ws.addressing.EndpointReference;
+
+/**
+ * An abstract base class for the TestResource resource.
+ * <p />
+ * ***** WARNING *****
+ * 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.PropertiesResource, org.apache.ws.notification.base.NotificationProducerResource {
+    
+    /**
+     * The resource ID of the instance.
+     */
+    protected String m_id;
+    
+    /** The EndpointReference for this resource **/
+    protected EndpointReference m_endpointReference;
+
+        /**
+     * The set of properties associated with this resource.
+     */
+    protected org.apache.ws.resource.properties.ResourcePropertySet m_propSet;
+            
+    
+    /**
+     * A list of termination listeners to be notified when the resource is terminated.
+     */
+    private java.util.List m_terminationListeners = new java.util.ArrayList(); 
+     
+     
+    /**
+     * DOCUMENT_ME
+     *
+     * @param id DOCUMENT_ME
+     */
+    public void setID( Object id )
+    {
+        if ( m_id != null )
+        {
+            throw new IllegalStateException( "This resource's ID has already been set." );
+        }
+
+        try
+        {
+            m_id = (String) id;
+        }
+        catch ( ClassCastException cce )
+        {
+            throw new IllegalArgumentException( "Specified ID is not a String." );
+        }
+    }
+
+    /**
+     * DOCUMENT_ME
+     *
+     * @param listener DOCUMENT_ME
+     */
+    public void addTerminationListener( org.apache.ws.resource.lifetime.ResourceTerminationListener listener)
+    {         
+         m_terminationListeners.add(listener);
+    }
+
+    /**
+     * DOCUMENT_ME
+     *
+     * @return DOCUMENT_ME
+     */
+    public Object getID()
+    {
+        return m_id;
+    }
+
+    public void destroy()
+    {
+	org.apache.ws.resource.lifetime.ResourceTerminationEvent rte = new org.apache.ws.resource.lifetime.impl.ResourceTerminationEventImpl(getID(),"Resource Destroyed");
+	for (int i = 0; i < m_terminationListeners.size(); i++)
+	{
+	    org.apache.ws.resource.lifetime.ResourceTerminationListener resourceTerminationEventListener = (org.apache.ws.resource.lifetime.ResourceTerminationListener) m_terminationListeners.get(i);
+	    resourceTerminationEventListener.terminationOccurred(rte);
+	}     
+        return;
+    }
+
+    public void init()
+    {
+                
+                org.apache.ws.service.testresource.TestResourceResourcePropertiesDocument propsDoc = org.apache.ws.service.testresource.TestResourceResourcePropertiesDocument.Factory.newInstance();
+        m_propSet = new org.apache.ws.resource.properties.impl.XmlBeansResourcePropertySet( propsDoc );
+		
+                    org.apache.ws.resource.properties.ResourceProperty topicProp = getResourcePropertySet().get( org.apache.ws.notification.base.v2004_06.porttype.NotificationProducerPortType.PROP_QNAME_TOPIC );
+    topicProp.setCallback( new org.apache.ws.notification.base.TopicResourcePropertyCallback( getTopicSpaceSet() ) );
+
+    org.apache.ws.resource.properties.ResourceProperty fixedTopicSetProp = getResourcePropertySet().get( org.apache.ws.notification.base.v2004_06.porttype.NotificationProducerPortType.PROP_QNAME_FIXED_TOPIC_SET );
+    fixedTopicSetProp.setCallback( new org.apache.ws.notification.base.FixedTopicSetResourcePropertyCallback( getTopicSpaceSet() ) );
+
+    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() );
+                  
+    }
+    
+   /**
+    * Returns the EndpointReference associated with this Resource.
+    *
+    * @return The Resource's EndpointReference or null if the EndpointReference has not been set.
+    * 
+    * Note: It is the responsibility of the Resource creator to set the EndpointReference (i.e. ResourceHome impl)
+    */
+    public EndpointReference getEndpointReference()
+    {
+            return m_endpointReference;        
+    }
+    
+   /**
+    * Sets the EndpointReference associated with this Resource.
+    *
+    * @param epr The Resource's EndpointReference.
+    * 
+    * Note: It is the responsibility of the Resource creator to set the EndpointReference (i.e. ResourceHome impl)
+    */
+    public void setEndpointReference(EndpointReference epr)
+    {
+            m_endpointReference = epr;        
+    }
+    
+
+    /**
+     * @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() 
+	{
+		return m_topicSpaceSet;
+	}
+      
+}

Added: webservices/muse/trunk/src/examples/client/src/test/org/apache/ws/service/testresource/AbstractTestResourceService.java
URL: http://svn.apache.org/viewcvs/webservices/muse/trunk/src/examples/client/src/test/org/apache/ws/service/testresource/AbstractTestResourceService.java?rev=290990&view=auto
==============================================================================
--- webservices/muse/trunk/src/examples/client/src/test/org/apache/ws/service/testresource/AbstractTestResourceService.java (added)
+++ webservices/muse/trunk/src/examples/client/src/test/org/apache/ws/service/testresource/AbstractTestResourceService.java Thu Sep 22 10:23:01 2005
@@ -0,0 +1,153 @@
+
+package org.apache.ws.service.testresource;
+
+import org.apache.ws.resource.ResourceContext;
+import org.apache.ws.resource.handler.SoapMethodNameMap;
+import org.apache.ws.resource.handler.WsrfService;
+import org.apache.ws.resource.AbstractPortType;
+import org.apache.ws.resource.handler.ServiceSoapMethodNameMap;
+import javax.xml.namespace.QName;
+
+/**
+ * An abstract base class for the TestResource service.
+ * <p />
+ * ***** WARNING *****
+ * 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 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.properties.v2004_06.porttype.GetResourcePropertyPortType, org.apache.ws.notification.base.v2004_06.porttype.NotificationProducerPortType {
+
+   public static final String TARGET_NSURI = "http://ws.apache.org/service/testresource";
+   public static final String TARGET_NSPREFIX = "testresource";
+
+   /**
+    * DOCUMENT_ME
+    */
+   private ServiceSoapMethodNameMap m_methodNameMap;
+
+   /**
+    * DOCUMENT_ME
+    */
+   private boolean m_isInitialized;
+
+   public AbstractTestResourceService( ResourceContext resourceContext )
+   {
+      super(resourceContext);
+   }
+
+   /**
+    * DOCUMENT_ME
+    *
+    * @param requestQname DOCUMENT_ME
+    *
+    * @return DOCUMENT_ME
+    */
+   public String getMethodName( QName requestQname )
+   {
+      if ( !m_isInitialized )
+      {
+         init(  );
+      }
+
+      return m_methodNameMap.getMethodName( requestQname );
+   }
+
+ 
+   /**
+    * DOCUMENT_ME
+    *
+    * @return DOCUMENT_ME
+    */
+   public final SoapMethodNameMap getMethodNameMap(  )
+   {
+      return m_methodNameMap;
+   }
+   
+      /**
+       * DOCUMENT_ME
+       */
+   public void init(  )
+   {
+      m_methodNameMap    = new ServiceSoapMethodNameMap( getResourceContext(  ) );
+      m_methodNameMap.addMapping( javax.xml.namespace.QName.valueOf("{http://ws.apache.org/service/testresource}TestOperation") , "testOperation" );
+      m_isInitialized      = true;
+   }
+   
+   
+      /**
+       * DOCUMENT_ME
+       *
+       * @return DOCUMENT_ME
+       */
+   protected final boolean isInitialized(  )
+   {
+         return m_isInitialized;
+   }
+
+   /**
+    * DOCUMENT_ME
+    *
+    * @param requestDoc DOCUMENT_ME
+    *
+    * @return DOCUMENT_ME
+    */
+   public org.oasisOpen.docs.wsrf.x2004.x06.wsrfWSResourceProperties12Draft01.QueryResourcePropertiesResponseDocument queryResourceProperties( org.oasisOpen.docs.wsrf.x2004.x06.wsrfWSResourceProperties12Draft01.QueryResourcePropertiesDocument requestDoc )
+   {
+      return new org.apache.ws.resource.properties.v2004_06.porttype.impl.QueryResourcePropertiesPortTypeImpl( getResourceContext(  ) ).queryResourceProperties( requestDoc );
+   }
+   /**
+    * DOCUMENT_ME
+    *
+    * @param requestDoc DOCUMENT_ME
+    *
+    * @return DOCUMENT_ME
+    */
+   public org.oasisOpen.docs.wsrf.x2004.x06.wsrfWSResourceProperties12Draft01.SetResourcePropertiesResponseDocument setResourceProperties( org.oasisOpen.docs.wsrf.x2004.x06.wsrfWSResourceProperties12Draft01.SetResourcePropertiesDocument requestDoc )
+   {
+      return new org.apache.ws.resource.properties.v2004_06.porttype.impl.SetResourcePropertiesPortTypeImpl( getResourceContext(  ) ).setResourceProperties( requestDoc );
+   }
+
+   /**
+    * @see org.apache.ws.resource.properties.v2004_06.porttype.GetMultipleResourcePropertiesPortType#getMultipleResourceProperties
+    */
+   public org.oasisOpen.docs.wsrf.x2004.x06.wsrfWSResourceProperties12Draft01.GetMultipleResourcePropertiesResponseDocument getMultipleResourceProperties( org.oasisOpen.docs.wsrf.x2004.x06.wsrfWSResourceProperties12Draft01.GetMultipleResourcePropertiesDocument requestDoc )
+   {
+      return new org.apache.ws.resource.properties.v2004_06.porttype.impl.GetMultipleResourcePropertiesPortTypeImpl( getResourceContext(  ) ).getMultipleResourceProperties( requestDoc );
+   }
+
+   /**
+    * @see 
+    */
+   public org.oasisOpen.docs.wsrf.x2004.x06.wsrfWSResourceProperties12Draft01.GetResourcePropertyResponseDocument getResourceProperty( org.oasisOpen.docs.wsrf.x2004.x06.wsrfWSResourceProperties12Draft01.GetResourcePropertyDocument requestDoc )
+   {
+      return new org.apache.ws.resource.properties.v2004_06.porttype.impl.GetResourcePropertyPortTypeImpl( getResourceContext(  ) ).getResourceProperty( requestDoc );
+   }
+
+   /**
+    * DOCUMENT_ME
+    *
+    * @param requestDoc DOCUMENT_ME
+    *
+    * @return DOCUMENT_ME
+    */
+   public org.oasisOpen.docs.wsn.x2004.x06.wsnWSBaseNotification12Draft01.SubscribeResponseDocument subscribe( org.oasisOpen.docs.wsn.x2004.x06.wsnWSBaseNotification12Draft01.SubscribeDocument requestDoc )
+   {        
+       return new org.apache.ws.notification.base.v2004_06.porttype.impl.NotificationProducerPortTypeImpl( getResourceContext(  ) ).subscribe( requestDoc );
+   }
+
+   /**
+    * DOCUMENT_ME
+    *
+    * @param requestDoc DOCUMENT_ME
+    *
+    * @return DOCUMENT_ME
+    */
+   public org.oasisOpen.docs.wsn.x2004.x06.wsnWSBaseNotification12Draft01.GetCurrentMessageResponseDocument getCurrentMessage( org.oasisOpen.docs.wsn.x2004.x06.wsnWSBaseNotification12Draft01.GetCurrentMessageDocument requestDoc )
+   {
+       return new org.apache.ws.notification.base.v2004_06.porttype.impl.NotificationProducerPortTypeImpl( getResourceContext(  ) ).getCurrentMessage( requestDoc );
+   }
+    
+
+
+}

Added: webservices/muse/trunk/src/examples/client/src/test/org/apache/ws/service/testresource/InvalidResourcePropertyQNameFaultException.java
URL: http://svn.apache.org/viewcvs/webservices/muse/trunk/src/examples/client/src/test/org/apache/ws/service/testresource/InvalidResourcePropertyQNameFaultException.java?rev=290990&view=auto
==============================================================================
--- webservices/muse/trunk/src/examples/client/src/test/org/apache/ws/service/testresource/InvalidResourcePropertyQNameFaultException.java (added)
+++ webservices/muse/trunk/src/examples/client/src/test/org/apache/ws/service/testresource/InvalidResourcePropertyQNameFaultException.java Thu Sep 22 10:23:01 2005
@@ -0,0 +1,50 @@
+
+package org.apache.ws.service.testresource;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.apache.ws.resource.i18n.MessagesImpl;
+import org.apache.ws.util.i18n.Messages;
+import javax.xml.namespace.QName;
+import org.apache.ws.resource.faults.AbstractBaseFaultException;
+import org.apache.ws.resource.properties.NamespaceVersionHolder;
+
+/**
+ * An exception representing a InvalidResourcePropertyQNameFaultException WSRF base fault.
+ * <p />
+ * ***** WARNING *****
+ * This class is generated by Wsdl2Java and is NOT meant to be modified. 
+ * It will be overwritten by subsequent runs of Wsdl2Java. 
+ */
+public class InvalidResourcePropertyQNameFaultException
+        extends AbstractBaseFaultException
+{
+
+    private static final Messages MSG = MessagesImpl.getInstance();
+    private static final Log LOG = LogFactory.getLog( InvalidResourcePropertyQNameFaultException.class );
+
+    private QName m_name;
+
+    /**
+     * Constructs a new InvalidResourcePropertyQNameFaultException .
+     *
+     * @param namespaces
+     * @param faultString 
+     */
+    public InvalidResourcePropertyQNameFaultException( NamespaceVersionHolder namespaces, String faultString )
+    {
+        super( namespaces, faultString );
+        m_name = new QName( "http://ws.apache.org/service/testresource", "InvalidResourcePropertyQNameFaultException");        
+    }
+    
+    /**
+     * Returns the element name for this base fault.
+     *
+     * @return the element name for this base fault
+     */
+    public QName getBaseFaultName()
+    {
+        return m_name;
+    }
+
+}

Added: webservices/muse/trunk/src/examples/client/src/test/org/apache/ws/service/testresource/ResourceUnknownFaultException.java
URL: http://svn.apache.org/viewcvs/webservices/muse/trunk/src/examples/client/src/test/org/apache/ws/service/testresource/ResourceUnknownFaultException.java?rev=290990&view=auto
==============================================================================
--- webservices/muse/trunk/src/examples/client/src/test/org/apache/ws/service/testresource/ResourceUnknownFaultException.java (added)
+++ webservices/muse/trunk/src/examples/client/src/test/org/apache/ws/service/testresource/ResourceUnknownFaultException.java Thu Sep 22 10:23:01 2005
@@ -0,0 +1,50 @@
+
+package org.apache.ws.service.testresource;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.apache.ws.resource.i18n.MessagesImpl;
+import org.apache.ws.util.i18n.Messages;
+import javax.xml.namespace.QName;
+import org.apache.ws.resource.faults.AbstractBaseFaultException;
+import org.apache.ws.resource.properties.NamespaceVersionHolder;
+
+/**
+ * An exception representing a ResourceUnknownFaultException WSRF base fault.
+ * <p />
+ * ***** WARNING *****
+ * This class is generated by Wsdl2Java and is NOT meant to be modified. 
+ * It will be overwritten by subsequent runs of Wsdl2Java. 
+ */
+public class ResourceUnknownFaultException
+        extends AbstractBaseFaultException
+{
+
+    private static final Messages MSG = MessagesImpl.getInstance();
+    private static final Log LOG = LogFactory.getLog( ResourceUnknownFaultException.class );
+
+    private QName m_name;
+
+    /**
+     * Constructs a new ResourceUnknownFaultException .
+     *
+     * @param namespaces
+     * @param faultString 
+     */
+    public ResourceUnknownFaultException( NamespaceVersionHolder namespaces, String faultString )
+    {
+        super( namespaces, faultString );
+        m_name = new QName( "http://ws.apache.org/service/testresource", "ResourceUnknownFaultException");        
+    }
+    
+    /**
+     * Returns the element name for this base fault.
+     *
+     * @return the element name for this base fault
+     */
+    public QName getBaseFaultName()
+    {
+        return m_name;
+    }
+
+}

Added: webservices/muse/trunk/src/examples/client/src/test/org/apache/ws/service/testresource/TestResourceCustomOperationsPortType.java
URL: http://svn.apache.org/viewcvs/webservices/muse/trunk/src/examples/client/src/test/org/apache/ws/service/testresource/TestResourceCustomOperationsPortType.java?rev=290990&view=auto
==============================================================================
--- webservices/muse/trunk/src/examples/client/src/test/org/apache/ws/service/testresource/TestResourceCustomOperationsPortType.java (added)
+++ webservices/muse/trunk/src/examples/client/src/test/org/apache/ws/service/testresource/TestResourceCustomOperationsPortType.java Thu Sep 22 10:23:01 2005
@@ -0,0 +1,17 @@
+
+package org.apache.ws.service.testresource;
+
+/**
+ * An interface containing all custom operations from the TestResource service's
+ * most-derived portType.
+ * <p />
+ * ***** WARNING *****
+ * This class is generated by Wsdl2Java and is NOT meant to be modified. 
+ * It will be overwritten by subsequent runs of Wsdl2Java. 
+ */
+public interface TestResourceCustomOperationsPortType
+{
+   
+      public org.apache.ws.service.testresource.TestOperationResponseDocument testOperation( org.apache.ws.service.testresource.TestOperationDocument requestDoc ) ;       
+   
+}

Added: webservices/muse/trunk/src/examples/client/src/test/org/apache/ws/service/testresource/TestResourceHome.java
URL: http://svn.apache.org/viewcvs/webservices/muse/trunk/src/examples/client/src/test/org/apache/ws/service/testresource/TestResourceHome.java?rev=290990&view=auto
==============================================================================
--- webservices/muse/trunk/src/examples/client/src/test/org/apache/ws/service/testresource/TestResourceHome.java (added)
+++ webservices/muse/trunk/src/examples/client/src/test/org/apache/ws/service/testresource/TestResourceHome.java Thu Sep 22 10:23:01 2005
@@ -0,0 +1,88 @@
+
+package org.apache.ws.service.testresource;
+
+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 org.apache.ws.addressing.EndpointReference;
+
+import javax.xml.namespace.QName;
+
+import java.io.Serializable;
+
+/**
+ * The home for TestResource resources.
+ * <p />
+ * NOTE: This file is generated, but is meant to be modified.
+ *       It will NOT be overwritten by subsequent runs of Wsdl2Java.
+ */
+public class TestResourceHome
+        extends AbstractTestResourceHome
+        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/service/testresource}TestResource");
+       
+    /** 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/service/testresource}TestResourcePortType");    
+        
+    /** The WSDL Port name associated with the resource. This is useful for building EPR's. **/
+    public static final String PORT_NAME = "TestResource";
+        
+    /** The name of the resource key for this resource. **/
+    public static final QName RESOURCE_KEY_NAME = javax.xml.namespace.QName.valueOf("{http://ws.apache.org/service/testresource}ResourceIdentifier");
+    
+        /**
+     * 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;
+    
+    /**
+     * Create and add any resource instances.
+     *
+     * @throws Exception on error
+     */
+    public void init() throws Exception
+    {
+        super.init();
+        // TODO: Create and add any known resource instances here.
+        // If this is home for a singleton service (i.e. a service that exposes exactly one resource),
+        // use null as the resource identifier when creating the instance.
+        String instance1Id = "0001";
+        TestResourceResource instance1 = (TestResourceResource) createInstance( instance1Id );
+        add( instance1 );
+    }    
+    
+    public QName getServiceName()
+    {
+        return SERVICE_NAME;
+    }
+    
+    public QName getPortType()
+    {
+        return PORT_TYPE;
+    }
+    
+    public String getServicePortName()
+    {
+        return PORT_NAME;
+    }
+    
+    public QName getResourceKeyNameQName()
+    {
+        return RESOURCE_KEY_NAME;
+    }
+    
+    public org.apache.ws.resource.properties.NamespaceVersionHolder getNamespaceVersionHolder()
+    {
+        return SPEC_NAMESPACE_SET; 
+    }
+    
+}

Added: webservices/muse/trunk/src/examples/client/src/test/org/apache/ws/service/testresource/TestResourcePropertyQNames.java
URL: http://svn.apache.org/viewcvs/webservices/muse/trunk/src/examples/client/src/test/org/apache/ws/service/testresource/TestResourcePropertyQNames.java?rev=290990&view=auto
==============================================================================
--- webservices/muse/trunk/src/examples/client/src/test/org/apache/ws/service/testresource/TestResourcePropertyQNames.java (added)
+++ webservices/muse/trunk/src/examples/client/src/test/org/apache/ws/service/testresource/TestResourcePropertyQNames.java Thu Sep 22 10:23:01 2005
@@ -0,0 +1,38 @@
+package org.apache.ws.service.testresource;
+
+import javax.xml.namespace.QName;
+
+/** 
+ * QNames of the resource properties associated with the TestResource resource.
+ * <p />
+ * ***** WARNING *****
+ * This class is generated by Wsdl2Java and is NOT meant to be modified. 
+ * It will be overwritten by subsequent runs of Wsdl2Java. 
+ */
+public interface TestResourcePropertyQNames
+{
+    
+            QName LASTRESPONSETIME =
+            new QName( "http://docs.oasis-open.org/wsdm/2004/12/mows/wsdm-mows.xsd", "LastResponseTime", "mows-xs");        
+            QName TESTMETRIC =
+            new QName( "http://ws.apache.org/service/testresource", "TestMetric", "tns");        
+            QName MANAGEABILITYCAPABILITY =
+            new QName( "http://docs.oasis-open.org/wsdm/2004/12/muws/wsdm-muws-part1.xsd", "ManageabilityCapability", "muws-p1-xs");        
+            QName TOPICEXPRESSIONDIALECTS =
+            new QName( "http://docs.oasis-open.org/wsn/2004/06/wsn-WS-BaseNotification-1.2-draft-01.xsd", "TopicExpressionDialects", "wsnt");        
+            QName PRICE =
+            new QName( "http://ws.apache.org/service/testresource", "Price", "tns");        
+            QName NAME =
+            new QName( "http://ws.apache.org/service/testresource", "Name", "tns");        
+            QName RESOURCEID =
+            new QName( "http://docs.oasis-open.org/wsdm/2004/12/muws/wsdm-muws-part1.xsd", "ResourceId", "muws-p1-xs");        
+            QName FIXEDTOPICSET =
+            new QName( "http://docs.oasis-open.org/wsn/2004/06/wsn-WS-BaseNotification-1.2-draft-01.xsd", "FixedTopicSet", "wsnt");        
+            QName OPERATIONALSTATUS =
+            new QName( "http://docs.oasis-open.org/wsdm/2004/12/muws/wsdm-muws-part2.xsd", "OperationalStatus", "muws-p2-xs");        
+            QName CURRENTTIME =
+            new QName( "http://docs.oasis-open.org/wsdm/2004/12/muws/wsdm-muws-part2.xsd", "CurrentTime", "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");        
+    
+}

Added: webservices/muse/trunk/src/examples/client/src/test/org/apache/ws/service/testresource/TestResourceResource.java
URL: http://svn.apache.org/viewcvs/webservices/muse/trunk/src/examples/client/src/test/org/apache/ws/service/testresource/TestResourceResource.java?rev=290990&view=auto
==============================================================================
--- webservices/muse/trunk/src/examples/client/src/test/org/apache/ws/service/testresource/TestResourceResource.java (added)
+++ webservices/muse/trunk/src/examples/client/src/test/org/apache/ws/service/testresource/TestResourceResource.java Thu Sep 22 10:23:01 2005
@@ -0,0 +1,190 @@
+
+package org.apache.ws.service.testresource;
+
+import java.math.BigDecimal;
+import java.util.Calendar;
+
+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.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.TestResourcePropertyQNames;
+import org.apache.xmlbeans.GDurationBuilder;
+import org.oasisOpen.docs.wsdm.x2004.x12.mows.wsdmMows.DurationMetric;
+import org.oasisOpen.docs.wsdm.x2004.x12.muws.wsdmMuwsPart2.OperationalStatusDocument;
+
+/**
+ * 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.
+ */
+public class TestResourceResource extends AbstractTestResourceResource
+
+{
+
+        /**
+     * 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();
+
+			// identity capability
+			prop_manageabilitycapability
+			.setManageabilityCapability(IdentityCapability.URI);
+			resourceProperty.add(prop_manageabilitycapability);
+			
+			// operational status capability
+			prop_manageabilitycapability = org.oasisOpen.docs.wsdm.x2004.x12.muws.wsdmMuwsPart1.ManageabilityCapabilityDocument.Factory
+			.newInstance();
+			prop_manageabilitycapability
+			.setManageabilityCapability(OperationalStatusCapability.URI);
+			resourceProperty.add(prop_manageabilitycapability);
+			
+			// manageability listener capability
+//			resourceProperty
+//			.addChangeListener(manageabilityCharacteristicsCapability);
+
+		// 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);
+	
+	
+		}
+	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.
+			
+			
+
+            }
+}

Added: webservices/muse/trunk/src/examples/client/src/test/org/apache/ws/service/testresource/TestResourceService.java
URL: http://svn.apache.org/viewcvs/webservices/muse/trunk/src/examples/client/src/test/org/apache/ws/service/testresource/TestResourceService.java?rev=290990&view=auto
==============================================================================
--- webservices/muse/trunk/src/examples/client/src/test/org/apache/ws/service/testresource/TestResourceService.java (added)
+++ webservices/muse/trunk/src/examples/client/src/test/org/apache/ws/service/testresource/TestResourceService.java Thu Sep 22 10:23:01 2005
@@ -0,0 +1,70 @@
+package org.apache.ws.service.testresource;
+
+import org.apache.ws.resource.ResourceContext;
+import org.apache.xmlbeans.XmlObject;
+import org.apache.xmlbeans.XmlException;
+
+import javax.xml.rpc.JAXRPCException;
+
+/**
+ * A TestResource service.
+ *
+ * This class is generated ONCE and never overwritten.
+ * If there is a change to the WSDL, then the generated implemented interfaces
+ * representing the implemented portTypes will change, thus showing a compile error to the
+ * user.
+ * <p />
+ * NOTE: This file is generated, but is meant to be modified.
+ *       It will NOT be overwritten by subsequent runs of Wsdl2Java.
+ */
+public class TestResourceService
+   extends AbstractTestResourceService 
+   implements TestResourceCustomOperationsPortType
+{
+   
+      
+   /**
+    * 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 TestResourceService } object.
+    *
+    * @param resourceContext DOCUMENT_ME
+    */
+   public TestResourceService( ResourceContext resourceContext )
+   {
+      super(resourceContext);
+      init();
+   }
+   
+      /**
+    * Returns a collection of Spec Namespaces associated with this Service
+    *
+    * @return A NamespaceVersionHolder impl which represents the collection of spec namespaces 
+    *         associated with this service.
+    */
+   protected org.apache.ws.resource.properties.NamespaceVersionHolder getNamespaceSet()
+   {
+      return SPEC_NAMESPACE_SET;
+   }
+   
+      
+   public org.apache.ws.service.testresource.TestOperationResponseDocument testOperation( org.apache.ws.service.testresource.TestOperationDocument requestDoc )
+   {              
+     	org.apache.ws.service.testresource.TestOperationResponseDocument responseDocument = org.apache.ws.service.testresource.TestOperationResponseDocument.Factory.newInstance();	
+     	
+     	/**
+     	 * TODO implement method and populate the response object 
+     	 * 
+     	 * For more information on working-with/populating the XmlBean-generated types.
+     	 *
+     	 * See http://xmlbeans.apache.org/documentation/tutorial_getstarted.html#Results+of+Compiling+the+Schema     	 
+     	 */
+     	return responseDocument;
+   }
+   
+   
+      
+}

Added: webservices/muse/trunk/src/examples/client/src/test/org/apache/ws/service/testresource/TestResource_deploy.wsdd
URL: http://svn.apache.org/viewcvs/webservices/muse/trunk/src/examples/client/src/test/org/apache/ws/service/testresource/TestResource_deploy.wsdd?rev=290990&view=auto
==============================================================================
--- webservices/muse/trunk/src/examples/client/src/test/org/apache/ws/service/testresource/TestResource_deploy.wsdd (added)
+++ webservices/muse/trunk/src/examples/client/src/test/org/apache/ws/service/testresource/TestResource_deploy.wsdd Thu Sep 22 10:23:01 2005
@@ -0,0 +1,28 @@
+<?xml version="1.0"?>
+
+<!-- ***** WARNING: This file will be overwritten during generation. ***** -->
+
+<deployment xmlns="http://xml.apache.org/axis/wsdd/" 
+            xmlns:java="http://xml.apache.org/axis/wsdd/providers/java">
+
+   <service name="TestResource" provider="java:WSRF" style="document" use="literal">
+      
+      <wsdlFile>/wsdl/testresource.wsdl</wsdlFile>      
+      
+      <requestFlow>
+         <handler type="java:org.apache.axis.handlers.JAXRPCHandler">
+            <parameter name="className" value="org.apache.axis.message.addressing.handler.AxisServerSideAddressingHandler" />
+            <parameter name="referencePropertyNames" value="*" />
+         </handler>
+      </requestFlow>      
+      
+      <responseFlow>
+         <handler type="java:org.apache.axis.handlers.JAXRPCHandler">
+            <parameter name="className" value="org.apache.axis.message.addressing.handler.AxisServerSideAddressingHandler" />
+            <parameter name="referencePropertyNames" value="*" />
+         </handler>
+      </responseFlow>            
+      
+   </service>
+
+</deployment>

Added: webservices/muse/trunk/src/examples/client/src/test/org/apache/ws/service/testresource/TestResource_jndi-config.xml
URL: http://svn.apache.org/viewcvs/webservices/muse/trunk/src/examples/client/src/test/org/apache/ws/service/testresource/TestResource_jndi-config.xml?rev=290990&view=auto
==============================================================================
--- webservices/muse/trunk/src/examples/client/src/test/org/apache/ws/service/testresource/TestResource_jndi-config.xml (added)
+++ webservices/muse/trunk/src/examples/client/src/test/org/apache/ws/service/testresource/TestResource_jndi-config.xml Thu Sep 22 10:23:01 2005
@@ -0,0 +1,41 @@
+<?xml version="1.0"?>
+
+<!-- ***** WARNING: This file will be overwritten during generation. ***** -->
+
+<jndiConfig xmlns="http://www.apache.org/wsfx/wsrf/jndi/config">
+
+   <service name="TestResource">
+      <resource name="home" type="org.apache.ws.service.testresource.TestResourceHome">
+         <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/muse</value>
+	    </parameter>            
+            <parameter>
+               <name>serviceClassName</name>
+               <value>org.apache.ws.service.testresource.TestResourceService</value>
+            </parameter>
+            <parameter>
+               <name>resourceClassName</name>
+               <value>org.apache.ws.service.testresource.TestResourceResource</value>
+            </parameter>
+            <parameter>
+               <name>wsdlTargetNamespace</name>
+               <value>http://ws.apache.org/service/testresource</value>
+            </parameter>            
+            <parameter>
+               <name>resourceIdentifierReferenceParameterName</name>
+               <value>{http://ws.apache.org/service/testresource}ResourceIdentifier</value>
+            </parameter>            
+         </resourceParams>
+      </resource>
+   </service>
+
+</jndiConfig>
+