ws-wsrf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sc...@apache.org
Subject svn commit: r227033 [22/27] - in /webservices/wsrf/trunk: ./ src/java/org/apache/ws/ src/java/org/apache/ws/addressing/ src/java/org/apache/ws/addressing/v2003_03/ src/java/org/apache/ws/addressing/v2004_08_10/ src/java/org/apache/ws/resource/ src/java...
Date Tue, 02 Aug 2005 16:30:44 GMT
Modified: webservices/wsrf/trunk/src/java/org/apache/ws/util/platform/axis/tool/WsddUpdater.java
URL: http://svn.apache.org/viewcvs/webservices/wsrf/trunk/src/java/org/apache/ws/util/platform/axis/tool/WsddUpdater.java?rev=227033&r1=227032&r2=227033&view=diff
==============================================================================
--- webservices/wsrf/trunk/src/java/org/apache/ws/util/platform/axis/tool/WsddUpdater.java (original)
+++ webservices/wsrf/trunk/src/java/org/apache/ws/util/platform/axis/tool/WsddUpdater.java Tue Aug  2 09:28:49 2005
@@ -1,215 +1,214 @@
-/*=============================================================================*
- *  Copyright 2004 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.util.platform.axis.tool;
-
-import org.apache.axis.AxisEngine;
-import org.apache.axis.MessageContext;
-import org.apache.axis.configuration.FileProvider;
-import org.apache.axis.server.AxisServer;
-import org.apache.axis.utils.Admin;
-import org.apache.tools.ant.BuildException;
-import org.apache.tools.ant.DirectoryScanner;
-import org.apache.tools.ant.taskdefs.MatchingTask;
-import org.apache.tools.ant.types.FileSet;
-import org.apache.ws.util.JaxpUtils;
-import org.w3c.dom.Element;
-
-import java.io.File;
-import java.io.FileInputStream;
-import java.util.ArrayList;
-import java.util.List;
-
-/**
- * Utility class that allows for easy deployment of new entries (e.g. deploy.wsdd)
- * to an Axis WSDD. This class can be executed in any of the following ways:
- * <ul>
- *  <li>by calling {@link WsddUpdater#deploy(java.io.File)}</li>
- *  <li>from the command-line: java org.apache.ws.platform.axis.tool.WsddUpdater path_to_deploy.wsdd</li>
- *  <li>as an Ant task: &lt;wsddupdater deployWsdd="path_to_deploy.wsdd"&gt;</li>
- * </ul>
- *
- * @author Ian P. Springer
- */
-public class WsddUpdater
-        extends MatchingTask
-{
-    /**
-     * Below default can be overridden by setting the below sysprop.
-     */
-    public static final String SYSPROP_WSDD = "wsdd";
-
-    /**
-     * Default to looking for server-config.wsdd in current dir or classpath.
-     */
-    private static final String DEFAULT_CONFIG_WSDD = "server-config.wsdd";
-
-    private String m_configWsdd;
-    private List m_wsddFiles = new ArrayList();
-    private Admin m_axisAdmin;
-    private MessageContext m_msgContext;
-
-    /**
-     * Creates a new {@link WsddUpdater} object.
-     */
-    public WsddUpdater()
-    {
-        this( (String) null );
-    }
-
-    /**
-     * Creates a new {@link WsddUpdater} object for updating the specified WSDD file.
-     *
-     * @param configWsdd DOCUMENT_ME
-     */
-    public WsddUpdater( File configWsdd )
-    {
-        this( configWsdd.getPath() );
-    }
-
-    /**
-     * Creates a new {@link WsddUpdater} object for updating the specified WSDD, which may be a a file path or a location in
-     * the classpath.
-     *
-     * @param configWsdd DOCUMENT_ME
-     */
-    public WsddUpdater( String configWsdd )
-    {
-        initContextClassLoader();
-        if ( configWsdd != null )
-        {
-            m_configWsdd = configWsdd;
-        }
-        else
-        {
-            m_configWsdd =
-                    ( System.getProperty( SYSPROP_WSDD ) != null ) ? System.getProperty( SYSPROP_WSDD ) : DEFAULT_CONFIG_WSDD;
-        }
-    }
-
-    private void initContextClassLoader()
-    {
-        // this is done because for some reason, when run using Maven,
-        // the ContextClassloader is null, which causes an issue with Axis.
-        if ( Thread.currentThread().getContextClassLoader() == null )
-        {
-            Thread.currentThread().setContextClassLoader( MatchingTask.class.getClassLoader() );
-        }
-    }
-
-    /**
-     * Sets the WSDD to be updated.
-     *
-     * @param configWsdd the WSDD to be updated
-     */
-    public void setConfigWsdd( String configWsdd )
-    {
-        m_configWsdd = configWsdd;
-    }
-
-    /**
-     * Sets the WSDD (un)deployment fragment to be added to the WSDD.
-     *
-     * @param deployWsdd the WSDD (un)deployment fragment to be added to the WSDD
-     */
-    public void setDeployWsdd( File deployWsdd )
-    {
-        m_wsddFiles.add( deployWsdd );
-    }
-
-    /**
-     * DOCUMENT_ME
-     *
-     * @param wsddPaths DOCUMENT_ME
-     */
-    public void addConfiguredWsddPaths( FileSet wsddPaths )
-    {
-        File baseDir = wsddPaths.getDir( getProject() );
-        DirectoryScanner dirScanner = wsddPaths.getDirectoryScanner( getProject() );
-        String[] includedFiles = dirScanner.getIncludedFiles();
-        for ( int i = 0; i < includedFiles.length; i++ )
-        {
-            m_wsddFiles.add( new File( baseDir, includedFiles[i] ) );
-        }
-    }
-
-    /**
-     * DOCUMENT_ME
-     *
-     * @param deployWsdd DOCUMENT_ME
-     * @throws Exception DOCUMENT_ME
-     */
-    public void deploy( File deployWsdd )
-            throws Exception
-    {
-        setDeployWsdd( deployWsdd );
-        execute();
-    }
-
-    /**
-     * DOCUMENT_ME
-     *
-     * @throws org.apache.tools.ant.BuildException DOCUMENT_ME
-     */
-    public void execute()
-            throws BuildException
-    {
-        if ( m_wsddFiles.isEmpty() )
-        {
-            throw new BuildException( "No deploy WSDDs were specified!" );
-        }
-
-        try
-        {
-            AxisEngine axisEngine = new AxisServer( new FileProvider( m_configWsdd ) );
-            m_msgContext = new MessageContext( axisEngine );
-            m_axisAdmin = new Admin();
-            for ( int i = 0; i < m_wsddFiles.size(); i++ )
-            {
-                deployWsdd( (File) m_wsddFiles.get( i ) );
-            }
-        }
-        catch ( Exception e )
-        {
-            throw new BuildException( e );
-        }
-    }
-
-    /**
-     * Command-line invocation entry point.
-     *
-     * @param args command-line arguments
-     * @throws Exception on fatal error
-     */
-    public static void main( String[] args )
-            throws Exception
-    {
-        //System.setProperty( SYSPROP_WSDD, "C:/server-config.wsdd" );
-        if ( args.length != 1 )
-        {
-            System.err.println( "Usage: " + WsddUpdater.class.getName() + " deployWsddFile" );
-            System.exit( 1 );
-        }
-
-        new WsddUpdater().deploy( new File( args[0] ) );
-    }
-
-    private void deployWsdd( File deployWsdd ) throws Exception
-    {
-        log( "Deploying WSDD " + deployWsdd + " to configuration WSDD " + m_configWsdd + "..." );
-        Element deployWsddElem = JaxpUtils.loadDocument( new FileInputStream( deployWsdd ) ).getDocumentElement();
-        m_axisAdmin.process( m_msgContext, deployWsddElem );
-    }
-}
+/*=============================================================================*
+ *  Copyright 2004 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.util.platform.axis.tool;
+
+import org.apache.axis.AxisEngine;
+import org.apache.axis.MessageContext;
+import org.apache.axis.configuration.FileProvider;
+import org.apache.axis.server.AxisServer;
+import org.apache.axis.utils.Admin;
+import org.apache.tools.ant.BuildException;
+import org.apache.tools.ant.DirectoryScanner;
+import org.apache.tools.ant.taskdefs.MatchingTask;
+import org.apache.tools.ant.types.FileSet;
+import org.apache.ws.util.JaxpUtils;
+import org.w3c.dom.Element;
+import java.io.File;
+import java.io.FileInputStream;
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * Utility class that allows for easy deployment of new entries (e.g. deploy.wsdd)
+ * to an Axis WSDD. This class can be executed in any of the following ways:
+ * <ul>
+ *  <li>by calling {@link WsddUpdater#deploy(java.io.File)}</li>
+ *  <li>from the command-line: java org.apache.ws.platform.axis.tool.WsddUpdater path_to_deploy.wsdd</li>
+ *  <li>as an Ant task: &lt;wsddupdater deployWsdd="path_to_deploy.wsdd"&gt;</li>
+ * </ul>
+ *
+ * @author Ian P. Springer
+ */
+public class WsddUpdater
+   extends MatchingTask
+{
+   /**
+    * Below default can be overridden by setting the below sysprop.
+    */
+   public static final String SYSPROP_WSDD = "wsdd";
+
+   /**
+    * Default to looking for server-config.wsdd in current dir or classpath.
+    */
+   private static final String DEFAULT_CONFIG_WSDD = "server-config.wsdd";
+   private String              m_configWsdd;
+   private List                m_wsddFiles  = new ArrayList(  );
+   private Admin               m_axisAdmin;
+   private MessageContext      m_msgContext;
+
+   /**
+    * Creates a new {@link WsddUpdater} object.
+    */
+   public WsddUpdater(  )
+   {
+      this( (String) null );
+   }
+
+   /**
+    * Creates a new {@link WsddUpdater} object for updating the specified WSDD file.
+    *
+    * @param configWsdd DOCUMENT_ME
+    */
+   public WsddUpdater( File configWsdd )
+   {
+      this( configWsdd.getPath(  ) );
+   }
+
+   /**
+    * Creates a new {@link WsddUpdater} object for updating the specified WSDD, which may be a a file path or a location in
+    * the classpath.
+    *
+    * @param configWsdd DOCUMENT_ME
+    */
+   public WsddUpdater( String configWsdd )
+   {
+      initContextClassLoader(  );
+      if ( configWsdd != null )
+      {
+         m_configWsdd = configWsdd;
+      }
+      else
+      {
+         m_configWsdd =
+            ( System.getProperty( SYSPROP_WSDD ) != null ) ? System.getProperty( SYSPROP_WSDD ) : DEFAULT_CONFIG_WSDD;
+      }
+   }
+
+   /**
+    * Sets the WSDD to be updated.
+    *
+    * @param configWsdd the WSDD to be updated
+    */
+   public void setConfigWsdd( String configWsdd )
+   {
+      m_configWsdd = configWsdd;
+   }
+
+   /**
+    * Sets the WSDD (un)deployment fragment to be added to the WSDD.
+    *
+    * @param deployWsdd the WSDD (un)deployment fragment to be added to the WSDD
+    */
+   public void setDeployWsdd( File deployWsdd )
+   {
+      m_wsddFiles.add( deployWsdd );
+   }
+
+   /**
+    * DOCUMENT_ME
+    *
+    * @param wsddPaths DOCUMENT_ME
+    */
+   public void addConfiguredWsddPaths( FileSet wsddPaths )
+   {
+      File             baseDir       = wsddPaths.getDir( getProject(  ) );
+      DirectoryScanner dirScanner    = wsddPaths.getDirectoryScanner( getProject(  ) );
+      String[]         includedFiles = dirScanner.getIncludedFiles(  );
+      for ( int i = 0; i < includedFiles.length; i++ )
+      {
+         m_wsddFiles.add( new File( baseDir, includedFiles[i] ) );
+      }
+   }
+
+   /**
+    * DOCUMENT_ME
+    *
+    * @param deployWsdd DOCUMENT_ME
+    * @throws Exception DOCUMENT_ME
+    */
+   public void deploy( File deployWsdd )
+   throws Exception
+   {
+      setDeployWsdd( deployWsdd );
+      execute(  );
+   }
+
+   /**
+    * DOCUMENT_ME
+    *
+    * @throws org.apache.tools.ant.BuildException DOCUMENT_ME
+    */
+   public void execute(  )
+   throws BuildException
+   {
+      if ( m_wsddFiles.isEmpty(  ) )
+      {
+         throw new BuildException( "No deploy WSDDs were specified!" );
+      }
+
+      try
+      {
+         AxisEngine axisEngine = new AxisServer( new FileProvider( m_configWsdd ) );
+         m_msgContext    = new MessageContext( axisEngine );
+         m_axisAdmin     = new Admin(  );
+         for ( int i = 0; i < m_wsddFiles.size(  ); i++ )
+         {
+            deployWsdd( (File) m_wsddFiles.get( i ) );
+         }
+      }
+      catch ( Exception e )
+      {
+         throw new BuildException( e );
+      }
+   }
+
+   /**
+    * Command-line invocation entry point.
+    *
+    * @param args command-line arguments
+    * @throws Exception on fatal error
+    */
+   public static void main( String[] args )
+   throws Exception
+   {
+      //System.setProperty( SYSPROP_WSDD, "C:/server-config.wsdd" );
+      if ( args.length != 1 )
+      {
+         System.err.println( "Usage: " + WsddUpdater.class.getName(  ) + " deployWsddFile" );
+         System.exit( 1 );
+      }
+
+      new WsddUpdater(  ).deploy( new File( args[0] ) );
+   }
+
+   private void deployWsdd( File deployWsdd )
+   throws Exception
+   {
+      log( "Deploying WSDD " + deployWsdd + " to configuration WSDD " + m_configWsdd + "..." );
+      Element deployWsddElem = JaxpUtils.loadDocument( new FileInputStream( deployWsdd ) ).getDocumentElement(  );
+      m_axisAdmin.process( m_msgContext, deployWsddElem );
+   }
+
+   private void initContextClassLoader(  )
+   {
+      // this is done because for some reason, when run using Maven,
+      // the ContextClassloader is null, which causes an issue with Axis.
+      if ( Thread.currentThread(  ).getContextClassLoader(  ) == null )
+      {
+         Thread.currentThread(  ).setContextClassLoader( MatchingTask.class.getClassLoader(  ) );
+      }
+   }
+}
\ No newline at end of file

