ws-ews-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hemap...@apache.org
Subject svn commit: r153710 [2/3] - in webservices/ews/trunk: ./ conf/ samples/clients/ samples/ejb/bookquote/ samples/ejb/echo/ samples/ejb/google/ samples/ejb/math/ samples/ejb/time/ samples/ejb/zip/ samples/servlet/echo/ samples/servlet/echo/org/apache/ws/echosample/ samples/servlet/math/ schema/ src/org/apache/geronimo/ews/jaxrpcmapping/ src/org/apache/geronimo/ews/ws4j2ee/context/ src/org/apache/geronimo/ews/ws4j2ee/context/impl/ src/org/apache/geronimo/ews/ws4j2ee/module/ src/org/apache/geronimo/ews/ws4j2ee/parsers/ src/org/apache/geronimo/ews/ws4j2ee/toWs/ src/org/apache/geronimo/ews/ws4j2ee/toWs/impl/ src/org/apache/geronimo/ews/ws4j2ee/toWs/misc/ src/org/apache/geronimo/ews/ws4j2ee/toWs/wrapperWs/ src/org/apache/geronimo/ews/ws4j2ee/utils/ src/org/apache/geronimo/ews/ws4j2ee/utils/packager/ src/org/apache/geronimo/ews/ws4j2ee/wsutils/ test/org/apache/geronimo/ews/ws4j2ee/ test/org/apache/geronimo/ews/ws4j2ee/providerUsage/ test/org/apache/geronimo/ews/ws4j2ee/seviceRef/ test/testData/math/
Date Mon, 14 Feb 2005 04:26:14 GMT
Modified: webservices/ews/trunk/src/org/apache/geronimo/ews/ws4j2ee/toWs/misc/BuildFileGenerator.java
URL: http://svn.apache.org/viewcvs/webservices/ews/trunk/src/org/apache/geronimo/ews/ws4j2ee/toWs/misc/BuildFileGenerator.java?view=diff&r1=153709&r2=153710
==============================================================================
--- webservices/ews/trunk/src/org/apache/geronimo/ews/ws4j2ee/toWs/misc/BuildFileGenerator.java (original)
+++ webservices/ews/trunk/src/org/apache/geronimo/ews/ws4j2ee/toWs/misc/BuildFileGenerator.java Sun Feb 13 20:26:05 2005
@@ -1,231 +1,226 @@
-/*
- * 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.misc;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.apache.geronimo.ews.ws4j2ee.context.InputOutputFile;
-import org.apache.geronimo.ews.ws4j2ee.context.J2EEWebServiceContext;
-import org.apache.geronimo.ews.ws4j2ee.toWs.GenerationConstants;
-import org.apache.geronimo.ews.ws4j2ee.toWs.GenerationFault;
-import org.apache.geronimo.ews.ws4j2ee.toWs.Generator;
-import org.apache.geronimo.ews.ws4j2ee.toWs.dd.JaxrpcMapperGenerator;
-
-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.ArrayList;
-import java.util.Properties;
-import java.util.StringTokenizer;
-
-/**
- * @author Srinath Perera(hemapani@opensource.lk)
- */
-public class BuildFileGenerator implements Generator {
-    private J2EEWebServiceContext j2eewscontext;
-
-    protected static Log log =
-            LogFactory.getLog(JaxrpcMapperGenerator.class.getName());
-
-    public BuildFileGenerator(J2EEWebServiceContext j2eewscontext) throws GenerationFault {
-        this.j2eewscontext = j2eewscontext;
-    }
-
-    public void generate() throws GenerationFault {
-        try {
-            String buildfile = j2eewscontext.getMiscInfo().getOutPutPath() + "/build.xml";
-            if (j2eewscontext.getMiscInfo().isVerbose())
-                log.info("genarating " + buildfile + ".................");
-            PrintWriter out = new PrintWriter(new FileWriter(buildfile));
-            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");
-            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");
-                    if (!(new File(location)).exists()) {
-                        j2eewscontext.getMiscInfo().setCompile(false);
-                    }
-                } 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 = null;
-            if (file != null) {
-                tempfile = new File(file.getParent(), "classes");
-            }
-            if (tempfile == null) {
-                tempfile = new File("./target/classes");
-            }
-            out.write("		<pathelement location=\"" + tempfile.getCanonicalPath() + "\"/>");
-            tempfile = new File("target/test-classes");
-            out.write("		<pathelement location=\"" + tempfile.getCanonicalPath() + "\"/>");
-            ArrayList classpathelements = j2eewscontext.getMiscInfo().getClasspathElements();
-            if (classpathelements != null) {
-                for (int i = 0; i < classpathelements.size(); i++) {
-                    out.write("		<pathelement location=\""
-                            + ((File) classpathelements.get(i)).getCanonicalPath() + "\"/>\n");
-                }
-            }
-            if (prpertyIn != null) {
-                out.write("		<fileset dir=\"${maven.repo.local}\">\n");
-                out.write("		    <include name=\"axis/**/*.jar\"/>\n");
-                out.write("			<include name=\"commons-logging/**/*.jar\"/>\n");
-                out.write("			<include name=\"commons-discovery/**/*.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("         <include name=\"ews/**/*.jar\"/>\n");
-                out.write("         <include name=\"openejb/**/*.jar\"/>\n");
-                out.write("		</fileset>\n");
-            }
-
-            out.write("	</path>\n");
-            out.write("	<target name=\"compile\">\n");
-            out.write("	   <mkdir dir=\"${build.classes}\"/>\n");
-            out.write("    <delete>\n");
-            out.write("         <fileset dir=\"${build.classes}\">\n");
-            out.write("             <include name=\"**\"/>\n");
-            out.write("         </fileset>\n");
-            out.write("    </delete>\n");
-            out.write("	   <mkdir dir=\"${build.lib}\"/>\n");
-            out.write("		<javac destdir=\"${build.classes}\" source=\"1.3\" debug=\"on\">\n");
-            out.write("			<classpath refid=\"classpath\" />\n");
-            out.write("			<src path=\"${src}\"/>\n");
-            out.write("		</javac>\n");
-            out.write("	</target>\n");
-            out.write("	<target name=\"jar\" depends=\"compile\">\n");
-            out.write("		<mkdir dir=\"${build.classes}/META-INF/\"/>\n");
-            writeFileCopyStatement(j2eewscontext.getMiscInfo().getJaxrpcfile(), out);
-            writeFileCopyStatement(j2eewscontext.getMiscInfo().getWsdlFile(), out);
-            writeFileCopyStatement(j2eewscontext.getMiscInfo().getWsconffile(), out);
-			
-            out.write("		<copy todir=\"${build.classes}\">\n");
-            out.write("			<fileset dir=\"${src}\">\n");
-            out.write("             <include name=\"*.properties\"/>\n");
-            out.write("				<include name=\"META-INF/*.xml\"/>\n");
-            out.write("				<include name=\"WEB-INF/*.xml\"/>\n");
-            out.write("				<include name=\"META-INF/*.wsdl\"/>\n");
-            out.write("				<include name=\"META-INF/*.wsdd\"/>\n");
-            out.write("             <include name=\"WEB-INF/*.wsdl\"/>\n");
-            out.write("             <include name=\"WEB-INF/*.wsdd\"/>\n");
-            out.write("             <include name=\"*.wsdl\"/>\n");
-            out.write("             <include name=\"*.wsdd\"/>\n");
-            out.write("             <exclude name=\"build**\"/>\n");
-            out.write("			</fileset>\n");
-            out.write("		</copy>\n");
-            String jarName = j2eewscontext.getWSDLContext().getTargetPortType().getName().toLowerCase();
-            int index = jarName.lastIndexOf(".");
-            if (index > 0) {
-                jarName = jarName.substring(index + 1);
-            }
-            String finalJarFile = j2eewscontext.getMiscInfo().getOutPutPath() + "/" + jarName + "-ewsimpl.jar";
-            File jarFile = new File(finalJarFile);
-            String tempFile = "${build}/lib/" + jarName + "-temp.jar";
-            out.write("		<jar jarfile=\"" + tempFile + "\" basedir=\"${build.classes}\" >\n");
-            out.write("		<include name=\"**\" />\n");
-            out.write("		<manifest>\n");
-            out.write("			<section name=\"org/apache/ws4j2ee\">\n");
-            out.write("			<attribute name=\"Implementation-Title\" value=\"Apache jsr109 impl\"/>\n");
-            out.write("			<attribute name=\"Implementation-Vendor\" value=\"Apache Web Services\"/>\n");
-            out.write("			</section>\n");
-            out.write("		</manifest>\n");
-            out.write("		</jar>\n");
-            out.write("     <java classname=\"org.apache.geronimo.ews.ws4j2ee.utils.packager.Packager\" fork=\"no\" >\n");
-            out.write("     	<arg value=\"" + jarFile.getCanonicalPath() + "\"/>\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)).getCanonicalPath() + "\"/>\n");
-            }
-            out.write("     </java>\n");
-            out.write("	</target>\n");
-            out.write("	<target name=\"dist\" depends=\"jar\"/>\n  ");
-            out.write("	<target name=\"clean\">\n");
-            out.write("		<delete dir=\"${build}\"/>\n");
-            out.write("	</target>\n");
-			
-            out.write("</project>\n");
-            out.close();
-        } catch (IOException e) {
-            log.error(e);
-            throw GenerationFault.createGenerationFault(e);
-        }
-    }
-
-    private StringTokenizer getClasspathComponets() {
-        String classpath = System.getProperty("java.class.path");
-        String spearator = System.getProperties().getProperty("path.separator");
-        return new StringTokenizer(classpath, spearator);
-    }
-
-    private void writeFileCopyStatement(InputOutputFile file, PrintWriter out) throws GenerationFault {
-        try {
-            if (file != null) {
-                String fileName = file.fileName();
-                if (fileName != null) {
-                    File absFile = new File(fileName);
-                    if (absFile.exists())
-                        out.write("		<copy file =\"" + absFile.getCanonicalPath() + "\" todir=\"${build.classes}/META-INF\"/>\n");
-                }
-            }
-        } catch (Exception e) {
-        }
-    }
-}
+///*
+// * 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.misc;
+//
+//import org.apache.commons.logging.Log;
+//import org.apache.commons.logging.LogFactory;
+//import org.apache.geronimo.ews.ws4j2ee.context.InputOutputFile;
+//import org.apache.geronimo.ews.ws4j2ee.context.J2EEWebServiceContext;
+//import org.apache.geronimo.ews.ws4j2ee.toWs.GenerationConstants;
+//import org.apache.geronimo.ews.ws4j2ee.toWs.GenerationFault;
+//import org.apache.geronimo.ews.ws4j2ee.toWs.Generator;
+//import org.apache.geronimo.ews.ws4j2ee.toWs.dd.JaxrpcMapperGenerator;
+//
+//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.ArrayList;
+//import java.util.Properties;
+//import java.util.StringTokenizer;
+//
+///**
+// * @author Srinath Perera(hemapani@opensource.lk)
+// */
+//public class BuildFileGenerator implements Generator {
+//    private J2EEWebServiceContext j2eewscontext;
+//
+//    protected static Log log =
+//            LogFactory.getLog(JaxrpcMapperGenerator.class.getName());
+//
+//    public BuildFileGenerator(J2EEWebServiceContext j2eewscontext) throws GenerationFault {
+//        this.j2eewscontext = j2eewscontext;
+//    }
+//
+//    public void generate() throws GenerationFault {
+//        try {
+//            String buildfile = j2eewscontext.getMiscInfo().getOutPutPath() + "/build.xml";
+//            if (j2eewscontext.getMiscInfo().isVerbose())
+//                log.info("genarating " + buildfile + ".................");
+//            PrintWriter out = new PrintWriter(new FileWriter(buildfile));
+//            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");
+//            Properties pro = new Properties();
+//            
+//            ClassLoader cl = Thread.currentThread().getContextClassLoader();
+//            
+//            
+//            InputStream prpertyIn = cl.getResourceAsStream(GenerationConstants.WS4J2EE_PROPERTY_FILE);
+//            if (prpertyIn != null) {
+//                pro.load(prpertyIn);
+//                System.setProperties(pro);
+//                String location = null;
+//                try {
+//                    pro.load(prpertyIn);
+//                } finally {
+//                    prpertyIn.close();
+//                }    
+//            } else {
+//                System.out.println("property file not found");
+//            }
+//        
+//            String location = System.getProperty(GenerationConstants.MAVEN_LOCAL_REPOSITARY);
+//            if (location != null) {
+////                out.write(" <property name=\"maven.repo.local\" location=\"" + location + "\"/>\n");
+//                out.write(" <property name=\"maven.repo.local\" location=\"${user.home}/.maven/repository\"/>\n");
+//                if (!(new File(location)).exists()) {
+//                    j2eewscontext.getMiscInfo().setCompile(false);
+//                }
+//            } else {
+//                prpertyIn = null;
+//            }
+//
+//
+//            out.write("	<path id=\"classpath\" >\n");
+//            File file = new File(".");
+////            System.out.println(file.getAbsolutePath());
+//            File tempfile = new File(file,"target/classes");
+////            System.out.println(tempfile.getName());
+////            System.out.println(tempfile.getCanonicalPath());
+////            System.out.println(tempfile.getAbsolutePath());
+////            System.out.println(tempfile.getAbsolutePath());
+//            if(tempfile.exists()){
+//                out.write("     <pathelement location=\"target/classes\"/>");
+//            }
+//            
+//            ArrayList classpathelements = j2eewscontext.getMiscInfo().getClasspathElements();
+//            if (classpathelements != null) {
+//                for (int i = 0; i < classpathelements.size(); i++) {
+//                    File pathFile = (File) classpathelements.get(i);
+//                    System.out.println(pathFile.getName());
+//                    out.write("		<pathelement location=\""
+//                            + pathFile.getName() + "\"/>\n");
+//                }
+//            }
+//            if (prpertyIn != null) {
+//                out.write("		<fileset dir=\"${maven.repo.local}\">\n");
+//                out.write("		    <include name=\"axis/**/*.jar\"/>\n");
+//                out.write("			<include name=\"commons-logging/**/*.jar\"/>\n");
+//                out.write("			<include name=\"commons-discovery/**/*.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("         <include name=\"ews/**/*.jar\"/>\n");
+//                out.write("         <include name=\"openejb/**/*.jar\"/>\n");
+//                out.write("		</fileset>\n");
+//            }
+//
+//            out.write("	</path>\n");
+//            out.write("	<target name=\"compile\">\n");
+//            out.write("	   <mkdir dir=\"${build.classes}\"/>\n");
+//            out.write("    <delete>\n");
+//            out.write("         <fileset dir=\"${build.classes}\">\n");
+//            out.write("             <include name=\"**\"/>\n");
+//            out.write("         </fileset>\n");
+//            out.write("    </delete>\n");
+//            out.write("	   <mkdir dir=\"${build.lib}\"/>\n");
+//            out.write("		<javac destdir=\"${build.classes}\" source=\"1.3\" debug=\"on\">\n");
+//            out.write("			<classpath refid=\"classpath\" />\n");
+//            out.write("			<src path=\"${src}\"/>\n");
+//            out.write("		</javac>\n");
+//            out.write("	</target>\n");
+//            out.write("	<target name=\"jar\" depends=\"compile\">\n");
+//            out.write("		<mkdir dir=\"${build.classes}/META-INF/\"/>\n");
+//            writeFileCopyStatement(j2eewscontext.getMiscInfo().getJaxrpcfile(), out);
+//            writeFileCopyStatement(j2eewscontext.getMiscInfo().getWsdlFile(), out);
+//            writeFileCopyStatement(j2eewscontext.getMiscInfo().getWsconffile(), out);
+//			
+//            out.write("		<copy todir=\"${build.classes}\">\n");
+//            out.write("			<fileset dir=\"${src}\">\n");
+//            out.write("             <include name=\"*.properties\"/>\n");
+//            out.write("				<include name=\"META-INF/*.xml\"/>\n");
+//            out.write("				<include name=\"WEB-INF/*.xml\"/>\n");
+//            out.write("				<include name=\"META-INF/*.wsdl\"/>\n");
+//            out.write("				<include name=\"META-INF/*.wsdd\"/>\n");
+//            out.write("             <include name=\"WEB-INF/*.wsdl\"/>\n");
+//            out.write("             <include name=\"WEB-INF/*.wsdd\"/>\n");
+//            out.write("             <include name=\"*.wsdl\"/>\n");
+//            out.write("             <include name=\"*.wsdd\"/>\n");
+//            out.write("             <exclude name=\"build**\"/>\n");
+//            out.write("			</fileset>\n");
+//            out.write("		</copy>\n");
+//            String jarName = j2eewscontext.getWSDLContext().getTargetPortType().getName().toLowerCase();
+//            int index = jarName.lastIndexOf(".");
+//            if (index > 0) {
+//                jarName = jarName.substring(index + 1);
+//            }
+//            String finalJarFile = j2eewscontext.getMiscInfo().getOutPutPath() + "/" + jarName + "-ewsimpl.jar";
+//            File jarFile = new File(finalJarFile);
+//            String tempFile = "${build}/lib/" + jarName + "-temp.jar";
+//            out.write("		<jar jarfile=\"" + tempFile + "\" basedir=\"${build.classes}\" >\n");
+//            out.write("		<include name=\"**\" />\n");
+//            out.write("		<manifest>\n");
+//            out.write("			<section name=\"org/apache/ws4j2ee\">\n");
+//            out.write("			<attribute name=\"Implementation-Title\" value=\"Apache jsr109 impl\"/>\n");
+//            out.write("			<attribute name=\"Implementation-Vendor\" value=\"Apache Web Services\"/>\n");
+//            out.write("			</section>\n");
+//            out.write("		</manifest>\n");
+//            out.write("		</jar>\n");
+//            out.write("     <java classname=\"org.apache.geronimo.ews.ws4j2ee.utils.packager.Packager\" fork=\"no\" >\n");
+//            out.write("     	<arg value=\"" + jarFile.getName() + "\"/>\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)).getName() + "\"/>\n");
+//            }
+//            out.write("     </java>\n");
+//            out.write("	</target>\n");
+//            out.write("	<target name=\"dist\" depends=\"jar\"/>\n  ");
+//            out.write("	<target name=\"clean\">\n");
+//            out.write("		<delete dir=\"${build}\"/>\n");
+//            out.write("	</target>\n");
+//			
+//            out.write("</project>\n");
+//            out.close();
+//        } catch (IOException e) {
+//            log.error(e);
+//            throw GenerationFault.createGenerationFault(e);
+//        }
+//    }
+//
+//    private StringTokenizer getClasspathComponets() {
+//        String classpath = System.getProperty("java.class.path");
+//        String spearator = System.getProperties().getProperty("path.separator");
+//        return new StringTokenizer(classpath, spearator);
+//    }
+//
+//    private void writeFileCopyStatement(InputOutputFile file, PrintWriter out) throws GenerationFault {
+//        try {
+//            if (file != null) {
+//                String fileName = file.fileName();
+//                if (fileName != null) {
+//                    File absFile = new File(fileName);
+//                    if (absFile.exists())
+//                        out.write("		<copy file =\"" + absFile.getCanonicalPath() + "\" todir=\"${build.classes}/META-INF\"/>\n");
+//                }
+//            }
+//        } catch (Exception e) {
+//        }
+//    }
+//}

