You are viewing a plain text version of this content. The canonical link for it is here.
Posted to wsrf-commits@ws.apache.org by ip...@apache.org on 2005/07/19 03:35:29 UTC

svn commit: r219594 - in /webservices/wsrf/trunk/src: java/org/apache/ws/resource/ java/org/apache/ws/resource/impl/ java/org/apache/ws/util/jndi/ test/org/apache/ws/resource/ test/org/apache/ws/resource/properties/ test/org/apache/ws/resource/properti...

Author: ips
Date: Mon Jul 18 18:34:47 2005
New Revision: 219594

URL: http://svn.apache.org/viewcvs?rev=219594&view=rev
Log:
refactored how resource map is stored and accessed

Added:
    webservices/wsrf/trunk/src/test/org/apache/ws/resource/TestFixtureFactory.java
Removed:
    webservices/wsrf/trunk/src/test/org/apache/ws/resource/properties/AbstractSushiHome.java
Modified:
    webservices/wsrf/trunk/src/java/org/apache/ws/resource/ResourceContext.java
    webservices/wsrf/trunk/src/java/org/apache/ws/resource/impl/AbstractResourceContext.java
    webservices/wsrf/trunk/src/java/org/apache/ws/resource/impl/AbstractResourceHome.java
    webservices/wsrf/trunk/src/java/org/apache/ws/util/jndi/XmlBeanJndiUtils.java
    webservices/wsrf/trunk/src/test/org/apache/ws/resource/properties/AbstractResourcePropertiesTestCase.java
    webservices/wsrf/trunk/src/test/org/apache/ws/resource/properties/SushiHome.java
    webservices/wsrf/trunk/src/test/org/apache/ws/resource/properties/SushiResourceContext.java
    webservices/wsrf/trunk/src/test/org/apache/ws/resource/properties/v2004_06/porttype/impl/GetMultipleResourcePropertiesProviderTestCase.java
    webservices/wsrf/trunk/src/test/org/apache/ws/resource/properties/v2004_06/porttype/impl/SetResourcePropertiesProviderTestCase.java

Modified: webservices/wsrf/trunk/src/java/org/apache/ws/resource/ResourceContext.java
URL: http://svn.apache.org/viewcvs/webservices/wsrf/trunk/src/java/org/apache/ws/resource/ResourceContext.java?rev=219594&r1=219593&r2=219594&view=diff
==============================================================================
--- webservices/wsrf/trunk/src/java/org/apache/ws/resource/ResourceContext.java (original)
+++ webservices/wsrf/trunk/src/java/org/apache/ws/resource/ResourceContext.java Mon Jul 18 18:34:47 2005
@@ -1,5 +1,5 @@
 /*=============================================================================*
- *  Copyright 2004 The Apache Software Foundation
+ *  Copyright 2004-2005 The Apache Software Foundation
  *
  *  Licensed under the Apache License, Version 2.0 (the "License");
  *  you may not use this file except in compliance with the License.
@@ -21,26 +21,18 @@
 import java.util.Iterator;
 
 /**
- * <code>ResourceContext</code> wraps around a {@link SOAPMessageContext SOAPMessageContext} and provides
- * methods for obtaining the {@link ResourceHome} and {@link Resource} objects
- * associated with the given SOAP message (referenced in <code>SOAPMessageContext</code>).
- *
- * TODO: make this an interface instead of an abstract class
+ * Context information pertaining to a specific request being processed by the WSRF
+ * resource invocation framework. Provides methods for obtaining the {@link ResourceHome}
+ * and {@link Resource} objects associated with the request. Also provides access to
+ * some service related information such as the service endpoint URL.
  */