Modified: webservices/wsrf/trunk/src/java/org/apache/ws/util/platform/weblogic/WeblogicJaxRpcPlatform.java
URL: http://svn.apache.org/viewcvs/webservices/wsrf/trunk/src/java/org/apache/ws/util/platform/weblogic/WeblogicJaxRpcPlatform.java?rev=227033&r1=227032&r2=227033&view=diff
==============================================================================
--- webservices/wsrf/trunk/src/java/org/apache/ws/util/platform/weblogic/WeblogicJaxRpcPlatform.java (original)
+++ webservices/wsrf/trunk/src/java/org/apache/ws/util/platform/weblogic/WeblogicJaxRpcPlatform.java Tue Aug  2 09:28:49 2005
@@ -1,69 +1,84 @@
-package org.apache.ws.util.platform.weblogic;
-
-import org.apache.ws.util.platform.JaxRpcPlatform;
-
-
-/**
- * @author Sal Campana
- */
-public class WeblogicJaxRpcPlatform extends JaxRpcPlatform
-{
-
-    /**
-     * WebLogic description.
-     */
-    private static final String WEBLOGIC_DESC = "BEA WebLogic Server";
-
-    /**
-     * Class name of WebLogic's impl of SAAJ {@link javax.xml.soap.SOAPFactory} interface.
-     */
-    private static final String IMPL_SOAP_FACTORY_WEBLOGIC = "weblogic.webservice.core.soap.SOAPFactoryImpl";
-
-    /**
-     * Returns a short description of the platform.
-     *
-     * @return a short description of the platform
-     */
-    public String getDescription()
-    {
-        return WEBLOGIC_DESC;
-    }
-
-    /**
-     * Returns the SOAPFactoryImpl class name.
-     *
-     * @return SOAPFactoryImpl class name.
-     */
-    public String getSoapFactoryImpl()
-    {
-        return IMPL_SOAP_FACTORY_WEBLOGIC;
-    }
-
-    /**
-     * Returns the platform-specific endpoint url for a service on a given platform.
-     * <p/>
-     * An example of this would be:</br>
-     * baseWebappUrl = http://localhost:8080/wsrf</br>
-     * serviceName = filesystem</br>
-     * <p/>
-     * On the Axis platform the endpoint URL is:  http://localhost:8080/wsrf/services/filesystem
-     *
-     * @param baseWebappUrl The url containing the webapp context (i.e. http://localhost:8080/wsrf)
-     * @param serviceName   The service name which is registered with the platform
-     * @return The endpoint url for the service.
-     */
-    public String getEndpointUrl(String baseWebappUrl, String serviceName)
-    {
-        return baseWebappUrl + "/" + serviceName;
-    }
-
-    /**
-     * Returns the description of the JAX-RPC platform.
-     *
-     * @return String
-     */
-    public String toString()
-    {
-        return WEBLOGIC_DESC;
-    }
-}
+/*=============================================================================*
+ *  Copyright 2004 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.util.platform.weblogic;
+
+import org.apache.ws.util.platform.JaxRpcPlatform;
+
+/**
+ * @author Sal Campana
+ */
+public class WeblogicJaxRpcPlatform
+   extends JaxRpcPlatform
+{
+   /**
+    * WebLogic description.
+    */
+   private static final String WEBLOGIC_DESC = "BEA WebLogic Server";
+
+   /**
+    * Class name of WebLogic's impl of SAAJ {@link javax.xml.soap.SOAPFactory} interface.
+    */
+   private static final String IMPL_SOAP_FACTORY_WEBLOGIC = "weblogic.webservice.core.soap.SOAPFactoryImpl";
+
+   /**
+    * Returns a short description of the platform.
+    *
+    * @return a short description of the platform
+    */
+   public String getDescription(  )
+   {
+      return WEBLOGIC_DESC;
+   }
+
+   /**
+    * Returns the platform-specific endpoint url for a service on a given platform.
+    * <p/>
+    * An example of this would be:</br>
+    * baseWebappUrl = http://localhost:8080/wsrf</br>
+    * serviceName = filesystem</br>
+    * <p/>
+    * On the Axis platform the endpoint URL is:  http://localhost:8080/wsrf/services/filesystem
+    *
+    * @param baseWebappUrl The url containing the webapp context (i.e. http://localhost:8080/wsrf)
+    * @param serviceName   The service name which is registered with the platform
+    * @return The endpoint url for the service.
+    */
+   public String getEndpointUrl( String baseWebappUrl,
+                                 String serviceName )
+   {
+      return baseWebappUrl + "/" + serviceName;
+   }
+
+   /**
+    * Returns the SOAPFactoryImpl class name.
+    *
+    * @return SOAPFactoryImpl class name.
+    */
+   public String getSoapFactoryImpl(  )
+   {
+      return IMPL_SOAP_FACTORY_WEBLOGIC;
+   }
+
+   /**
+    * Returns the description of the JAX-RPC platform.
+    *
+    * @return String
+    */
+   public String toString(  )
+   {
+      return WEBLOGIC_DESC;
+   }
+}
\ No newline at end of file