Modified: webservices/ews/trunk/src/org/apache/geronimo/ews/ws4j2ee/toWs/wrapperWs/WebEndpointWrapperClassWriter.java
URL: http://svn.apache.org/viewcvs/webservices/ews/trunk/src/org/apache/geronimo/ews/ws4j2ee/toWs/wrapperWs/WebEndpointWrapperClassWriter.java?view=diff&r1=153709&r2=153710
==============================================================================
--- webservices/ews/trunk/src/org/apache/geronimo/ews/ws4j2ee/toWs/wrapperWs/WebEndpointWrapperClassWriter.java (original)
+++ webservices/ews/trunk/src/org/apache/geronimo/ews/ws4j2ee/toWs/wrapperWs/WebEndpointWrapperClassWriter.java Sun Feb 13 20:26:05 2005
@@ -95,7 +95,7 @@
     }
 
     protected void writeConstructors() throws GenerationFault {
-        out.write("\tpublic " + classname + "()throws org.apache.geronimo.ews.ws4j2ee.wsutils.J2EEFault{\n");
+        out.write("\tpublic " + classname + "()throws org.apache.axis.AxisFault{\n");
         out.write("\t\tbean = (" + implBean + ")org.apache.geronimo.ews.ws4j2ee.wsutils.ImplBeanPool.getImplBean(\""
                 + implBean + "\");\n");
         out.write("\t}\n");

Modified: webservices/ews/trunk/src/org/apache/geronimo/ews/ws4j2ee/utils/AntExecuter.java
URL: http://svn.apache.org/viewcvs/webservices/ews/trunk/src/org/apache/geronimo/ews/ws4j2ee/utils/AntExecuter.java?view=diff&r1=153709&r2=153710
==============================================================================
--- webservices/ews/trunk/src/org/apache/geronimo/ews/ws4j2ee/utils/AntExecuter.java (original)
+++ webservices/ews/trunk/src/org/apache/geronimo/ews/ws4j2ee/utils/AntExecuter.java Sun Feb 13 20:26:05 2005
@@ -16,25 +16,15 @@
 
 package org.apache.geronimo.ews.ws4j2ee.utils;
 
+import java.io.File;
+import java.util.jar.JarOutputStream;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
 import org.apache.geronimo.ews.ws4j2ee.context.J2EEWebServiceContext;
-import org.apache.geronimo.ews.ws4j2ee.toWs.GenerationConstants;
 import org.apache.geronimo.ews.ws4j2ee.toWs.GenerationFault;
-import org.apache.geronimo.ews.ws4j2ee.utils.packager.ModulePackager;
 import org.apache.tools.ant.Project;
 import org.apache.tools.ant.taskdefs.Ant;
-import org.apache.tools.ant.taskdefs.Javac;
-import org.apache.tools.ant.types.FileSet;
-import org.apache.tools.ant.types.Path;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.util.ArrayList;
-import java.util.Properties;
-import java.util.jar.JarOutputStream;
 
 /**
  * <p>To call this Class and execute a ant task the $JAVA_HOME/lib/tool.jar need
@@ -84,20 +74,20 @@
         }
     }
 
-    public void execute() throws GenerationFault {
-        try {
-            Class.forName("com.sun.tools.javac.Main");
-            File outDir = new File(wscontext.getMiscInfo().getOutPutPath());
-            File dest = new File(outDir, "build/classes");
-            compile(outDir, dest);
-            createModule(outDir, dest);
-        } catch (IOException e) {
-            log.error(e);
-            throw GenerationFault.createGenerationFault(e);
-        } 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");
+//    public void execute() throws GenerationFault {
+//        try {
+//            Class.forName("com.sun.tools.javac.Main");
+//            File outDir = new File(wscontext.getMiscInfo().getOutPutPath());
+//            File dest = new File(outDir, "build/classes");
+//            compile(outDir, dest);
+//            createModule(outDir, dest);
+//        } catch (IOException e) {
+//            log.error(e);
+//            throw GenerationFault.createGenerationFault(e);
+//        } 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");
 //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 :) 
@@ -105,126 +95,126 @@
 //          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");
-        }
-    }
-
-    private void createModule(File outDir, File dest) throws IOException {
-        String jarName = wscontext.getWSDLContext().getTargetPortType().getName().toLowerCase();
-        int index = jarName.lastIndexOf(".");
-        if (index > 0) {
-            jarName = jarName.substring(index + 1);
-        }
-        ModulePackager module = new ModulePackager(new File(outDir, jarName + "-ewsImpl.jar"));
-        module.addClassFiles(dest);
-        ArrayList classpathelements = wscontext.getMiscInfo().getClasspathElements();
-        if (classpathelements != null) {
-            for (int i = 0; i < classpathelements.size(); i++) {
-                module.addJarFile((File) classpathelements.get(i));
-            }
-        }
-        File dir = outDir;
-        File[] files = dir.listFiles();
-        if (files != null) {
-            for (int i = 0; i < files.length; i++) {
-                String file = files[i].getName();
-                if (files[i].isFile() &&
-                        !(file.endsWith(".jar") ||
-                        file.endsWith(".zip") ||
-                        file.endsWith(".war") ||
-                        file.endsWith(".ear") ||
-                        file.endsWith(".java"))
-                ) {
-                    module.addFileToJar(file, files[i]);
-                }
-            }
-        }
-        dir = new File(outDir, "META-INF");
-        files = dir.listFiles();
-        if (files != null) {
-            for (int i = 0; i < files.length; i++) {
-                String file = files[i].getName();
-                if (files[i].isFile() &&
-                        !(file.endsWith(".jar") ||
-                        file.endsWith(".zip") ||
-                        file.endsWith(".war") ||
-                        file.endsWith(".ear") ||
-                        file.endsWith(".java"))
-                ) {
-                    module.addFileToJar("META-INF/" + file, files[i]);
-                }
-            }
-        }
-        module.finalizeJar();
-    }
-
-    private void compile(File outDir, File destDir) throws IOException {
-        Project project = new Project();
-        project.init();
-        project.setCoreLoader(Thread.currentThread().getContextClassLoader());
-        Javac comp = new Javac();
-        comp.setProject(project);
-        destDir.mkdirs();
-        comp.setDestdir(destDir);
-        Path path = new Path(project);
-        path.setLocation(outDir);
-        comp.setSrcdir(path);
-        File repository = findMavenRepository();
-        if (repository != null) {
-            Path compileClasspath = new Path(project);
-            FileSet fileset = new FileSet();
-            fileset.setDir(repository);
-            fileset.setIncludes("axis/**/*.jar");
-            fileset.setIncludes("geronimo-spec/**/*.jar");
-            fileset.setIncludes("geronimo/**/*.jar");
-            fileset.setIncludes("sec/**/*.jar");
-            fileset.setIncludes("dom4j/**/*.jar");
-            fileset.setIncludes("jaxb-ri/**/*.jar");
-            fileset.setIncludes("xerces/**/*.jar");
-            fileset.setIncludes("ews/**/*.jar");
-            fileset.setIncludes("openejb/**/*.jar");
-            compileClasspath.addFileset(fileset);
-            comp.setClasspath(compileClasspath);
-        } else {
-        }
-        comp.init();
-        comp.execute();
-    }
-
-    private File findMavenRepository() throws IOException {
-        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) {
-                File locationFile = new File(location);
-                if (locationFile.exists()) {
-                    return locationFile;
-                }
-            }
-        }
-        return null;
-    }
+//        }
+//    }
+//
+//    private void createModule(File outDir, File dest) throws IOException {
+//        String jarName = wscontext.getWSDLContext().getTargetPortType().getName().toLowerCase();
+//        int index = jarName.lastIndexOf(".");
+//        if (index > 0) {
+//            jarName = jarName.substring(index + 1);
+//        }
+//        ModulePackager module = new ModulePackager(new File(outDir, jarName + "-ewsImpl.jar"));
+//        module.addClassFiles(dest);
+//        ArrayList classpathelements = wscontext.getMiscInfo().getClasspathElements();
+//        if (classpathelements != null) {
+//            for (int i = 0; i < classpathelements.size(); i++) {
+//                module.addJarFile((File) classpathelements.get(i));
+//            }
+//        }
+//        File dir = outDir;
+//        File[] files = dir.listFiles();
+//        if (files != null) {
+//            for (int i = 0; i < files.length; i++) {
+//                String file = files[i].getName();
+//                if (files[i].isFile() &&
+//                        !(file.endsWith(".jar") ||
+//                        file.endsWith(".zip") ||
+//                        file.endsWith(".war") ||
+//                        file.endsWith(".ear") ||
+//                        file.endsWith(".java"))
+//                ) {
+//                    module.addFileToJar(file, files[i]);
+//                }
+//            }
+//        }
+//        dir = new File(outDir, "META-INF");
+//        files = dir.listFiles();
+//        if (files != null) {
+//            for (int i = 0; i < files.length; i++) {
+//                String file = files[i].getName();
+//                if (files[i].isFile() &&
+//                        !(file.endsWith(".jar") ||
+//                        file.endsWith(".zip") ||
+//                        file.endsWith(".war") ||
+//                        file.endsWith(".ear") ||
+//                        file.endsWith(".java"))
+//                ) {
+//                    module.addFileToJar("META-INF/" + file, files[i]);
+//                }
+//            }
+//        }
+//        module.finalizeJar();
+//    }
+//
+//    private void compile(File outDir, File destDir) throws IOException {
+//        Project project = new Project();
+//        project.init();
+//        project.setCoreLoader(Thread.currentThread().getContextClassLoader());
+//        Javac comp = new Javac();
+//        comp.setProject(project);
+//        destDir.mkdirs();
+//        comp.setDestdir(destDir);
+//        Path path = new Path(project);
+//        path.setLocation(outDir);
+//        comp.setSrcdir(path);
+//        File repository = findMavenRepository();
+//        if (repository != null) {
+//            Path compileClasspath = new Path(project);
+//            FileSet fileset = new FileSet();
+//            fileset.setDir(repository);
+//            fileset.setIncludes("axis/**/*.jar");
+//            fileset.setIncludes("geronimo-spec/**/*.jar");
+//            fileset.setIncludes("geronimo/**/*.jar");
+//            fileset.setIncludes("sec/**/*.jar");
+//            fileset.setIncludes("dom4j/**/*.jar");
+//            fileset.setIncludes("jaxb-ri/**/*.jar");
+//            fileset.setIncludes("xerces/**/*.jar");
+//            fileset.setIncludes("ews/**/*.jar");
+//            fileset.setIncludes("openejb/**/*.jar");
+//            compileClasspath.addFileset(fileset);
+//            comp.setClasspath(compileClasspath);
+//        } else {
+//        }
+//        comp.init();
+//        comp.execute();
+//    }
+//
+//    private File findMavenRepository() throws IOException {
+//        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) {
+//                File locationFile = new File(location);
+//                if (locationFile.exists()) {
+//                    return locationFile;
+//                }
+//            }
+//        }
+//        return null;
+//    }
 
 }

