axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hemap...@apache.org
Subject cvs commit: ws-axis/contrib/ews/src/org/apache/geronimo/ews/ws4j2ee/utils/packager/load PackageModuleFactory.java
Date Mon, 19 Jul 2004 15:40:48 GMT
hemapani    2004/07/19 08:40:48

  Modified:    contrib/ews/src/org/apache/geronimo/ews/ws4j2ee/parsers
                        EJBDDParser.java ServiceReferanceParser.java
                        WebDDParser.java
               contrib/ews/src/org/apache/geronimo/ews/ws4j2ee/parsers/impl
                        ParserFactoryImpl.java
               contrib/ews/src/org/apache/geronimo/ews/ws4j2ee/toWs
                        GenerationConstants.java GenerationFactory.java
                        Ws4J2ee.java Ws4J2eeServerCLOptionParser.java
               contrib/ews/src/org/apache/geronimo/ews/ws4j2ee/toWs/dd
                        J2EEContainerSpecificDDGenerator.java
               contrib/ews/src/org/apache/geronimo/ews/ws4j2ee/toWs/dd/geronimo
                        GeronimoDDWriter.java
               contrib/ews/src/org/apache/geronimo/ews/ws4j2ee/toWs/ejb
                        EJBDDWriter.java EJBGenerator.java
               contrib/ews/src/org/apache/geronimo/ews/ws4j2ee/toWs/impl
                        GenerationFactoryImpl.java
               contrib/ews/src/org/apache/geronimo/ews/ws4j2ee/toWs/misc
                        BuildFileGenerator.java
               contrib/ews/src/org/apache/geronimo/ews/ws4j2ee/toWs/wrapperWs/geronimo
                        InternalBasedWrapperClassWriter.java
               contrib/ews/src/org/apache/geronimo/ews/ws4j2ee/toWs/ws
                        J2eeDeployWriter.java
               contrib/ews/src/org/apache/geronimo/ews/ws4j2ee/toWs/wsdl
                        WSDLGenerator.java
               contrib/ews/src/org/apache/geronimo/ews/ws4j2ee/utils
                        AntExecuter.java Utils.java
               contrib/ews/src/org/apache/geronimo/ews/ws4j2ee/utils/packager
                        JARFile.java Packager.java
               contrib/ews/src/org/apache/geronimo/ews/ws4j2ee/utils/packager/load
                        PackageModuleFactory.java
  Added:       contrib/ews/src/org/apache/geronimo/ews/ws4j2ee/parsers
                        DomEJBDDParser.java
               contrib/ews/src/org/apache/geronimo/ews/ws4j2ee/toWs
                        Ws4J2eeDeployContext.java
               contrib/ews/src/org/apache/geronimo/ews/ws4j2ee/utils
                        PropertyStore.java
  Log:
  change the EWS to fit in to the geronimo integeration
  internal based geronimo accsess is supported
  nicer way of using EWS programatically is added
  
  Revision  Changes    Path
  1.8       +1 -0      ws-axis/contrib/ews/src/org/apache/geronimo/ews/ws4j2ee/parsers/EJBDDParser.java
  
  Index: EJBDDParser.java
  ===================================================================
  RCS file: /home/cvs/ws-axis/contrib/ews/src/org/apache/geronimo/ews/ws4j2ee/parsers/EJBDDParser.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- EJBDDParser.java	12 Jul 2004 04:14:27 -0000	1.7
  +++ EJBDDParser.java	19 Jul 2004 15:40:47 -0000	1.8
  @@ -61,6 +61,7 @@
   import javax.xml.bind.JAXBContext;
   import javax.xml.bind.Unmarshaller;
   
  +
   import org.apache.geronimo.ews.ws4j2ee.context.J2EEWebServiceContext;
   import org.apache.geronimo.ews.ws4j2ee.context.impl.EJBDDContextImpl;
   import org.apache.geronimo.ews.ws4j2ee.context.j2eeDD.EJBContext;
  
  
  
  1.4       +4 -20     ws-axis/contrib/ews/src/org/apache/geronimo/ews/ws4j2ee/parsers/ServiceReferanceParser.java
  
  Index: ServiceReferanceParser.java
  ===================================================================
  RCS file: /home/cvs/ws-axis/contrib/ews/src/org/apache/geronimo/ews/ws4j2ee/parsers/ServiceReferanceParser.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- ServiceReferanceParser.java	12 Jul 2004 04:14:27 -0000	1.3
  +++ ServiceReferanceParser.java	19 Jul 2004 15:40:47 -0000	1.4
  @@ -131,26 +131,10 @@
   	public void parse(Element refEle){	
   		ref = new ServiceReferanceImpl();
   		Element root = refEle; 
  -
  -		NodeList sevlele = root.getElementsByTagName("service-ref-name");
  -		if(sevlele.getLength()>0){
  -			ref.setServicerefName(Utils.getElementValue(sevlele.item(0)));
  -		}
  -		
  -		sevlele = root.getElementsByTagName("service-interface");
  -		if(sevlele.getLength()>0){
  -			ref.setServiceInterface(Utils.getElementValue(sevlele.item(0)));
  -		}
  -		
  -		sevlele = root.getElementsByTagName("wsdl-file");
  -		if(sevlele.getLength()>0){
  -			ref.setWsdlFile(Utils.getElementValue(sevlele.item(0)));
  -		}
  -
  -		sevlele = root.getElementsByTagName("jaxrpc-mapping-file");
  -		if(sevlele.getLength()>0){
  -			ref.setJaxrpcmappingFile(Utils.getElementValue(sevlele.item(0)));
  -		}
  +		ref.setServicerefName(Utils.getElementValue(root.getElementsByTagName("service-ref-name")));
  +		ref.setServiceInterface(Utils.getElementValue( root.getElementsByTagName("service-interface")));
  +		ref.setWsdlFile(Utils.getElementValue(root.getElementsByTagName("wsdl-file")));
  +		ref.setJaxrpcmappingFile(Utils.getElementValue(root.getElementsByTagName("jaxrpc-mapping-file")));
   	}
   	
       /**
  
  
  
  1.5       +2 -5      ws-axis/contrib/ews/src/org/apache/geronimo/ews/ws4j2ee/parsers/WebDDParser.java
  
  Index: WebDDParser.java
  ===================================================================
  RCS file: /home/cvs/ws-axis/contrib/ews/src/org/apache/geronimo/ews/ws4j2ee/parsers/WebDDParser.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- WebDDParser.java	12 Jul 2004 04:14:27 -0000	1.4
  +++ WebDDParser.java	19 Jul 2004 15:40:47 -0000	1.5
  @@ -102,11 +102,8 @@
   			NodeList sevlele = root.getElementsByTagName("servlet");
   			if(sevlele.getLength()>0){
   				Element serv = (Element)sevlele.item(0);
  -				NodeList servName = serv.getElementsByTagName("servlet-class");
  -				servletClass = Utils.getElementValue(servName.item(0));
  -				
  -				servName = serv.getElementsByTagName("servlet-name");
  -				servletName = Utils.getElementValue(servName.item(0));
  +				servletClass = Utils.getElementValue(serv.getElementsByTagName("servlet-class"));
  +				servletName = Utils.getElementValue(serv.getElementsByTagName("servlet-name"));
   			}
   			context = new WebDDContextImpl(servletClass,servletName);
   		} catch (Exception e) {
  
  
  
  1.1                  ws-axis/contrib/ews/src/org/apache/geronimo/ews/ws4j2ee/parsers/DomEJBDDParser.java
  
  Index: DomEJBDDParser.java
  ===================================================================
  /*
   * The Apache Software License, Version 1.1
   *
   *
   * Copyright (c) 2001-2004 The Apache Software Foundation.  All rights
   * reserved.
   *
   * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   *
   * 1. Redistributions of source code must retain the above copyright
   *    notice, this list of conditions and the following disclaimer.
   *
   * 2. Redistributions in binary form must reproduce the above copyright
   *    notice, this list of conditions and the following disclaimer in
   *    the documentation and/or other materials provided with the
   *    distribution.
   *
   * 3. The end-user documentation included with the redistribution,
   *    if any, must include the following acknowledgment:
   *       "This product includes software developed by the
   *        Apache Software Foundation (http://www.apache.org/)."
   *    Alternately, this acknowledgment may appear in the software itself,
   *    if and wherever such third-party acknowledgments normally appear.
   *
   * 4. The names "Axis" and "Apache Software Foundation" must
   *    not be used to endorse or promote products derived from this
   *    software without prior written permission. For written
   *    permission, please contact apache@apache.org.
   *
   * 5. Products derived from this software may not be called "Apache",
   *    nor may "Apache" appear in their name, without prior written
   *    permission of the Apache Software Foundation.
   *
   * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
   * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
   * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
   * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
   * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
   * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
   * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
   * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
   * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
   * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
   * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   * SUCH DAMAGE.
   * ====================================================================
   *
   * This software consists of voluntary contributions made by many
   * individuals on behalf of the Apache Software Foundation.  For more
   * information on the Apache Software Foundation, please see
   * <http://www.apache.org/>.
   */
  
  package org.apache.geronimo.ews.ws4j2ee.parsers;
  
  import java.io.InputStream;
  
  import javax.xml.parsers.DocumentBuilderFactory;
  
  import org.apache.geronimo.ews.ws4j2ee.context.J2EEWebServiceContext;
  import org.apache.geronimo.ews.ws4j2ee.context.impl.EJBDDContextImpl;
  import org.apache.geronimo.ews.ws4j2ee.context.j2eeDD.EJBContext;
  import org.apache.geronimo.ews.ws4j2ee.toWs.GenerationFault;
  import org.apache.geronimo.ews.ws4j2ee.utils.Utils;
  import org.w3c.dom.Document;
  import org.w3c.dom.Element;
  import org.w3c.dom.NodeList;
  
  /**
   * Parse the ejb-jar.xml file and get the name of the EJB
   * @author Srinath Perera(hemapani@opensource.lk)
   */
  public class DomEJBDDParser {
  	private J2EEWebServiceContext j2eewscontext;
  	private String ejbName = null;
  	private EJBContext context;
  
  	public DomEJBDDParser(J2EEWebServiceContext j2eewscontext) {
  		this.j2eewscontext = j2eewscontext;
  	}
  
  	public void parse(InputStream inputStream) throws GenerationFault {
  			try {
  				DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
  				dbf.setNamespaceAware(true);
  				Document doc = dbf.newDocumentBuilder().parse(inputStream);
  				Element root =  doc.getDocumentElement();
  				NodeList beaneles = root.getElementsByTagName("enterprise-beans");
  				if(beaneles.getLength()>0){
  					Element beanele = (Element)beaneles.item(0);
  					NodeList sessionList = beanele.getElementsByTagName("session");
  					if(sessionList.getLength()>0){
  						Element session = (Element)sessionList.item(0);
  						
  						String ejbName = Utils.getElementValue(session.getElementsByTagName("ejb-name"));
  						String home = Utils.getElementValue(session.getElementsByTagName("home"));
  						String remote = Utils.getElementValue(session.getElementsByTagName("remote"));
  						String ejbClass = Utils.getElementValue(session.getElementsByTagName("ejb-class"));
  
  						context = new EJBDDContextImpl(
  							ejbName,
  							ejbClass,
  							home,remote,null,null);
  					}else{
  						throw new GenerationFault("session tag not found");
  				}
  				}else{
  					throw new GenerationFault("enterprise-beans tag not found");
  				}
  			} catch (Exception e) {
  				throw GenerationFault.createGenerationFault(e);
  			}
  		}
      /**
       * @return
       */
      public EJBContext getContext() {
          return context;
      }
  
      /**
       * @param context
       */
      public void setContext(EJBContext context) {
          this.context = context;
      }
  
  }
  
  
  
  1.2       +2 -2      ws-axis/contrib/ews/src/org/apache/geronimo/ews/ws4j2ee/parsers/impl/ParserFactoryImpl.java
  
  Index: ParserFactoryImpl.java
  ===================================================================
  RCS file: /home/cvs/ws-axis/contrib/ews/src/org/apache/geronimo/ews/ws4j2ee/parsers/impl/ParserFactoryImpl.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- ParserFactoryImpl.java	12 Jul 2004 04:14:28 -0000	1.1
  +++ ParserFactoryImpl.java	19 Jul 2004 15:40:47 -0000	1.2
  @@ -25,7 +25,7 @@
   import org.apache.geronimo.ews.ws4j2ee.context.webservices.server.WSCFContextImpl;
   import org.apache.geronimo.ews.ws4j2ee.context.webservices.server.WSCFException;
   import org.apache.geronimo.ews.ws4j2ee.context.webservices.server.interfaces.WSCFContext;
  -import org.apache.geronimo.ews.ws4j2ee.parsers.EJBDDParser;
  +import org.apache.geronimo.ews.ws4j2ee.parsers.DomEJBDDParser;
   import org.apache.geronimo.ews.ws4j2ee.parsers.ParserFactory;
   import org.apache.geronimo.ews.ws4j2ee.parsers.ServiceReferanceParser;
   import org.apache.geronimo.ews.ws4j2ee.parsers.WebDDParser;
  @@ -46,7 +46,7 @@
           J2EEWebServiceContext context,
           InputStream inputStream)
           throws GenerationFault {
  -			EJBDDParser ejbDDparser = new EJBDDParser(context);
  +			DomEJBDDParser ejbDDparser = new DomEJBDDParser(context);
   			ejbDDparser.parse(inputStream);
           	return ejbDDparser.getContext();
       }
  
  
  
  1.14      +5 -5      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.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- GenerationConstants.java	7 Jul 2004 09:02:00 -0000	1.13
  +++ GenerationConstants.java	19 Jul 2004 15:40:47 -0000	1.14
  @@ -91,7 +91,7 @@
   
       public static final String J2EE_CONTAINER_DD = "j2ee-container-dd";
       public static final String WS4J2EE_PROPERTY_FILE = "ws4j2ee.properties";
  -	public static final String WS4J2EE_PROVIDER =  "ws4j2ee-provider";
  +	public static final String WS4J2EE_PROVIDER =  "j2ee";
   	public static final String J2EE_VERSION =  "j2ee-version";
   	public static final String J2EE_VERSION_1_3 =  "1.3";
   	public static final String J2EE_VERSION_1_4 =  "1.4";
  @@ -101,10 +101,10 @@
   	public static final String EJB_DEPLOY_DIR =  "ejb-deploy";
   	
   	
  -	private static Ws4J2eeProperties properties = new Ws4J2eeProperties();
  -	public static String getProperty(String key){
  -		return properties.getProperty(key);
  -	}
  +//	private static Ws4J2eeProperties properties = new Ws4J2eeProperties();
  +//	public static String getProperty(String key){
  +//		return properties.getProperty(key);
  +//	}
   
   	/** j2ee Container DDs */
       public static final String JBOSS_DD = "jboss.xml";
  
  
  
  1.2       +3 -2      ws-axis/contrib/ews/src/org/apache/geronimo/ews/ws4j2ee/toWs/GenerationFactory.java
  
  Index: GenerationFactory.java
  ===================================================================
  RCS file: /home/cvs/ws-axis/contrib/ews/src/org/apache/geronimo/ews/ws4j2ee/toWs/GenerationFactory.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- GenerationFactory.java	12 Jul 2004 04:14:27 -0000	1.1
  +++ GenerationFactory.java	19 Jul 2004 15:40:47 -0000	1.2
  @@ -35,9 +35,10 @@
           throws GenerationFault;
       public Generator createClientSideWsGenerator(J2EEWebServiceContext j2eewscontext)
           throws GenerationFault;
  -	public Generator createWSDLGenerator(J2EEWebServiceContext wscontext,
  +	public Generator createWSDLGenerator(
  +		J2EEWebServiceContext wscontext,
   		Emitter emitter,
  -		Ws4J2eeServerCLOptionParser clparser)throws GenerationFault;
  +		Ws4J2eeDeployContext clparser)throws GenerationFault;
       public Generator createServerSideWsGenerator(J2EEWebServiceContext j2eewscontext)
           throws GenerationFault;
       public Generator createHandlerGenerator(J2EEWebServiceContext j2eewscontext)
  
  
  
  1.2       +15 -12    ws-axis/contrib/ews/src/org/apache/geronimo/ews/ws4j2ee/toWs/Ws4J2ee.java
  
  Index: Ws4J2ee.java
  ===================================================================
  RCS file: /home/cvs/ws-axis/contrib/ews/src/org/apache/geronimo/ews/ws4j2ee/toWs/Ws4J2ee.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- Ws4J2ee.java	12 Jul 2004 04:14:27 -0000	1.1
  +++ Ws4J2ee.java	19 Jul 2004 15:40:47 -0000	1.2
  @@ -80,10 +80,9 @@
   public class Ws4J2ee implements Generator {
       protected static Log log =
           LogFactory.getLog(Ws4J2ee.class.getName());
  -    private String[] args;
       private J2EEWebServiceContext wscontext;
       private boolean verbose = false;
  -    private Ws4J2eeServerCLOptionParser clparser;
  +    private Ws4J2eeDeployContext clparser;
       private WSCFPortComponent port;
       private ClassLoader classloader;
      
  @@ -100,15 +99,18 @@
   	private Ws4J2eeFactory factory;
   
   
  -    public Ws4J2ee(String[] args, boolean useSEI)
  +    public Ws4J2ee(Ws4J2eeDeployContext doployContext,Emitter emitter)
           throws GenerationFault {
  -		emitter = new Emitter();
  -        this.args = args;
  -        //create the context
  -		prepareContext();
  -        //parse the arguments 
  -		parseCLargs();
  -        
  +        	if(emitter == null){
  +				this.emitter = new Emitter();        	
  +        	}else{
  +				this.emitter = emitter;
  +        	}
  +			this.clparser = doployContext;
  +		    //create the context
  +			prepareContext();
  +		    //parse the arguments 
  +			parseCLargs();
       }
       
   	/**
  @@ -139,7 +141,6 @@
       }
       
       private void parseCLargs()throws GenerationFault{
  -		clparser = new Ws4J2eeServerCLOptionParser(args, emitter);
   		module = clparser.getModule();
   		classloader = module.getClassLoaderWithPackageLoaded();
   
  @@ -352,7 +353,9 @@
        */
       public static void main(String[] args) throws Exception {
           Ws4J2ee gen = null;
  -        gen = new Ws4J2ee(args, false);
  +        Emitter emitter = new Emitter();
  +		Ws4J2eeDeployContext deployContext = new Ws4J2eeServerCLOptionParser(args,emitter);
  +        gen = new Ws4J2ee(deployContext,emitter);
           gen.generate();
       }
   }
  
  
  
  1.2       +5 -5      ws-axis/contrib/ews/src/org/apache/geronimo/ews/ws4j2ee/toWs/Ws4J2eeServerCLOptionParser.java
  
  Index: Ws4J2eeServerCLOptionParser.java
  ===================================================================
  RCS file: /home/cvs/ws-axis/contrib/ews/src/org/apache/geronimo/ews/ws4j2ee/toWs/Ws4J2eeServerCLOptionParser.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- Ws4J2eeServerCLOptionParser.java	12 Jul 2004 04:14:27 -0000	1.1
  +++ Ws4J2eeServerCLOptionParser.java	19 Jul 2004 15:40:47 -0000	1.2
  @@ -75,12 +75,12 @@
   /**
    * @author hemapani
    */
  -public class Ws4J2eeServerCLOptionParser {
  +public class Ws4J2eeServerCLOptionParser implements Ws4J2eeDeployContext{
   	private PackageModule module;
   	private String outPutLocation;
   	private String moduleLocation = null;
   	private String implStyle = GenerationConstants.USE_LOCAL_AND_REMOTE;
  -	private String contanier = GenerationConstants.JBOSS_CONTAINER;
  +	private String container = GenerationConstants.JBOSS_CONTAINER;
   
   
   	private String[] args;
  @@ -598,7 +598,7 @@
   				this.implStyle = option.getArgument();
   				break;	 
   			case CONTAINER_OPT: 
  -				this.contanier = option.getArgument();
  +				this.container = option.getArgument();
   				break;	 	 
   	 
   
  @@ -755,7 +755,7 @@
        * @return
        */
       public String getContanier() {
  -        return contanier;
  +        return container;
       }
   
       /**
  @@ -769,7 +769,7 @@
        * @param string
        */
       public void setContanier(String string) {
  -        contanier = string;
  +        container = string;
       }
   
       /**
  
  
  
  1.1                  ws-axis/contrib/ews/src/org/apache/geronimo/ews/ws4j2ee/toWs/Ws4J2eeDeployContext.java
  
  Index: Ws4J2eeDeployContext.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 org.apache.geronimo.ews.ws4j2ee.utils.packager.load.PackageModule;
  
  /**
   * @author hemapani@opensource.lk
   */
  public interface Ws4J2eeDeployContext {
  	public int getMode();
  	public String getWsdlImplFilename();
  	public PackageModule getModule();
  	public String getModuleLocation();
  	public String getContanier();
  	public String getImplStyle();
  	public String getOutPutLocation();
  }
  
  
  
  1.10      +3 -0      ws-axis/contrib/ews/src/org/apache/geronimo/ews/ws4j2ee/toWs/dd/J2EEContainerSpecificDDGenerator.java
  
  Index: J2EEContainerSpecificDDGenerator.java
  ===================================================================
  RCS file: /home/cvs/ws-axis/contrib/ews/src/org/apache/geronimo/ews/ws4j2ee/toWs/dd/J2EEContainerSpecificDDGenerator.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- J2EEContainerSpecificDDGenerator.java	12 Jul 2004 04:14:29 -0000	1.9
  +++ J2EEContainerSpecificDDGenerator.java	19 Jul 2004 15:40:47 -0000	1.10
  @@ -61,6 +61,7 @@
   import org.apache.geronimo.ews.ws4j2ee.toWs.GenerationFault;
   import org.apache.geronimo.ews.ws4j2ee.toWs.Generator;
   import org.apache.geronimo.ews.ws4j2ee.toWs.Writer;
  +import org.apache.geronimo.ews.ws4j2ee.toWs.dd.geronimo.GeronimoDDWriter;
   import org.apache.geronimo.ews.ws4j2ee.toWs.dd.jboss.JBossDDWriter;
   import org.apache.geronimo.ews.ws4j2ee.toWs.dd.jonas.JOnASDDWriter;
   
  @@ -79,6 +80,8 @@
               writer = new JBossDDWriter(j2eewscontext);
           else if (GenerationConstants.JONAS_CONTAINER.equals(j2eewscontext.getMiscInfo().getTargetJ2EEContainer())) 
               writer = new JOnASDDWriter(j2eewscontext);
  +		else if (GenerationConstants.GERONIMO_CONTAINER.equals(j2eewscontext.getMiscInfo().getTargetJ2EEContainer())) 
  +					writer = new GeronimoDDWriter(j2eewscontext);            
           else
               new GenerationFault("unsupported j2ee container " + j2eewscontext.getMiscInfo().getTargetJ2EEContainer());
       }
  
  
  
  1.5       +3 -12     ws-axis/contrib/ews/src/org/apache/geronimo/ews/ws4j2ee/toWs/dd/geronimo/GeronimoDDWriter.java
  
  Index: GeronimoDDWriter.java
  ===================================================================
  RCS file: /home/cvs/ws-axis/contrib/ews/src/org/apache/geronimo/ews/ws4j2ee/toWs/dd/geronimo/GeronimoDDWriter.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- GeronimoDDWriter.java	12 Jul 2004 04:14:28 -0000	1.4
  +++ GeronimoDDWriter.java	19 Jul 2004 15:40:47 -0000	1.5
  @@ -65,23 +65,13 @@
    */
   public class GeronimoDDWriter extends AbstractWriter {
   	public GeronimoDDWriter(J2EEWebServiceContext j2eewscontext) throws GenerationFault {
  -		super(j2eewscontext,
  -		(j2eewscontext.getMiscInfo().isImplwithEJB()
  -			?j2eewscontext.getMiscInfo().getOutPutPath() +
  -				"/META-INF/"+ GenerationConstants.GERONIMO_DD
  -			:j2eewscontext.getMiscInfo().getOutPutPath() +
  -				"/META-INF/"+ GenerationConstants.GERONIMO_WEB_DD));
  +		super(j2eewscontext, j2eewscontext.getMiscInfo().getOutPutPath() + 
  +				"/META-INF/"+ GenerationConstants.GERONIMO_DD);
   	}
   
   	
   	public void writeCode() throws GenerationFault {
  -		if(out == null)
  -			return;
  -		if(j2eewscontext.getMiscInfo().isImplwithEJB()){
   			writeEJBDD();
  -		}else{
  -			writeCode();
  -		}	
   	}
   	
   //	<?xml version="1.0"?>
  @@ -124,6 +114,7 @@
   		out.write("         </session>\n");
   		out.write("     </enterprise-beans>\n");
   		out.write("</openejb-jar>\n");
  +		out.flush();
   	}
   	
   
  
  
  
  1.9       +23 -88    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.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- EJBDDWriter.java	12 Jul 2004 04:14:28 -0000	1.8
  +++ EJBDDWriter.java	19 Jul 2004 15:40:47 -0000	1.9
  @@ -101,19 +101,21 @@
   		  ejbname = ejbname.substring(index+1);
   		} 
   		String version = GenerationConstants.J2EE_VERSION_1_4; 
  -		version = GenerationConstants.getProperty(GenerationConstants.WS4J2EE_PROVIDER); 
  -
   
   		out.write("<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n");
  -		if(version == GenerationConstants.J2EE_VERSION_1_4){
  -			out.write("<ejb-jar xmlns=\"http://java.sun.com/xml/ns/j2ee\">\n");
  -		}else{
  -			out.write("<!DOCTYPE ejb-jar PUBLIC '-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN' 'http://java.sun.com/dtd/ejb-jar_2_0.dtd'>\n");
  -			out.write("<ejb-jar>\n");
  -		}
  -		
  +//let us stack to the J2EE 1.4 and by the wy 1.3 has nothing to do with web services :) 
  +//		if(version == GenerationConstants.J2EE_VERSION_1_3){
  +//			out.write("<!DOCTYPE ejb-jar PUBLIC '-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN' 'http://java.sun.com/dtd/ejb-jar_2_0.dtd'>\n");
  +//			out.write("<ejb-jar>\n");
  +//		}else{
  +//		}
  +		out.write("<ejb-jar xmlns=\"http://java.sun.com/xml/ns/j2ee\"\n");
  +		out.write("		 xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n");
  +		out.write("		 xsi:schemaLocation=\"http://java.sun.com/xml/ns/j2ee\\n");
  +		out.write("		 http://java.sun.com/xml/ns/j2ee/ejb-jar_2_1.xsd\"\n");
  +		out.write("		 version=\"2.1\">\n");
   
  -		out.write("<display-name>" + j2eewscontext.getWSCFContext().getWscfdWsDesxription().getDisplayName() + "</display-name>\n");
  +		//out.write("<display-name>" + j2eewscontext.getWSCFContext().getWscfdWsDesxription().getDisplayName() + "</display-name>\n");
   		out.write("\t<enterprise-beans>\n");
   		out.write("\t\t<session>\n");
   		out.write("\t\t\t<display-name>" + j2eewscontext.getWSCFContext().getWscfdWsDesxription().getDisplayName() + "</display-name>\n");
  @@ -122,7 +124,8 @@
   		
   		String implStyle = j2eewscontext.getMiscInfo().getImplStyle();
   		if(GenerationConstants.USE_LOCAL_AND_REMOTE.equals(implStyle) 
  -			|| GenerationConstants.USE_REMOTE.equals(implStyle)){
  +			|| GenerationConstants.USE_REMOTE.equals(implStyle) 
  +			||GenerationConstants.USE_INTERNALS.equals(implStyle)){
   			out.write("\t\t\t<home>" + ejbcontext.getEjbhomeInterface() + "</home>\n");
   			out.write("\t\t\t<remote>" + ejbcontext.getEjbRemoteInterface() + "</remote>\n");
   	
  @@ -141,83 +144,15 @@
   		out.write("\t\t\t</security-identity>\n");
   		out.write("\t\t</session\n>");
   		out.write("\t</enterprise-beans>\n");
  +		out.write("\t<assembly-descriptor>\n");
  +		out.write("\t    <method-permission>\n");
  +		out.write("\t        <unchecked/>\n");
  +		out.write("\t        <method>\n");
  +		out.write("\t		     <ejb-name>" + ejbname + "</ejb-name>\n");
  +		out.write("\t			 <method-name>*</method-name>\n");
  +		out.write("\t		</method>\n");
  +		out.write("\t     </method-permission>\n");
  +		out.write("\t</assembly-descriptor>\n");
   		out.write("</ejb-jar>\n");
  -//	   try {
  -//				 JAXBContext jc =
  -//					  JAXBContext.newInstance("org.apache.geronimo.ews.ws4j2ee.parsers.ejbdd");
  -//            
  -//				  // create an ObjectFactory instance.
  -//				  // if the JAXBContext had been created with mutiple pacakge names,
  -//				  // we would have to explicitly use the correct package name when
  -//				  // creating the ObjectFactory.            
  -//				  ObjectFactory objFactory = new ObjectFactory();
  -//            
  -//				  // create an empty PurchaseOrder
  -//				  EjbJar dd = objFactory.createEjbJar();
  -//               
  -//				  EjbJarType.AssemblyDescriptorType type =
  -//					  objFactory.createEjbJarTypeAssemblyDescriptorType();
  -//               
  -//				  dd.setAssemblyDescriptor(type);
  -//                
  -//				  DescriptionType dtype = objFactory.createDescriptionType();
  -//				  dtype.setValue(j2eewscontext.getMiscInfo().getWscfdWsDesxription().getDisplayName());
  -//				  dd.setDescription(dtype);
  -//                
  -//				  EjbJarType.EnterpriseBeansType eb =
  -//					  objFactory.createEjbJarTypeEnterpriseBeansType();
  -//				  EjbJarType.EnterpriseBeansType.Session s =
  -//					  objFactory.createEjbJarTypeEnterpriseBeansTypeSession();
  -//            
  -//				  EjbClassType bean = objFactory.createEjbClassType();
  -//				  bean.setValue(j2eewscontext.getMiscInfo().getEjbbean());
  -//				  Remote remote = objFactory.createRemote();
  -//				  remote.setValue(j2eewscontext.getMiscInfo().getEjbsei());
  -//				  Home home = objFactory.createHome();
  -//				  home.setValue(j2eewscontext.getMiscInfo().getEjbhome());
  -//				  EjbNameType name = objFactory.createEjbNameType();
  -//				  name.setValue(j2eewscontext.getMiscInfo().getWscfport().getServiceImplBean().getEjblink());
  -//				  s.setEjbClass(bean);
  -//				  s.setRemote(remote);
  -//				  s.setHome(home);
  -//				  s.setEjbName(name);
  -//                
  -//				  EjbJarType.EnterpriseBeansType.SessionType.SessionTypeType session =
  -//					  objFactory
  -//						  .createEjbJarTypeEnterpriseBeansTypeSessionTypeSessionTypeType();
  -//				  EjbJarType
  -//					  .EnterpriseBeansType
  -//					  .SessionType
  -//					  .TransactionTypeType teansaction =
  -//					  objFactory
  -//						  .createEjbJarTypeEnterpriseBeansTypeSessionTypeTransactionTypeType();
  -//               
  -//				  //the Bean is stateless fine 
  -//				  session.setValue("Stateless");
  -//               
  -//				  //transaction context is set to bean.
  -//				  //as the jsr109 says that the EJB is stateless
  -//				  //the transaction context does not apply. Is this acceptable??
  -//				  teansaction.setValue("Bean");
  -//                
  -//				  s.setSessionType(session);
  -//				  s.setTransactionType(teansaction);
  -//            
  -//				  eb.getSessionOrEntity().add(s);
  -//				  dd.setEnterpriseBeans(eb);
  -//            
  -//				  Marshaller m = jc.createMarshaller();
  -//				  m.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, Boolean.TRUE);
  -//				  m.marshal(dd, out);
  -//            
  -//				  out.flush();
  -//				  out.close();
  -//		  } catch (PropertyException e) {
  -//			  e.printStackTrace();
  -//			  throw new GenerationFault(e);
  -//		  } catch (JAXBException e) {
  -//			  e.printStackTrace();
  -//			throw new GenerationFault(e);
  -//		  }
   	}
   }
  
  
  
  1.4       +2 -1      ws-axis/contrib/ews/src/org/apache/geronimo/ews/ws4j2ee/toWs/ejb/EJBGenerator.java
  
  Index: EJBGenerator.java
  ===================================================================
  RCS file: /home/cvs/ws-axis/contrib/ews/src/org/apache/geronimo/ews/ws4j2ee/toWs/ejb/EJBGenerator.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- EJBGenerator.java	12 Jul 2004 04:14:28 -0000	1.3
  +++ EJBGenerator.java	19 Jul 2004 15:40:47 -0000	1.4
  @@ -97,7 +97,8 @@
   			localhomewriter = factory.getGenerationFactory().createEJBWriter(context, ejbcontext, GenerationConstants.EJB_LOCAL_HOME_INTERFACE_WRITER);
   			localwriter = factory.getGenerationFactory().createEJBWriter(context, ejbcontext, GenerationConstants.EJB_LOCAL_INTERFACE_WRITER);
   		}else if(GenerationConstants.USE_INTERNALS.equals(implStyle)){
  -			//when we use the internals we do not want create anything   
  +			homewriter = factory.getGenerationFactory().createEJBWriter(context, ejbcontext,GenerationConstants.EJB_HOME_INTERFACE_WRITER);
  +			remotewriter = factory.getGenerationFactory().createEJBWriter(context, ejbcontext, GenerationConstants.EJB_REMOTE_INTERFACE_WRITER);
   		}
   		if(!context.getMiscInfo().isImplAvalible()){
   			beanwriter = factory.getGenerationFactory().createEJBWriter(context, ejbcontext, GenerationConstants.EJB_IMPLEMENTATION_BEAN_WRITER);
  
  
  
  1.2       +2 -1      ws-axis/contrib/ews/src/org/apache/geronimo/ews/ws4j2ee/toWs/impl/GenerationFactoryImpl.java
  
  Index: GenerationFactoryImpl.java
  ===================================================================
  RCS file: /home/cvs/ws-axis/contrib/ews/src/org/apache/geronimo/ews/ws4j2ee/toWs/impl/GenerationFactoryImpl.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- GenerationFactoryImpl.java	12 Jul 2004 04:14:29 -0000	1.1
  +++ GenerationFactoryImpl.java	19 Jul 2004 15:40:47 -0000	1.2
  @@ -25,6 +25,7 @@
   import org.apache.geronimo.ews.ws4j2ee.toWs.GenerationFault;
   import org.apache.geronimo.ews.ws4j2ee.toWs.Generator;
   import org.apache.geronimo.ews.ws4j2ee.toWs.Writer;
  +import org.apache.geronimo.ews.ws4j2ee.toWs.Ws4J2eeDeployContext;
   import org.apache.geronimo.ews.ws4j2ee.toWs.Ws4J2eeServerCLOptionParser;
   import org.apache.geronimo.ews.ws4j2ee.toWs.dd.J2EEContainerSpecificDDGenerator;
   import org.apache.geronimo.ews.ws4j2ee.toWs.dd.JaxrpcMapperGenerator;
  @@ -85,7 +86,7 @@
   
       public Generator createWSDLGenerator(J2EEWebServiceContext wscontext,
       	Emitter emitter,
  -    	Ws4J2eeServerCLOptionParser clparser)
  +		Ws4J2eeDeployContext clparser)
           throws GenerationFault {
           return new WSDLGenerator(wscontext,emitter,clparser);
       }
  
  
  
  1.14      +99 -67    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.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- BuildFileGenerator.java	12 Jul 2004 04:14:29 -0000	1.13
  +++ BuildFileGenerator.java	19 Jul 2004 15:40:47 -0000	1.14
  @@ -56,9 +56,12 @@
    package org.apache.geronimo.ews.ws4j2ee.toWs.misc;
   
   import java.io.File;
  +import java.io.FileInputStream;
   import java.io.FileWriter;
   import java.io.IOException;
  +import java.io.InputStream;
   import java.io.PrintWriter;
  +import java.util.Properties;
   import java.util.StringTokenizer;
   import java.util.Vector;
   
  @@ -101,6 +104,43 @@
   			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");
  +			
  +			Properties pro = new Properties();
  +			InputStream prpertyIn = null;
  +			File file = new File(GenerationConstants.WS4J2EE_PROPERTY_FILE);
  +			if(file.exists()){
  +				prpertyIn = new FileInputStream(file);
  +			}else{
  +				file = new File("modules/axis/target/"+GenerationConstants.WS4J2EE_PROPERTY_FILE);
  +				if(file.exists()){
  +					prpertyIn = new FileInputStream(file);
  +				}else{
  +					file = new File("target/"+GenerationConstants.WS4J2EE_PROPERTY_FILE);
  +					if(file.exists()){
  +						prpertyIn = new FileInputStream(file);
  +					}else{
  +						prpertyIn = getClass().getClassLoader().getResourceAsStream(GenerationConstants.WS4J2EE_PROPERTY_FILE);
  +					}				
  +				}
  +			}
  +			if(prpertyIn!= null){
  +				String location = null;
  +				try{
  +					pro.load(prpertyIn);
  +					location = pro.getProperty(GenerationConstants.MAVEN_LOCAL_REPOSITARY);
  +				}finally{
  +					prpertyIn.close();
  +				}
  +				if(location != null){
  +					out.write("	<property name=\"maven.repo.local\" location=\"" +location +"\"/>\n");
  +				}else{
  +					prpertyIn = null;
  +				}
  +
  +			}else{
  +				System.out.println("property file not found");
  +			}
  +			//out.write("	<property file=\"ws4j2ee.properties\"/>\n");
   
   			out.write("	<path id=\"classpath\" >\n");
   			File tempfile = new File("./target/classes");
  @@ -115,12 +155,8 @@
   						+ ((File)classpathelements.get(i)).getAbsolutePath() + "\"/>\n");				
   				}
   			}
  -
  -			String value = GenerationConstants.getProperty(GenerationConstants.MAVEN_LOCAL_REPOSITARY);
  -
  -			
  -			if(value!= null){
  -				out.write("		<fileset dir=\""+value+"\">\n");
  +			if(prpertyIn!= null){
  +				out.write("		<fileset dir=\"${maven.repo.local}\">\n");
   				out.write("		    <include name=\"axis/**/*.jar\"/>\n");
   				out.write("			<include name=\"geronimo-spec/**/*.jar\"/>\n");
   				out.write("			<include name=\"geronimo/**/*.jar\"/>\n");
  @@ -129,14 +165,11 @@
   				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");
  -				}
   			}
  -			
  -			
  +			StringTokenizer tok = getClasspathComponets();
  +			while (tok.hasMoreTokens()) {
  +				out.write("		<pathelement location=\"" + tok.nextToken() + "\"/>\n");
  +			}
   			out.write("	</path>\n");
   
   
  @@ -156,30 +189,40 @@
   			writeFileCopyStatement(j2eewscontext.getMiscInfo().getWsdlFile(),out);
   			writeFileCopyStatement(j2eewscontext.getMiscInfo().getWsconffile(),out);
   			
  -			if(j2eewscontext.getMiscInfo().isImplwithEJB()){
  -				File ejbDD = 	new File(j2eewscontext.getMiscInfo().getOutPutPath()+"/META-INF/ejb-jar.xml");
  -				if(ejbDD.exists())
  -					out.write("		<copy file =\""+ejbDD.getAbsolutePath()+"\" todir=\"${build.classes}/META-INF\"/>\n");
  -				
  -				File contianerDD = null;	
  -				if(GenerationConstants.JBOSS_CONTAINER.equals(j2eewscontext.getMiscInfo().getTargetJ2EEContainer())){
  -					contianerDD = new File(j2eewscontext.getMiscInfo().getOutPutPath()+"/META-INF/"+GenerationConstants.JBOSS_DD);
  -				}else if(GenerationConstants.JONAS_CONTAINER.equals(j2eewscontext.getMiscInfo().getTargetJ2EEContainer())){
  -					contianerDD = new File(j2eewscontext.getMiscInfo().getOutPutPath()+"/META-INF/"+GenerationConstants.JONAS_DD);
  -				}else if(GenerationConstants.GERONIMO_CONTAINER.equals(j2eewscontext.getMiscInfo().getTargetJ2EEContainer())){
  -					contianerDD = new File(j2eewscontext.getMiscInfo().getOutPutPath()+"/META-INF/"+GenerationConstants.GERONIMO_DD);
  -				}	
  -				if(contianerDD.exists()){
  -						out.write("		<copy file =\""+contianerDD.getAbsolutePath()+"\" todir=\"${build.classes}/META-INF\"/>\n ");
  -				}
  -				
  -									
  -			}else{
  -				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 ");				
  -				}
  -			}
  +//			if(j2eewscontext.getMiscInfo().isImplwithEJB()){
  +//				File ejbDD = 	new File(j2eewscontext.getMiscInfo().getOutPutPath()+"/META-INF/ejb-jar.xml");
  +//				if(ejbDD.exists())
  +//					out.write("		<copy file =\""+ejbDD.getAbsolutePath()+"\" todir=\"${build.classes}/META-INF\"/>\n");
  +//				
  +//				File contianerDD = null;	
  +//				if(GenerationConstants.JBOSS_CONTAINER.equals(j2eewscontext.getMiscInfo().getTargetJ2EEContainer())){
  +//					contianerDD = new File(j2eewscontext.getMiscInfo().getOutPutPath()+"/META-INF/"+GenerationConstants.JBOSS_DD);
  +//				}else if(GenerationConstants.JONAS_CONTAINER.equals(j2eewscontext.getMiscInfo().getTargetJ2EEContainer())){
  +//					contianerDD = new File(j2eewscontext.getMiscInfo().getOutPutPath()+"/META-INF/"+GenerationConstants.JONAS_DD);
  +//				}else if(GenerationConstants.GERONIMO_CONTAINER.equals(j2eewscontext.getMiscInfo().getTargetJ2EEContainer())){
  +//					contianerDD = new File(j2eewscontext.getMiscInfo().getOutPutPath()+"/META-INF/"+GenerationConstants.GERONIMO_DD);
  +//				}	
  +//				if(contianerDD.exists()){
  +//						out.write("		<copy file =\""+contianerDD.getAbsolutePath()+"\" todir=\"${build.classes}/META-INF\"/>\n ");
  +//				}
  +//				
  +//									
  +//			}else{
  +//				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 ");				
  +//				}
  +//			}
  +			
  +			out.write("		<copy todir=\"${build.classes}\">\n");
  +			out.write("			<fileset dir=\"${src}\">\n");
  +			out.write("				<include name=\"META-INF/*.xml\"/>\n");
  +			out.write("				<include name=\"WEB-INF/*.xml\"/>\n");
  +			out.write("				<include name=\"**/*.wsdl\"/>\n");
  +			out.write("				<include name=\"**/*.wsdd\"/>\n");
  +			out.write("			</fileset>\n");
  +			out.write("		</copy>\n");
  +
   
   
   			String jarName = j2eewscontext.getWSDLContext().getTargetPortType().getName().toLowerCase();
  @@ -204,12 +247,12 @@
   			
   			out.write("     <java classname=\"org.apache.geronimo.ews.ws4j2ee.utils.packager.Packager\" fork=\"no\" >\n");
   			out.write("     	<arg value=\""+jarFile.getAbsolutePath()+"\"/>\n");
  +			out.write("     	<arg value=\""	+ tempFile + "\"/>\n");
   			out.write("     	<classpath refid=\"classpath\" />\n");
   			for(int i = 0;i<classpathelements.size();i++){
   				out.write("     	<arg value=\""
   					+ ((File)classpathelements.get(i)).getAbsolutePath() + "\"/>\n");				
   			}
  -			out.write("     	<arg value=\""	+ tempFile + "\"/>\n"); 
   			out.write("     </java>\n");
   //			out.write("		<delete dir=\"${build}\"/>\n");
   			out.write("	</target>\n");
  @@ -221,35 +264,24 @@
   			out.write("		<delete dir=\"${build}\"/>\n");
   			out.write("	</target>\n");
   			
  -			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);
  -			
  -			out.write("	<target name=\"deploy\" depends=\"jar\">\n");
  -			if(webappsLib != null){
  -				out.write("		<copy file=\""+ jarName + 
  -					".jar\" todir=\""+webappsLib+"\"/>\n");
  -			}
  -			if(ejbDeploy != null){
  -				out.write("		<copy file=\""+ jarName + 
  -					".jar\" todir=\""+ejbDeploy+"\"/>\n");
  -			}
  -				
  -			out.write("		<java classname=\"org.apache.axis.client.AdminClient\" fork=\"no\" >\n");
  -			out.write("			<classpath refid=\"classpath\" />\n");
  -			if(host != null){
  -				out.write("			<arg value=\"-h\"/>\n");
  -				out.write("			<arg value=\""+host+"\"/>\n");
  -			}			
  -			if(port != null){
  -				out.write("			<arg value=\"-p\"/>\n");
  -				out.write("			<arg value=\""+port+"\"/>\n"); 
  -			}
  -			out.write("			<arg value=\"deploy.wsdd\"/>\n");
  -			out.write("		</java>\n");
  -
  -			out.write("	</target>\n");
  +			
  +//			out.write("	<target name=\"deploy\" depends=\"jar\">\n");
  +//			out.write("		<copy file=\""+ jarName + 
  +//				".jar\" todir=\"${axis-webapps-lib}\"/>\n");
  +//				out.write("		<copy file=\""+ jarName + 
  +//					".jar\" todir=\"${ejb-deploy}\"/>\n");
  +//				
  +//			out.write("		<java classname=\"org.apache.axis.client.AdminClient\" fork=\"no\" >\n");
  +//			out.write("			<classpath refid=\"classpath\" />\n");
  +//
  +//			out.write("			<arg value=\"-h\"/>\n");
  +//			out.write("			<arg value=\"axis-host\"/>\n");
  +//			out.write("			<arg value=\"-p\"/>\n");
  +//			out.write("			<arg value=\"axis-port\"/>\n"); 
  +//			out.write("			<arg value=\"deploy.wsdd\"/>\n");
  +//			out.write("		</java>\n");
  +//			out.write("	</target>\n");
  +			
   			out.write("</project>\n");
   			out.close();
   		} catch (IOException e) {
  
  
  
  1.6       +122 -111  ws-axis/contrib/ews/src/org/apache/geronimo/ews/ws4j2ee/toWs/wrapperWs/geronimo/InternalBasedWrapperClassWriter.java
  
  Index: InternalBasedWrapperClassWriter.java
  ===================================================================
  RCS file: /home/cvs/ws-axis/contrib/ews/src/org/apache/geronimo/ews/ws4j2ee/toWs/wrapperWs/geronimo/InternalBasedWrapperClassWriter.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- InternalBasedWrapperClassWriter.java	12 Jul 2004 04:14:29 -0000	1.5
  +++ InternalBasedWrapperClassWriter.java	19 Jul 2004 15:40:47 -0000	1.6
  @@ -54,6 +54,7 @@
    */
   package org.apache.geronimo.ews.ws4j2ee.toWs.wrapperWs.geronimo;
   
  +import java.lang.reflect.Method;
   import java.util.ArrayList;
   import java.util.Iterator;
   
  @@ -65,120 +66,130 @@
   import org.apache.geronimo.ews.ws4j2ee.toWs.JavaClassWriter;
   import org.apache.geronimo.ews.ws4j2ee.utils.Utils;
   
  -
   /**
    * @author Srinath Perera(hemapani@opensource.lk)
    */
   public class InternalBasedWrapperClassWriter extends JavaClassWriter {
  -	protected static Log log =
  -		LogFactory.getLog(InternalBasedWrapperClassWriter.class.getName());
  -	protected String seiName = null;
  -	/**
  -	 * @param j2eewscontext
  -	 * @param qulifiedName
  -	 * @throws GenerationFault
  -	 */
  -	public InternalBasedWrapperClassWriter(J2EEWebServiceContext j2eewscontext)
  -		throws GenerationFault {
  -		super(j2eewscontext, getName(j2eewscontext) + "Impl");
  -		seiName = j2eewscontext.getMiscInfo().getJaxrpcSEI();
  -
  -	}
  -
  -	private static String getName(J2EEWebServiceContext j2eewscontext) {
  -		String name = j2eewscontext.getWSDLContext().gettargetBinding().getName();
  -		if (name == null) {
  -			name = j2eewscontext.getMiscInfo().getJaxrpcSEI();
  -		}
  -		return name;
  -	}
  -
  -	protected String getimplementsPart() {
  -		return " implements "
  -			+ j2eewscontext.getMiscInfo().getJaxrpcSEI();
  -	}
  -
  -	protected void writeAttributes() throws GenerationFault {
  -		out.write("\tprivate " + seiName + " bean = null;\n");
  -		out.write("\tprivate org.openejb.EJBContainer container;\n");
  -	}
  -
  -//	  String cotnainerIndex = ... // get container index  from request
  -//	  ContainerIndex index = ContainerIndex.getInstance();
  -//	  EJBContainer container = index.getContainer(containerIndex);
  -//	  container.invoke(callMethod, args, primKey);
  -//@see  org.openejb.cotnainerIndex#getContainer() and EJBContainer 
  -//I can go though all and select the one with right ejbname for the wrost case
  -
  -	protected void writeConstructors() throws GenerationFault {
  -		out.write("\tpublic " + classname + "(){\n");
  -		out.write("\t\tString containerID = \""+j2eewscontext.getMiscInfo().getJ2eeComponetLink()+"\";\n"); // get container id (aka deployment id) from request
  -		out.write("\t\torg.openejb.ContainerIndex index = org.openejb.ContainerIndex.getInstance();\n");
  -		out.write("\t\tthis.container = index.getContainer(containerID);\n");
  -		out.write("\t}\n");
  -	}
  -
  -		protected void writeMethods() throws GenerationFault {
  -		String parmlistStr = null;
  -		 ArrayList operations = j2eewscontext.getMiscInfo().getSEIOperations();
  -		 for(int i =0;i<operations.size();i++){
  -			parmlistStr = "";
  -			 SEIOperation op = (SEIOperation)operations.get(i);
  -			 String returnType = op.getReturnType();
  -			 if(returnType == null)
  -				returnType = "void";
  -			 out.write("\tpublic "+returnType+" "+op.getMethodName()+"(");
  -				
  -			 Iterator pas = op.getParameterNames().iterator();
  -			 boolean first = true;
  -			 while(pas.hasNext()){
  -				 String name = (String)pas.next();
  -				 String type = op.getParameterType(name);
  -				 if(first){ 
  -					 first = false;
  -					 out.write(type + " " +name);
  -					 parmlistStr = parmlistStr + name;
  -				 }else{
  -					 out.write(","+type + " " +name);
  -					 parmlistStr = parmlistStr + ","+name;
  -				 }
  -						
  -			 }
  -				
  -			 out.write(") throws java.rmi.RemoteException");
  -			 ArrayList faults = op.getFaults();
  -			 for(int j = 0;j<faults.size();j++){
  -				 out.write(","+(String)faults.get(i));
  -			 }
  -			 out.write("{\n");
  -			 
  -			 out.write("\t\tjava.lang.reflect.Method callMethod = org.apache.geronimo.ews.ws4j2ee.utils.Utils.getJavaMethod(\""+seiName+"\",\""+op.getMethodName()+"\");\n");
  -			 out.write("\t\tString primKey = null;\n");
  -			 out.write("\t\tObject[] arguments = new Object[]{");
  -			 pas = op.getParameterNames().iterator();
  -			 first = true;
  -			 while(pas.hasNext()){
  -				 String name = (String)pas.next();
  -				 String type = op.getParameterType(name);
  -				 if(first){ 
  -					 first = false;
  -					 out.write(Utils.getParameter(type,name));
  -				 }else{
  -					out.write(","+Utils.getParameter(type,name));
  -				 }
  -			 }
  -			 out.write("};\n");
  -			out.write("\t\t\ttry{\n");
  -			 out.write("\t\t\tObject result = container.invoke(callMethod, arguments, primKey);\n");
  -			 if(!"void".equals(returnType))
  -				 out.write("\t\t\treturn "+Utils.getReturnCode(returnType,"result")+";\n");
  -			 out.write("\t\t\t}catch(Throwable e){\n");
  -			out.write("\t\t\t\tthrow new org.apache.geronimo.ews.ws4j2ee.wsutils.J2EEFault(e);\n");
  -			 out.write("}\n");			 
  -			 out.write("\t}\n");
  -		 }
  -		 //out.write("}\n");	
  -
  -	}
  +    protected static Log log =
  +        LogFactory.getLog(InternalBasedWrapperClassWriter.class.getName());
  +    protected final String seiName;
  +    protected final String ejbName;
  +    /**
  +     * @param j2eewscontext
  +     * @param qulifiedName
  +     * @throws GenerationFault
  +     */
  +    public InternalBasedWrapperClassWriter(J2EEWebServiceContext j2eewscontext)
  +        throws GenerationFault {
  +        super(j2eewscontext, getName(j2eewscontext) + "Impl");
  +        seiName = j2eewscontext.getMiscInfo().getJaxrpcSEI();
  +        ejbName = j2eewscontext.getEJBDDContext().getEjbName();
  +
  +    }
  +
  +    private static String getName(J2EEWebServiceContext j2eewscontext) {
  +        String name =
  +            j2eewscontext.getWSDLContext().gettargetBinding().getName();
  +        if (name == null) {
  +            name = j2eewscontext.getMiscInfo().getJaxrpcSEI();
  +        }
  +        return name;
  +    }
  +
  +    protected String getimplementsPart() {
  +        return " implements " + j2eewscontext.getMiscInfo().getJaxrpcSEI();
  +    }
  +
  +    protected void writeAttributes() throws GenerationFault {
  +        out.write("\tprivate " + seiName + " bean = null;\n");
  +        out.write("\tprivate org.openejb.EJBContainer container;\n");
  +    }
  +
  +    protected void writeConstructors() throws GenerationFault {
  +        out.write("\tpublic " + classname + "(){\n");
  +        out.write("\t}\n");
  +    }
  +
  +    protected void writeMethods() throws GenerationFault {
  +        String parmlistStr = null;
  +        ArrayList operations = j2eewscontext.getMiscInfo().getSEIOperations();
  +        for (int i = 0; i < operations.size(); i++) {
  +            parmlistStr = "";
  +            SEIOperation op = (SEIOperation) operations.get(i);
  +            String returnType = op.getReturnType();
  +            if (returnType == null)
  +                returnType = "void";
  +            out.write(
  +                "\tpublic " + returnType + " " + op.getMethodName() + "(");
  +
  +            Iterator pas = op.getParameterNames().iterator();
  +            boolean first = true;
  +            while (pas.hasNext()) {
  +                String name = (String) pas.next();
  +                String type = op.getParameterType(name);
  +                if (first) {
  +                    first = false;
  +                    out.write(type + " " + name);
  +                    parmlistStr = parmlistStr + name;
  +                } else {
  +                    out.write("," + type + " " + name);
  +                    parmlistStr = parmlistStr + "," + name;
  +                }
  +
  +            }
  +
  +            out.write(") throws java.rmi.RemoteException");
  +            ArrayList faults = op.getFaults();
  +            for (int j = 0; j < faults.size(); j++) {
  +                out.write("," + (String) faults.get(i));
  +            }
  +            out.write("{\n");
  +
  +            out.write(
  +                "\t\tString methodName = \"" + op.getMethodName() + "\";\n");
  +            out.write(
  +                "\t\tjava.lang.reflect.Method callMethod = Utils.getJavaMethod(\""
  +                    + seiName
  +                    + "\",\"methodName\");\n");
  +            out.write(
  +                "\t\tClass[] classes = callMethod.getParameterTypes();\n");
  +
  +            out.write("\t\tObject[] arguments = new Object[]{");
  +            pas = op.getParameterNames().iterator();
  +            first = true;
  +            while (pas.hasNext()) {
  +                String name = (String) pas.next();
  +                String type = op.getParameterType(name);
  +                if (first) {
  +                    first = false;
  +                    out.write(Utils.getParameter(type, name));
  +                } else {
  +                    out.write("," + Utils.getParameter(type, name));
  +                }
  +            }
  +            out.write("};\n");
  +            if (!"void".equals(returnType)) {
  +                out.write(
  +					"\t\t\treturn "
  +						+ Utils.getReturnCode(returnType, "GeronimoUtils.invokeEJB(\""
  +                        + ejbName
  +                        + "\",methodName,classes,arguments)")
  +						+ ";\n");
  +            } else {
  +                out.write(
  +                    "\t\t\tGeronimoUtils.invokeEJB(\""
  +                        + ejbName
  +                        + "\",methodName,classes,arguments);\n");
  +            }
  +            out.write("\t}\n");
  +        }
  +    }
  +    /* (non-Javadoc)
  +     * @see org.apache.geronimo.ews.ws4j2ee.toWs.JavaClassWriter#writeImportStatements()
  +     */
  +    protected void writeImportStatements() throws GenerationFault {
  +		out.write("import org.apache.geronimo.ews.ws4j2ee.wsutils.GeronimoUtils;\n");
  +		out.write("import org.apache.geronimo.ews.ws4j2ee.utils.Utils;\n");
  +    }
   
   }
  
  
  
  1.6       +1 -1      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.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- J2eeDeployWriter.java	12 Jul 2004 04:14:28 -0000	1.5
  +++ J2eeDeployWriter.java	19 Jul 2004 15:40:47 -0000	1.6
  @@ -385,7 +385,7 @@
   
   		//get the Name of the provider needed in the deploy.wsdd
   		String provider = null;
  -		provider = GenerationConstants.getProperty(GenerationConstants.WS4J2EE_PROVIDER); 
  +		provider = GenerationConstants.WS4J2EE_PROVIDER; 
   
   		while (iterator.hasNext()) {
   			Object obj = iterator.next();
  
  
  
  1.4       +3 -4      ws-axis/contrib/ews/src/org/apache/geronimo/ews/ws4j2ee/toWs/wsdl/WSDLGenerator.java
  
  Index: WSDLGenerator.java
  ===================================================================
  RCS file: /home/cvs/ws-axis/contrib/ews/src/org/apache/geronimo/ews/ws4j2ee/toWs/wsdl/WSDLGenerator.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- WSDLGenerator.java	12 Jul 2004 04:14:28 -0000	1.3
  +++ WSDLGenerator.java	19 Jul 2004 15:40:47 -0000	1.4
  @@ -63,11 +63,10 @@
   import org.apache.geronimo.ews.ws4j2ee.context.ContextValidator;
   import org.apache.geronimo.ews.ws4j2ee.context.J2EEWebServiceContext;
   import org.apache.geronimo.ews.ws4j2ee.context.impl.AxisEmitterBasedJaxRpcMapperContext;
  -import org.apache.geronimo.ews.ws4j2ee.context.webservices.server.AxisEmitterBasedWSCFContext;
   import org.apache.geronimo.ews.ws4j2ee.context.wsdl.impl.AxisEmitterBasedWSDLContext;
   import org.apache.geronimo.ews.ws4j2ee.toWs.GenerationFault;
   import org.apache.geronimo.ews.ws4j2ee.toWs.Generator;
  -import org.apache.geronimo.ews.ws4j2ee.toWs.Ws4J2eeServerCLOptionParser;
  +import org.apache.geronimo.ews.ws4j2ee.toWs.Ws4J2eeDeployContext;
   import org.apache.geronimo.ews.ws4j2ee.utils.Utils;
   
   /**
  @@ -78,7 +77,7 @@
    */
   public class WSDLGenerator extends Java2WSDL implements Generator {
   	private J2EEWebServiceContext wscontext;
  -	private Ws4J2eeServerCLOptionParser clparser;
  +	private Ws4J2eeDeployContext clparser;
   	private Emitter emitter;
   	private String wsdlFile;
   	private boolean verbose;
  @@ -88,7 +87,7 @@
   
   	public WSDLGenerator(J2EEWebServiceContext wscontext,
   			Emitter emitter,
  -			Ws4J2eeServerCLOptionParser clparser)throws GenerationFault {
  +			Ws4J2eeDeployContext clparser)throws GenerationFault {
   		this.wscontext = wscontext;
   		this.emitter = emitter;
   		this.clparser = clparser;
  
  
  
  1.8       +7 -4      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.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- AntExecuter.java	12 Jul 2004 04:14:29 -0000	1.7
  +++ AntExecuter.java	19 Jul 2004 15:40:47 -0000	1.8
  @@ -47,10 +47,13 @@
   			ant.execute();        
   		}catch(ClassNotFoundException 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 maven reposiroty " +
  -			"directory in the conf/ws4j2ee.propertites Build fill ignore the faliure");
  +//NOW as the code is used by Geronimo we can not afford to let the build
  +//failure tests beside if you use maven it works fine. it will find your maven 
  +//repository itself :) 
  +//        }catch(BuildException e){
  +//			System.out.println(e.getMessage() +
  +//			"if it is a compile error you may not have set the maven reposiroty " +
  +//			"directory in the conf/ws4j2ee.propertites Build fill ignore the faliure");
           }
       }
   }
  
  
  
  1.12      +5 -2      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.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- Utils.java	12 Jul 2004 04:14:29 -0000	1.11
  +++ Utils.java	19 Jul 2004 15:40:47 -0000	1.12
  @@ -903,7 +903,7 @@
   		}else if("java.lang.Character".equals(type)||"char".equals(type)){
   			return "((java.lang.Character)"+name+").charValue()";
   		}else{
  -			return name;
  +			return "("+type+")"+name;
   		}
   	}
   	
  @@ -960,7 +960,10 @@
   		return returnType + end;
   	}
   	
  -	public static String getElementValue(Node node){
  +	public static String getElementValue(NodeList nodesin){
  +		if(nodesin == null || nodesin.getLength() < 1)
  +			return null;
  +		Node node = nodesin.item(0);	
   		NodeList nodes = node.getChildNodes();
   		for(int i = 0;i<nodes.getLength();i++){
   			Node temp = nodes.item(i);
  
  
  
  1.1                  ws-axis/contrib/ews/src/org/apache/geronimo/ews/ws4j2ee/utils/PropertyStore.java
  
  Index: PropertyStore.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.utils;
  
  import java.io.File;
  import java.io.FileInputStream;
  import java.io.FileNotFoundException;
  import java.io.FileOutputStream;
  import java.io.IOException;
  import java.util.Properties;
  
  import org.apache.geronimo.ews.ws4j2ee.toWs.GenerationConstants;
  
  /**
   * @author hemapani@opensource.lk
   */
  public class PropertyStore {
  	private Properties properties;
  	private File file;
  	public PropertyStore(){
  		File baseDir = new File(".");
  		String path = baseDir.getAbsolutePath();
  		if(path.endsWith("incubator-geronimo")
  			||path.endsWith("incubator-geronimo\\")
  			||path.endsWith("incubator-geronimo/")){
  			path = new File("./modules/axis/").getAbsolutePath();
  		}
  		file = new File(path,"target/"+GenerationConstants.WS4J2EE_PROPERTY_FILE);
  		
  		file.getParentFile().mkdirs();
  		FileInputStream in = null;
  		System.out.println(file.getAbsolutePath() + " created .. ");
          try {
              properties = new Properties();
              if(file.exists()){
              	in = new FileInputStream(file);
              	properties.load(in);
              }
          } catch (FileNotFoundException e) {
          } catch (IOException e) {
          }finally{
  			try{
  				if(in != null){
  					in.close();
  				}
  			}catch(Exception e){}
  
          }
  	}
  	public void store(String repository){
  		properties.setProperty(GenerationConstants.MAVEN_LOCAL_REPOSITARY,repository);
  		FileOutputStream out = null;
  		try {
  				out = new FileOutputStream(file);
  			properties.store(out,"repository Location");
  		} catch (FileNotFoundException e) {
  		} catch (IOException e) {
  		}finally{
  			try{
  				if(out != null){
  					out.close();
  				}
  			}catch(Exception e){}
  		}
  	}
  	
  	public static void main(String[] args){
  		try{
  			PropertyStore store = new PropertyStore();
  			store.store(args[0]);
  		}catch(Exception e){}
  	}
  }
  
  
  
  1.9       +10 -6     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.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- JARFile.java	12 Jul 2004 04:14:27 -0000	1.8
  +++ JARFile.java	19 Jul 2004 15:40:48 -0000	1.9
  @@ -69,6 +69,8 @@
   import java.util.jar.JarOutputStream;
   import java.util.zip.ZipEntry;
   
  +import org.apache.axis.components.logger.LogFactory;
  +import org.apache.commons.logging.Log;
   import org.apache.geronimo.ews.ws4j2ee.toWs.GenerationFault;
   
   /**
  @@ -84,6 +86,9 @@
    * @author Srinath Perera(hemapani@opensource.lk)
    */
   public class JARFile {
  +	protected static Log log =
  +				LogFactory.getLog(JARFile.class.getName());
  +	
       private HashMap jarEntries;
       private File path;
   
  @@ -99,7 +104,7 @@
   
       public void addJarFile(String jarFile) throws GenerationFault {
           try {
  -			System.out.println("# " + jarFile + " added ....");
  +			log.info(jarFile + " added ....");
               
               JarFile file = new JarFile(jarFile);
               Enumeration e = file.entries();
  @@ -109,7 +114,9 @@
                       new JARFileEntry(
                           entry.getName(),
                           file.getInputStream(entry));
  -                this.jarEntries.put(entry.getName(), newEntry);
  +                if(!jarEntries.containsKey(entry.getName())){
  +					this.jarEntries.put(entry.getName(), newEntry);
  +                }        
               }
           } catch (IOException e) {
               e.printStackTrace();
  @@ -124,9 +131,6 @@
       public void createNewJarFile() throws IOException {
           if (!path.exists())
               path.createNewFile();
  -
  -        System.out.println("  creating " + path.getAbsolutePath() + ".......");
  -
           BufferedOutputStream bo =
               new BufferedOutputStream(new FileOutputStream(path));
           JarOutputStream jo = new JarOutputStream(bo);
  @@ -134,7 +138,7 @@
           for (; it.hasNext();) {
   
               JARFileEntry jarentry = (JARFileEntry) it.next();
  -            System.out.println("## "+jarentry.getJarEntry().getName() + " adding ..");
  +			log.info(jarentry.getJarEntry().getName() + " adding");
               InputStream instream = null;
               //            File input = new File(jarentry.getSource());
   
  
  
  
  1.6       +7 -2      ws-axis/contrib/ews/src/org/apache/geronimo/ews/ws4j2ee/utils/packager/Packager.java
  
  Index: Packager.java
  ===================================================================
  RCS file: /home/cvs/ws-axis/contrib/ews/src/org/apache/geronimo/ews/ws4j2ee/utils/packager/Packager.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- Packager.java	12 Jul 2004 04:14:27 -0000	1.5
  +++ Packager.java	19 Jul 2004 15:40:48 -0000	1.6
  @@ -60,9 +60,14 @@
   import java.io.IOException;
   import java.util.ArrayList;
   
  +import org.apache.axis.components.logger.LogFactory;
  +import org.apache.commons.logging.Log;
   import org.apache.geronimo.ews.ws4j2ee.toWs.GenerationFault;
   
   public class Packager {
  +	protected static Log log =
  +			LogFactory.getLog(Packager.class.getName());
  +			
       private String[] args;
   
       public Packager(String[] args) throws GenerationFault {
  @@ -73,7 +78,7 @@
           try {
               JARFile jfile = new JARFile(new File(args[0]));
   			
  -			System.out.println("######### creating the jar "+args[0]+"############");
  +			log.info("creating the jar "+args[0]);
               for (int i = 1; i < args.length; i++) {
                   if (args[i].endsWith(".jar")) {
                       jfile.addJarFile(args[i]);
  @@ -96,7 +101,7 @@
   
                   
               }
  -			System.out.println("####################### JAR FILE CREATED ###########################");
  +			log.info("jar file creation done ");
               jfile.createNewJarFile();
           } catch (IOException e) {
               throw GenerationFault.createGenerationFault(e);
  
  
  
  1.3       +1 -1      ws-axis/contrib/ews/src/org/apache/geronimo/ews/ws4j2ee/utils/packager/load/PackageModuleFactory.java
  
  Index: PackageModuleFactory.java
  ===================================================================
  RCS file: /home/cvs/ws-axis/contrib/ews/src/org/apache/geronimo/ews/ws4j2ee/utils/packager/load/PackageModuleFactory.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- PackageModuleFactory.java	12 Jul 2004 04:14:27 -0000	1.2
  +++ PackageModuleFactory.java	19 Jul 2004 15:40:48 -0000	1.3
  @@ -51,7 +51,7 @@
   					throw new UnrecoverableGenerationFault("unknown type of file");
               }
           } catch (GenerationFault e) {
  -            throw new UnrecoverableGenerationFault(e);
  +            throw new UnrecoverableGenerationFault(path + " not found ",e);
           }
           throw new UnrecoverableGenerationFault("path is null");
       }
  
  
  

Mime
View raw message