Modified: webservices/wsrf/trunk/src/java/org/apache/ws/util/rpc/JaxRpcConstants.java
URL: http://svn.apache.org/viewcvs/webservices/wsrf/trunk/src/java/org/apache/ws/util/rpc/JaxRpcConstants.java?rev=227033&r1=227032&r2=227033&view=diff
==============================================================================
--- webservices/wsrf/trunk/src/java/org/apache/ws/util/rpc/JaxRpcConstants.java (original)
+++ webservices/wsrf/trunk/src/java/org/apache/ws/util/rpc/JaxRpcConstants.java Tue Aug  2 09:28:49 2005
@@ -1,37 +1,37 @@
-/*=============================================================================*
- *  Copyright 2004 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.util.rpc;
-
-
-/**
- * Constants related to JAX-RPC ({@link javax.xml.rpc}) APIs.
- *
- * @author Ian P. Springer
- */
-public interface JaxRpcConstants
-{
-   /** DOCUMENT_ME */
-   String IMPL_SERVICE_FACTORY_AXIS = "org.apache.axis.client.ServiceFactory";
-
-   /** DOCUMENT_ME */
-   String IMPL_SERVICE_FACTORY_SUN = "com.sun.xml.rpc.client.ServiceFactoryImpl";
-
-   /** DOCUMENT_ME */
-   String IMPL_SERVICE_FACTORY_WEBLOGIC = "weblogic.webservice.core.rpc.ServiceFactoryImpl";
-
-   /** DOCUMENT_ME */
-   String SYSPROP_SERVICE_FACTORY = "javax.xml.rpc.ServiceFactory";
+/*=============================================================================*
+ *  Copyright 2004 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.util.rpc;
+
+
+/**
+ * Constants related to JAX-RPC ({@link javax.xml.rpc}) APIs.
+ *
+ * @author Ian P. Springer
+ */
+public interface JaxRpcConstants
+{
+   /** DOCUMENT_ME */
+   String IMPL_SERVICE_FACTORY_AXIS = "org.apache.axis.client.ServiceFactory";
+
+   /** DOCUMENT_ME */
+   String IMPL_SERVICE_FACTORY_SUN = "com.sun.xml.rpc.client.ServiceFactoryImpl";
+
+   /** DOCUMENT_ME */
+   String IMPL_SERVICE_FACTORY_WEBLOGIC = "weblogic.webservice.core.rpc.ServiceFactoryImpl";
+
+   /** DOCUMENT_ME */
+   String SYSPROP_SERVICE_FACTORY = "javax.xml.rpc.ServiceFactory";
 }

Modified: webservices/wsrf/trunk/src/java/org/apache/ws/util/soap/Body.java
URL: http://svn.apache.org/viewcvs/webservices/wsrf/trunk/src/java/org/apache/ws/util/soap/Body.java?rev=227033&r1=227032&r2=227033&view=diff
==============================================================================
--- webservices/wsrf/trunk/src/java/org/apache/ws/util/soap/Body.java (original)
+++ webservices/wsrf/trunk/src/java/org/apache/ws/util/soap/Body.java Tue Aug  2 09:28:49 2005
@@ -1,29 +1,61 @@
-package org.apache.ws.util.soap;
-
-import org.apache.ws.XmlObjectWrapper;
-import org.apache.xmlbeans.XmlObject;
-
-/**
- * A Facade wrapper for a SOAPBody
- *
- * @author Sal Campana
- */
-public class Body implements XmlObjectWrapper
-{
-    XmlObject m_xmlObject;
-
-    public Body(org.w3.x2003.x05.soapEnvelope.Body body)
-    {
-        m_xmlObject = body;
-    }
-
-    public Body(org.xmlsoap.schemas.soap.envelope.Body body)
-    {
-        m_xmlObject = body;
-    }
-
-    public XmlObject getXmlObject()
-    {
-        return m_xmlObject;
-    }
-}
+/*=============================================================================*
+ *  Copyright 2004 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.util.soap;
+
+import org.apache.ws.XmlObjectWrapper;
+import org.apache.xmlbeans.XmlObject;
+
+/**
+ * A Facade wrapper for a SOAPBody
+ *
+ * @author Sal Campana
+ */
+public class Body
+   implements XmlObjectWrapper
+{
+   /** DOCUMENT_ME */
+   XmlObject m_xmlObject;
+
+   /**
+    * Creates a new {@link Body} object.
+    *
+    * @param body DOCUMENT_ME
+    */
+   public Body( org.w3.x2003.x05.soapEnvelope.Body body )
+   {
+      m_xmlObject = body;
+   }
+
+   /**
+    * Creates a new {@link Body} object.
+    *
+    * @param body DOCUMENT_ME
+    */
+   public Body( org.xmlsoap.schemas.soap.envelope.Body body )
+   {
+      m_xmlObject = body;
+   }
+
+   /**
+    * DOCUMENT_ME
+    *
+    * @return DOCUMENT_ME
+    */
+   public XmlObject getXmlObject(  )
+   {
+      return m_xmlObject;
+   }
+}
\ No newline at end of file

Modified: webservices/wsrf/trunk/src/java/org/apache/ws/util/soap/Envelope.java
URL: http://svn.apache.org/viewcvs/webservices/wsrf/trunk/src/java/org/apache/ws/util/soap/Envelope.java?rev=227033&r1=227032&r2=227033&view=diff
==============================================================================
--- webservices/wsrf/trunk/src/java/org/apache/ws/util/soap/Envelope.java (original)
+++ webservices/wsrf/trunk/src/java/org/apache/ws/util/soap/Envelope.java Tue Aug  2 09:28:49 2005
@@ -1,53 +1,101 @@
-package org.apache.ws.util.soap;
-
-import org.apache.ws.XmlObjectWrapper;
-import org.apache.xmlbeans.XmlObject;
-
-/**
- * A Facade Wrapper for a SOAPEnvelope
- *
- * @author Sal Campana
- */
-public class Envelope implements XmlObjectWrapper
-{
-    XmlObject m_xmlObject;
-    Body m_body;
-    Header m_header;
-
-    public Envelope(org.w3.x2003.x05.soapEnvelope.EnvelopeDocument envelope)
-    {
-        if(envelope.getEnvelope() == null)
-        {
-           throw new IllegalArgumentException("There must be an Envelope in the EnvelopeDocument.");
-        }
-        m_xmlObject = envelope;
-        m_body = new Body(envelope.getEnvelope().getBody());
-        m_header = new Header(envelope.getEnvelope().getHeader());
-    }
-
-    public Envelope(org.xmlsoap.schemas.soap.envelope.EnvelopeDocument envelope)
-    {
-        if(envelope.getEnvelope() == null)
-        {
-            throw new IllegalArgumentException("There must be an Envelope in the EnvelopeDocument.");
-        }
-        m_xmlObject = envelope;
-        m_body = new Body(envelope.getEnvelope().getBody());
-        m_header = new Header(envelope.getEnvelope().getHeader());
-    }
-
-    public Body getBody()
-    {
-        return m_body;
-    }
-
-    public Header getHeader()
-    {
-        return m_header;
-    }
-
-    public XmlObject getXmlObject()
-    {
-        return m_xmlObject;
-    }
-}
+/*=============================================================================*
+ *  Copyright 2004 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.util.soap;
+
+import org.apache.ws.XmlObjectWrapper;
+import org.apache.xmlbeans.XmlObject;
+
+/**
+ * A Facade Wrapper for a SOAPEnvelope
+ *
+ * @author Sal Campana
+ */
+public class Envelope
+   implements XmlObjectWrapper
+{
+   /** DOCUMENT_ME */
+   XmlObject m_xmlObject;
+
+   /** DOCUMENT_ME */
+   Body   m_body;
+
+   /** DOCUMENT_ME */
+   Header m_header;
+
+   /**
+    * Creates a new {@link Envelope} object.
+    *
+    * @param envelope DOCUMENT_ME
+    */
+   public Envelope( org.w3.x2003.x05.soapEnvelope.EnvelopeDocument envelope )
+   {
+      if ( envelope.getEnvelope(  ) == null )
+      {
+         throw new IllegalArgumentException( "There must be an Envelope in the EnvelopeDocument." );
+      }
+
+      m_xmlObject    = envelope;
+      m_body         = new Body( envelope.getEnvelope(  ).getBody(  ) );
+      m_header       = new Header( envelope.getEnvelope(  ).getHeader(  ) );
+   }
+
+   /**
+    * Creates a new {@link Envelope} object.
+    *
+    * @param envelope DOCUMENT_ME
+    */
+   public Envelope( org.xmlsoap.schemas.soap.envelope.EnvelopeDocument envelope )
+   {
+      if ( envelope.getEnvelope(  ) == null )
+      {
+         throw new IllegalArgumentException( "There must be an Envelope in the EnvelopeDocument." );
+      }
+
+      m_xmlObject    = envelope;
+      m_body         = new Body( envelope.getEnvelope(  ).getBody(  ) );
+      m_header       = new Header( envelope.getEnvelope(  ).getHeader(  ) );
+   }
+
+   /**
+    * DOCUMENT_ME
+    *
+    * @return DOCUMENT_ME
+    */
+   public Body getBody(  )
+   {
+      return m_body;
+   }
+
+   /**
+    * DOCUMENT_ME
+    *
+    * @return DOCUMENT_ME
+    */
+   public Header getHeader(  )
+   {
+      return m_header;
+   }
+
+   /**
+    * DOCUMENT_ME
+    *
+    * @return DOCUMENT_ME
+    */
+   public XmlObject getXmlObject(  )
+   {
+      return m_xmlObject;
+   }
+}
\ No newline at end of file

Modified: webservices/wsrf/trunk/src/java/org/apache/ws/util/soap/Header.java
URL: http://svn.apache.org/viewcvs/webservices/wsrf/trunk/src/java/org/apache/ws/util/soap/Header.java?rev=227033&r1=227032&r2=227033&view=diff
==============================================================================
--- webservices/wsrf/trunk/src/java/org/apache/ws/util/soap/Header.java (original)
+++ webservices/wsrf/trunk/src/java/org/apache/ws/util/soap/Header.java Tue Aug  2 09:28:49 2005
@@ -1,30 +1,61 @@
-package org.apache.ws.util.soap;
-
-import org.apache.ws.XmlObjectWrapper;
-import org.apache.xmlbeans.XmlObject;
-
-
-/**
- * A Facade wrapper for a SOAPHeader
- *
- * @author Sal Campana
- */
-public class Header implements XmlObjectWrapper
-{
-    XmlObject m_xmlObject;
-
-    public Header( org.w3.x2003.x05.soapEnvelope.Header header)
-    {
-        m_xmlObject = header;
-    }
-
-    public Header(org.xmlsoap.schemas.soap.envelope.Header header)
-    {
-        m_xmlObject = header;
-    }
-
-    public XmlObject getXmlObject()
-    {
-        return m_xmlObject;
-    }
-}
+/*=============================================================================*
+ *  Copyright 2004 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.util.soap;
+
+import org.apache.ws.XmlObjectWrapper;
+import org.apache.xmlbeans.XmlObject;
+
+/**
+ * A Facade wrapper for a SOAPHeader
+ *
+ * @author Sal Campana
+ */
+public class Header
+   implements XmlObjectWrapper
+{
+   /** DOCUMENT_ME */
+   XmlObject m_xmlObject;
+
+   /**
+    * Creates a new {@link Header} object.
+    *
+    * @param header DOCUMENT_ME
+    */
+   public Header( org.w3.x2003.x05.soapEnvelope.Header header )
+   {
+      m_xmlObject = header;
+   }
+
+   /**
+    * Creates a new {@link Header} object.
+    *
+    * @param header DOCUMENT_ME
+    */
+   public Header( org.xmlsoap.schemas.soap.envelope.Header header )
+   {
+      m_xmlObject = header;
+   }
+
+   /**
+    * DOCUMENT_ME
+    *
+    * @return DOCUMENT_ME
+    */
+   public XmlObject getXmlObject(  )
+   {
+      return m_xmlObject;
+   }
+}
\ No newline at end of file

Modified: webservices/wsrf/trunk/src/java/org/apache/ws/util/soap/SaajConstants.java
URL: http://svn.apache.org/viewcvs/webservices/wsrf/trunk/src/java/org/apache/ws/util/soap/SaajConstants.java?rev=227033&r1=227032&r2=227033&view=diff
==============================================================================
--- webservices/wsrf/trunk/src/java/org/apache/ws/util/soap/SaajConstants.java (original)
+++ webservices/wsrf/trunk/src/java/org/apache/ws/util/soap/SaajConstants.java Tue Aug  2 09:28:49 2005
@@ -1,73 +1,73 @@
-/*=============================================================================*
- *  Copyright 2004 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.util.soap;
-
-
-/**
- * Constants related to SAAJ ({@link javax.xml.soap}) APIs.
- *
- * @author Ian P. Springer
- */
-public interface SaajConstants
-{
-   /** DOCUMENT_ME */
-   String IMPL_MESSAGE_FACTORY_AXIS = "org.apache.axis.soap.MessageFactoryImpl";
-
-   /** DOCUMENT_ME */
-   String IMPL_MESSAGE_FACTORY_SUN = "com.sun.xml.messaging.saaj.soap.MessageFactoryImpl";
-
-   /** DOCUMENT_ME */
-   String IMPL_MESSAGE_FACTORY_WEBLOGIC = "weblogic.webservice.core.soap.MessageFactoryImpl";
-
-   /** DOCUMENT_ME */
-   String IMPL_SOAP_CONNECTION_FACTORY_AXIS = "org.apache.axis.soap.SOAPConnectionFactoryImpl";
-
-   /** DOCUMENT_ME */
-   String IMPL_SOAP_CONNECTION_FACTORY_SUN = "com.sun.xml.messaging.saaj.soap.SOAPConnectionFactoryImpl";
-
-   /** DOCUMENT_ME */
-   String IMPL_SOAP_CONNECTION_FACTORY_WEBLOGIC = "weblogic.webservice.core.soap.SOAPConnectionFactoryImpl";
-
-   /** DOCUMENT_ME */
-   String IMPL_SOAP_ELEMENT_FACTORY_AXIS = "org.apache.axis.soap.SOAPElementFactoryImpl";
-
-   /** DOCUMENT_ME */
-   String IMPL_SOAP_ELEMENT_FACTORY_SUN = "com.sun.xml.messaging.saaj.soap.SOAPElementFactoryImpl";
-
-   /** DOCUMENT_ME */
-   String IMPL_SOAP_ELEMENT_FACTORY_WEBLOGIC = "weblogic.webservice.core.soap.SOAPElementFactoryImpl";
-
-   /** DOCUMENT_ME */
-   String IMPL_SOAP_FACTORY_AXIS = "org.apache.axis.soap.SOAPFactoryImpl";
-
-   /** DOCUMENT_ME */
-   String IMPL_SOAP_FACTORY_SUN = "com.sun.xml.messaging.saaj.soap.SOAPFactoryImpl";
-
-   /** DOCUMENT_ME */
-   String IMPL_SOAP_FACTORY_WEBLOGIC = "weblogic.webservice.core.soap.SOAPFactoryImpl";
-
-   /** DOCUMENT_ME */
-   String SYSPROP_MESSAGE_FACTORY = "javax.xml.soap.MessageFactory";
-
-   /** DOCUMENT_ME */
-   String SYSPROP_SOAP_CONNECTION_FACTORY = "javax.xml.soap.SOAPConnectionFactory";
-
-   /** DOCUMENT_ME */
-   String SYSPROP_SOAP_ELEMENT_FACTORY = "javax.xml.soap.SOAPElementFactory";
-
-   /** DOCUMENT_ME */
-   String SYSPROP_SOAP_FACTORY = "javax.xml.soap.SOAPFactory";
+/*=============================================================================*
+ *  Copyright 2004 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.util.soap;
+
+
+/**
+ * Constants related to SAAJ ({@link javax.xml.soap}) APIs.
+ *
+ * @author Ian P. Springer
+ */
+public interface SaajConstants
+{
+   /** DOCUMENT_ME */
+   String IMPL_MESSAGE_FACTORY_AXIS = "org.apache.axis.soap.MessageFactoryImpl";
+
+   /** DOCUMENT_ME */
+   String IMPL_MESSAGE_FACTORY_SUN = "com.sun.xml.messaging.saaj.soap.MessageFactoryImpl";
+
+   /** DOCUMENT_ME */
+   String IMPL_MESSAGE_FACTORY_WEBLOGIC = "weblogic.webservice.core.soap.MessageFactoryImpl";
+
+   /** DOCUMENT_ME */
+   String IMPL_SOAP_CONNECTION_FACTORY_AXIS = "org.apache.axis.soap.SOAPConnectionFactoryImpl";
+
+   /** DOCUMENT_ME */
+   String IMPL_SOAP_CONNECTION_FACTORY_SUN = "com.sun.xml.messaging.saaj.soap.SOAPConnectionFactoryImpl";
+
+   /** DOCUMENT_ME */
+   String IMPL_SOAP_CONNECTION_FACTORY_WEBLOGIC = "weblogic.webservice.core.soap.SOAPConnectionFactoryImpl";
+
+   /** DOCUMENT_ME */
+   String IMPL_SOAP_ELEMENT_FACTORY_AXIS = "org.apache.axis.soap.SOAPElementFactoryImpl";
+
+   /** DOCUMENT_ME */
+   String IMPL_SOAP_ELEMENT_FACTORY_SUN = "com.sun.xml.messaging.saaj.soap.SOAPElementFactoryImpl";
+
+   /** DOCUMENT_ME */
+   String IMPL_SOAP_ELEMENT_FACTORY_WEBLOGIC = "weblogic.webservice.core.soap.SOAPElementFactoryImpl";
+
+   /** DOCUMENT_ME */
+   String IMPL_SOAP_FACTORY_AXIS = "org.apache.axis.soap.SOAPFactoryImpl";
+
+   /** DOCUMENT_ME */
+   String IMPL_SOAP_FACTORY_SUN = "com.sun.xml.messaging.saaj.soap.SOAPFactoryImpl";
+
+   /** DOCUMENT_ME */
+   String IMPL_SOAP_FACTORY_WEBLOGIC = "weblogic.webservice.core.soap.SOAPFactoryImpl";
+
+   /** DOCUMENT_ME */
+   String SYSPROP_MESSAGE_FACTORY = "javax.xml.soap.MessageFactory";
+
+   /** DOCUMENT_ME */
+   String SYSPROP_SOAP_CONNECTION_FACTORY = "javax.xml.soap.SOAPConnectionFactory";
+
+   /** DOCUMENT_ME */
+   String SYSPROP_SOAP_ELEMENT_FACTORY = "javax.xml.soap.SOAPElementFactory";
+
+   /** DOCUMENT_ME */
+   String SYSPROP_SOAP_FACTORY = "javax.xml.soap.SOAPFactory";
 }

Modified: webservices/wsrf/trunk/src/java/org/apache/ws/util/soap/SoapClient.java
URL: http://svn.apache.org/viewcvs/webservices/wsrf/trunk/src/java/org/apache/ws/util/soap/SoapClient.java?rev=227033&r1=227032&r2=227033&view=diff
==============================================================================
--- webservices/wsrf/trunk/src/java/org/apache/ws/util/soap/SoapClient.java (original)
+++ webservices/wsrf/trunk/src/java/org/apache/ws/util/soap/SoapClient.java Tue Aug  2 09:28:49 2005
@@ -20,7 +20,6 @@
 import org.apache.ws.util.i18n.Keys;
 import org.apache.ws.util.i18n.Messages;
 import org.apache.ws.util.i18n.MessagesImpl;
-
 import java.io.ByteArrayOutputStream;
 import java.io.File;
 import java.io.FileInputStream;
@@ -46,7 +45,9 @@
  */
 public class SoapClient
 {
-   public static final Messages MSG = MessagesImpl.getInstance();
+   /** DOCUMENT_ME */
+   public static final Messages MSG = MessagesImpl.getInstance(  );
+
    /**
     * @param args takes three args, the third being optional: <ul> <li>serviceURL - HTTP SOAP endpoint URL to send request to
     *             <li>xmlFileToSend - a file with an XML document of the request <li>soapAction - the value for the
@@ -58,14 +59,14 @@
    throws Exception
    {
       validateArgs( args );
-      String         serviceURL    = args[0];
-      String         xmlFileToSend = args[1];
-      String         soapAction    = ( args.length > 2 ) ? args[2] : "";
-      String response =
+      String serviceURL    = args[0];
+      String xmlFileToSend = args[1];
+      String soapAction    = ( args.length > 2 ) ? args[2] : "";
+      String response      =
          sendRequest( new URL( serviceURL ),
                       new FileInputStream( xmlFileToSend ),
-                      soapAction != null ? new URI( soapAction ) : null );
-      System.out.println( response );            
+                      ( soapAction != null ) ? new URI( soapAction ) : null );
+      System.out.println( response );
    }
 
    /**
@@ -77,12 +78,14 @@
     *
     * @throws IOException
     */
-   public static String sendRequest( URL         serviceURL,
-                                             File        soapMessageFile,
-                                             URI         soapAction )
+   public static String sendRequest( URL  serviceURL,
+                                     File soapMessageFile,
+                                     URI  soapAction )
    throws IOException
    {
-      return sendRequest( serviceURL, new FileInputStream( soapMessageFile ), soapAction );
+      return sendRequest( serviceURL,
+                          new FileInputStream( soapMessageFile ),
+                          soapAction );
    }
 
    /**
@@ -95,8 +98,8 @@
     * @throws IOException
     */
    public static String sendRequest( URL         serviceURL,
-                                             InputStream soapMessage,
-                                             URI         soapAction )
+                                     InputStream soapMessage,
+                                     URI         soapAction )
    throws IOException
    {
       // Create the connection where we're going to send the request.
@@ -118,7 +121,7 @@
                                    String.valueOf( buf.length ) );
       httpConn.setRequestProperty( "Content-Type", "text/xml; charset=UTF-8" );
 
-      httpConn.setRequestProperty( "SOAPAction", soapAction != null ? soapAction.toString() : "" );
+      httpConn.setRequestProperty( "SOAPAction", ( soapAction != null ) ? soapAction.toString(  ) : "" );
       httpConn.setRequestMethod( "POST" );
       httpConn.setDoOutput( true );
       httpConn.setDoInput( true );
@@ -137,8 +140,9 @@
       }
       else
       {
-         System.err.println( MSG.getMessage( Keys.SOAP_REQ_FAILED_HTTP_STATUS, Integer.toString(httpConn.getResponseCode(  )),
-                             httpConn.getResponseMessage(  ) ));
+         System.err.println( MSG.getMessage( Keys.SOAP_REQ_FAILED_HTTP_STATUS,
+                                             Integer.toString( httpConn.getResponseCode(  ) ),
+                                             httpConn.getResponseMessage(  ) ) );
          inStream = httpConn.getErrorStream(  );
       }
 
@@ -151,11 +155,9 @@
 
       if ( ( args.length < 2 ) || ( args.length > 3 ) )
       {
-         System.err.println(MSG.getMessage( Keys.SOAPCLIENT_USAGE,progName));
-         System.err.println( MSG.getMessage( Keys.SOAPACITON_OPTIONAL) );
+         System.err.println( MSG.getMessage( Keys.SOAPCLIENT_USAGE, progName ) );
+         System.err.println( MSG.getMessage( Keys.SOAPACITON_OPTIONAL ) );
          System.exit( 1 );
       }
    }