Modified: webservices/ews/trunk/src/org/apache/geronimo/ews/ws4j2ee/utils/FileUtils.java
URL: http://svn.apache.org/viewcvs/webservices/ews/trunk/src/org/apache/geronimo/ews/ws4j2ee/utils/FileUtils.java?view=diff&r1=153709&r2=153710
==============================================================================
--- webservices/ews/trunk/src/org/apache/geronimo/ews/ws4j2ee/utils/FileUtils.java (original)
+++ webservices/ews/trunk/src/org/apache/geronimo/ews/ws4j2ee/utils/FileUtils.java Sun Feb 13 20:26:05 2005
@@ -20,6 +20,7 @@
 import org.apache.commons.logging.LogFactory;
 
 import java.io.File;
+import java.io.FileInputStream;
 import java.io.FileOutputStream;
 import java.io.IOException;
 import java.io.InputStream;
@@ -36,6 +37,20 @@
 public class FileUtils {
     protected static Log log =
             LogFactory.getLog(FileUtils.class.getName());
+            
+    public static void copyFile(File in, File out) throws GenerationFault {
+        try {
+            FileInputStream ins = new FileInputStream(in);
+            FileOutputStream outs = new FileOutputStream(out);
+            copyFile(ins, outs);
+            ins.close();
+            outs.close();
+        } catch (Exception e) {
+            throw GenerationFault.createGenerationFault(e);
+        }
+    }
+    
+                
     public static void copyFile(InputStream in, OutputStream out) throws GenerationFault {
         try {
             byte[] buf = new byte[1024];

Modified: webservices/ews/trunk/src/org/apache/geronimo/ews/ws4j2ee/utils/Utils.java
URL: http://svn.apache.org/viewcvs/webservices/ews/trunk/src/org/apache/geronimo/ews/ws4j2ee/utils/Utils.java?view=diff&r1=153709&r2=153710
==============================================================================
--- webservices/ews/trunk/src/org/apache/geronimo/ews/ws4j2ee/utils/Utils.java (original)
+++ webservices/ews/trunk/src/org/apache/geronimo/ews/ws4j2ee/utils/Utils.java Sun Feb 13 20:26:05 2005
@@ -16,44 +16,30 @@
 
 package org.apache.geronimo.ews.ws4j2ee.utils;
 
-import org.apache.axis.Constants;
-import org.apache.axis.encoding.Base64;
+import java.io.File;
+import java.io.IOException;
+import java.io.InputStream;
+import java.lang.reflect.Method;
+import java.util.ArrayList;
+import java.util.StringTokenizer;
+
+import javax.xml.namespace.QName;
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.DocumentBuilderFactory;
+
+import org.apache.axis.AxisFault;
 import org.apache.axis.utils.ClassUtils;
 import org.apache.axis.utils.JavaUtils;
 import org.apache.geronimo.ews.ws4j2ee.context.J2EEWebServiceContext;
 import org.apache.geronimo.ews.ws4j2ee.toWs.GenerationFault;
-import org.apache.geronimo.ews.ws4j2ee.wsutils.J2EEFault;
-import org.w3c.dom.Attr;
-import org.w3c.dom.CharacterData;
 import org.w3c.dom.Document;
-import org.w3c.dom.Element;
-import org.w3c.dom.NamedNodeMap;
 import org.w3c.dom.Node;
 import org.w3c.dom.NodeList;
 import org.w3c.dom.Text;
+import org.xml.sax.EntityResolver;
 import org.xml.sax.InputSource;
 import org.xml.sax.SAXException;
 
-import javax.xml.namespace.QName;
-import javax.xml.parsers.DocumentBuilder;
-import javax.xml.parsers.DocumentBuilderFactory;
-import javax.xml.parsers.ParserConfigurationException;
-import javax.xml.parsers.SAXParserFactory;
-import java.io.ByteArrayInputStream;
-import java.io.File;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.UnsupportedEncodingException;
-import java.lang.reflect.Method;
-import java.net.HttpURLConnection;
-import java.net.MalformedURLException;
-import java.net.ProtocolException;
-import java.net.URL;
-import java.net.URLConnection;
-import java.util.ArrayList;
-import java.util.Stack;
-import java.util.StringTokenizer;
-
 /**
  * This class was taken from the axis XMLUtils. It should be properly adopted if to be used permanantly
  */
@@ -66,657 +52,6 @@
             "javax.xml.parsers.SAXParserFactory";
 
     private static DocumentBuilderFactory dbf = getDOMFactory();
-    private static SAXParserFactory saxFactory;
-    private static Stack saxParsers = new Stack();
-
-    private static String empty = new String("");
-    private static ByteArrayInputStream bais = new ByteArrayInputStream(empty.getBytes());
-
-    static {
-        // Initialize SAX Parser factory defaults
-        initSAXFactory(null, true, false);
-    }
-
-    /**
-     * Encode a string appropriately for XML.
-     * Lifted from ApacheSOAP 2.2 (org.apache.soap.Utils)
-     *
-     * @param orig the String to encode
-     * @return a String in which XML special chars are repalced by entities
-     */
-    public static String xmlEncodeString(String orig) {
-        if (orig == null) {
-            return "";
-        }
-        char[] chars = orig.toCharArray();
-
-        // if the string doesn't have any of the magic characters, leave
-        // it alone.
-        boolean needsEncoding = false;
-        search:
-        for (int i = 0; i < chars.length; i++) {
-            switch (chars[i]) {
-                case '&':
-                case '"':
-                case '\'':
-                case '<':
-                case '>':
-                    needsEncoding = true;
-                    break search;
-            }
-        }
-        if (!needsEncoding) return orig;
-        StringBuffer strBuf = new StringBuffer();
-        for (int i = 0; i < chars.length; i++) {
-            switch (chars[i]) {
-                case '&':
-                    strBuf.append("&amp;");
-                    break;
-                case '\"':
-                    strBuf.append("&quot;");
-                    break;
-                case '\'':
-                    strBuf.append("&apos;");
-                    break;
-                case '<':
-                    strBuf.append("&lt;");
-                    break;
-                case '\r':
-                    strBuf.append("&#xd;");
-                    break;
-                case '>':
-                    strBuf.append("&gt;");
-                    break;
-                default   :
-                    if (((int) chars[i]) > 127) {
-                        strBuf.append("&#");
-                        strBuf.append((int) chars[i]);
-                        strBuf.append(";");
-                    } else {
-                        strBuf.append(chars[i]);
-                    }
-            }
-        }
-        return strBuf.toString();
-    }
-
-    /**
-     * Initialize the SAX parser factory.
-     *
-     * @param factoryClassName The (optional) class name of the desired
-     *                         SAXParserFactory implementation. Will be
-     *                         assigned to the system property
-     *                         <b>javax.xml.parsers.SAXParserFactory</b>
-     *                         unless this property is already set.
-     *                         If <code>null</code>, leaves current setting
-     *                         alone.
-     * @param namespaceAware   true if we want a namespace-aware parser
-     * @param validating       true if we want a validating parser
-     */
-    public static void initSAXFactory(String factoryClassName,
-                                      boolean namespaceAware,
-                                      boolean validating) {
-        if (factoryClassName != null) {
-            try {
-                saxFactory = (SAXParserFactory) Class.forName(factoryClassName).
-                        newInstance();
-                /*
-                 * Set the system property only if it is not already set to
-                 * avoid corrupting environments in which Axis is embedded.
-                 */
-                if (System.getProperty(saxParserFactoryProperty) == null) {
-                    System.setProperty(saxParserFactoryProperty,
-                            factoryClassName);
-                }
-            } catch (Exception e) {
-//                log.error(Messages.getMessage("exception00"), e);
-                saxFactory = null;
-            }
-        } else {
-            saxFactory = SAXParserFactory.newInstance();
-        }
-        saxFactory.setNamespaceAware(namespaceAware);
-        saxFactory.setValidating(validating);
-
-        // Discard existing parsers
-        saxParsers.clear();
-    }
-
-    private static DocumentBuilderFactory getDOMFactory() {
-        DocumentBuilderFactory dbf;
-        try {
-            dbf = DocumentBuilderFactory.newInstance();
-            dbf.setNamespaceAware(true);
-        } catch (Exception e) {
-//            log.error(Messages.getMessage("exception00"), e );
-            dbf = null;
-        }
-        return (dbf);
-    }
-
-    private static boolean tryReset = true;
-
-    /** Get a SAX parser instance from the JAXP factory.
-     *
-     * @return a SAXParser instance.
-     */
-//    public static synchronized SAXParser getSAXParser() {
-//        if(!saxParsers.empty()) {
-//            return (SAXParser )saxParsers.pop();
-//        }
-//
-//        try {
-//            SAXParser parser = saxFactory.newSAXParser();
-//            parser.getParser().setEntityResolver(new DefaultEntityResolver());
-//            XMLReader reader = parser.getXMLReader(); 
-//            reader.setEntityResolver(new DefaultEntityResolver());
-//            reader.setFeature("http://xml.org/sax/features/namespace-prefixes", false);
-//            return parser;
-//        } catch (ParserConfigurationException e) {
-//            log.error(Messages.getMessage("parserConfigurationException00"), e);
-//            return null;
-//        } catch (SAXException se) {
-//            log.error(Messages.getMessage("SAXException00"), se);
-//            return null;
-//        }
-//    }
-//
-//
-//    /** Return a SAX parser for reuse.
-//     * @param parser A SAX parser that is available for reuse
-//     */
-//    public static void releaseSAXParser(SAXParser parser) {
-//        if(!tryReset) return;
-//
-//        //Free up possible ref. held by past contenthandler.
-//        try{
-//            XMLReader xmlReader= parser.getXMLReader();
-//            if(null != xmlReader){
-////                xmlReader.setContentHandler(doNothingContentHandler);
-////                xmlReader.setDTDHandler(doNothingContentHandler);
-////                xmlReader.setEntityResolver(doNothingContentHandler);
-////                xmlReader.setErrorHandler(doNothingContentHandler);
-//                synchronized (XMLUtils.class ) {
-//                    saxParsers.push(parser);
-//                }
-//            }
-//            else {
-//                tryReset= false;
-//            }
-//        } catch (org.xml.sax.SAXException e) {
-//            tryReset= false;
-//        }
-//    }
-    /**
-     * Get an empty new Document
-     * @return Document
-     * @throws ParserConfigurationException if construction problems occur
-     */
-//    public static Document newDocument() 
-//         throws ParserConfigurationException
-//    {
-//        synchronized (dbf) {
-//            return dbf.newDocumentBuilder().newDocument();
-//        }
-//    }
-
-    /**
-     * Get a new Document read from the input source
-     *
-     * @return Document
-     * @throws ParserConfigurationException if construction problems occur
-     * @throws SAXException                 if the document has xml sax problems
-     * @throws IOException                  if i/o exceptions occur
-     */
-    public static Document newDocument(InputSource inp)
-            throws ParserConfigurationException, SAXException, IOException {
-        DocumentBuilder db;
-        synchronized (dbf) {
-            db = dbf.newDocumentBuilder();
-        }
-//        db.setEntityResolver(new DefaultEntityResolver());
-//        db.setErrorHandler( new ParserErrorHandler() );
-        return (db.parse(inp));
-    }
-
-    /**
-     * Get a new Document read from the input stream
-     *
-     * @return Document
-     * @throws ParserConfigurationException if construction problems occur
-     * @throws SAXException                 if the document has xml sax problems
-     * @throws IOException                  if i/o exceptions occur
-     */
-    public static Document newDocument(InputStream inp)
-            throws ParserConfigurationException, SAXException, IOException {
-        return Utils.newDocument(new InputSource(inp));
-    }
-
-    /**
-     * Get a new Document read from the indicated uri
-     *
-     * @return Document
-     * @throws ParserConfigurationException if construction problems occur
-     * @throws SAXException                 if the document has xml sax problems
-     * @throws IOException                  if i/o exceptions occur
-     */
-    public static Document newDocument(String uri)
-            throws ParserConfigurationException, SAXException, IOException {
-        // call the authenticated version as there might be 
-        // username/password info embeded in the uri.
-        return Utils.newDocument(uri, null, null);
-    }
-
-    /**
-     * Create a new document from the given URI, use the username and password
-     * if the URI requires authentication.
-     *
-     * @param uri      the resource to get
-     * @param username basic auth username
-     * @param password basic auth password
-     * @throws ParserConfigurationException if construction problems occur
-     * @throws SAXException                 if the document has xml sax problems
-     * @throws IOException                  if i/o exceptions occur
-     */
-    public static Document newDocument(String uri, String username, String password)
-            throws ParserConfigurationException, SAXException, IOException {
-        InputSource ins = Utils.getInputSourceFromURI(uri, username, password);
-        Document doc = Utils.newDocument(ins);
-        // Close the Stream
-        if (ins.getByteStream() != null) {
-            ins.getByteStream().close();
-        } else if (ins.getCharacterStream() != null) {
-            ins.getCharacterStream().close();
-        }
-        return doc;
-    }
-
-//    private static String privateElementToString(Element element,
-//                                                 boolean omitXMLDecl)
-//    {
-//        return DOM2Writer.nodeToString(element, omitXMLDecl);
-//    }
-
-    /**
-     * turn an element into an XML fragment
-     * @param element
-     * @return stringified element
-     */
-//    public static String ElementToString(Element element) {
-//        return privateElementToString(element, true);
-//    }
-
-    /**
-     * turn a whole DOM document into XML
-     * @param doc DOM document
-     * @return string representation of the document, including XML declaration
-     */
-//    public static String DocumentToString(Document doc) {
-//        return privateElementToString(doc.getDocumentElement(), false);
-//    }
-
-//    public static void privateElementToWriter(Element element, Writer writer,
-//                                              boolean omitXMLDecl,
-//                                              boolean pretty) {
-//        DOM2Writer.serializeAsXML(element, writer, omitXMLDecl, pretty);
-//    }
-//
-//    public static void ElementToStream(Element element, OutputStream out) {
-//        Writer writer = getWriter(out);
-//        privateElementToWriter(element, writer, true, false);
-//    }
-
-//    public static void PrettyElementToStream(Element element, OutputStream out) {
-//        Writer writer = getWriter(out);
-//        privateElementToWriter(element, writer, true, true);
-//    }
-//
-//    public static void ElementToWriter(Element element, Writer writer) {
-//        privateElementToWriter(element, writer, true, false);
-//    }
-
-//    public static void PrettyElementToWriter(Element element, Writer writer) {
-//        privateElementToWriter(element, writer, true, true);
-//    }
-//
-//    public static void DocumentToStream(Document doc, OutputStream out) {
-//        Writer writer = getWriter(out);
-//        privateElementToWriter(doc.getDocumentElement(), writer, false, false);
-//    }
-//
-//    public static void PrettyDocumentToStream(Document doc, OutputStream out) {
-//        Writer writer = getWriter(out);
-//        privateElementToWriter(doc.getDocumentElement(), writer, false, true);
-//    }
-//    
-//    private static Writer getWriter(OutputStream os) {
-//        Writer writer = null;
-//        try {
-//            writer = new OutputStreamWriter(os, "UTF-8");
-//        } catch (UnsupportedEncodingException uee) {
-//            log.error(Messages.getMessage("exception00"), uee);
-//            writer = new OutputStreamWriter(os);
-//        }
-//        return writer;
-//    }
-//
-//    public static void DocumentToWriter(Document doc, Writer writer) {
-//        privateElementToWriter(doc.getDocumentElement(), writer, false, false);
-//    }
-//
-//    public static void PrettyDocumentToWriter(Document doc, Writer writer) {
-//        privateElementToWriter(doc.getDocumentElement(), writer, false, true);
-//    }
-    /**
-     * Convert a simple string to an element with a text node
-     * 
-     * @param namespace - element namespace
-     * @param name - element name
-     * @param string - value of the text node
-     * @return element - an XML Element, null if no element was created
-     */ 
-//    public static Element StringToElement(String namespace, String name, String string) {
-//        try {
-//            Document doc = XMLUtils.newDocument();
-//            Element element = doc.createElementNS(namespace, name);
-//            Text text = doc.createTextNode(string);
-//            element.appendChild(text);
-//            return element;
-//        } 
-//        catch (ParserConfigurationException e) {
-//            // This should not occur
-//            throw new InternalException(e);
-//        }
-//    }
-
-    /**
-     * get the inner XML inside an element as a string. This is done by
-     * converting the XML to its string representation, then extracting the
-     * subset between beginning and end tags.
-     *
-     * @param element
-     * @return textual body of the element, or null for no inner body
-     */
-//    public static String getInnerXMLString(Element element) {
-//        String elementString = ElementToString(element);
-//        int start, end;
-//        start = elementString.indexOf(">") + 1;
-//        end = elementString.lastIndexOf("</");
-//        if (end > 0)
-//            return elementString.substring(start,end);
-//        else
-//            return null;
-//    }
-    public static String getPrefix(String uri, Node e) {
-        while (e != null && (e.getNodeType() == Element.ELEMENT_NODE)) {
-            NamedNodeMap attrs = e.getAttributes();
-            for (int n = 0; n < attrs.getLength(); n++) {
-                Attr a = (Attr) attrs.item(n);
-                String name;
-                if ((name = a.getName()).startsWith("xmlns:") &&
-                        a.getNodeValue().equals(uri)) {
-                    return name.substring(6);
-                }
-            }
-            e = e.getParentNode();
-        }
-        return null;
-    }
-
-    public static String getNamespace(String prefix, Node e) {
-        while (e != null && (e.getNodeType() == Node.ELEMENT_NODE)) {
-            Attr attr =
-                    ((Element) e).getAttributeNodeNS(Constants.NS_URI_XMLNS, prefix);
-            if (attr != null) return attr.getValue();
-            e = e.getParentNode();
-        }
-        return null;
-    }
-
-    /**
-     * Return a QName when passed a string like "foo:bar" by mapping
-     * the "foo" prefix to a namespace in the context of the given Node.
-     *
-     * @return a QName generated from the given string representation
-     */
-    public static QName getQNameFromString(String str, Node e) {
-        if (str == null || e == null)
-            return null;
-        int idx = str.indexOf(':');
-        if (idx > -1) {
-            String prefix = str.substring(0, idx);
-            String ns = getNamespace(prefix, e);
-            if (ns == null)
-                return null;
-            return new QName(ns, str.substring(idx + 1));
-        } else {
-            return new QName("", str);
-        }
-    }
-
-    /**
-     * Return a string for a particular QName, mapping a new prefix
-     * if necessary.
-     */
-    public static String getStringForQName(QName qname, Element e) {
-        String uri = qname.getNamespaceURI();
-        String prefix = getPrefix(uri, e);
-        if (prefix == null) {
-            int i = 1;
-            prefix = "ns" + i;
-            while (getNamespace(prefix, e) != null) {
-                i++;
-                prefix = "ns" + i;
-            }
-            e.setAttributeNS(Constants.NS_URI_XMLNS,
-                    "xmlns:" + prefix, uri);
-        }
-        return prefix + ":" + qname.getLocalPart();
-    }
-
-    /**
-     * Concat all the text and cdata node children of this elem and return
-     * the resulting text.
-     * (by Matt Duftler)
-     *
-     * @param parentEl the element whose cdata/text node values are to
-     *                 be combined.
-     * @return the concatanated string.
-     */
-    public static String getChildCharacterData(Element parentEl) {
-        if (parentEl == null) {
-            return null;
-        }
-        Node tempNode = parentEl.getFirstChild();
-        StringBuffer strBuf = new StringBuffer();
-        CharacterData charData;
-        while (tempNode != null) {
-            switch (tempNode.getNodeType()) {
-                case Node.TEXT_NODE:
-                case Node.CDATA_SECTION_NODE:
-                    charData = (CharacterData) tempNode;
-                    strBuf.append(charData.getData());
-                    break;
-            }
-            tempNode = tempNode.getNextSibling();
-        }
-        return strBuf.toString();
-    }
-    
-//    public static class ParserErrorHandler implements ErrorHandler
-//    {
-//        protected static Log log =
-//            LogFactory.getLog(ParserErrorHandler.class.getName());
-//        /**
-//         * Returns a string describing parse exception details
-//         */
-//        private String getParseExceptionInfo(SAXParseException spe) {
-//            String systemId = spe.getSystemId();
-//            if (systemId == null) {
-//                systemId = "null";
-//            }
-//            String info = "URI=" + systemId +
-//                " Line=" + spe.getLineNumber() +
-//                ": " + spe.getMessage();
-//            return info;
-//        }
-//
-//        // The following methods are standard SAX ErrorHandler methods.
-//        // See SAX documentation for more info.
-//
-////        public void warning(SAXParseException spe) throws SAXException {
-////            if (log.isDebugEnabled())
-////                log.debug( Messages.getMessage("warning00", getParseExceptionInfo(spe)));
-////        }
-//        
-//        public void error(SAXParseException spe) throws SAXException {
-//            String message = "Error: " + getParseExceptionInfo(spe);
-//            throw new SAXException(message);
-//        }
-//
-//        public void fatalError(SAXParseException spe) throws SAXException {
-//            String message = "Fatal Error: " + getParseExceptionInfo(spe);
-//            throw new SAXException(message);
-//        }
-//    }
-
-
-    /**
-     * Utility to get the bytes uri.
-     * Does NOT handle authenticated URLs,
-     * use getInputSourceFromURI(uri, username, password)
-     *
-     * @param uri the resource to get
-     * @see #getInputSourceFromURI(String uri, String username, String password)
-     */
-    public static InputSource getInputSourceFromURI(String uri) {
-        return new InputSource(uri);
-    }
-
-    /**
-     * Utility to get the bytes uri
-     *
-     * @param source the resource to get
-     */
-//    public static InputSource sourceToInputSource(Source source) {
-//        if (source instanceof SAXSource) {
-//            return ((SAXSource) source).getInputSource();
-//        } else if (source instanceof DOMSource) {
-//            ByteArrayOutputStream baos = new ByteArrayOutputStream();
-//            Node node = ((DOMSource)source).getNode();
-//            if (node instanceof Document) {
-//                node = ((Document)node).getDocumentElement();
-//            }
-//            Element domElement = (Element)node;
-//            PrettyElementToStream(domElement, baos);
-//            InputSource  isource = new InputSource(source.getSystemId());
-//            isource.setByteStream(new ByteArrayInputStream(baos.toByteArray()));
-//            return isource;
-//        } else if (source instanceof StreamSource) {
-//            StreamSource ss      = (StreamSource) source;
-//            InputSource  isource = new InputSource(ss.getSystemId());
-//            isource.setByteStream(ss.getInputStream());
-//            isource.setCharacterStream(ss.getReader());
-//            isource.setPublicId(ss.getPublicId());
-//            return isource;
-//        } else {
-//            return getInputSourceFromURI(source.getSystemId());
-//        }
-//    }
-
-    /**
-     * Utility to get the bytes at a protected uri
-     * This will retrieve the URL if a username and password are provided.
-     * The java.net.URL class does not do Basic Authentication, so we have to
-     * do it manually in this routine.
-     * If no username is provided, we create an InputSource from the uri
-     * and let the InputSource go fetch the contents.
-     *
-     * @param uri      the resource to get
-     * @param username basic auth username
-     * @param password basic auth password
-     */
-    private static InputSource getInputSourceFromURI(String uri,
-                                                     String username,
-                                                     String password)
-            throws IOException, ProtocolException, UnsupportedEncodingException {
-        URL wsdlurl = null;
-        try {
-            wsdlurl = new URL(uri);
-        } catch (MalformedURLException e) {
-            // we can't process it, it might be a 'simple' foo.wsdl
-            // let InputSource deal with it
-            return new InputSource(uri);
-        }
-        
-        // if no authentication, just let InputSource deal with it
-        if (username == null && wsdlurl.getUserInfo() == null) {
-            return new InputSource(uri);
-        }
-        
-        // if this is not an HTTP{S} url, let InputSource deal with it
-        if (!wsdlurl.getProtocol().startsWith("http")) {
-            return new InputSource(uri);
-        }
-        URLConnection connection = wsdlurl.openConnection();
-        // Does this work for https???
-        if (!(connection instanceof HttpURLConnection)) {
-            // can't do http with this URL, let InputSource deal with it
-            return new InputSource(uri);
-        }
-        HttpURLConnection uconn = (HttpURLConnection) connection;
-        String userinfo = wsdlurl.getUserInfo();
-        uconn.setRequestMethod("GET");
-        uconn.setAllowUserInteraction(false);
-        uconn.setDefaultUseCaches(false);
-        uconn.setDoInput(true);
-        uconn.setDoOutput(false);
-        uconn.setInstanceFollowRedirects(true);
-        uconn.setUseCaches(false);
-
-        // username/password info in the URL overrides passed in values 
-        String auth = null;
-        if (userinfo != null) {
-            auth = userinfo;
-        } else if (username != null) {
-            auth = (password == null) ? username : username + ":" + password;
-        }
-        if (auth != null) {
-            uconn.setRequestProperty("Authorization",
-                    "Basic " +
-                    base64encode(auth.getBytes(charEncoding)));
-        }
-        uconn.connect();
-        return new InputSource(uconn.getInputStream());
-    }
-
-    public static final String base64encode(byte[] bytes) {
-        return new String(Base64.encode(bytes));
-    }
-
-    public static InputSource getEmptyInputSource() {
-        return new InputSource(bais);
-    }
-
-    /**
-     * Find a Node with a given QName
-     *
-     * @param node parent node
-     * @param name QName of the child we need to find
-     * @return child node
-     */
-    public static Node findNode(Node node, QName name) {
-        if (name.getNamespaceURI().equals(node.getNamespaceURI()) &&
-                name.getLocalPart().equals(node.getLocalName()))
-            return node;
-        NodeList children = node.getChildNodes();
-        for (int i = 0; i < children.getLength(); i++) {
-            Node ret = findNode(children.item(i), name);
-            if (ret != null)
-                return ret;
-        }
-        return null;
-    }
 
     public static String getClassNameFromQuallifiedName(String qualifiedName) {
         int index = qualifiedName.lastIndexOf('.');
@@ -762,7 +97,7 @@
                 + "." + firstCharacterToUpperCase(JavaUtils.xmlNameToJava(qname.getLocalPart()));
     }
 
-    public static Method getJavaMethod(String className, String methodName) throws J2EEFault {
+    public static Method getJavaMethod(String className, String methodName) throws AxisFault {
         String primKey = null;
         Class sei;
         try {
@@ -778,8 +113,7 @@
                 throw new org.apache.geronimo.ews.ws4j2ee.toWs.UnrecoverableGenerationFault("Method " + methodName + " not found in the class" + className);
             return callMethod;
         } catch (ClassNotFoundException e) {
-            e.printStackTrace();
-            throw new J2EEFault(e);
+            throw AxisFault.makeFault(e);
         }
     }
 
@@ -955,6 +289,50 @@
         File parent = file.getParentFile();
         parent.mkdirs();
     }
+    private static DocumentBuilderFactory getDOMFactory() {
+          DocumentBuilderFactory dbf;
+          try {
+              dbf = DocumentBuilderFactory.newInstance();
+              dbf.setNamespaceAware(true);
+          } catch (Exception e) {
+//              log.error(Messages.getMessage("exception00"), e );
+              dbf = null;
+          }
+          return (dbf);
+      }
+      
+    public static Document createDocument(InputStream in) throws GenerationFault {
+        try {
+            DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
+            dbf.setNamespaceAware(true);
+            dbf.setValidating(false);
+            dbf.setExpandEntityReferences(false);
+            DocumentBuilder db = dbf.newDocumentBuilder();
+            EntityResolver er = new EntityResolver() {
+                public InputSource resolveEntity(String publicId,
+                                                 String systemId)
+                        throws SAXException, IOException {
+                    InputStream is = null;
+                    if ("http://java.sun.com/dtd/ejb-jar_2_0.dtd".equalsIgnoreCase(systemId)) {
+                        return getInputSource(Utils.class.getClassLoader().getResourceAsStream("ejb-jar_2_0.dtd"));
+                    } else if ("http://java.sun.com/dtd/web-app_2_3.dtd".equalsIgnoreCase(systemId))
+                        return getInputSource(Utils.class.getClassLoader().getResourceAsStream("web-app_2_3.dtd"));
+                    return null;
+                }
+
+                private InputSource getInputSource(InputStream is) throws IOException {
+                    if (is == null)
+                        throw new IOException("error at the project set up can not find entity");
+                    return new InputSource(is);
+                }
+            };
+            db.setEntityResolver(er);
+            return db.parse(in);
+        } catch (Exception e) {
+            throw GenerationFault.createGenerationFault(e);
+        }
+    }
+
 
 }
 

Modified: webservices/ews/trunk/src/org/apache/geronimo/ews/ws4j2ee/wsutils/ImplBeanPool.java
URL: http://svn.apache.org/viewcvs/webservices/ews/trunk/src/org/apache/geronimo/ews/ws4j2ee/wsutils/ImplBeanPool.java?view=diff&r1=153709&r2=153710
==============================================================================
--- webservices/ews/trunk/src/org/apache/geronimo/ews/ws4j2ee/wsutils/ImplBeanPool.java (original)
+++ webservices/ews/trunk/src/org/apache/geronimo/ews/ws4j2ee/wsutils/ImplBeanPool.java Sun Feb 13 20:26:05 2005
@@ -16,6 +16,7 @@
 
 package org.apache.geronimo.ews.ws4j2ee.wsutils;
 
+import org.apache.axis.AxisFault;
 import org.apache.axis.utils.ClassUtils;
 
 /**
@@ -32,17 +33,16 @@
         instance = new ImplBeanPool();
     }
 
-    public static Object getImplBean(String classname) throws J2EEFault {
+    public static Object getImplBean(String classname) throws AxisFault{
         return instance.getBean(classname);
     }
 
-    private Object getBean(String classname) throws J2EEFault {
+    private Object getBean(String classname) throws AxisFault {
         try {
             Class implClass = ClassUtils.forName(classname);
             return implClass.newInstance();
         } catch (Exception e) {
-            e.printStackTrace();
-            throw new J2EEFault(e);
+            throw AxisFault.makeFault(e);
         }
     }
 }

Modified: webservices/ews/trunk/test/org/apache/geronimo/ews/ws4j2ee/GenerateWithoutWSDLTest.java
URL: http://svn.apache.org/viewcvs/webservices/ews/trunk/test/org/apache/geronimo/ews/ws4j2ee/GenerateWithoutWSDLTest.java?view=diff&r1=153709&r2=153710
==============================================================================
--- webservices/ews/trunk/test/org/apache/geronimo/ews/ws4j2ee/GenerateWithoutWSDLTest.java (original)
+++ webservices/ews/trunk/test/org/apache/geronimo/ews/ws4j2ee/GenerateWithoutWSDLTest.java Sun Feb 13 20:26:05 2005
@@ -1,118 +1,118 @@
-/*
- * 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;
-
-import org.apache.geronimo.ews.AbstractTestCase;
-import org.apache.geronimo.ews.ws4j2ee.toWs.Ws4J2ee;
-
-/**
- * this test case with wsdl does not exists .. but the information is get by the 
- * SEI. This should be the prefered way for the J2EE developer. User can give a 
- * packaged application as explained by the JSR109 specification to the tool.
- * the arguments are 
- * 	GenerateWithoutWSDL &lt;webservices.xml-file&gt; -o&lt;targetoutput&gt; &lt;additionl argument that are given toJava2WSDL&gt;   
- * @author Srinath Perera(hemapani@opensource.lk)
- */
-public class GenerateWithoutWSDLTest extends AbstractTestCase {
-	private String outDir = "target/generated/samples/";
-    /**
-     * @param testName
-     */
-    public GenerateWithoutWSDLTest(String testName) {
-        super(testName);
-    }
-
-	public void testMathSample() throws Exception{
-		try{
-			String[] args2 = new String[]{
-				getTestFile(testDir+"testData/math/webservices.xml"),"-o",
-				outDir+"withoutWSDL/math/server" ,"-l" ,
-				"http://127.0.0.1/aixs/math"};
-			Ws4J2ee.main(args2);
-		}catch(Exception e){
-			e.printStackTrace();
-		}
-	}
-	
-	public void testServletBasedMathSample() throws Exception{
-		String[] args2 = new String[]{
-			getTestFile(testDir + "testData/math/webservice-ServletBased.xml"),"-o",
-			outDir+"withoutWSDL/math/server-servlet" ,"-l" ,
-			"http://127.0.0.1/aixs/math"};
-		Ws4J2ee.main(args2);
-	}
-	public void testMathSampleWithHandlers() throws Exception{
-		try{
-			String[] args2 = new String[]{
-				getTestFile(testDir + "testData/math/webservice-withHandler.xml"),"-o",
-				outDir+"withoutWSDL/math-withHandlers/server" ,"-l" ,
-				"http://127.0.0.1/aixs/math"};
-			Ws4J2ee.main(args2);
-		}catch(Exception e){
-			e.printStackTrace();
-		}
-	}
-	public void testBookSampleJar() throws Exception{
-		String[] args2 = new String[]{
-			getTestFile("target/generated/samples/bookquote.jar"),"-o"
-			,outDir+"withoutWSDL/bookquote-jar/"};
-		Ws4J2ee.main(args2);
-	}
-	public void testGoogleSampleJar() throws Exception{
-		String[] args2 = new String[]{
-			getTestFile("target/generated/samples/google.jar"),"-o",
-			outDir+"withoutWSDL/google-jar/"};
-		Ws4J2ee.main(args2);
-	}
-	public void testTimeSampleJar() throws Exception{
-		String[] args2 = new String[]{getTestFile("target/generated/samples/time.jar"),"-o",
-			outDir+"withoutWSDL/time-jar/"};
-		Ws4J2ee.main(args2);
-	}
-	public void testZipampleJar() throws Exception{
-		String[] args2 = new String[]{getTestFile("target/generated/samples/zip.jar"),"-o",
-			outDir+"withoutWSDL/zip-jar/"};
-		Ws4J2ee.main(args2);
-	}
-	
-	public void testBookSampleWar() throws Exception{
-		String[] args2 = new String[]{getTestFile("target/generated/samples/simple.war"),"-o",
-			outDir+"withoutWSDL/bookquote-war/"};
-		Ws4J2ee.main(args2);
-	}
-	public void testBookSampleEar() throws Exception{
-		String[] args2 = new String[]{
-				getTestFile("target/generated/samples/bookquote.ear"),"-o",
-				outDir+"withoutWSDL/bookquote-ear/"};
-		Ws4J2ee.main(args2);
-	}
-	
-	public void testEchoJar() throws Exception{
-		String[] args2 = new String[]{
-				getTestFile("target/generated/samples/echo.jar"),"-o",
-				outDir+"withoutWSDL/echo-jar/"};
-		Ws4J2ee.main(args2);
-	}
-    public void testEchoWar() throws Exception{
-//fix this once ohters fixed 
-//        String[] args2 = new String[]{
-//                getTestFile("target/generated/samples/echo.war"),"-o",
-//                outDir+"withoutWSDL/echo-war/"};
-//        Ws4J2ee.main(args2);
-    }
-}
+/*
+ * 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;
+
+import org.apache.geronimo.ews.AbstractTestCase;
+import org.apache.geronimo.ews.ws4j2ee.toWs.Ws4J2ee;
+
+/**
+ * this test case with wsdl does not exists .. but the information is get by the 
+ * SEI. This should be the prefered way for the J2EE developer. User can give a 
+ * packaged application as explained by the JSR109 specification to the tool.
+ * the arguments are 
+ * 	GenerateWithoutWSDL &lt;webservices.xml-file&gt; -o&lt;targetoutput&gt; &lt;additionl argument that are given toJava2WSDL&gt;   
+ * @author Srinath Perera(hemapani@opensource.lk)
+ */
+public class GenerateWithoutWSDLTest extends AbstractTestCase {
+	private String outDir = "target/generated/samples/";
+    /**
+     * @param testName
+     */
+    public GenerateWithoutWSDLTest(String testName) {
+        super(testName);
+    }
+
+	public void testMathSample() throws Exception{
+		try{
+			String[] args2 = new String[]{
+				getTestFile(testDir+"testData/math/webservices.xml"),"-o",
+				outDir+"withoutWSDL/math/server" ,"-l" ,
+				"http://127.0.0.1/aixs/math"};
+			Ws4J2ee.main(args2);
+		}catch(Exception e){
+			e.printStackTrace();
+		}
+	}
+	
+	public void testServletBasedMathSample() throws Exception{
+		String[] args2 = new String[]{
+			getTestFile(testDir + "testData/math/webservice-ServletBased.xml"),"-o",
+			outDir+"withoutWSDL/math/server-servlet" ,"-l" ,
+			"http://127.0.0.1/aixs/math"};
+		Ws4J2ee.main(args2);
+	}
+	public void testMathSampleWithHandlers() throws Exception{
+		try{
+			String[] args2 = new String[]{
+				getTestFile(testDir + "testData/math/webservice-withHandler.xml"),"-o",
+				outDir+"withoutWSDL/math-withHandlers/server" ,"-l" ,
+				"http://127.0.0.1/aixs/math"};
+			Ws4J2ee.main(args2);
+		}catch(Exception e){
+			e.printStackTrace();
+		}
+	}
+	public void testBookSampleJar() throws Exception{
+		String[] args2 = new String[]{
+			getTestFile("target/generated/samples/bookquote.jar"),"-o"
+			,outDir+"withoutWSDL/bookquote-jar/"};
+		Ws4J2ee.main(args2);
+	}
+	public void testGoogleSampleJar() throws Exception{
+		String[] args2 = new String[]{
+			getTestFile("target/generated/samples/google.jar"),"-o",
+			outDir+"withoutWSDL/google-jar/"};
+		Ws4J2ee.main(args2);
+	}
+	public void testTimeSampleJar() throws Exception{
+		String[] args2 = new String[]{getTestFile("target/generated/samples/time.jar"),"-o",
+			outDir+"withoutWSDL/time-jar/"};
+		Ws4J2ee.main(args2);
+	}
+	public void testZipampleJar() throws Exception{
+		String[] args2 = new String[]{getTestFile("target/generated/samples/zip.jar"),"-o",
+			outDir+"withoutWSDL/zip-jar/"};
+		Ws4J2ee.main(args2);
+	}
+	
+	public void testBookSampleWar() throws Exception{
+		String[] args2 = new String[]{getTestFile("target/generated/samples/simple.war"),"-o",
+			outDir+"withoutWSDL/bookquote-war/"};
+		Ws4J2ee.main(args2);
+	}
+	public void testBookSampleEar() throws Exception{
+		String[] args2 = new String[]{
+				getTestFile("target/generated/samples/bookquote.ear"),"-o",
+				outDir+"withoutWSDL/bookquote-ear/"};
+		Ws4J2ee.main(args2);
+	}
+	
+	public void testEchoJar() throws Exception{
+		String[] args2 = new String[]{
+				getTestFile("target/generated/samples/echo.jar"),"-o",
+				outDir+"withoutWSDL/echo-jar/"};
+		Ws4J2ee.main(args2);
+	}
+    public void testEchoWar() throws Exception{
+//fix this once ohters fixed 
+//        String[] args2 = new String[]{
+//                getTestFile("target/generated/samples/echo.war"),"-o",
+//                outDir+"withoutWSDL/echo-war/"};
+//        Ws4J2ee.main(args2);
+    }
+}

Modified: webservices/ews/trunk/test/org/apache/geronimo/ews/ws4j2ee/JaxRpcMappingTest.java
URL: http://svn.apache.org/viewcvs/webservices/ews/trunk/test/org/apache/geronimo/ews/ws4j2ee/JaxRpcMappingTest.java?view=diff&r1=153709&r2=153710
==============================================================================
--- webservices/ews/trunk/test/org/apache/geronimo/ews/ws4j2ee/JaxRpcMappingTest.java (original)
+++ webservices/ews/trunk/test/org/apache/geronimo/ews/ws4j2ee/JaxRpcMappingTest.java Sun Feb 13 20:26:05 2005
@@ -32,7 +32,6 @@
 import org.apache.geronimo.ews.AbstractTestCase;
 import org.apache.geronimo.ews.jaxrpcmapping.J2eeEmitter;
 import org.apache.geronimo.ews.jaxrpcmapping.JaxRpcMapper;
-
 import org.apache.geronimo.ews.ws4j2ee.context.J2EEWebServiceContext;
 import org.apache.geronimo.ews.ws4j2ee.context.JaxRpcMapperContext;
 import org.apache.geronimo.ews.ws4j2ee.context.wsdl.WSDLContext;



---------------------------------------------------------------------
To unsubscribe, e-mail: ews-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: ews-dev-help@ws.apache.org


Mime
View raw message