You are viewing a plain text version of this content. The canonical link for it is here.
Posted to axis-cvs@ws.apache.org by he...@apache.org on 2004/06/27 17:20:24 UTC

cvs commit: ws-axis/contrib/ews/src/org/apache/geronimo/ews/ws4j2ee/utils/packager/load EARPackageModule.java WARPackageModule.java

hemapani    2004/06/27 08:20:24

  Modified:    contrib/ews/src/org/apache/geronimo/ews/ws4j2ee/context/impl
                        JaxRpcMapperImpl.java
               contrib/ews/src/org/apache/geronimo/ews/ws4j2ee/toWs
                        GenerationConstants.java
                        UnrecoverableGenerationFault.java
               contrib/ews/src/org/apache/geronimo/ews/ws4j2ee/toWs/ejb
                        EJBDDWriter.java
               contrib/ews/src/org/apache/geronimo/ews/ws4j2ee/toWs/handlers
                        HandlerWriter.java
               contrib/ews/src/org/apache/geronimo/ews/ws4j2ee/toWs/misc
                        BuildFileGenerator.java
               contrib/ews/src/org/apache/geronimo/ews/ws4j2ee/toWs/wrapperWs
                        WebEndpointWrapperClassWriter.java
               contrib/ews/src/org/apache/geronimo/ews/ws4j2ee/toWs/ws
                        J2eeDeployWriter.java
               contrib/ews/src/org/apache/geronimo/ews/ws4j2ee/utils
                        AntExecuter.java UncompressingJarClassLoader.java
                        Utils.java
               contrib/ews/src/org/apache/geronimo/ews/ws4j2ee/utils/packager
                        JARFile.java
               contrib/ews/src/org/apache/geronimo/ews/ws4j2ee/utils/packager/load
                        EARPackageModule.java WARPackageModule.java
  Added:       contrib/ews/src/org/apache/geronimo/ews/ws4j2ee/toWs
                        Ws4J2eeProperties.java
  Log:
  fix the run the runing ant programatically
  
  Revision  Changes    Path
  1.6       +3 -2      ws-axis/contrib/ews/src/org/apache/geronimo/ews/ws4j2ee/context/impl/JaxRpcMapperImpl.java
  
  Index: JaxRpcMapperImpl.java
  ===================================================================
  RCS file: /home/cvs/ws-axis/contrib/ews/src/org/apache/geronimo/ews/ws4j2ee/context/impl/JaxRpcMapperImpl.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- JaxRpcMapperImpl.java	10 Jun 2004 11:35:19 -0000	1.5
  +++ JaxRpcMapperImpl.java	27 Jun 2004 15:20:23 -0000	1.6
  @@ -161,8 +161,9 @@
   			  }
   		  }
           }
  -        
  -        return Utils.jni2javaName(returnType);
  +        return returnType;
  +       // fixed inside 
  +       // return Utils.jni2javaName(returnType);
       }
   	
   			
  
  
  
  1.12      +5 -25     ws-axis/contrib/ews/src/org/apache/geronimo/ews/ws4j2ee/toWs/GenerationConstants.java
  
  Index: GenerationConstants.java
  ===================================================================
  RCS file: /home/cvs/ws-axis/contrib/ews/src/org/apache/geronimo/ews/ws4j2ee/toWs/GenerationConstants.java,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- GenerationConstants.java	22 Jun 2004 09:13:43 -0000	1.11
  +++ GenerationConstants.java	27 Jun 2004 15:20:23 -0000	1.12
  @@ -104,9 +104,9 @@
   	public static final String EJB_DEPLOY_DIR =  "ejb-deploy";
   	
   	
  -	private static Properties properties;
  -	public static Properties getProperties(){
  -		return properties;
  +	private static Ws4J2eeProperties properties = new Ws4J2eeProperties();
  +	public static String getProperty(String key){
  +		return properties.getProperty(key);
   	}
   
   	/** j2ee Container DDs */
  @@ -126,26 +126,6 @@
   	public static final String USE_INTERNALS = "use-internals"; 
   	public static final String USE_LOCAL_AND_REMOTE = "use-local-remote"; 
   	
  -	static{
  -		InputStream proIn = null;
  -		try{
  -			properties = new Properties();
  -			proIn = GenerationConstants.class.getResourceAsStream(WS4J2EE_PROPERTY_FILE);
  -			if(proIn == null){
  -				proIn = GenerationConstants.class.getResourceAsStream("META-INF/"+WS4J2EE_PROPERTY_FILE);
  -			}
  -			if(proIn == null){
  -				proIn = new FileInputStream("conf/"+WS4J2EE_PROPERTY_FILE);
  -			}
  -			if(proIn == null){
  -				proIn = new FileInputStream(WS4J2EE_PROPERTY_FILE);
  -			}
  -			if(proIn != null){
  -				properties.load(proIn);
  -			}
  -		}catch(Exception e){
  -			e.printStackTrace();
  -		}
  -	}
  - 
  +	public static final String CONFIG_STORE = "target/configStore";
  +	public static final String MAVEN_LOCAL_REPOSITARY = "maven.repo.local";
   }
  
  
  
  1.2       +17 -0     ws-axis/contrib/ews/src/org/apache/geronimo/ews/ws4j2ee/toWs/UnrecoverableGenerationFault.java
  
  Index: UnrecoverableGenerationFault.java
  ===================================================================
  RCS file: /home/cvs/ws-axis/contrib/ews/src/org/apache/geronimo/ews/ws4j2ee/toWs/UnrecoverableGenerationFault.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- UnrecoverableGenerationFault.java	10 Jun 2004 11:35:19 -0000	1.1
  +++ UnrecoverableGenerationFault.java	27 Jun 2004 15:20:23 -0000	1.2
  @@ -66,6 +66,23 @@
   		super();
   	}
   
  +    /**
  +     * @param message
  +     * @param cause
  +     */
  +    public UnrecoverableGenerationFault(String message, Throwable cause) {
  +        super(message, cause);
  +        // TODO Auto-generated constructor stub
  +    }
  +
  +    /**
  +     * @param cause
  +     */
  +    public UnrecoverableGenerationFault(Throwable cause) {
  +        super(cause);
  +        // TODO Auto-generated constructor stub
  +    }
  +
   	/**
   	 * @param message 
   	 */
  
  
  
  1.1                  ws-axis/contrib/ews/src/org/apache/geronimo/ews/ws4j2ee/toWs/Ws4J2eeProperties.java
  
  Index: Ws4J2eeProperties.java
  ===================================================================
  /*
   * Copyright 2001-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.geronimo.ews.ws4j2ee.toWs;
  
  import java.io.File;
  import java.io.FileInputStream;
  import java.io.InputStream;
  import java.util.ArrayList;
  import java.util.Properties;
  
  /**
   * @author hemapani@opensource.lk
   */
  public class Ws4J2eeProperties {
  	private Properties properties;
  	/**
  	 * these a properties of the files or dir
  	 * they are checked are they really exists
  	 */
  	private ArrayList properitesToCheck; 
  	
  	public Ws4J2eeProperties(){
  		properties = new Properties();
  		properitesToCheck = new ArrayList(); 
  		properitesToCheck.add(GenerationConstants.AXIS_WEBAPPS_LIB);
  		properitesToCheck.add(GenerationConstants.EJB_DEPLOY_DIR);
  		properitesToCheck.add(GenerationConstants.MAVEN_LOCAL_REPOSITARY);
  		loadProperties();
  		checkProperties();
  	}
  	
  	public String getProperty(String key){
  		return properties.getProperty(key);
  	}
  	
  	private void checkProperties(){
  		for(int i =0;i<properitesToCheck.size();i++){
  			String key = (String)properitesToCheck.get(i);
  			String value = properties.getProperty(key);
  			if(value != null){
  				File file = new File(value);
  				if(!file.exists()){
  					properties.remove(key);
  				}
  			}
  		}
  	}
  	
  	private void loadProperties(){
  		InputStream proIn = null;
  		proIn = GenerationConstants.class.getResourceAsStream(GenerationConstants.WS4J2EE_PROPERTY_FILE);
          try {
              if(proIn == null){
  				File file = new File("conf/"+GenerationConstants.WS4J2EE_PROPERTY_FILE);
  				if(file.exists()){
  					proIn = new FileInputStream(file);				
  				}
              }
              if(proIn == null){
              	proIn = GenerationConstants.class.getResourceAsStream("META-INF/"+GenerationConstants.WS4J2EE_PROPERTY_FILE);
              }
              if(proIn == null){
              	proIn = new FileInputStream(GenerationConstants.WS4J2EE_PROPERTY_FILE);
              }
              if(proIn != null){
              	properties.load(proIn);
              }
          } catch (Exception e) {
           	throw new UnrecoverableGenerationFault(e);
          }
  	
  	}
  	
  }
  
  
  
  1.7       +1 -2      ws-axis/contrib/ews/src/org/apache/geronimo/ews/ws4j2ee/toWs/ejb/EJBDDWriter.java
  
  Index: EJBDDWriter.java
  ===================================================================
  RCS file: /home/cvs/ws-axis/contrib/ews/src/org/apache/geronimo/ews/ws4j2ee/toWs/ejb/EJBDDWriter.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- EJBDDWriter.java	27 May 2004 15:26:34 -0000	1.6
  +++ EJBDDWriter.java	27 Jun 2004 15:20:23 -0000	1.7
  @@ -101,8 +101,7 @@
   		  ejbname = ejbname.substring(index+1);
   		} 
   		String version = GenerationConstants.J2EE_VERSION_1_4; 
  -		version = GenerationConstants.getProperties()
  -			.getProperty(GenerationConstants.WS4J2EE_PROVIDER); 
  +		version = GenerationConstants.getProperty(GenerationConstants.WS4J2EE_PROVIDER); 
   
   
   		out.write("<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n");
  
  
  
  1.5       +4 -2      ws-axis/contrib/ews/src/org/apache/geronimo/ews/ws4j2ee/toWs/handlers/HandlerWriter.java
  
  Index: HandlerWriter.java
  ===================================================================
  RCS file: /home/cvs/ws-axis/contrib/ews/src/org/apache/geronimo/ews/ws4j2ee/toWs/handlers/HandlerWriter.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- HandlerWriter.java	14 Jun 2004 08:30:03 -0000	1.4
  +++ HandlerWriter.java	27 Jun 2004 15:20:24 -0000	1.5
  @@ -98,16 +98,18 @@
           if(out == null)
           	return;
           out.write("package " + packageName + ";\n");
  +		out.write("import org.apache.axis.AxisFault;\n");
  +		out.write("import org.apache.axis.MessageContext;\n");
           out.write("public class " + className + " extends org.apache.axis.handlers.BasicHandler{\n");
   
  -        out.write("\tpublic class " + className + "(){\n");
  +        out.write("\tpublic " + className + "(){\n");
           out.write("\t\tsetName(\"" + handler.getHandlerName() + "\");\n");
           out.write("\t}\n");
   
           out.write("\tpublic void init(){}\n");
           out.write("\tpublic void cleanup(){}\n");
           out.write("\tpublic void onFault(MessageContext msgContext){}\n");
  -        out.write("\tpublic abstract void invoke(MessageContext msgContext) throws AxisFault{\n");
  +        out.write("\tpublic void invoke(MessageContext msgContext) throws AxisFault{\n");
           out.write("\t\t//write your implementation here\n");
           out.write("\t}\n");
   
  
  
  
  1.10      +45 -25    ws-axis/contrib/ews/src/org/apache/geronimo/ews/ws4j2ee/toWs/misc/BuildFileGenerator.java
  
  Index: BuildFileGenerator.java
  ===================================================================
  RCS file: /home/cvs/ws-axis/contrib/ews/src/org/apache/geronimo/ews/ws4j2ee/toWs/misc/BuildFileGenerator.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- BuildFileGenerator.java	22 Jun 2004 09:13:44 -0000	1.9
  +++ BuildFileGenerator.java	27 Jun 2004 15:20:24 -0000	1.10
  @@ -55,6 +55,13 @@
    
    package org.apache.geronimo.ews.ws4j2ee.toWs.misc;
   
  +import java.io.File;
  +import java.io.FileWriter;
  +import java.io.IOException;
  +import java.io.PrintWriter;
  +import java.util.StringTokenizer;
  +import java.util.Vector;
  +
   import org.apache.axis.components.logger.LogFactory;
   import org.apache.commons.logging.Log;
   import org.apache.geronimo.ews.ws4j2ee.context.InputOutputFile;
  @@ -64,14 +71,6 @@
   import org.apache.geronimo.ews.ws4j2ee.toWs.Generator;
   import org.apache.geronimo.ews.ws4j2ee.toWs.dd.JaxrpcMapperGenerator;
   
  -import java.io.File;
  -import java.io.FileWriter;
  -import java.io.IOException;
  -import java.io.PrintWriter;
  -import java.util.Properties;
  -import java.util.StringTokenizer;
  -import java.util.Vector;
  -
   /**
    * @author Srinath Perera(hemapani@opensource.lk)
    */
  @@ -96,15 +95,19 @@
   			out.write("<?xml version=\"1.0\"?>\n");
   
   			out.write("<project basedir=\".\" default=\"dist\">\n");
  +			out.write("	<property name=\"build.sysclasspath\" value=\"last\"/>\n");
   			out.write("	<property name=\"src\" location=\".\"/>\n");
   			out.write("	<property name=\"build\" location=\"build\"/>\n");
   			out.write("	<property name=\"build.classes\" location=\"${build}/classes\"/>\n");
   			out.write("	<property name=\"build.lib\" location=\"${build}/lib\"/>\n");
   			out.write("	<property name=\"lib\" location=\"lib\"/>\n");
   
  -			out.write("	<path id=\"classpath\">\n");
  -			StringTokenizer tok = getClasspathComponets();
  +			out.write("	<path id=\"classpath\" >\n");
   			String jarfile = j2eewscontext.getMiscInfo().getJarFileName();
  +			File tempfile = new File("./target/classes");
  +			out.write("		<pathelement location=\"/"+tempfile.getAbsolutePath()+"\"/>");
  +			tempfile = new File("target/test-classes");
  +			out.write("		<pathelement location=\"/"+tempfile.getAbsolutePath()+"\"/>");
   			
   			Vector classpathelements = j2eewscontext.getMiscInfo().getClasspathElements();
   			if(classpathelements != null){
  @@ -113,11 +116,31 @@
   						+ ((File)classpathelements.get(i)).getAbsolutePath() + "\"/>\n");				
   				}
   			}
  -			while (tok.hasMoreTokens()) {
  -				out.write("		<pathelement location=\"" + tok.nextToken() + "\"/>\n");
  +
  +			String value = GenerationConstants.getProperty(GenerationConstants.MAVEN_LOCAL_REPOSITARY);
  +
  +			
  +			if(value!= null){
  +				out.write("		<fileset dir=\""+value+"\">\n");
  +				out.write("		    <include name=\"axis/**/*.jar\"/>\n");
  +				out.write("			<include name=\"geronimo-spec/**/*.jar\"/>\n");
  +				out.write("			<include name=\"geronimo/**/*.jar\"/>\n");
  +				out.write("			<include name=\"sec/**/*.jar\"/>\n");
  +				out.write("			<include name=\"dom4j/**/*.jar\"/>\n");
  +				out.write("			<include name=\"jaxb-ri/**/*.jar\"/>\n");
  +				out.write("			<include name=\"xerces/**/*.jar\"/>\n");
  +				out.write("		</fileset>\n");
  +			}else{
  +				StringTokenizer tok = getClasspathComponets();
  +				while (tok.hasMoreTokens()) {
  +					out.write("		<pathelement location=\"" + tok.nextToken() + "\"/>\n");
  +				}
   			}
  +			
  +			
   			out.write("	</path>\n");
   
  +
   			out.write("	<target name=\"compile\">\n");
   			out.write("	   <mkdir dir=\"${build.classes}\"/>\n");
   			out.write("	   <mkdir dir=\"${build.lib}\"/>\n");
  @@ -153,7 +176,10 @@
   				
   									
   			}else{
  -				out.write("		<copy file =\"${src}/META-INF/web.xml\" todir=\"${build.classes}/META-INF\"/>\n ");
  +				File file = new File(j2eewscontext.getMiscInfo().getOutPutPath()+"/WEB-INF/web.xml");
  +				if(file.exists()){
  +					out.write("		<copy file =\"${src}/WEB-INF/web.xml\" todir=\"${build.classes}/META-INF\"/>\n ");				
  +				}
   			}
   
   
  @@ -194,12 +220,11 @@
   			out.write("	<target name=\"clean\">\n");
   			out.write("		<delete dir=\"${build}\"/>\n");
   			out.write("	</target>\n");
  -
  -			Properties p = GenerationConstants.getProperties();
  -			String webappsLib = p.getProperty(GenerationConstants.AXIS_WEBAPPS_LIB);
  -			String ejbDeploy =  p.getProperty(GenerationConstants.EJB_DEPLOY_DIR);
  -			String host = p.getProperty(GenerationConstants.AXIS_HOST);
  -			String port = p.getProperty(GenerationConstants.AXIS_PORT);
  +			
  +			String webappsLib = GenerationConstants.getProperty(GenerationConstants.AXIS_WEBAPPS_LIB);
  +			String ejbDeploy =  GenerationConstants.getProperty(GenerationConstants.EJB_DEPLOY_DIR);
  +			String host = GenerationConstants.getProperty(GenerationConstants.AXIS_HOST);
  +			String port = GenerationConstants.getProperty(GenerationConstants.AXIS_PORT);
   			
   			if(jarfile != null){
   				out.write("	<target name=\"deploy\" depends=\"jar\">\n");
  @@ -239,12 +264,7 @@
   
   	private StringTokenizer getClasspathComponets() {
   		String classpath = System.getProperty("java.class.path");
  -		String spearator = ";";
  -		if (classpath.indexOf(';') < 0) {
  -			//then it is UNIX
  -			spearator = ":";
  -		}
  -
  +		String spearator = System.getProperties().getProperty("path.separator");
   		return new StringTokenizer(classpath, spearator);
   	}
   	
  
  
  
  1.7       +5 -3      ws-axis/contrib/ews/src/org/apache/geronimo/ews/ws4j2ee/toWs/wrapperWs/WebEndpointWrapperClassWriter.java
  
  Index: WebEndpointWrapperClassWriter.java
  ===================================================================
  RCS file: /home/cvs/ws-axis/contrib/ews/src/org/apache/geronimo/ews/ws4j2ee/toWs/wrapperWs/WebEndpointWrapperClassWriter.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- WebEndpointWrapperClassWriter.java	14 Jun 2004 08:30:03 -0000	1.6
  +++ WebEndpointWrapperClassWriter.java	27 Jun 2004 15:20:24 -0000	1.7
  @@ -93,6 +93,7 @@
   	protected static Log log =
   		LogFactory.getLog(WrapperWsGenerator.class.getName());
   	protected String seiName = null;
  +	private String implBean = null;
   	/**
   	 * @param j2eewscontext
   	 * @param qulifiedName
  @@ -102,6 +103,7 @@
   		throws GenerationFault {
   		super(j2eewscontext, getName(j2eewscontext) + "Impl");
   		seiName = j2eewscontext.getMiscInfo().getJaxrpcSEI();
  +		implBean = j2eewscontext.getMiscInfo().getEndpointImplbean();
   
   	}
   
  @@ -119,13 +121,13 @@
   	}
   
   	protected void writeAttributes() throws GenerationFault {
  -		out.write("private " + seiName + " bean = null;\n");
  +		out.write("private " + implBean + " bean = null;\n");
   	}
   
   	protected void writeConstructors() throws GenerationFault {
   		out.write("\tpublic " + classname + "()throws org.apache.geronimo.ews.ws4j2ee.wsutils.J2EEFault{\n");
  -		out.write("\t\tbean = ("+j2eewscontext.getMiscInfo().getEndpointImplbean()+")org.apache.geronimo.ews.ws4j2ee.wsutils.ImplBeanPool.getImplBean(\""
  -			+j2eewscontext.getMiscInfo().getEndpointImplbean()+"\");\n");
  +		out.write("\t\tbean = ("+implBean+")org.apache.geronimo.ews.ws4j2ee.wsutils.ImplBeanPool.getImplBean(\""
  +			+implBean+"\");\n");
   		out.write("\t}\n");
   	}
   
  
  
  
  1.4       +1 -2      ws-axis/contrib/ews/src/org/apache/geronimo/ews/ws4j2ee/toWs/ws/J2eeDeployWriter.java
  
  Index: J2eeDeployWriter.java
  ===================================================================
  RCS file: /home/cvs/ws-axis/contrib/ews/src/org/apache/geronimo/ews/ws4j2ee/toWs/ws/J2eeDeployWriter.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- J2eeDeployWriter.java	22 Jun 2004 09:13:43 -0000	1.3
  +++ J2eeDeployWriter.java	27 Jun 2004 15:20:24 -0000	1.4
  @@ -382,8 +382,7 @@
   
   		//get the Name of the provider needed in the deploy.wsdd
   		String provider = null;
  -		provider = GenerationConstants.getProperties()
  -			.getProperty(GenerationConstants.WS4J2EE_PROVIDER); 
  +		provider = GenerationConstants.getProperty(GenerationConstants.WS4J2EE_PROVIDER); 
   
   		while (iterator.hasNext()) {
   			Object obj = iterator.next();
  
  
  
  1.5       +22 -7     ws-axis/contrib/ews/src/org/apache/geronimo/ews/ws4j2ee/utils/AntExecuter.java
  
  Index: AntExecuter.java
  ===================================================================
  RCS file: /home/cvs/ws-axis/contrib/ews/src/org/apache/geronimo/ews/ws4j2ee/utils/AntExecuter.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- AntExecuter.java	22 Jun 2004 09:13:43 -0000	1.4
  +++ AntExecuter.java	27 Jun 2004 15:20:24 -0000	1.5
  @@ -16,8 +16,11 @@
   
   package org.apache.geronimo.ews.ws4j2ee.utils;
   
  +import java.io.File;
   
  -
  +import org.apache.tools.ant.BuildException;
  +import org.apache.tools.ant.Project;
  +import org.apache.tools.ant.taskdefs.Ant;
   
   /**
    * <p>To call this Class and execute a ant task the $JAVA_HOME/lib/tool.jar need
  @@ -29,13 +32,25 @@
       public void execute(String buildFile) throws Exception {
           //wait till the ant jar added
           try{
  -//			Class.forName("com.sun.tools.javac.Main");
  -//			org.apache.tools.ant.Main.start(
  -//				new String[] { "-f", buildFile },
  -//				null,
  -//				cl);
  -        }catch(ClassCastException e){
  +			Class.forName("com.sun.tools.javac.Main");
  +			Project project = new Project();
  +			project.init();
  +			project.setCoreLoader(null);
  +			Ant ant = new Ant();
  +			ant.setProject(project);
  +			ant.init();
  +			ant.setInheritAll(true);
  +			ant.setInheritRefs(true);
  +			File file = new File(buildFile);
  +			ant.setAntfile(file.getAbsolutePath());
  +			ant.setDir(file.getParentFile());
  +			ant.execute();        
  +		}catch(ClassCastException e){
   			System.out.println("Ant file will not be run programatcally as the " +
				"$JAVA_HOME/lib/tool.jar is not in the class path. To run the ant " +
				"prgramatically add that jar to classpath");
  +        }catch(BuildException e){
  +			System.out.println(e.getMessage() +
  +			"if it is a compile error you may not have set the mavem reposiroty " +
  +			"directory in the conf/ws4j2ee.propertites Build fill ignore the faliure");
           }
       }
   }
  
  
  
  1.2       +33 -0     ws-axis/contrib/ews/src/org/apache/geronimo/ews/ws4j2ee/utils/UncompressingJarClassLoader.java
  
  Index: UncompressingJarClassLoader.java
  ===================================================================
  RCS file: /home/cvs/ws-axis/contrib/ews/src/org/apache/geronimo/ews/ws4j2ee/utils/UncompressingJarClassLoader.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- UncompressingJarClassLoader.java	22 Jun 2004 09:13:43 -0000	1.1
  +++ UncompressingJarClassLoader.java	27 Jun 2004 15:20:24 -0000	1.2
  @@ -33,9 +33,11 @@
    * @author Srinath Perera(hemapani@opensource.lk)
    */
   public class UncompressingJarClassLoader {
  +	private static int configCount = 0; 
       private JarFile ajar;
       private byte[] data = new byte[10 * 1024];
       private Vector urls = new Vector();
  +    private String dir;
   
       public UncompressingJarClassLoader(
           String dir,
  @@ -43,6 +45,9 @@
           String classpath,
           String jarpath) {
           try {
  +        	dir = dir + "/config"+configCount+"/";
  +        	this.dir = dir;
  +			configCount++;
               ajar = new JarFile(jarFile);
               uncompress(dir, jarFile.getAbsoluteFile(), classpath, jarpath);
           } catch (Exception e) {
  @@ -125,4 +130,32 @@
       public Vector getURLs(){
       	return urls;
       }
  +    /**
  +     * @return
  +     */
  +    public static int getConfigCount() {
  +        return configCount;
  +    }
  +
  +    /**
  +     * @return
  +     */
  +    public String getDir() {
  +        return dir;
  +    }
  +
  +    /**
  +     * @param i
  +     */
  +    public static void setConfigCount(int i) {
  +        configCount = i;
  +    }
  +
  +    /**
  +     * @param string
  +     */
  +    public void setDir(String string) {
  +        dir = string;
  +    }
  +
   }
  
  
  
  1.10      +5 -0      ws-axis/contrib/ews/src/org/apache/geronimo/ews/ws4j2ee/utils/Utils.java
  
  Index: Utils.java
  ===================================================================
  RCS file: /home/cvs/ws-axis/contrib/ews/src/org/apache/geronimo/ews/ws4j2ee/utils/Utils.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- Utils.java	14 Jun 2004 08:31:15 -0000	1.9
  +++ Utils.java	27 Jun 2004 15:20:24 -0000	1.10
  @@ -916,6 +916,11 @@
   		}	
   
   	}
  +	/**
  +	 * @deprecated
  +	 * @param returnType
  +	 * @return
  +	 */
   	
   	public static String jni2javaName(String returnType){
   		if(returnType == null)
  
  
  
  1.6       +1 -2      ws-axis/contrib/ews/src/org/apache/geronimo/ews/ws4j2ee/utils/packager/JARFile.java
  
  Index: JARFile.java
  ===================================================================
  RCS file: /home/cvs/ws-axis/contrib/ews/src/org/apache/geronimo/ews/ws4j2ee/utils/packager/JARFile.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- JARFile.java	22 Jun 2004 09:13:43 -0000	1.5
  +++ JARFile.java	27 Jun 2004 15:20:24 -0000	1.6
  @@ -99,7 +99,6 @@
   
       public void addJarFile(String jarFile) throws GenerationFault {
           try {
  -			System.out.println("%%%%%%%%%%%%"+jarFile);
               JarFile file = new JarFile(jarFile);
               Enumeration e = file.entries();
               while (e.hasMoreElements()) {
  @@ -133,7 +132,7 @@
           for (; it.hasNext();) {
   
               JARFileEntry jarentry = (JARFileEntry) it.next();
  -            System.out.println(jarentry.getSource() + " adding ..");
  +            System.out.println(jarentry.getJarEntry().getName() + " adding ..");
               InputStream instream = null;
               //            File input = new File(jarentry.getSource());
   
  
  
  
  1.2       +18 -16    ws-axis/contrib/ews/src/org/apache/geronimo/ews/ws4j2ee/utils/packager/load/EARPackageModule.java
  
  Index: EARPackageModule.java
  ===================================================================
  RCS file: /home/cvs/ws-axis/contrib/ews/src/org/apache/geronimo/ews/ws4j2ee/utils/packager/load/EARPackageModule.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- EARPackageModule.java	22 Jun 2004 09:13:44 -0000	1.1
  +++ EARPackageModule.java	27 Jun 2004 15:20:24 -0000	1.2
  @@ -19,6 +19,7 @@
   import java.io.File;
   import java.util.Vector;
   
  +import org.apache.geronimo.ews.ws4j2ee.toWs.GenerationConstants;
   import org.apache.geronimo.ews.ws4j2ee.toWs.GenerationFault;
   import org.apache.geronimo.ews.ws4j2ee.utils.UncompressingJarClassLoader;
   
  @@ -38,7 +39,7 @@
           if (firstmodule) {
               cl =
                   new UncompressingJarClassLoader(
  -                    "target/temp",
  +                    GenerationConstants.CONFIG_STORE,
                       new File(zip.getName()),
                       null,
                       "");
  @@ -47,27 +48,27 @@
               getInputStreamForJarEntry(jarFile, "META-INF/webservice.xml");
   
           //TODO parse the application.xml and find the WAR and EAR files 
  -        File file = new File("target/temp");
  +        File file = new File(cl.getDir());
           String[] files = file.list();
           PackageModule module = null;
  -        for (int i = 0; i < files.length; i++) {
  -            if (files[i].endsWith(".jar")) {
  -                module =
  -                    PackageModuleFactory.createPackageModule(
  -                        "target/temp/" + files[i],
  -                        false);
  -                break;
  -            }
  -        }
  +        if(file != null){
  +			for (int i = 0; i < files.length; i++) {
  +				
  +				if (files[i].endsWith(".jar")) {
  +					module =
  +						PackageModuleFactory.createPackageModule(
  +						cl.getDir() + files[i],
  +							false);
  +					ejbJarfile = module.getEjbJarfile();		
  +					break;
  +				}
  +			}
   
  -        if (module != null) {
  -            ejbJarfile = module.getEjbJarfile();
  -        } else {
               for (int i = 0; i < files.length; i++) {
                   if (files[i].endsWith(".war")) {
                       module =
                           PackageModuleFactory.createPackageModule(
  -                            "target/temp/" + files[i],
  +							cl.getDir() + files[i],
                               false);
                       webddfile = module.getWebddfile();
                       break;
  @@ -75,7 +76,8 @@
               }
               if (module == null)
                   throw new GenerationFault("No jar module or war module find in EAR");
  -        }
  +		}
  +
   
           if (wscfFile == null && firstmodule)
               throw new GenerationFault("wscf file must not be null");
  
  
  
  1.2       +2 -1      ws-axis/contrib/ews/src/org/apache/geronimo/ews/ws4j2ee/utils/packager/load/WARPackageModule.java
  
  Index: WARPackageModule.java
  ===================================================================
  RCS file: /home/cvs/ws-axis/contrib/ews/src/org/apache/geronimo/ews/ws4j2ee/utils/packager/load/WARPackageModule.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- WARPackageModule.java	22 Jun 2004 09:13:43 -0000	1.1
  +++ WARPackageModule.java	27 Jun 2004 15:20:24 -0000	1.2
  @@ -19,6 +19,7 @@
   import java.io.File;
   import java.util.Vector;
   
  +import org.apache.geronimo.ews.ws4j2ee.toWs.GenerationConstants;
   import org.apache.geronimo.ews.ws4j2ee.toWs.GenerationFault;
   import org.apache.geronimo.ews.ws4j2ee.utils.UncompressingJarClassLoader;
   
  @@ -37,7 +38,7 @@
           if (firstmodule) {
               cl =
                   new UncompressingJarClassLoader(
  -                    "target/temp",
  +					GenerationConstants.CONFIG_STORE,
                       new File(zip.getName()),
                       "WEB-INF/classes",
                       "WEB-INF/lib");