-
-    
-}
+}
\ No newline at end of file

Modified: webservices/wsrf/trunk/src/java/org/apache/ws/util/soap/SoapClientTask.java
URL: http://svn.apache.org/viewcvs/webservices/wsrf/trunk/src/java/org/apache/ws/util/soap/SoapClientTask.java?rev=227033&r1=227032&r2=227033&view=diff
==============================================================================
--- webservices/wsrf/trunk/src/java/org/apache/ws/util/soap/SoapClientTask.java (original)
+++ webservices/wsrf/trunk/src/java/org/apache/ws/util/soap/SoapClientTask.java Tue Aug  2 09:28:49 2005
@@ -20,7 +20,6 @@
 import org.apache.ws.util.i18n.Keys;
 import org.apache.ws.util.i18n.Messages;
 import org.apache.ws.util.i18n.MessagesImpl;
-
 import java.io.File;
 import java.io.IOException;
 import java.net.URI;
@@ -33,41 +32,69 @@
  *
  * @author Ian P. Springer (Hewlett-Packard Company)
  */
-public class SoapClientTask extends Task
+public class SoapClientTask
+   extends Task
 {
-   public static final Messages MSG = MessagesImpl.getInstance();
-   private URL m_serviceURL;
-   private File m_requestFile;
-   private URI m_soapAction;
-
-   public void setServiceURL( URL serviceURL )
+   /** DOCUMENT_ME */
+   public static final Messages MSG           = MessagesImpl.getInstance(  );
+   private URL                  m_serviceURL;
+   private File                 m_requestFile;
+   private URI                  m_soapAction;
+
+   /**
+    * DOCUMENT_ME
+    *
+    * @param requestFile DOCUMENT_ME
+    */
+   public void setRequestFile( File requestFile )
    {
-      m_serviceURL = serviceURL;
+      m_requestFile = requestFile;
    }
 
-   public void setRequestFile( File requestFile )
+   /**
+    * DOCUMENT_ME
+    *
+    * @param serviceURL DOCUMENT_ME
+    */
+   public void setServiceURL( URL serviceURL )
    {
-      m_requestFile = requestFile;
+      m_serviceURL = serviceURL;
    }
 
-   public void setSoapAction( String soapAction ) throws URISyntaxException
+   /**
+    * DOCUMENT_ME
+    *
+    * @param soapAction DOCUMENT_ME
+    *
+    * @throws URISyntaxException DOCUMENT_ME
+    */
+   public void setSoapAction( String soapAction )
+   throws URISyntaxException
    {
-      if ( ! isUnresolvedProperty( soapAction ) )
+      if ( !isUnresolvedProperty( soapAction ) )
       {
          m_soapAction = new URI( soapAction );
       }
    }
 
-   public void execute() throws BuildException
+   /**
+    * DOCUMENT_ME
+    *
+    * @throws BuildException DOCUMENT_ME
+    */
+   public void execute(  )
+   throws BuildException
    {
       if ( m_serviceURL == null )
       {
-         throw new BuildException( MSG.getMessage( Keys.SRVC_URL_REQ) );
+         throw new BuildException( MSG.getMessage( Keys.SRVC_URL_REQ ) );
       }
+
       if ( m_requestFile == null )
       {
-         throw new BuildException( MSG.getMessage( Keys.RQST_FILE_REQ) );
+         throw new BuildException( MSG.getMessage( Keys.RQST_FILE_REQ ) );
       }
+
       String response;
       try
       {
@@ -77,12 +104,19 @@
       {
          throw new BuildException( ioe );
       }
+
       System.out.println( response );
    }
 
+   /**
+    * DOCUMENT_ME
+    *
+    * @param value DOCUMENT_ME
+    *
+    * @return DOCUMENT_ME
+    */
    boolean isUnresolvedProperty( String value )
    {
-       return value.startsWith( "${" ) && value.endsWith( "}" );
+      return value.startsWith( "${" ) && value.endsWith( "}" );
    }
-
-}
+}
\ No newline at end of file