-public abstract class ResourceContext
+public interface ResourceContext
 {
-   /**
-    * Creates a new {@link ResourceContext} object.
-    */
-   protected ResourceContext(  )
-   {
-   }
 
    /**
     * @see SOAPMessageContext#setProperty(String, Object)
     */
-   public abstract void setProperty( String name,
-                                     Object value );
+   void setProperty( String name, Object value );
 
    /**
     * @see SOAPMessageContext#getProperty(String)
@@ -60,70 +52,59 @@
     * @throws ResourceUnknownException  if resource was not specified in the request or it does not exist.
     * @throws ResourceContextException if error occurs during resource lookup.
     */
-   public abstract Resource getResource(  )
-   throws ResourceContextException, 
-          ResourceException;
+   Resource getResource(  )
+   throws ResourceContextException, ResourceException;
 
    /**
     * Gets <code>ResourceHome</code> associated with the service.
     *
     * @return <code>ResourceHome</code> associated with the service. Cannot be null.
     */
-   public abstract ResourceHome getResourceHome(  );
+   ResourceHome getResourceHome(  );
 
    /**
     * DOCUMENT_ME
     *
     * @return DOCUMENT_ME
     */
-   public abstract SOAPMessage getSOAPMessage(  );
-
-   /**
-    * Returns <code>ResourceContext</code> initialized with a specific <code>SOAPMessageContext</code>.
-    *
-    * @return <code>ResourceContext</code> initialized with a specific <code>SOAPMessageContext</code>.
-    */
-   public static ResourceContext getResourceContext( SOAPMessageContext soapMsgContext )
-   {
-      // TODO: return ResourceContext impl using configurable factory.
-      return null;
-   }
+   SOAPMessage getSOAPMessage(  );
 
    /**
-    * Gets path of the service.
+    * Gets name of the service.
     *
-    * @return The path of the service.
+    * @return The name of the service.
     */
-   public abstract String getServiceName(  );
+   String getServiceName(  );
 
    /**
-    * Gets the full URL of the service
+    * Gets the endpoint URL of the service.
     *
-    * @return The URL of the service
+    * @return The endpoint URL of the service
     */
-   public abstract URL getServiceURL(  );
+   URL getServiceURL(  );
 
    /**
-    * Gets the base URL from which service urls are based.
+    * Gets the base URL from which service URLs are based.
     *
     * @return The String representation of the base url
     */
-   public abstract String getBaseURL(  );
+   String getBaseURL(  );
 
    /**
     * @see SOAPMessageContext#containsProperty(String)
     */
-   public abstract boolean containsProperty( String name );
+   boolean containsProperty( String name );
 
    /**
     * @see SOAPMessageContext#removeProperty(String)
     */
-   public abstract void removeProperty( String name );
+   void removeProperty( String name );
 
    /**
-    * Returns the value of the WS-Addressing Action header
+    * Returns the value of the WS-Addressing Action header element.
     *
-    * @return WS-Addressing Action Header value
+    * @return value of the WS-Addressing Action header element
     */
-   public abstract String getAddressingAction();
+   String getAddressingAction();
+
 }

Modified: webservices/wsrf/trunk/src/java/org/apache/ws/resource/impl/AbstractResourceContext.java
URL: http://svn.apache.org/viewcvs/webservices/wsrf/trunk/src/java/org/apache/ws/resource/impl/AbstractResourceContext.java?rev=219594&r1=219593&r2=219594&view=diff
==============================================================================
--- webservices/wsrf/trunk/src/java/org/apache/ws/resource/impl/AbstractResourceContext.java (original)
+++ webservices/wsrf/trunk/src/java/org/apache/ws/resource/impl/AbstractResourceContext.java Mon Jul 18 18:34:47 2005
@@ -45,7 +45,7 @@
  * An abstract implementation of a resource context.
  */
 public abstract class AbstractResourceContext