Modified: webservices/wsrf/trunk/src/java/org/apache/ws/util/test/axis/AbstractAxisTestCase.java
URL: http://svn.apache.org/viewcvs/webservices/wsrf/trunk/src/java/org/apache/ws/util/test/axis/AbstractAxisTestCase.java?rev=227033&r1=227032&r2=227033&view=diff
==============================================================================
--- webservices/wsrf/trunk/src/java/org/apache/ws/util/test/axis/AbstractAxisTestCase.java (original)
+++ webservices/wsrf/trunk/src/java/org/apache/ws/util/test/axis/AbstractAxisTestCase.java Tue Aug  2 09:28:49 2005
@@ -1,271 +1,279 @@
-/*=============================================================================*
- *  Copyright 2004 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.util.test.axis;
-
-import junit.framework.AssertionFailedError;
-import junit.framework.TestCase;
-import org.apache.ws.util.rpc.JaxRpcConstants;
-import org.apache.ws.util.soap.SaajConstants;
-import org.apache.axis.configuration.FileProvider;
-import org.apache.axis.ConfigurationException;
-
-import java.net.MalformedURLException;
-import java.net.ServerSocket;
-import java.net.URL;
-
-/**
- * Provides some conviencence functionality for easier testing of web services.
- * Methods provided by this JUnit test case superclass will allow an embedded
- * Axis server to be started and stopped.
- *
- * @author mazz
- */
-public abstract class AbstractAxisTestCase
-   extends TestCase
-{
-   /**
-    * This constant is used for enabling/disabling the use of the embedded axis server.
-    */
-   public boolean RUN_AXIS_SERVER = true;  
-
-   private static final int ANY_FREE_PORT = 0;
-
-   /*
-    * Make sure JAX-RPC and SAAJ factories all are set to Axis' impls.
-    */
-   static
-   {
-      System.setProperty( JaxRpcConstants.SYSPROP_SERVICE_FACTORY, JaxRpcConstants.IMPL_SERVICE_FACTORY_AXIS );
-      System.setProperty( SaajConstants.SYSPROP_SOAP_FACTORY, SaajConstants.IMPL_SOAP_FACTORY_AXIS );
-      System.setProperty( SaajConstants.SYSPROP_MESSAGE_FACTORY, SaajConstants.IMPL_MESSAGE_FACTORY_AXIS );
-      System.setProperty( SaajConstants.SYSPROP_SOAP_CONNECTION_FACTORY,
-                          SaajConstants.IMPL_SOAP_CONNECTION_FACTORY_AXIS );
-      System.setProperty( SaajConstants.SYSPROP_SOAP_ELEMENT_FACTORY, SaajConstants.IMPL_SOAP_ELEMENT_FACTORY_AXIS );
-   }
-
-   /**
-    * the embedded Axis server
-    */
-   private NotSoSimpleAxisServer m_simpleAxisServer;
-
-   /**
-    * @see TestCase#TestCase()
-    */
-   public AbstractAxisTestCase(  )
-   {
-      super(  );
-   }
-
-   /**
-    * Enables/Disables the running of the Axis server. The DEFAULT is true (run Axis server)
-    *
-    * The reason for adding this is to allow derived test cases which can either use the underlying SimpleAxisServer
-    * or "turn-off" that functionality and hit a runnign instance.
-    *
-    * @param runServer
-    */
-   public AbstractAxisTestCase( boolean runServer )
-   {
-      RUN_AXIS_SERVER = runServer;
-   }
-
-   /**
-    * @see TestCase#TestCase(String)
-    */
-   public AbstractAxisTestCase( String name )
-   {
-      super( name );
-   }
-
-   /**
-    * Returns the base URL used to contact the Axis server.  To access a web service hosted inside
-    * of the embedded Axis server, append the name of the web service to this base URL.
-    * <p/>
-    * Subclasses may override this method if the default is not acceptable. The
-    * default is <code>http://127.0.0.1:####/axis/services/</code> where <code>####</code>
-    * is the {@link #getAxisServerSocketPort() Axis port number} and <code>axis</code> is
-    * the {@link #getAxisContextName() Axis context name}.
-    *
-    * @return base URL for all web services hosted in the embedded Axis server
-    */
-   protected URL getAxisBaseUrl(  )
-   {
-      try
-      {
-         return new URL( "http",
-                         "127.0.0.1",
-                         m_simpleAxisServer.getServerSocket(  ).getLocalPort(  ),
-                         "/" + getAxisContextName(  ) + "/services/" );
-      }
-      catch ( MalformedURLException murle )
-      { // should never occur - throw error so as not to force a throws clause in signature
-         throw new AssertionFailedError( murle.toString(  ) );
-      }
-   }
-
-   /**
-    * Returns the full directory path containing the WSDD configuration file(s).
-    * This is the base path that is prepended to the
-    * {@link #getAxisConfigFileName() configuration file name}.
-    * <p/>
-    * Subclasses may override this method if the default is not acceptable. The
-    * default is the current directory as defined by the system property
-    * <code>user.dir</code>.
-    *
-    * @return filename of the WSDD configuration file
-    */
-   protected String getAxisConfigBasePath(  )
-   {
-      return System.getProperty( "user.dir" );
-   }
-
-   /**
-    * Returns the filename of the actual Axis WSDD configuration file, excluding
-    * all directory paths.
-    * <p/>
-    * Subclasses may override this method if the default is not acceptable. The
-    * default is <code>server-config.wsdd</code>.
-    *
-    * @return filename of the WSDD configuration file
-    */
-   protected String getAxisConfigFileName(  )
-   {
-      return "server-config.wsdd";
-   }
-
-   /**
-    * Returns the context name of the Axis servlet for use within an endpoint URL.
-    *
-    * @return context name of the Axis servlet
-    */
-   protected String getAxisContextName(  )
-   {
-      return "axis";
-   }
-
-   /**
-    * This setter is to allow subclasses to tell us if we should use an already existing Axis server.
-    *
-    * @param server the embedded Axis server to be used by the tests
-    */
-   protected void setAxisServer( NotSoSimpleAxisServer server )
-   {
-      m_simpleAxisServer = server;
-   }
-
-   /**
-    * @return the embedded Axis server to be used by the tests
-    */
-   protected NotSoSimpleAxisServer getAxisServer(  )
-   {
-      return m_simpleAxisServer;
-   }
-
-   /**
-    * Returns the number of the port that the embedded Axis server will accept
-    * requests on.
-    * <p/>
-    * Subclasses may override this method if the default is not acceptable. The
-    * default is <code>8080</code>.
-    *
-    * @return port number that the Axis server will listen to
-    */
-   protected int getAxisServerSocketPort(  )
-   {
-      return ANY_FREE_PORT;
-   }
-
-   /**
-    * Returns a URL used to request a WSDL document for a web service with the given name.
-    * This method uses {@link #getAxisBaseUrl()} to determine the base URL.
-    *
-    * @param serviceName the name of the web service
-    *
-    * @return URL used to request a web service WSDL document
-    *
-    * @see #getAxisBaseUrl()
-    */
-   protected URL getAxisWebServiceUrl( String serviceName )
-   {
-      try
-      {
-         return new URL( getAxisBaseUrl(  ),
-                         serviceName );
-      }
-      catch ( MalformedURLException murle )
-      { // should never occur - throw error so as not to force a throws clause in signature
-         throw new AssertionFailedError( murle.toString(  ) );
-      }
-   }
-
-   /**
-    * Returns a URL used to request a WSDL document for a web service with the given name.
-    * This method uses {@link #getAxisBaseUrl()} to determine the base URL.
-    *
-    * @param serviceName the name of the web service
-    *
-    * @return URL used to request a web service WSDL document
-    *
-    * @see #getAxisBaseUrl()
-    */
-   protected URL getAxisWebServiceWsdlUrl( String serviceName )
-   {
-      try
-      {
-         return new URL( getAxisBaseUrl(  ).toString(  ) + serviceName + "?wsdl" );
-      }
-      catch ( MalformedURLException murle )
-      { // should never occur - throw error so as not to force a throws clause in signature
-         throw new AssertionFailedError( murle.toString(  ) );
-      }
-   }
-
-   /**
-    * Reads in the Axis configuration file, creates a server socket to accept
-    * requests and then starts the embedded Axis server.
-    *
-    * @throws Exception if failed to get the configuration file, failed to start
-    *                   the server socket or failed to start the server
-    */
-   protected void startAxisServer(  )
-   throws Exception
-   {
-       FileProvider config = getFileProvider();
-       ServerSocket ss = new ServerSocket( getAxisServerSocketPort(  ) );
-      m_simpleAxisServer = new NotSoSimpleAxisServer(  );
-      m_simpleAxisServer.setServerSocket( ss );
-      m_simpleAxisServer.setMyConfig( config );
-      m_simpleAxisServer.start(  );
-   }
-
-    protected FileProvider getFileProvider() throws ConfigurationException {
-        FileProvider config = new FileProvider( getAxisConfigBasePath(  ),
-                                                getAxisConfigFileName(  ) );
-        return config;
-    }
-
-    /**
-    * Stops the embedded Axis server if it is running.
-    */
-   protected void stopAxisServer(  )
-   {
-      if ( m_simpleAxisServer != null )
-      {
-         m_simpleAxisServer.stop(  );
-         m_simpleAxisServer = null;
-      }
-   }
+/*=============================================================================*
+ *  Copyright 2004 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.util.test.axis;
+
+import junit.framework.AssertionFailedError;
+import junit.framework.TestCase;
+import org.apache.axis.ConfigurationException;
+import org.apache.axis.configuration.FileProvider;
+import org.apache.ws.util.rpc.JaxRpcConstants;
+import org.apache.ws.util.soap.SaajConstants;
+import java.net.MalformedURLException;
+import java.net.ServerSocket;
+import java.net.URL;
+
+/**
+ * Provides some conviencence functionality for easier testing of web services.
+ * Methods provided by this JUnit test case superclass will allow an embedded
+ * Axis server to be started and stopped.
+ *
+ * @author mazz
+ */
+public abstract class AbstractAxisTestCase
+   extends TestCase
+{
+   private static final int ANY_FREE_PORT = 0;
+
+   /*
+    * Make sure JAX-RPC and SAAJ factories all are set to Axis' impls.
+    */
+   static
+   {
+      System.setProperty( JaxRpcConstants.SYSPROP_SERVICE_FACTORY, JaxRpcConstants.IMPL_SERVICE_FACTORY_AXIS );
+      System.setProperty( SaajConstants.SYSPROP_SOAP_FACTORY, SaajConstants.IMPL_SOAP_FACTORY_AXIS );
+      System.setProperty( SaajConstants.SYSPROP_MESSAGE_FACTORY, SaajConstants.IMPL_MESSAGE_FACTORY_AXIS );
+      System.setProperty( SaajConstants.SYSPROP_SOAP_CONNECTION_FACTORY,
+                          SaajConstants.IMPL_SOAP_CONNECTION_FACTORY_AXIS );
+      System.setProperty( SaajConstants.SYSPROP_SOAP_ELEMENT_FACTORY, SaajConstants.IMPL_SOAP_ELEMENT_FACTORY_AXIS );
+   }
+
+   /**
+    * This constant is used for enabling/disabling the use of the embedded axis server.
+    */
+   public boolean RUN_AXIS_SERVER = true;
+
+   /**
+    * the embedded Axis server
+    */
+   private NotSoSimpleAxisServer m_simpleAxisServer;
+
+   /**
+    * @see TestCase#TestCase()
+    */
+   public AbstractAxisTestCase(  )
+   {
+      super(  );
+   }
+
+   /**
+    * Enables/Disables the running of the Axis server. The DEFAULT is true (run Axis server)
+    *
+    * The reason for adding this is to allow derived test cases which can either use the underlying SimpleAxisServer
+    * or "turn-off" that functionality and hit a runnign instance.
+    *
+    * @param runServer
+    */
+   public AbstractAxisTestCase( boolean runServer )
+   {
+      RUN_AXIS_SERVER = runServer;
+   }
+
+   /**
+    * @see TestCase#TestCase(String)
+    */
+   public AbstractAxisTestCase( String name )
+   {
+      super( name );
+   }
+
+   /**
+    * Returns the base URL used to contact the Axis server.  To access a web service hosted inside
+    * of the embedded Axis server, append the name of the web service to this base URL.
+    * <p/>
+    * Subclasses may override this method if the default is not acceptable. The
+    * default is <code>http://127.0.0.1:####/axis/services/</code> where <code>####</code>
+    * is the {@link #getAxisServerSocketPort() Axis port number} and <code>axis</code> is
+    * the {@link #getAxisContextName() Axis context name}.
+    *
+    * @return base URL for all web services hosted in the embedded Axis server
+    */
+   protected URL getAxisBaseUrl(  )
+   {
+      try
+      {
+         return new URL( "http",
+                         "127.0.0.1",
+                         m_simpleAxisServer.getServerSocket(  ).getLocalPort(  ),
+                         "/" + getAxisContextName(  ) + "/services/" );
+      }
+      catch ( MalformedURLException murle )
+      { // should never occur - throw error so as not to force a throws clause in signature
+         throw new AssertionFailedError( murle.toString(  ) );
+      }
+   }
+
+   /**
+    * Returns the full directory path containing the WSDD configuration file(s).
+    * This is the base path that is prepended to the
+    * {@link #getAxisConfigFileName() configuration file name}.
+    * <p/>
+    * Subclasses may override this method if the default is not acceptable. The
+    * default is the current directory as defined by the system property
+    * <code>user.dir</code>.
+    *
+    * @return filename of the WSDD configuration file
+    */
+   protected String getAxisConfigBasePath(  )
+   {
+      return System.getProperty( "user.dir" );
+   }
+
+   /**
+    * Returns the filename of the actual Axis WSDD configuration file, excluding
+    * all directory paths.
+    * <p/>
+    * Subclasses may override this method if the default is not acceptable. The
+    * default is <code>server-config.wsdd</code>.
+    *
+    * @return filename of the WSDD configuration file
+    */
+   protected String getAxisConfigFileName(  )
+   {
+      return "server-config.wsdd";
+   }
+
+   /**
+    * Returns the context name of the Axis servlet for use within an endpoint URL.
+    *
+    * @return context name of the Axis servlet
+    */
+   protected String getAxisContextName(  )
+   {
+      return "axis";
+   }
+
+   /**
+    * This setter is to allow subclasses to tell us if we should use an already existing Axis server.
+    *
+    * @param server the embedded Axis server to be used by the tests
+    */
+   protected void setAxisServer( NotSoSimpleAxisServer server )
+   {
+      m_simpleAxisServer = server;
+   }
+
+   /**
+    * @return the embedded Axis server to be used by the tests
+    */
+   protected NotSoSimpleAxisServer getAxisServer(  )
+   {
+      return m_simpleAxisServer;
+   }
+
+   /**
+    * Returns the number of the port that the embedded Axis server will accept
+    * requests on.
+    * <p/>
+    * Subclasses may override this method if the default is not acceptable. The
+    * default is <code>8080</code>.
+    *
+    * @return port number that the Axis server will listen to
+    */
+   protected int getAxisServerSocketPort(  )
+   {
+      return ANY_FREE_PORT;
+   }
+
+   /**
+    * Returns a URL used to request a WSDL document for a web service with the given name.
+    * This method uses {@link #getAxisBaseUrl()} to determine the base URL.
+    *
+    * @param serviceName the name of the web service
+    *
+    * @return URL used to request a web service WSDL document
+    *
+    * @see #getAxisBaseUrl()
+    */
+   protected URL getAxisWebServiceUrl( String serviceName )
+   {
+      try
+      {
+         return new URL( getAxisBaseUrl(  ),
+                         serviceName );
+      }
+      catch ( MalformedURLException murle )
+      { // should never occur - throw error so as not to force a throws clause in signature
+         throw new AssertionFailedError( murle.toString(  ) );
+      }
+   }
+
+   /**
+    * Returns a URL used to request a WSDL document for a web service with the given name.
+    * This method uses {@link #getAxisBaseUrl()} to determine the base URL.
+    *
+    * @param serviceName the name of the web service
+    *
+    * @return URL used to request a web service WSDL document
+    *
+    * @see #getAxisBaseUrl()
+    */
+   protected URL getAxisWebServiceWsdlUrl( String serviceName )
+   {
+      try
+      {
+         return new URL( getAxisBaseUrl(  ).toString(  ) + serviceName + "?wsdl" );
+      }
+      catch ( MalformedURLException murle )
+      { // should never occur - throw error so as not to force a throws clause in signature
+         throw new AssertionFailedError( murle.toString(  ) );
+      }
+   }
+
+   /**
+    * DOCUMENT_ME
+    *
+    * @return DOCUMENT_ME
+    *
+    * @throws ConfigurationException DOCUMENT_ME
+    */
+   protected FileProvider getFileProvider(  )
+   throws ConfigurationException
+   {
+      FileProvider config = new FileProvider( getAxisConfigBasePath(  ),
+                                              getAxisConfigFileName(  ) );
+      return config;
+   }
+
+   /**
+    * Reads in the Axis configuration file, creates a server socket to accept
+    * requests and then starts the embedded Axis server.
+    *
+    * @throws Exception if failed to get the configuration file, failed to start
+    *                   the server socket or failed to start the server
+    */
+   protected void startAxisServer(  )
+   throws Exception
+   {
+      FileProvider config = getFileProvider(  );
+      ServerSocket ss = new ServerSocket( getAxisServerSocketPort(  ) );
+      m_simpleAxisServer = new NotSoSimpleAxisServer(  );
+      m_simpleAxisServer.setServerSocket( ss );
+      m_simpleAxisServer.setMyConfig( config );
+      m_simpleAxisServer.start(  );
+   }
+
+   /**
+    * Stops the embedded Axis server if it is running.
+    */
+   protected void stopAxisServer(  )
+   {
+      if ( m_simpleAxisServer != null )
+      {
+         m_simpleAxisServer.stop(  );
+         m_simpleAxisServer = null;
+      }
+   }
 }

Modified: webservices/wsrf/trunk/src/java/org/apache/ws/util/test/axis/AbstractMultipleAxisTestCase.java
URL: http://svn.apache.org/viewcvs/webservices/wsrf/trunk/src/java/org/apache/ws/util/test/axis/AbstractMultipleAxisTestCase.java?rev=227033&r1=227032&r2=227033&view=diff
==============================================================================
--- webservices/wsrf/trunk/src/java/org/apache/ws/util/test/axis/AbstractMultipleAxisTestCase.java (original)
+++ webservices/wsrf/trunk/src/java/org/apache/ws/util/test/axis/AbstractMultipleAxisTestCase.java Tue Aug  2 09:28:49 2005
@@ -1,82 +1,85 @@
-/*=============================================================================*
- *  Copyright 2004 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.util.test.axis;
-
-import junit.framework.TestCase;
-
-/**
- * A JUnit test case superclass that will setup each individual test with its own
- * Axis server.  Multiple Axis servers will be started/stopped - one per test method.
- *
- * @author mazz
- */
-public abstract class AbstractMultipleAxisTestCase
-   extends AbstractAxisTestCase
-{
-   /**
-    * @see AbstractAxisTestCase#AbstractAxisTestCase()
-    */
-   public AbstractMultipleAxisTestCase(  )
-   {
-       super();
-   }
-
-   /**
-    * @see AbstractAxisTestCase#AbstractAxisTestCase(boolean)
-   */
-   public AbstractMultipleAxisTestCase(boolean runServer )
-   {
-       super(runServer);       
-   }
-
-   /**
-    * @see AbstractAxisTestCase#AbstractAxisTestCase(String)
-    */
-   public AbstractMultipleAxisTestCase( String name )
-   {
-      super( name );
-   }
-
-   /**
-    * Starts the embedded Axis server.
-    *
-    * @see TestCase#setUp()
-    */
-   protected void setUp(  )
-   throws Exception
-   {
-      super.setUp(  );
-       //see if server should be run
-       if (RUN_AXIS_SERVER) {
-           startAxisServer(  );
-       }
-   }
-
-   /**
-    * Stops the embedded Axis server.
-    *
-    * @see TestCase#tearDown()
-    */
-   protected void tearDown(  )
-   throws Exception
-   {
-      super.tearDown(  );
-       //see if server was running before teardown
-       if (RUN_AXIS_SERVER) {
-           stopAxisServer(  );
-       }
-   }
+/*=============================================================================*
+ *  Copyright 2004 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.util.test.axis;
+
+
+/**
+ * A JUnit test case superclass that will setup each individual test with its own
+ * Axis server.  Multiple Axis servers will be started/stopped - one per test method.
+ *
+ * @author mazz
+ */
+public abstract class AbstractMultipleAxisTestCase
+   extends AbstractAxisTestCase
+{
+   /**
+    * @see AbstractAxisTestCase#AbstractAxisTestCase()
+    */
+   public AbstractMultipleAxisTestCase(  )
+   {
+      super(  );
+   }
+
+   /**
+    * @see AbstractAxisTestCase#AbstractAxisTestCase(boolean)
+    */
+   public AbstractMultipleAxisTestCase( boolean runServer )
+   {
+      super( runServer );
+   }
+
+   /**
+    * @see AbstractAxisTestCase#AbstractAxisTestCase(String)
+    */
+   public AbstractMultipleAxisTestCase( String name )
+   {
+      super( name );
+   }
+
+   /**
+    * Starts the embedded Axis server.
+    *
+    * @see TestCase#setUp()
+    */
+   protected void setUp(  )
+   throws Exception
+   {
+      super.setUp(  );
+
+      //see if server should be run
+      if ( RUN_AXIS_SERVER )
+      {
+         startAxisServer(  );
+      }
+   }
+
+   /**
+    * Stops the embedded Axis server.
+    *
+    * @see TestCase#tearDown()
+    */
+   protected void tearDown(  )
+   throws Exception
+   {
+      super.tearDown(  );
+
+      //see if server was running before teardown
+      if ( RUN_AXIS_SERVER )
+      {
+         stopAxisServer(  );
+      }
+   }
 }

Modified: webservices/wsrf/trunk/src/java/org/apache/ws/util/test/axis/AbstractNoAxisTestCase.java
URL: http://svn.apache.org/viewcvs/webservices/wsrf/trunk/src/java/org/apache/ws/util/test/axis/AbstractNoAxisTestCase.java?rev=227033&r1=227032&r2=227033&view=diff
==============================================================================
--- webservices/wsrf/trunk/src/java/org/apache/ws/util/test/axis/AbstractNoAxisTestCase.java (original)
+++ webservices/wsrf/trunk/src/java/org/apache/ws/util/test/axis/AbstractNoAxisTestCase.java Tue Aug  2 09:28:49 2005
@@ -1,36 +1,36 @@
-/*=============================================================================*
- *  Copyright 2004 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.util.test.axis;
-
-
-/**
- * For running tests against an Axis instance running in another JVM (i.e. under Tomcat).
- *
- * @author Ian P. Springer
- */
-public abstract class AbstractNoAxisTestCase
-   extends AbstractAxisTestCase
-{
-   /**
-    * Context is wsrf when not running under a {@link org.apache.axis.transport.http.SimpleAxisServer}.
-    *
-    * @return "wsrf"
-    */
-   protected String getAxisContextName(  )
-   {
-      return "wsrf";
-   }
+/*=============================================================================*
+ *  Copyright 2004 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.util.test.axis;
+
+
+/**
+ * For running tests against an Axis instance running in another JVM (i.e. under Tomcat).
+ *
+ * @author Ian P. Springer
+ */
+public abstract class AbstractNoAxisTestCase
+   extends AbstractAxisTestCase
+{
+   /**
+    * Context is wsrf when not running under a {@link org.apache.axis.transport.http.SimpleAxisServer}.
+    *
+    * @return "wsrf"
+    */
+   protected String getAxisContextName(  )
+   {
+      return "wsrf";
+   }
 }

Modified: webservices/wsrf/trunk/src/java/org/apache/ws/util/test/axis/AbstractOneAxisTestCase.java
URL: http://svn.apache.org/viewcvs/webservices/wsrf/trunk/src/java/org/apache/ws/util/test/axis/AbstractOneAxisTestCase.java?rev=227033&r1=227032&r2=227033&view=diff
==============================================================================
--- webservices/wsrf/trunk/src/java/org/apache/ws/util/test/axis/AbstractOneAxisTestCase.java (original)
+++ webservices/wsrf/trunk/src/java/org/apache/ws/util/test/axis/AbstractOneAxisTestCase.java Tue Aug  2 09:28:49 2005
@@ -1,192 +1,192 @@
-/*=============================================================================*
- *  Copyright 2004 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.util.test.axis;
-
-import junit.framework.Test;
-import junit.framework.TestCase;
-import java.lang.reflect.Method;
-import java.lang.reflect.Modifier;
-import java.util.Vector;
-
-/**
- * A JUnit test case superclass that will setup one global Axis server for use across all
- * individual test methods.  An embedded Axis server is started before the
- * first test is run and that one Axis server remains running until the last test completes
- * its run at which time the Axis server is stopped.
- *
- * @author Ian P. Springer
- */
-public abstract class AbstractOneAxisTestCase
-   extends AbstractAxisTestCase
-{
-   /** number of test methods that have been run (static since JUnit creates one instance of this class per test method) */
-   private static int s_testsRun = 0;
-
-   /** total number of test methods found in the test case (static since JUnit creates one instance of this class per test method) */
-   private static int s_testCount = 0;
-
-   /** axis server for use across all tests in the test case (static since JUnit creates one instance of this class per test method) */
-   private static NotSoSimpleAxisServer s_simpleAxisServer;
-
-   /**
-    * @see AbstractAxisTestCase#AbstractAxisTestCase()
-    */
-   public AbstractOneAxisTestCase(  )
-   {
-      super(  );
-   }
-
-    /**
-     * @see AbstractAxisTestCase#AbstractAxisTestCase(boolean)
-     */
-    protected AbstractOneAxisTestCase(boolean runServer)
-    {
-        super(runServer);
-    }
-
-   /**
-    * @see AbstractAxisTestCase#AbstractAxisTestCase(String)
-    */
-   public AbstractOneAxisTestCase( String name )
-   {
-      super( name );
-   }
-
-   /**
-    * Starts the embedded Axis server iff this is the first test being run within this test case.
-    *
-    * @see TestCase#setUp()
-    */
-   protected void setUp(  )
-   throws Exception
-   {
-      super.setUp(  );
-
-      //this check determines if the Axis server should be started.
-      if(RUN_AXIS_SERVER)
-      {
-      if ( s_testsRun++ == 0 )
-      {
-         startAxisServer(  );
-         s_simpleAxisServer = getAxisServer(  );
-      }
-      else
-      {
-         // a prior test method was run so the Axis server is already started, reuse it
-         setAxisServer( s_simpleAxisServer );
-      }
-      }
-   }
-
-   /**
-    * Stops the embedded Axis server after the last test within this test case has finished running.
-    *
-    * @see TestCase#tearDown()
-    */
-   protected void tearDown(  )
-   throws Exception
-   {
-      super.tearDown(  );
-      if ( s_testsRun == getTestCount(  ) )
-      {
-         //this check determines if the Axis server WAS started.
-        if(RUN_AXIS_SERVER)
-        {
-         stopAxisServer(  );
-         s_simpleAxisServer    = null;
-        }
-         // reset the counters to prepare for the next test case
-         s_testsRun     = 0;
-         s_testCount    = 0;
-      }
-   }
-
-   /**
-    * Returns the number of tests in this TestCase.
-    *
-    * @return the number of tests in this TestCase
-    */
-   private int getTestCount(  )
-   {
-      if ( s_testCount == 0 )
-      {
-         s_testCount = countTests( this.getClass(  ) );
-      }
-
-      return s_testCount;
-   }
-
-   /**
-    * Examines the given <code>Method</code> and returns <code>true</code> if it is a JUnit test method.
-    *
-    * A method is considered a test method if all of the following are <code>true</code>:
-    * <ol>
-    *    <li>The method's name starts with "test"</li>
-    *    <li>The method takes 0 parameters</li>
-    *    <li>The method returns "void"</li>
-    *    <li>The method is public</li>
-    * </ol>
-    *
-    * @param m the method to check
-    *
-    * @return <code>true</code> if the given method is a JUnit test method; <code>false</code> otherwise
-    */
-   private boolean isTestMethod( Method m )
-   {
-      String  name       = m.getName(  );
-      Class[] parameters = m.getParameterTypes(  );
-      Class   returnType = m.getReturnType(  );
-      boolean is_public  = Modifier.isPublic( m.getModifiers(  ) );
-
-      return ( parameters.length == 0 ) && name.startsWith( "test" ) && returnType.equals( Void.TYPE )
-             && is_public;
-   }
-
-   /**
-    * Counts the test methods in the specified JUnit TestCase class.
-    *
-    * @param testCaseClass a JUnit TestCase class
-    *
-    * @return the number of test methods in the specified TestCase class
-    *
-    * @see #isTestMethod(Method)
-    */
-   private int countTests( final Class testCaseClass )
-   {
-      Class  superClass = testCaseClass;
-      Vector tests = new Vector(  );
-
-      while ( Test.class.isAssignableFrom( superClass ) )
-      {
-         Method[] methods = superClass.getDeclaredMethods(  );
-
-         for ( int i = 0; i < methods.length; i++ )
-         {
-            if ( !tests.contains( methods[i].getName(  ) ) )
-            {
-               if ( isTestMethod( methods[i] ) )
-               {
-                  tests.add( methods[i].getName(  ) );
-               }
-            }
-         }
-
-         superClass = superClass.getSuperclass(  );
-      }
-
-      return tests.size(  );
-   }
+/*=============================================================================*
+ *  Copyright 2004 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.util.test.axis;
+
+import junit.framework.Test;
+import java.lang.reflect.Method;
+import java.lang.reflect.Modifier;
+import java.util.Vector;
+
+/**
+ * A JUnit test case superclass that will setup one global Axis server for use across all
+ * individual test methods.  An embedded Axis server is started before the
+ * first test is run and that one Axis server remains running until the last test completes
+ * its run at which time the Axis server is stopped.
+ *
+ * @author Ian P. Springer
+ */
+public abstract class AbstractOneAxisTestCase
+   extends AbstractAxisTestCase
+{
+   /** number of test methods that have been run (static since JUnit creates one instance of this class per test method) */
+   private static int s_testsRun = 0;
+
+   /** total number of test methods found in the test case (static since JUnit creates one instance of this class per test method) */
+   private static int s_testCount = 0;
+
+   /** axis server for use across all tests in the test case (static since JUnit creates one instance of this class per test method) */
+   private static NotSoSimpleAxisServer s_simpleAxisServer;
+
+   /**
+    * @see AbstractAxisTestCase#AbstractAxisTestCase()
+    */
+   public AbstractOneAxisTestCase(  )
+   {
+      super(  );
+   }
+
+   /**
+    * @see AbstractAxisTestCase#AbstractAxisTestCase(String)
+    */
+   public AbstractOneAxisTestCase( String name )
+   {
+      super( name );
+   }
+
+   /**
+    * @see AbstractAxisTestCase#AbstractAxisTestCase(boolean)
+    */
+   protected AbstractOneAxisTestCase( boolean runServer )
+   {
+      super( runServer );
+   }
+
+   /**
+    * Starts the embedded Axis server iff this is the first test being run within this test case.
+    *
+    * @see TestCase#setUp()
+    */
+   protected void setUp(  )
+   throws Exception
+   {
+      super.setUp(  );
+
+      //this check determines if the Axis server should be started.
+      if ( RUN_AXIS_SERVER )
+      {
+         if ( s_testsRun++ == 0 )
+         {
+            startAxisServer(  );
+            s_simpleAxisServer = getAxisServer(  );
+         }
+         else
+         {
+            // a prior test method was run so the Axis server is already started, reuse it
+            setAxisServer( s_simpleAxisServer );
+         }
+      }
+   }
+
+   /**
+    * Stops the embedded Axis server after the last test within this test case has finished running.
+    *
+    * @see TestCase#tearDown()
+    */
+   protected void tearDown(  )
+   throws Exception
+   {
+      super.tearDown(  );
+      if ( s_testsRun == getTestCount(  ) )
+      {
+         //this check determines if the Axis server WAS started.
+         if ( RUN_AXIS_SERVER )
+         {
+            stopAxisServer(  );
+            s_simpleAxisServer = null;
+         }
+
+         // reset the counters to prepare for the next test case
+         s_testsRun     = 0;
+         s_testCount    = 0;
+      }
+   }
+
+   /**
+    * Returns the number of tests in this TestCase.
+    *
+    * @return the number of tests in this TestCase
+    */
+   private int getTestCount(  )
+   {
+      if ( s_testCount == 0 )
+      {
+         s_testCount = countTests( this.getClass(  ) );
+      }
+
+      return s_testCount;
+   }
+
+   /**
+    * Examines the given <code>Method</code> and returns <code>true</code> if it is a JUnit test method.
+    *
+    * A method is considered a test method if all of the following are <code>true</code>:
+    * <ol>
+    *    <li>The method's name starts with "test"</li>
+    *    <li>The method takes 0 parameters</li>
+    *    <li>The method returns "void"</li>
+    *    <li>The method is public</li>
+    * </ol>
+    *
+    * @param m the method to check
+    *
+    * @return <code>true</code> if the given method is a JUnit test method; <code>false</code> otherwise
+    */
+   private boolean isTestMethod( Method m )
+   {
+      String  name       = m.getName(  );
+      Class[] parameters = m.getParameterTypes(  );
+      Class   returnType = m.getReturnType(  );
+      boolean is_public  = Modifier.isPublic( m.getModifiers(  ) );
+
+      return ( parameters.length == 0 ) && name.startsWith( "test" ) && returnType.equals( Void.TYPE )
+             && is_public;
+   }
+
+   /**
+    * Counts the test methods in the specified JUnit TestCase class.
+    *
+    * @param testCaseClass a JUnit TestCase class
+    *
+    * @return the number of test methods in the specified TestCase class
+    *
+    * @see #isTestMethod(Method)
+    */
+   private int countTests( final Class testCaseClass )
+   {
+      Class  superClass = testCaseClass;
+      Vector tests = new Vector(  );
+
+      while ( Test.class.isAssignableFrom( superClass ) )
+      {
+         Method[] methods = superClass.getDeclaredMethods(  );
+
+         for ( int i = 0; i < methods.length; i++ )
+         {
+            if ( !tests.contains( methods[i].getName(  ) ) )
+            {
+               if ( isTestMethod( methods[i] ) )
+               {
+                  tests.add( methods[i].getName(  ) );
+               }
+            }
+         }
+
+         superClass = superClass.getSuperclass(  );
+      }
+
+      return tests.size(  );
+   }
 }



Mime
View raw message