-        extends ResourceContext
+        implements ResourceContext
 {
 
     private static final Log LOG = LogFactory.getLog( AbstractResourceContext.class.getName() );
@@ -64,7 +64,7 @@
      *
      * @param soapMsgContext DOCUMENT_ME
      */
-    public AbstractResourceContext( SOAPMessageContext soapMsgContext ) throws ResourceContextException
+    public AbstractResourceContext( SOAPMessageContext soapMsgContext ) throws Exception
     {
         if ( soapMsgContext == null )
         {
@@ -80,6 +80,10 @@
         {
             ne.printStackTrace();
             throw new ResourceContextException( ne );
+        }
+        if ( m_home instanceof AbstractResourceHome )
+        {
+           ((AbstractResourceHome)m_home).init();
         }
     }
 

Modified: webservices/wsrf/trunk/src/java/org/apache/ws/resource/impl/AbstractResourceHome.java
URL: http://svn.apache.org/viewcvs/webservices/wsrf/trunk/src/java/org/apache/ws/resource/impl/AbstractResourceHome.java?rev=219594&r1=219593&r2=219594&view=diff
==============================================================================
--- webservices/wsrf/trunk/src/java/org/apache/ws/resource/impl/AbstractResourceHome.java (original)
+++ webservices/wsrf/trunk/src/java/org/apache/ws/resource/impl/AbstractResourceHome.java Mon Jul 18 18:34:47 2005
@@ -17,9 +17,9 @@
 
 import commonj.timers.Timer;
 import commonj.timers.TimerManager;
-import org.apache.commons.collections.map.ReferenceMap;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
+import org.apache.commons.collections.map.ReferenceMap;
 import org.apache.ws.Soap1_1Constants;
 import org.apache.ws.addressing.EndpointReference;
 import org.apache.ws.addressing.XmlBeansEndpointReference;
@@ -56,11 +56,11 @@
 import javax.xml.soap.SOAPHeader;
 import javax.xml.soap.SOAPHeaderElement;
 import java.util.ArrayList;
-import java.util.Collections;
-import java.util.HashMap;
 import java.util.Iterator;
 import java.util.List;
 import java.util.Map;
+import java.util.HashMap;
+import java.util.Collections;
 
 /**
  * LOG-DONE An implementation of the <code>ResourceHome</code> interface. This implementation was designed to work with
@@ -105,9 +105,9 @@
  * @author Globus, Ian Springer
  */
 public abstract class AbstractResourceHome
-        implements ResourceHome,
-        Initializable
+        implements ResourceHome, Initializable
 {
+
     private static final int DEFAULT_SWEEPER_DELAY = 60000;
     private static final Log LOG = LogFactory.getLog( AbstractResourceHome.class );
     public static final Messages MSG = MessagesImpl.getInstance();
@@ -143,6 +143,42 @@
     private List m_destructionListeners = new ArrayList();
 
     /**
+     * Initializes this home. Should be called <em>after</em> setters have been called on
+     * all bean properties.
+     *
+     * @throws Exception on error
+     */
+    public void init() throws Exception
+    {
+        synchronized( this )
+        {
+        if ( m_initialized )
+        {
+            return;
+        }
+        LOG.debug( MSG.getMessage( Keys.INIT_HOME ) );
+        Class resourceClass = getResourceClass();
+
+        //todo sjc is it gone ips??
+        /*     if ( PersistentResource.class.isAssignableFrom( resourceClass ) )
+             {
+                 m_resourceIsPersistent = true;
+             }*/
+        //end todo
+
+        Context initialContext = new InitialContext();
+        m_resources = getResourceMap( );
+        m_lockManager = new LockManager();
+        if ( ScheduledResourceTerminationResource.class.isAssignableFrom( getResourceClass() ) )
+        {
+            initSweeper( initialContext );
+        }
+        initCachePolicy( new InitialContext() );
+        m_initialized = true;
+        }
+    }
+
+    /**
      * DOCUMENT_ME
      *
      * @param jndiLocation DOCUMENT_ME
@@ -343,38 +379,6 @@
     /**
      * DOCUMENT_ME
      *
-     * @throws Exception DOCUMENT_ME
-     */
-    public synchronized void init()
-            throws Exception
-    {
-        LOG.debug( MSG.getMessage( Keys.INIT_HOME ) );
-        if ( m_initialized )
-        {
-            return;
-        }
-        Class resourceClass = getResourceClass();
-
-        //todo sjc is it gone ips??
-        /*     if ( PersistentResource.class.isAssignableFrom( resourceClass ) )
-             {
-                 m_resourceIsPersistent = true;
-             }*/
-        //end todo
-
-        Context initialContext = new InitialContext();
-        m_resources = initResourceMap( );
-        m_lockManager = new LockManager();
-        if ( ScheduledResourceTerminationResource.class.isAssignableFrom( getResourceClass() ) )
-        {
-            initSweeper( initialContext );
-        }
-        m_initialized = true;
-    }
-
-    /**
-     * DOCUMENT_ME
-     *
      * @param id DOCUMENT_ME
      *
      * @throws ResourceException           DOCUMENT_ME
@@ -578,7 +582,7 @@
         }
     }
 
-    protected abstract Map initResourceMap() throws NamingException;
+    protected abstract Map getResourceMap() throws NamingException;
 
 
 
@@ -810,4 +814,29 @@
             throw new JAXRPCException( soape );
         }
     }
-}
\ No newline at end of file
+
+    /**
+     * Creates a synschronized map for storing {@link Resource}s. If the resource is persistent,
+     * a {@link ReferenceMap} is used, otherwise a {@link HashMap} is used. Provided for the
+     * convenience of subclasses, which are responsible for creating a map of resources and
+     * maintaining a static reference to that map.
+     *
+     * @param isPersistent if the resource is persistent
+     *
+     * @return a synschronized map for storing {@link Resource}s
+     */
+    protected static Map createResourceMap( boolean isPersistent )
+    {
+        Map resourceMap;
+        if ( isPersistent )
+        {
+            resourceMap = new ReferenceMap( ReferenceMap.HARD, ReferenceMap.SOFT, true );
+        }
+        else
+        {
+            resourceMap = new HashMap();
+        }
+        return Collections.synchronizedMap( resourceMap );
+    }
+
+}

Modified: webservices/wsrf/trunk/src/java/org/apache/ws/util/jndi/XmlBeanJndiUtils.java
URL: http://svn.apache.org/viewcvs/webservices/wsrf/trunk/src/java/org/apache/ws/util/jndi/XmlBeanJndiUtils.java?rev=219594&r1=219593&r2=219594&view=diff
==============================================================================
--- webservices/wsrf/trunk/src/java/org/apache/ws/util/jndi/XmlBeanJndiUtils.java (original)
+++ webservices/wsrf/trunk/src/java/org/apache/ws/util/jndi/XmlBeanJndiUtils.java Mon Jul 18 18:34:47 2005
@@ -87,16 +87,16 @@
     private static DefaultParameters s_defaultParams;
 
     /**
-     * Configure JNDI with the Apache Tomcat naming service classes and create the comp and env contexts
+     * Configure JNDI with the Apache Tomcat naming service classes and
+     * create the WSRF context.
      *
-     * @return The initial context
+     * @return the WSRF context
      *
      * @throws Exception
      */
     public static Context initJNDI()
             throws Exception
     {
-
         initJndiImpl();
         return initWsrfContext();
     }

Added: webservices/wsrf/trunk/src/test/org/apache/ws/resource/TestFixtureFactory.java
URL: http://svn.apache.org/viewcvs/webservices/wsrf/trunk/src/test/org/apache/ws/resource/TestFixtureFactory.java?rev=219594&view=auto
==============================================================================
--- webservices/wsrf/trunk/src/test/org/apache/ws/resource/TestFixtureFactory.java (added)
+++ webservices/wsrf/trunk/src/test/org/apache/ws/resource/TestFixtureFactory.java Mon Jul 18 18:34:47 2005
@@ -0,0 +1,50 @@
+/*=============================================================================*
+ *  Copyright 2005 The Apache Software Foundation
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *=============================================================================*/
+package org.apache.ws.resource;
+
+import org.apache.axis.message.addressing.AddressingHeaders;
+import org.apache.axis.message.addressing.To;
+import org.apache.axis.message.addressing.Action;
+import org.apache.axis.types.URI;
+import org.apache.axis.MessageContext;
+import org.apache.axis.server.AxisServer;
+
+import javax.xml.rpc.handler.soap.SOAPMessageContext;
+
+/**
+ * Factory for various test fixture objects.
+ */
+public abstract class TestFixtureFactory
+{
+
+    public static SOAPMessageContext createSOAPMessageContext() throws Exception
+    {
+        SOAPMessageContext msgContext = new MessageContext( new AxisServer() );
+        AddressingHeaders wsaHeaders = createAddressingHeaders();
+        msgContext.setProperty( org.apache.axis.message.addressing.Constants.ENV_ADDRESSING_REQUEST_HEADERS, wsaHeaders );
+        return msgContext;
+    }
+
+    private static AddressingHeaders createAddressingHeaders()
+            throws URI.MalformedURIException
+    {
+        AddressingHeaders wsaHeaders = new AddressingHeaders( );
+        wsaHeaders.setTo( new To( "http://localhost:8080/wsrf/services/sushi" ) );
+        wsaHeaders.setAction( new Action( new URI( "urn:action" ) ) );
+        return wsaHeaders;
+    }
+
+}

Modified: webservices/wsrf/trunk/src/test/org/apache/ws/resource/properties/AbstractResourcePropertiesTestCase.java
URL: http://svn.apache.org/viewcvs/webservices/wsrf/trunk/src/test/org/apache/ws/resource/properties/AbstractResourcePropertiesTestCase.java?rev=219594&r1=219593&r2=219594&view=diff
==============================================================================
--- webservices/wsrf/trunk/src/test/org/apache/ws/resource/properties/AbstractResourcePropertiesTestCase.java (original)
+++ webservices/wsrf/trunk/src/test/org/apache/ws/resource/properties/AbstractResourcePropertiesTestCase.java Mon Jul 18 18:34:47 2005
@@ -19,6 +19,7 @@
 import org.apache.commons.io.CopyUtils;
 import org.apache.ws.resource.properties.impl.XmlBeansResourcePropertySet;
 import org.apache.ws.resource.properties.impl.XmlBeansResourcePropertySetMetaData;
+import org.apache.ws.util.jndi.XmlBeanJndiUtils;
 import org.apache.xmlbeans.XmlException;
 import org.apache.xmlbeans.XmlObject;
 import org.apache.xmlbeans.impl.common.XmlErrorPrinter;
@@ -39,7 +40,7 @@
  *
  * @author Ian P. Springer (Hewlett-Packard Company)
  */
-public class AbstractResourcePropertiesTestCase extends TestCase
+public abstract class AbstractResourcePropertiesTestCase extends TestCase
 {
 
    public static final String NSURI_SUSHI = "http://ws.apache.org/resource/properties/test/sushi";
@@ -59,11 +60,12 @@
    {
       try
       {
+         XmlBeanJndiUtils.initJNDI();
          compileSushiPropsXsd();
       }
       catch ( Exception e )
       {
-         throw new RuntimeException( "Failed to compile SushiProperties.xsd.", e );
+         throw new RuntimeException( "Failed to either initialize JNDI or compile SushiProperties.xsd.", e );
       }
       enableSushiPropsTypeClassLoader();
    }

Modified: webservices/wsrf/trunk/src/test/org/apache/ws/resource/properties/SushiHome.java
URL: http://svn.apache.org/viewcvs/webservices/wsrf/trunk/src/test/org/apache/ws/resource/properties/SushiHome.java?rev=219594&r1=219593&r2=219594&view=diff
==============================================================================
--- webservices/wsrf/trunk/src/test/org/apache/ws/resource/properties/SushiHome.java (original)
+++ webservices/wsrf/trunk/src/test/org/apache/ws/resource/properties/SushiHome.java Mon Jul 18 18:34:47 2005
@@ -29,12 +29,13 @@
 import javax.xml.namespace.QName;
 import java.io.InputStream;
 import java.io.Serializable;
+import java.util.Map;
 
 /**
  * @author Sal Campana
  */
 public class SushiHome
-        extends AbstractSushiHome
+        extends AbstractResourceHome
         implements Serializable
 {
 
@@ -57,19 +58,13 @@
             "org/apache/ws/resource/properties/SushiProperties.xml";
     private boolean m_isOpenContent;
 
-    public SushiHome( boolean isOpenContent )
+    public SushiHome( boolean isOpenContent ) throws Exception
     {
         m_isOpenContent = isOpenContent;
         setResourceClassName( SushiResource.class.getName() );
         setResourceIdentifierReferenceParameterName( RESOURCE_ID_REF_PARAM_NAME.toString() );
-        try
-        {
-            init();
-        }
-        catch ( Exception e )
-        {
-            e.printStackTrace();
-        }
+        resetResourceMap();
+        init();
     }
 
     /**
@@ -145,6 +140,33 @@
     public QName getResourceIdentifierReferenceParameterQName()
     {
         return RESOURCE_ID_REF_PARAM_NAME;
+    }
+
+    /**
+     * Map containing all SushiResource instances - this map <em>must</em> be static for
+     * compatibility with certain JNDI providers.
+     */
+    private static Map s_resources;
+
+    /**
+     * Returns a map of all SushiResource instances. Used by the {@link AbstractResourceHome}
+     * superclass.
+     */
+    protected synchronized final Map getResourceMap()
+    {
+        if ( s_resources == null )
+        {
+            s_resources = AbstractResourceHome.createResourceMap( m_resourceIsPersistent );
+        }
+        return s_resources;
+    }
+
+    /**
+     * Resets (sets to null) the resource map.
+     */
+    public synchronized final void resetResourceMap()
+    {
+        s_resources = null;
     }
 
 }

Modified: webservices/wsrf/trunk/src/test/org/apache/ws/resource/properties/SushiResourceContext.java
URL: http://svn.apache.org/viewcvs/webservices/wsrf/trunk/src/test/org/apache/ws/resource/properties/SushiResourceContext.java?rev=219594&r1=219593&r2=219594&view=diff
==============================================================================
--- webservices/wsrf/trunk/src/test/org/apache/ws/resource/properties/SushiResourceContext.java (original)
+++ webservices/wsrf/trunk/src/test/org/apache/ws/resource/properties/SushiResourceContext.java Mon Jul 18 18:34:47 2005
@@ -6,6 +6,7 @@
 import org.apache.ws.resource.ResourceException;
 import org.apache.ws.resource.ResourceHome;
 
+import javax.xml.rpc.JAXRPCException;
 import javax.xml.soap.MessageFactory;
 import javax.xml.soap.SOAPException;
 import javax.xml.soap.SOAPMessage;
@@ -14,20 +15,24 @@
 import java.util.Iterator;
 
 /**
+ * Resource context that serves as part of the unit test fixture.
+ *
  * @author Sal Campana
+ * @author Ian Springer
  */
-public class SushiResourceContext extends ResourceContext
+public class SushiResourceContext implements ResourceContext
 {
+
     ResourceHome m_home;
     private Resource m_resource;
-    private Object m_id = ID;
+
+    private static final String SERVICE_NAME = "sushi";
     public static final String ID = "1212";
-    private String m_serviceName = "sushi";
 
     /**
      * Creates a new {@link SushiResourceContext} object.
      */
-    public SushiResourceContext()
+    public SushiResourceContext() throws Exception
     {
         this( true );
     }
@@ -35,9 +40,10 @@
     /**
      * Creates a new {@link SushiResourceContext} object.
      */
-    public SushiResourceContext( boolean isOpenContent )
+    public SushiResourceContext( boolean isOpenContent ) throws Exception
     {
         m_home = new SushiHome( isOpenContent );
+
         try
         {
             m_resource = ( (SushiHome) m_home ).getInstance( this );
@@ -48,31 +54,6 @@
         }
     }
 
-    /**
-     * Creates a new {@link SushiResourceContext} object.
-     *
-     * @param pathToPropsXsd
-     */
-    public SushiResourceContext( String pathToPropsXsd )
-    {
-
-        try
-        {
-            ( (SushiHome) m_home ).setResourcePropsDocPath( pathToPropsXsd );
-            ( (SushiHome) m_home ).getInstance( this );
-            m_resource = m_home.find( this.m_id );
-        }
-        catch ( ResourceException e )
-        {
-            e.printStackTrace();
-        }
-        catch ( ResourceContextException e )
-        {
-            e.printStackTrace();
-        }
-
-    }
-
     public ResourceHome getResourceHome()
     {
         return m_home;
@@ -84,23 +65,22 @@
         {
             return MessageFactory.newInstance().createMessage();
         }
-        catch ( SOAPException e )
+        catch ( SOAPException soape )
         {
-            e.printStackTrace();
+            throw new JAXRPCException( soape );
         }
-        return null;
     }
 
     public String getServiceName()
     {
-        return m_serviceName;
+        return SERVICE_NAME;
     }
 
     public URL getServiceURL()
     {
         try
         {
-            return new URL( "http://localhost:8080/muse/" + m_serviceName );
+            return new URL( "http://localhost:8080/muse/" + SERVICE_NAME );
         }
         catch ( MalformedURLException murle )
         {

Modified: webservices/wsrf/trunk/src/test/org/apache/ws/resource/properties/v2004_06/porttype/impl/GetMultipleResourcePropertiesProviderTestCase.java
URL: http://svn.apache.org/viewcvs/webservices/wsrf/trunk/src/test/org/apache/ws/resource/properties/v2004_06/porttype/impl/GetMultipleResourcePropertiesProviderTestCase.java?rev=219594&r1=219593&r2=219594&view=diff
==============================================================================
--- webservices/wsrf/trunk/src/test/org/apache/ws/resource/properties/v2004_06/porttype/impl/GetMultipleResourcePropertiesProviderTestCase.java (original)
+++ webservices/wsrf/trunk/src/test/org/apache/ws/resource/properties/v2004_06/porttype/impl/GetMultipleResourcePropertiesProviderTestCase.java Mon Jul 18 18:34:47 2005
@@ -39,7 +39,7 @@
     /**
      * DOCUMENT_ME
      */
-    public void testGetMultiExistingProps()
+    public void testGetMultiExistingProps() throws Exception
     {
         m_resourceContext = new SushiResourceContext();
         final QName[] propNames = new QName[]{SushiPropertyQNames.EBI, SushiPropertyQNames.IKA};
@@ -56,7 +56,7 @@
     /**
      * DOCUMENT_ME
      */
-    public void testGetMultiWithAllInvalidPropNames()
+    public void testGetMultiWithAllInvalidPropNames() throws Exception
     {
         m_resourceContext = new SushiResourceContext( true );
         assertGetMultiRequestThrowsFault( new QName[]{BOGUS_PROP_NAME, ANOTHER_BOGUS_PROP_NAME} );
@@ -67,7 +67,7 @@
     /**
      * DOCUMENT_ME
      */
-    public void testGetMultiWithSomeInvalidPropNames()
+    public void testGetMultiWithSomeInvalidPropNames() throws Exception
     {
         m_resourceContext = new SushiResourceContext( true );
         assertGetMultiRequestThrowsFault( new QName[]{SushiPropertyQNames.OHTORO, BOGUS_PROP_NAME} );

Modified: webservices/wsrf/trunk/src/test/org/apache/ws/resource/properties/v2004_06/porttype/impl/SetResourcePropertiesProviderTestCase.java
URL: http://svn.apache.org/viewcvs/webservices/wsrf/trunk/src/test/org/apache/ws/resource/properties/v2004_06/porttype/impl/SetResourcePropertiesProviderTestCase.java?rev=219594&r1=219593&r2=219594&view=diff
==============================================================================
--- webservices/wsrf/trunk/src/test/org/apache/ws/resource/properties/v2004_06/porttype/impl/SetResourcePropertiesProviderTestCase.java (original)
+++ webservices/wsrf/trunk/src/test/org/apache/ws/resource/properties/v2004_06/porttype/impl/SetResourcePropertiesProviderTestCase.java Mon Jul 18 18:34:47 2005
@@ -15,8 +15,6 @@
  *=============================================================================*/
 package org.apache.ws.resource.properties.v2004_06.porttype.impl;
 
-import org.apache.ws.resource.ResourceContextException;
-import org.apache.ws.resource.ResourceException;
 import org.apache.ws.resource.properties.ResourceProperty;
 import org.apache.ws.resource.properties.SushiCallback;
 import org.apache.ws.resource.properties.SushiPlate;
@@ -28,12 +26,9 @@
 import org.apache.ws.resource.properties.faults.InvalidSetResourcePropertiesRequestContentFaultException;
 import org.apache.ws.resource.properties.faults.SetResourcePropertyRequestFailedFaultException;
 import org.apache.ws.util.XmlBeanUtils;
-import org.apache.xmlbeans.XmlException;
 import org.apache.xmlbeans.XmlObject;
 import org.oasisOpen.docs.wsrf.x2004.x06.wsrfWSResourceProperties12Draft01.GetResourcePropertyResponseDocument;
 
-import java.io.IOException;
-
 /**
  * @author Sal Campana, Ian Springer
  */
@@ -49,8 +44,7 @@
     }
     /* ===================================== TESTS FOR 'INSERT' ====================================== */
 
-    public void testInsertResourcePropertiesCallback() throws XmlException, ResourceException,
-            ResourceContextException
+    public void testInsertResourcePropertiesCallback() throws Exception
     {
         m_resourceContext = new SushiResourceContext();
         SushiResource resource = (SushiResource) m_resourceContext.getResource();
@@ -72,7 +66,7 @@
     }
 
     public void testInsertResourceProperty()
-            throws XmlException
+            throws Exception
     {
         m_resourceContext = new SushiResourceContext();
         XmlObject xBean =
@@ -87,7 +81,7 @@
         assertEquals( 2, childElements.length );
     }
 
-    public void testInsertAnyIntoOpenContent() throws XmlException
+    public void testInsertAnyIntoOpenContent() throws Exception
     {
         m_resourceContext = new SushiResourceContext();
         insertXsdAnyPropElem();
@@ -108,8 +102,7 @@
         }
     }
 
-    public void testInsertResourcePropertiesFailedCallback() throws XmlException, ResourceException,
-            ResourceContextException
+    public void testInsertResourcePropertiesFailedCallback() throws Exception
     {
         m_resourceContext = new SushiResourceContext();
         SushiResource resource = (SushiResource) m_resourceContext.getResource();
@@ -169,7 +162,7 @@
         }
     }
 
-    public void testDeleteOpenContent() throws IOException, XmlException
+    public void testDeleteOpenContent() throws Exception
     {
         m_resourceContext = new SushiResourceContext( true );
         deleteResourceProperty( SushiPropertyQNames.FUGU );
@@ -179,8 +172,7 @@
         assertNotNull( getResourcePropertyResponse );
     }
 
-    public void testDeleteResourcePropertiesCallback() throws ResourceException, ResourceContextException,
-            XmlException
+    public void testDeleteResourcePropertiesCallback() throws Exception
     {
         m_resourceContext = new SushiResourceContext();
         XmlObject xBean =
@@ -197,8 +189,7 @@
         assertTrue( m_callback.deleteWasInvoked() );
     }
 
-    public void testDeleteResourcePropertiesFailedCallback() throws ResourceException, ResourceContextException,
-            XmlException
+    public void testDeleteResourcePropertiesFailedCallback() throws Exception
     {
         m_resourceContext = new SushiResourceContext();
         XmlObject xBean =
@@ -225,8 +216,7 @@
     /**
      * DOCUMENT_ME
      */
-    public void testUpdateResourcePropertiesCallback() throws ResourceException, ResourceContextException,
-            XmlException
+    public void testUpdateResourcePropertiesCallback() throws Exception
     {
         String newValue = "99";
         m_resourceContext = new SushiResourceContext();
@@ -245,7 +235,7 @@
         assertTrue( callback.updateWasInvoked() );
     }
 
-    public void testUpdateOpenContent() throws XmlException
+    public void testUpdateOpenContent() throws Exception
     {
         m_resourceContext = new SushiResourceContext( true );
         insertXsdAnyPropElem();
@@ -260,8 +250,7 @@
     /**
      * DOCUMENT_ME
      */
-    public void testUpdateResourceProperty()
-            throws XmlException
+    public void testUpdateResourceProperty() throws Exception
     {
         final String newValue = "99";
         m_resourceContext = new SushiResourceContext();