You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by jl...@apache.org on 2007/10/25 19:10:56 UTC

svn commit: r588283 [15/18] - in /incubator/cxf/branches/jliu: ./ api/ api/src/main/java/org/apache/cxf/databinding/ api/src/main/java/org/apache/cxf/io/ api/src/main/java/org/apache/cxf/message/ api/src/main/java/org/apache/cxf/phase/ api/src/main/jav...

Modified: incubator/cxf/branches/jliu/tools/javato/ws/src/test/java/org/apache/cxf/tools/java2ws/JavaToWSTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/branches/jliu/tools/javato/ws/src/test/java/org/apache/cxf/tools/java2ws/JavaToWSTest.java?rev=588283&r1=588282&r2=588283&view=diff
==============================================================================
--- incubator/cxf/branches/jliu/tools/javato/ws/src/test/java/org/apache/cxf/tools/java2ws/JavaToWSTest.java (original)
+++ incubator/cxf/branches/jliu/tools/javato/ws/src/test/java/org/apache/cxf/tools/java2ws/JavaToWSTest.java Thu Oct 25 10:09:20 2007
@@ -26,6 +26,8 @@
 import org.apache.cxf.helpers.FileUtils;
 import org.apache.cxf.tools.common.ToolContext;
 import org.apache.cxf.tools.common.ToolTestBase;
+import org.apache.cxf.tools.util.Compiler;
+
 import org.junit.After;
 import org.junit.Before;
 import org.junit.Ignore;
@@ -35,126 +37,210 @@
     protected String cp;
     protected ToolContext env;
     protected File output;
+    protected File classDir;
 
     @Before
-    public void startUp() throws Exception {
+    public void setUpResource() throws Exception {
+        super.setUp();
         env = new ToolContext();
         cp = System.getProperty("java.class.path");
         URL url = getClass().getResource(".");
         output = new File(url.toURI());
+        System.setProperty("java.class.path", getClassPath());
         output = new File(output, "/generated/");
         FileUtils.mkDir(output);
+        classDir = new File(output, "/classes/");
+        FileUtils.mkDir(classDir);    
     }
-
+    
     @After
     public void tearDown() {
-        //super.tearDown();
+        super.tearDown();
         System.setProperty("java.class.path", cp);
+        FileUtils.removeDir(output);
+        output = null;
+    }
+    
+    private File outputFile(String name) {
+        return new File(output.getPath() + File.separator + name);
     }
 
-    @Ignore
+    @Test
     public void testVersionOutput() throws Exception {
         String[] args = new String[] {"-v"};
         JavaToWS.main(args);
         assertNotNull(getStdOut());
     }
 
-    @Ignore
+    @Test
     public void testFlagWSDL() throws Exception {
-        String[] args = new String[] {"-wsdl", "-o", output.getPath() + "/tmp.wsdl",
-                                      "-d", output.getPath(), "-client", "-server",
-                                      "org.apache.hello_world_soap12_http.Greeter"};
-        JavaToWS.main(args);
-        File wsdlFile = new File(output.getPath() + "/tmp.wsdl");
-        assertTrue("wsdl is not generated", wsdlFile.exists());
+        File wsdlFile = outputFile("tmp.wsdl");
+        String[] args = new String[] {"-wsdl", "-o", wsdlFile.getAbsolutePath(), "-s", output.getPath(),
+                                      "-client", "-server", "org.apache.hello_world_soap12_http.Greeter"};
+        JavaToWS.main(args);
+        checkStdErr();
+        assertTrue("Failed to generate WSDL file", wsdlFile.exists());
     }
-    
+
+    private void checkStdErr() {
+        String err = getStdErr();
+        if (err != null) {
+            assertEquals("errors: ", "", err);
+        }
+    }
+
     @Test
     public void testSimple() throws Exception {
-        String[] args = new String[] {"-wsdl", "-o", output.getPath() + "/tmp.wsdl", "-verbose",
-                                      "-d", output.getPath(),
-                                      "-frontend", "jaxws",
-                                      "-client", "-server",
+        File wsdlFile = outputFile("tmp.wsdl");
+        String[] args = new String[] {"-wsdl", "-o", output.getPath() + "/tmp.wsdl", "-verbose", "-s",
+                                      output.getPath(), "-frontend", "jaxws", "-client", "-server",
                                       "org.apache.hello_world_doc_lit.Greeter"};
         JavaToWS.main(args);
-        File wsdlFile = new File(output.getPath() + "/tmp.wsdl");
-        assertTrue("wsdl is not generated", wsdlFile.exists());
+        checkStdErr();
+        assertTrue("Failed to generate WSDL file", wsdlFile.exists());
     }
     
-    
-    
-    @Ignore 
-    
-    public void testGenServerAndClient() throws Exception {
-        String[] args = new String[] {"-d", output.getPath(), "-client", "-server",
-                                      "org.apache.hello_world_soap12_http.Greeter"};
+    @Test
+    public void testSimpleFrontend() throws Exception {
+        String[] args = new String[] {"-wsdl", "-o", output.getPath() + "/tmp.wsdl", "-verbose", "-s",
+                                      output.getPath(), "-frontend", "simple", "-client", "-server",
+                                      "org.apache.cxf.tools.fortest.simple.Hello"};
+        JavaToWS.main(args);
+        File client = outputFile("org/apache/cxf/tools/fortest/simple/HelloPortTypeClient.java");
+        File server = outputFile("org/apache/cxf/tools/fortest/simple/HelloPortTypeServer.java");
+        File impl = outputFile("org/apache/cxf/tools/fortest/simple/HelloPortTypeImpl.java");
+        assertTrue("Failed to generate client file for simple front end ", client.exists());
+        assertTrue("Failed to generate server file for simple front end ", server.exists());
+        assertTrue("Failed to generate impl file for simple front end ", impl.exists());
+        Compiler compiler = new Compiler();
+        String[] files = new String[]{client.getAbsoluteFile().toString(),
+                                     server.getAbsoluteFile().toString(), 
+                                     impl.getAbsoluteFile().toString()};
+        compiler.compileFiles(files, this.classDir);
+        
+        
+    }
+        
+    @Test
+    public void testMissingBeans() {
+        String[] args = new String[] {"-wsdl", "-o", output.getPath() + "/tmp.wsdl", "-verbose", "-s",
+                                      output.getPath(), "-frontend", "jaxws", "-client", "-server",
+                                      "-beans", "nobodyHome.xml",
+                                      "-beans", "nothing.xml",
+                                      "org.apache.hello_world_doc_lit.Greeter"};
         JavaToWS.main(args);
-        File client = new File(output.getPath()
-                               + "/org/apache/hello_world_soap12_http/Greeter_GreeterPort_Client.java");
+        String err = getStdErr();
+        assertTrue("Missing file error message", 
+                   err.indexOf("Unable to open bean definition file nobodyHome.xml") >= 0);
+    }
 
-        assertTrue("Client is not generated", client.exists());
+    @Test
+    public void testClassNoWebServiceAnno() throws Exception {
+        File wsdlFile = outputFile("tmp.wsdl");
+        String[] args = new String[] {"-wsdl", "-o", output.getPath() + "/tmp.wsdl", "-verbose", "-s",
+                                      output.getPath(), "-frontend", "jaxws", "-client", "-server",
+                                      "org.apache.cxf.tools.fortest.HelloWithNoAnno"};
+        JavaToWS.main(args);
+        assertTrue("Failed to generate WSDL file", wsdlFile.exists());
+        assertTrue("Class does not carry WebService error should be detected", getStdErr()
+            .indexOf("does not carry a WebService annotation") > -1);
+    }
 
-        File service = new File(output.getPath() + "/org/apache/hello_world_soap12_http/GreeterService.java");
-        assertTrue("GreeterService is not generated", service.exists());
-        File server = new File(output.getPath()
-                               + "/org/apache/hello_world_soap12_http/Greeter_GreeterPort_Server.java");
-        assertTrue("Greeter_GreeterPort_Server.java is not generated", server.exists());
+    @Test
+    public void testClassWithRMI() throws Exception {
+        File wsdlFile = outputFile("tmp.wsdl");
+        String[] args = new String[] {"-wsdl", "-o", output.getPath() + "/tmp.wsdl", "-verbose", 
+                                      "-s", output.getPath(), "-frontend", "jaxws", "-client", "-server",
+                                      "org.apache.cxf.tools.fortest.HelloRMI"};
+        JavaToWS.main(args);
+        assertTrue("Failed to generate WSDL file", wsdlFile.exists());
+        assertTrue("Parameter or return type implemented java.rmi.Remote interface error should be detected",
+                   getStdErr().indexOf("implemented the java.rmi.Remote interface") > -1);
     }
-    
-    
-    
-    @Ignore
-    public void testGenServerAndImpl() throws Exception {
-        String[] args = new String[] {"-d", output.getPath(), "-impl", "-server",
+
+    @Test
+    @Ignore // CXF-1024
+    public void testGenServerAndClient() throws Exception {
+        File client = outputFile("org/apache/hello_world_soap12_http/GreeterClient.java");
+        File server = outputFile("org/apache/hello_world_soap12_http/GreeterServer.java");
+
+        String[] args = new String[] {"-s", output.getPath(), "-client", "-server",
                                       "org.apache.hello_world_soap12_http.Greeter"};
         JavaToWS.main(args);
+        checkStdErr();
+        assertTrue("Client was not generated", client.exists());
+        assertTrue("Greeter_GreeterPort_Server.java was not generated", server.exists());
+    }
 
-        File server = new File(output.getPath()
-                               + "/org/apache/hello_world_soap12_http/Greeter_GreeterPort_Server.java");
-        assertTrue("Greeter_GreeterPort_Server.java is not generated", server.exists());
-        
-        
-        File impl = new File(output.getPath()
-                               + "/org/apache/hello_world_soap12_http/GreeterImpl.java");
-        assertTrue("GreeterImpl.java is not generated", impl.exists());
+    @Test
+    public void testGenServerAndImpl() throws Exception {
+        File server = outputFile("org/apache/hello_world_soap12_http/GreeterServer.java");
+        File impl = outputFile("org/apache/hello_world_soap12_http/GreeterImpl.java");
+
+        String[] args = new String[] {"-s", output.getPath(), "-server",
+                                      "org.apache.hello_world_soap12_http.Greeter"};
+        JavaToWS.main(args);
+        checkStdErr();
+        assertTrue("GreeterServer.java was not generated", server.exists());
+        assertTrue("GreeterImpl.java was not generated", impl.exists());
     }
-    
-    @Ignore
+
+    @Test
     public void testGenWrapperBean() throws Exception {
-        String[] args = new String[] {"-d", output.getPath(),
-                                      "-wrapperbean",
-                                      "-impl", "-server",
+        String[] args = new String[] {"-s", output.getPath(), "-wrapperbean", "-server",
                                       "org.apache.cxf.tools.java2ws.fortest.Calculator"};
-        JavaToWS.main(args);        
+        JavaToWS.main(args);
+        checkStdErr();
     }
-    
-    
-    @Ignore
+
+    @Test
     public void testInvalidFlag() throws Exception {
         String[] args = new String[] {"-frontend", "tmp", "-wsdl", "-o", output.getPath() + "/tmp.wsdl",
                                       "org.apache.hello_world_soap12_http.Greeter"};
         JavaToWS.main(args);
-        assertTrue("invalid frontend flag should be detected",
-                   getStdErr().indexOf("is not a valid frontend,") > -1);
-
-        File wsdlFile = new File(output.getPath() + "/tmp.wsdl");
-        assertTrue("wsdl is not generated", wsdlFile.exists());
+        assertTrue("invalid frontend flag should be detected", getStdErr()
+            .indexOf("is not a valid frontend,") > -1);
     }
 
-    @Ignore
+    @Test
     public void testInvalidFlag2() throws Exception {
-        String[] args = new String[] {"-frontend", "simple", "-wrapperbean", "-wsdl",
-                                      "-o", output.getPath() + "/tmp.wsdl",
+        String[] args = new String[] {"-frontend", "simple", "-wrapperbean", "-wsdl", "-o",
+                                      output.getPath() + "/tmp.wsdl",
                                       "org.apache.hello_world_soap12_http.Greeter"};
         JavaToWS.main(args);
-        assertTrue("wrapperbean flag error should be detected",
-                   getStdErr().indexOf("Wrapperbean only needs to be generated for jaxws front end") > -1);
-        File wsdlFile = new File(output.getPath() + "/tmp.wsdl");
-        assertTrue("wsdl is not generated", wsdlFile.exists());
+        assertTrue("wrapperbean flag error should be detected", getStdErr()
+            .indexOf("-wrapperbean is only valid for the jaxws front end.") > -1);
     }
-
-
-
+    
+    @Test
+    public void testInvalidFlag3() throws Exception {
+        String[] args = new String[] {"-databinding", "jaxb", "-frontend", "simple",
+                                      "-wsdl", "-o",
+                                      output.getPath() + "/tmp.wsdl",
+                                      "org.apache.hello_world_soap12_http.Greeter"};
+        JavaToWS.main(args);
+        assertTrue("jaxb databinding warning should be detected", getStdErr()
+                   .indexOf("Simple front end only supports aegis databinding") > -1);
+    }
+    
+    
+    @Test
+    public void testImplClassWithoutSei() throws Exception {
+        File wsdlFile = outputFile("tmp.wsdl");
+        String[] args = new String[] {"-wsdl", "-o", output.getPath() + "/tmp.wsdl", "-verbose", "-s",
+                                      output.getPath(), "-frontend", "jaxws", "-client", "-server",
+                                      "org.apache.cxf.tools.fortest.GreeterImpl"};
+        JavaToWS.main(args);
+        assertTrue("Failed to generate WSDL file", wsdlFile.exists());
+        
+        File sei = outputFile("org/apache/cxf/tools/fortest/GreeterImpl_PortType.java");
+        assertTrue("Failed to generate SEI file : GreeterImpl_PortType.java", sei.exists());
+        File client = outputFile("org/apache/cxf/tools/fortest/GreeterImpl_PortTypeClient.java");
+        assertTrue("Failed to generate client file : GreeterImpl_PortTypeClient.java", client.exists());
+        File server = outputFile("org/apache/cxf/tools/fortest/GreeterImpl_PortTypeServer.java");
+        assertTrue("Failed to generate SEI file : GreeterImpl_PortTypeServer.java", server.exists());
+    }
+        
     protected String getClassPath() throws URISyntaxException {
         ClassLoader loader = getClass().getClassLoader();
         StringBuffer classPath = new StringBuffer();

Modified: incubator/cxf/branches/jliu/tools/javato/ws/src/test/java/org/apache/cxf/tools/java2ws/fortest/Calculator.java
URL: http://svn.apache.org/viewvc/incubator/cxf/branches/jliu/tools/javato/ws/src/test/java/org/apache/cxf/tools/java2ws/fortest/Calculator.java?rev=588283&r1=588282&r2=588283&view=diff
==============================================================================
--- incubator/cxf/branches/jliu/tools/javato/ws/src/test/java/org/apache/cxf/tools/java2ws/fortest/Calculator.java (original)
+++ incubator/cxf/branches/jliu/tools/javato/ws/src/test/java/org/apache/cxf/tools/java2ws/fortest/Calculator.java Thu Oct 25 10:09:20 2007
@@ -18,6 +18,9 @@
  */
 package org.apache.cxf.tools.java2ws.fortest;
 
+import javax.jws.WebService;
+
+@WebService
 public class Calculator {
     public int add(int a, int b) throws AddException {
         if (a < 0 || b < 0) {

Modified: incubator/cxf/branches/jliu/tools/javato/ws/src/test/java/org/apache/cxf/tools/java2wsdl/generator/WSDLGeneratorFactoryTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/branches/jliu/tools/javato/ws/src/test/java/org/apache/cxf/tools/java2wsdl/generator/WSDLGeneratorFactoryTest.java?rev=588283&r1=588282&r2=588283&view=diff
==============================================================================
--- incubator/cxf/branches/jliu/tools/javato/ws/src/test/java/org/apache/cxf/tools/java2wsdl/generator/WSDLGeneratorFactoryTest.java (original)
+++ incubator/cxf/branches/jliu/tools/javato/ws/src/test/java/org/apache/cxf/tools/java2wsdl/generator/WSDLGeneratorFactoryTest.java Thu Oct 25 10:09:20 2007
@@ -19,8 +19,6 @@
 
 package org.apache.cxf.tools.java2wsdl.generator;
 
-import org.apache.cxf.tools.java2wsdl.generator.AbstractGenerator;
-import org.apache.cxf.tools.java2wsdl.generator.WSDLGeneratorFactory;
 import org.apache.cxf.tools.java2wsdl.generator.wsdl11.WSDL11Generator;
 import org.apache.cxf.wsdl.WSDLConstants;
 import org.junit.Assert;

Modified: incubator/cxf/branches/jliu/tools/javato/ws/src/test/java/org/apache/cxf/tools/java2wsdl/generator/wsdl11/annotator/WrapperBeanAnnotatorTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/branches/jliu/tools/javato/ws/src/test/java/org/apache/cxf/tools/java2wsdl/generator/wsdl11/annotator/WrapperBeanAnnotatorTest.java?rev=588283&r1=588282&r2=588283&view=diff
==============================================================================
--- incubator/cxf/branches/jliu/tools/javato/ws/src/test/java/org/apache/cxf/tools/java2wsdl/generator/wsdl11/annotator/WrapperBeanAnnotatorTest.java (original)
+++ incubator/cxf/branches/jliu/tools/javato/ws/src/test/java/org/apache/cxf/tools/java2wsdl/generator/wsdl11/annotator/WrapperBeanAnnotatorTest.java Thu Oct 25 10:09:20 2007
@@ -23,6 +23,7 @@
 import javax.xml.namespace.QName;
 
 
+import org.apache.cxf.tools.common.model.JAnnotation;
 import org.apache.cxf.tools.java2wsdl.generator.wsdl11.model.WrapperBeanClass;
 import org.junit.Assert;
 import org.junit.Test;
@@ -37,29 +38,44 @@
         clz.setElementName(new QName("http://doc.withannotation.fortest.tools.cxf.apache.org/", "sayHi"));
 
         clz.annotate(new WrapperBeanAnnotator());
-        List<String> annotations = clz.getAnnotations();
+        List<JAnnotation> annotations = clz.getAnnotations();
         
         String expectedNamespace = "http://doc.withannotation.fortest.tools.cxf.apache.org/";
+                
+        JAnnotation rootElementAnnotation = annotations.get(0);
+        assertEquals("@XmlRootElement(name = \"sayHi\", " 
+                     + "namespace = \"" + expectedNamespace + "\")", 
+                     rootElementAnnotation.toString());
         
-        assertTrue(annotations.contains("@XmlRootElement(namespace = \""
-                                        + expectedNamespace + "\", name = \"sayHi\")"));
-        assertTrue(annotations.contains("@XmlType(namespace = \""
-                                        + expectedNamespace + "\", name = \"sayHi\")"));
-        assertTrue(annotations.contains("@XmlAccessorType(XmlAccessType.FIELD)"));
-
+        JAnnotation xmlTypeAnnotation = annotations.get(2);
+        assertEquals("@XmlType(name = \"sayHi\", "
+                     + "namespace = \"" + expectedNamespace + "\")", 
+                     xmlTypeAnnotation.toString());
+        
+        JAnnotation accessorTypeAnnotation = annotations.get(1);
+        assertEquals("@XmlAccessorType(XmlAccessType.FIELD)", 
+                     accessorTypeAnnotation.toString());
         
         WrapperBeanClass resWrapperClass = new WrapperBeanClass();
         resWrapperClass.setFullClassName(pkgName + ".SayHiResponse");
-        resWrapperClass.setElementName(new QName("http://doc.withannotation.fortest.tools.cxf.apache.org/",
+        resWrapperClass.setElementName(new QName(expectedNamespace,
                                      "sayHiResponse"));
         
         resWrapperClass.annotate(new WrapperBeanAnnotator());
         annotations = resWrapperClass.getAnnotations();
         
-        assertTrue(annotations.contains("@XmlRootElement(namespace = \""
-                                        + expectedNamespace + "\", name = \"sayHiResponse\")"));
-        assertTrue(annotations.contains("@XmlType(namespace = \""
-                                        + expectedNamespace + "\", name = \"sayHiResponse\")"));
-        assertTrue(annotations.contains("@XmlAccessorType(XmlAccessType.FIELD)"));
+        rootElementAnnotation = annotations.get(0);
+        assertEquals("@XmlRootElement(name = \"sayHiResponse\", " 
+                     + "namespace = \"" + expectedNamespace + "\")", 
+                     rootElementAnnotation.toString());
+        
+        accessorTypeAnnotation = annotations.get(1);
+        assertEquals("@XmlAccessorType(XmlAccessType.FIELD)", 
+                     accessorTypeAnnotation.toString());
+        
+        xmlTypeAnnotation = annotations.get(2);
+        assertEquals("@XmlType(name = \"sayHiResponse\", "
+                     + "namespace = \"" + expectedNamespace + "\")",
+                     xmlTypeAnnotation.toString());
     }
 }

Modified: incubator/cxf/branches/jliu/tools/javato/ws/src/test/java/org/apache/cxf/tools/java2wsdl/generator/wsdl11/annotator/WrapperBeanFieldAnnotatorTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/branches/jliu/tools/javato/ws/src/test/java/org/apache/cxf/tools/java2wsdl/generator/wsdl11/annotator/WrapperBeanFieldAnnotatorTest.java?rev=588283&r1=588282&r2=588283&view=diff
==============================================================================
--- incubator/cxf/branches/jliu/tools/javato/ws/src/test/java/org/apache/cxf/tools/java2wsdl/generator/wsdl11/annotator/WrapperBeanFieldAnnotatorTest.java (original)
+++ incubator/cxf/branches/jliu/tools/javato/ws/src/test/java/org/apache/cxf/tools/java2wsdl/generator/wsdl11/annotator/WrapperBeanFieldAnnotatorTest.java Thu Oct 25 10:09:20 2007
@@ -20,7 +20,7 @@
 package org.apache.cxf.tools.java2wsdl.generator.wsdl11.annotator;
 
 
-import org.apache.cxf.tools.common.model.JavaAnnotation;
+import org.apache.cxf.tools.common.model.JAnnotation;
 import org.apache.cxf.tools.common.model.JavaClass;
 import org.apache.cxf.tools.common.model.JavaField;
 import org.junit.Assert;
@@ -38,14 +38,14 @@
                                            "http://doc.withannotation.fortest.tools.cxf.apache.org/");
 
         reqField.setOwner(clz);
-        JavaAnnotation annotation = reqField.getAnnotation();
+        JAnnotation annotation = reqField.getAnnotation();
         assertNull(annotation);
         
         reqField.annotate(new WrapperBeanFieldAnnotator());
         annotation = reqField.getAnnotation();
 
         String expectedNamespace = "http://doc.withannotation.fortest.tools.cxf.apache.org/";
-        assertEquals("@XmlElement(namespace = \"" + expectedNamespace + "\", name = \"array\")",
+        assertEquals("@XmlElement(name = \"array\", namespace = \"" + expectedNamespace + "\")",
                      annotation.toString());
 
         clz.setFullClassName("org.apache.cxf.tools.fortest.withannotation.doc.jaxws.SayHiResponse");
@@ -55,7 +55,7 @@
         resField.setOwner(clz);
         resField.annotate(new WrapperBeanFieldAnnotator());
         annotation = resField.getAnnotation();
-        assertEquals("@XmlElement(namespace = \"" + expectedNamespace + "\", name = \"return\")",
+        assertEquals("@XmlElement(name = \"return\", namespace = \"" + expectedNamespace + "\")",
                      annotation.toString());
     }
 }

Modified: incubator/cxf/branches/jliu/tools/javato/ws/src/test/java/org/apache/cxf/tools/java2wsdl/processor/JavaToProcessorTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/branches/jliu/tools/javato/ws/src/test/java/org/apache/cxf/tools/java2wsdl/processor/JavaToProcessorTest.java?rev=588283&r1=588282&r2=588283&view=diff
==============================================================================
--- incubator/cxf/branches/jliu/tools/javato/ws/src/test/java/org/apache/cxf/tools/java2wsdl/processor/JavaToProcessorTest.java (original)
+++ incubator/cxf/branches/jliu/tools/javato/ws/src/test/java/org/apache/cxf/tools/java2wsdl/processor/JavaToProcessorTest.java Thu Oct 25 10:09:20 2007
@@ -89,7 +89,7 @@
         processor.process();
 
         String expectedFile = getClass().getResource("expected/calculator.wsdl").getFile();
-        assertFileEquals(new File(expectedFile), new File(output, "calculator.wsdl"));
+        assertWsdlEquals(new File(expectedFile), new File(output, "calculator.wsdl"));
 
     }
 
@@ -118,7 +118,7 @@
         processor.process();
 
         String expectedFile = getClass().getResource("expected/hello_soap12.wsdl").getFile();
-        assertFileEquals(new File(expectedFile), new File(output, "hello_soap12.wsdl"));
+        assertWsdlEquals(new File(expectedFile), new File(output, "hello_soap12.wsdl"));
     }
 
     @Test
@@ -185,7 +185,7 @@
         processor.process();
 
         String expectedFile = getClass().getResource("expected/db.wsdl").getFile();
-        assertFileEquals(new File(expectedFile), new File(output, "db.wsdl"));
+        assertWsdlEquals(new File(expectedFile), new File(output, "db.wsdl"));
     }
 
     @Test
@@ -209,7 +209,7 @@
         processor.process();
 
         String expectedFile = getClass().getResource("expected/my_hello_soap12.wsdl").getFile();
-        assertFileEquals(new File(expectedFile), new File(output, "my_hello_soap12.wsdl"));
+        assertWsdlEquals(new File(expectedFile), new File(output, "my_hello_soap12.wsdl"));
     }
     @Test
     public void testGenWrapperBeanClasses() throws Exception {
@@ -304,13 +304,13 @@
         File wsdlFile = new File(output, "rpc-hello.wsdl");
         assertTrue("Generate Wsdl Fail", wsdlFile.exists());
         String expectedFile = getClass().getResource("expected/rpc-hello-expected.wsdl").getFile();
-        assertFileEquals(new File(expectedFile), new File(output, "rpc-hello.wsdl"));
+        assertWsdlEquals(new File(expectedFile), new File(output, "rpc-hello.wsdl"));
 
     }
 
 
     @Test
-    public void testXMlBare() {
+    public void testXMlBare() throws Exception {
         env.put(ToolConstants.CFG_OUTPUTFILE, output.getPath() + "/xml-bare.wsdl");
         env.put(ToolConstants.CFG_CLASSNAME, "org.apache.xml_bare.Greeter");
         processor.setEnvironment(env);
@@ -319,7 +319,7 @@
         File wsdlFile = new File(output, "xml-bare.wsdl");
         assertTrue("Generate Wsdl Fail", wsdlFile.exists());
         String expectedFile = getClass().getResource("expected/xml-bare-expected.wsdl").getFile();
-        assertFileEquals(new File(expectedFile), new File(output, "/xml-bare.wsdl"));
+        assertWsdlEquals(new File(expectedFile), new File(output, "/xml-bare.wsdl"));
 
     }
 
@@ -335,12 +335,9 @@
         assertTrue("Generate Wsdl Fail", wsdlFile.exists());
 
         String expectedFile = getClass().getResource("expected/hello_world_fault_expected.wsdl").getFile();
-        assertFileEquals(new File(expectedFile), new File(output, "/fault.wsdl"));
-
+        assertWsdlEquals(new File(expectedFile), new File(output, "/fault.wsdl"));
     }
 
-
-
     @Test
     public void testResumeClasspath() throws Exception {
         File classFile = new java.io.File(output.getCanonicalPath() + "/classes");
@@ -381,7 +378,7 @@
         assertTrue(bindingFile.exists());
 
         String expectedFile = getClass().getResource("expected/echo_date.xjb").getFile();
-        assertFileEquals(new File(expectedFile), bindingFile);
+        assertWsdlEquals(new File(expectedFile), bindingFile);
     }
 
     @Test
@@ -397,7 +394,7 @@
         assertTrue(bindingFile.exists());
 
         String expectedFile = getClass().getResource("expected/echo_calendar.xjb").getFile();
-        assertFileEquals(new File(expectedFile), bindingFile);
+        assertWsdlEquals(new File(expectedFile), bindingFile);
     }
 
     @Test
@@ -416,6 +413,44 @@
         assertTrue("Generate Wsdl Fail", wsdlFile.exists());
 
         String expectedFile = getClass().getResource("expected/list_expected.wsdl").getFile();
-        assertFileEquals(new File(expectedFile), new File(output, "/list_test.wsdl"));
+        assertWsdlEquals(new File(expectedFile), new File(output, "/list_test.wsdl"));
+
+    }
+
+    @Test
+    //  TODO: should suppor the XmlMimeType annotation in the SEI
+    public void testMimeTypeInSEI() throws Exception {
+        env.put(ToolConstants.CFG_OUTPUTFILE, output.getPath() + "/send_image.wsdl");
+        env.put(ToolConstants.CFG_CLASSNAME, "org.apache.cxf.tools.fortest.ImageSender");
+        env.put(ToolConstants.CFG_VERBOSE, ToolConstants.CFG_VERBOSE);
+        try {
+            processor.setEnvironment(env);
+            processor.process();                  
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+        File wsdlFile = new File(output, "send_image.wsdl");
+        assertTrue("Generate Wsdl Fail", wsdlFile.exists());
+        
+        String expectedFile = getClass().getResource("expected/expected_send_image.wsdl").getFile();
+        assertWsdlEquals(new File(expectedFile), wsdlFile);
+    }
+
+    @Test
+    public void testMimeTypeInBean() throws Exception {
+        env.put(ToolConstants.CFG_OUTPUTFILE, output.getPath() + "/send_image2.wsdl");
+        env.put(ToolConstants.CFG_CLASSNAME, "org.apache.cxf.tools.fortest.ImageSender2");
+        env.put(ToolConstants.CFG_VERBOSE, ToolConstants.CFG_VERBOSE);
+        try {
+            processor.setEnvironment(env);
+            processor.process();
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+        File wsdlFile = new File(output, "send_image2.wsdl");
+        assertTrue("Generate Wsdl Fail", wsdlFile.exists());
+        
+        String expectedFile = getClass().getResource("expected/expected_send_image2.wsdl").getFile();
+        assertWsdlEquals(new File(expectedFile), wsdlFile);
     }
 }

Modified: incubator/cxf/branches/jliu/tools/javato/ws/src/test/java/org/apache/cxf/tools/java2wsdl/processor/expected/calculator.wsdl
URL: http://svn.apache.org/viewvc/incubator/cxf/branches/jliu/tools/javato/ws/src/test/java/org/apache/cxf/tools/java2wsdl/processor/expected/calculator.wsdl?rev=588283&r1=588282&r2=588283&view=diff
==============================================================================
--- incubator/cxf/branches/jliu/tools/javato/ws/src/test/java/org/apache/cxf/tools/java2wsdl/processor/expected/calculator.wsdl (original)
+++ incubator/cxf/branches/jliu/tools/javato/ws/src/test/java/org/apache/cxf/tools/java2wsdl/processor/expected/calculator.wsdl Thu Oct 25 10:09:20 2007
@@ -17,23 +17,23 @@
   specific language governing permissions and limitations
   under the License.
 -->
-<wsdl:definitions name="Calculator" targetNamespace="http://docwrapped.classnoanno.fortest.tools.cxf.apache.org/" xmlns:ns1="http://docwrapped.classnoanno.fortest.tools.cxf.apache.org/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
+<wsdl:definitions name="Calculator" targetNamespace="http://docwrapped.classnoanno.fortest.tools.cxf.apache.org/" xmlns:tns="http://docwrapped.classnoanno.fortest.tools.cxf.apache.org/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
   <wsdl:types>
-<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://docwrapped.classnoanno.fortest.tools.cxf.apache.org/" attributeFormDefault="unqualified" elementFormDefault="qualified" targetNamespace="http://docwrapped.classnoanno.fortest.tools.cxf.apache.org/">
-<xsd:element name="AddException" type="AddException"/>
+<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:tns="http://docwrapped.classnoanno.fortest.tools.cxf.apache.org/" attributeFormDefault="unqualified" elementFormDefault="qualified" targetNamespace="http://docwrapped.classnoanno.fortest.tools.cxf.apache.org/">
+<xsd:element name="AddException" type="tns:AddException"/>
 <xsd:complexType name="AddException">
 <xsd:sequence>
 <xsd:element name="message" nillable="true" type="xsd:string"/>
 </xsd:sequence>
 </xsd:complexType>
-<xsd:element name="add" type="add"/>
+<xsd:element name="add" type="tns:add"/>
 <xsd:complexType name="add">
 <xsd:sequence>
 <xsd:element name="a" type="xsd:int"/>
 <xsd:element name="b" type="xsd:int"/>
 </xsd:sequence>
 </xsd:complexType>
-<xsd:element name="addResponse" type="addResponse"/>
+<xsd:element name="addResponse" type="tns:addResponse"/>
 <xsd:complexType name="addResponse">
 <xsd:sequence>
 <xsd:element name="return" type="xsd:int"/>
@@ -42,28 +42,28 @@
 </xsd:schema>
   </wsdl:types>
   <wsdl:message name="add">
-    <wsdl:part name="parameters" element="ns1:add">
+    <wsdl:part name="parameters" element="tns:add">
     </wsdl:part>
   </wsdl:message>
   <wsdl:message name="addResponse">
-    <wsdl:part name="result" element="ns1:addResponse">
+    <wsdl:part name="parameters" element="tns:addResponse">
     </wsdl:part>
   </wsdl:message>
   <wsdl:message name="AddException">
-    <wsdl:part name="fault" element="ns1:AddException">
+    <wsdl:part name="AddException" element="tns:AddException">
     </wsdl:part>
   </wsdl:message>
   <wsdl:portType name="CalculatorPortType">
     <wsdl:operation name="add">
-      <wsdl:input name="add" message="ns1:add">
+      <wsdl:input name="add" message="tns:add">
     </wsdl:input>
-      <wsdl:output name="addResponse" message="ns1:addResponse">
+      <wsdl:output name="addResponse" message="tns:addResponse">
     </wsdl:output>
-      <wsdl:fault name="AddException" message="ns1:AddException">
+      <wsdl:fault name="AddException" message="tns:AddException">
     </wsdl:fault>
     </wsdl:operation>
   </wsdl:portType>
-  <wsdl:binding name="CalculatorSoapBinding" type="ns1:CalculatorPortType">
+  <wsdl:binding name="CalculatorSoapBinding" type="tns:CalculatorPortType">
     <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
     <wsdl:operation name="add">
       <soap:operation soapAction="" style="document"/>
@@ -79,7 +79,7 @@
     </wsdl:operation>
   </wsdl:binding>
   <wsdl:service name="Calculator">
-    <wsdl:port name="CalculatorPort" binding="ns1:CalculatorSoapBinding">
+    <wsdl:port name="CalculatorPort" binding="tns:CalculatorSoapBinding">
       <soap:address location="http://localhost:9090/hello"/>
     </wsdl:port>
   </wsdl:service>

Modified: incubator/cxf/branches/jliu/tools/javato/ws/src/test/java/org/apache/cxf/tools/java2wsdl/processor/expected/db.wsdl
URL: http://svn.apache.org/viewvc/incubator/cxf/branches/jliu/tools/javato/ws/src/test/java/org/apache/cxf/tools/java2wsdl/processor/expected/db.wsdl?rev=588283&r1=588282&r2=588283&view=diff
==============================================================================
--- incubator/cxf/branches/jliu/tools/javato/ws/src/test/java/org/apache/cxf/tools/java2wsdl/processor/expected/db.wsdl (original)
+++ incubator/cxf/branches/jliu/tools/javato/ws/src/test/java/org/apache/cxf/tools/java2wsdl/processor/expected/db.wsdl Thu Oct 25 10:09:20 2007
@@ -7,9 +7,9 @@
   to you 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
@@ -17,8 +17,7 @@
   specific language governing permissions and limitations
   under the License.
 -->
-
-<wsdl:definitions name="Database" targetNamespace="http://cxf523.fortest.tools.cxf.apache.org/" xmlns:ns1="http://cxf523.fortest.tools.cxf.apache.org/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
+<wsdl:definitions name="Database" targetNamespace="http://cxf523.fortest.tools.cxf.apache.org/" xmlns:tns="http://cxf523.fortest.tools.cxf.apache.org/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
   <wsdl:types>
 <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="http://cxf523.fortest.tools.cxf.apache.org/" attributeFormDefault="unqualified" elementFormDefault="unqualified" targetNamespace="http://cxf523.fortest.tools.cxf.apache.org/">
 <xs:complexType name="operation0ResponseType">
@@ -50,28 +49,28 @@
 </xs:schema>
   </wsdl:types>
   <wsdl:message name="operation0">
-    <wsdl:part name="parameters" element="ns1:operation0">
+    <wsdl:part name="parameters" element="tns:operation0">
     </wsdl:part>
   </wsdl:message>
   <wsdl:message name="DBServiceFault">
-    <wsdl:part name="fault" element="ns1:DBServiceFault">
+    <wsdl:part name="DBServiceFault" element="tns:DBServiceFault">
     </wsdl:part>
   </wsdl:message>
   <wsdl:message name="operation0Response">
-    <wsdl:part name="result" element="ns1:operation0Response">
+    <wsdl:part name="parameters" element="tns:operation0Response">
     </wsdl:part>
   </wsdl:message>
   <wsdl:portType name="DatabasePortType">
     <wsdl:operation name="operation0">
-      <wsdl:input name="operation0" message="ns1:operation0">
+      <wsdl:input name="operation0" message="tns:operation0">
     </wsdl:input>
-      <wsdl:output name="operation0Response" message="ns1:operation0Response">
+      <wsdl:output name="operation0Response" message="tns:operation0Response">
     </wsdl:output>
-      <wsdl:fault name="DBServiceFault" message="ns1:DBServiceFault">
+      <wsdl:fault name="DBServiceFault" message="tns:DBServiceFault">
     </wsdl:fault>
     </wsdl:operation>
   </wsdl:portType>
-  <wsdl:binding name="DatabaseSoapBinding" type="ns1:DatabasePortType">
+  <wsdl:binding name="DatabaseSoapBinding" type="tns:DatabasePortType">
     <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
     <wsdl:operation name="operation0">
       <soap:operation soapAction="" style="document"/>
@@ -87,7 +86,7 @@
     </wsdl:operation>
   </wsdl:binding>
   <wsdl:service name="Database">
-    <wsdl:port name="DatabasePort" binding="ns1:DatabaseSoapBinding">
+    <wsdl:port name="DatabasePort" binding="tns:DatabaseSoapBinding">
       <soap:address location="http://localhost:9090/hello"/>
     </wsdl:port>
   </wsdl:service>

Modified: incubator/cxf/branches/jliu/tools/javato/ws/src/test/java/org/apache/cxf/tools/java2wsdl/processor/expected/hello_soap12.wsdl
URL: http://svn.apache.org/viewvc/incubator/cxf/branches/jliu/tools/javato/ws/src/test/java/org/apache/cxf/tools/java2wsdl/processor/expected/hello_soap12.wsdl?rev=588283&r1=588282&r2=588283&view=diff
==============================================================================
--- incubator/cxf/branches/jliu/tools/javato/ws/src/test/java/org/apache/cxf/tools/java2wsdl/processor/expected/hello_soap12.wsdl (original)
+++ incubator/cxf/branches/jliu/tools/javato/ws/src/test/java/org/apache/cxf/tools/java2wsdl/processor/expected/hello_soap12.wsdl Thu Oct 25 10:09:20 2007
@@ -17,7 +17,7 @@
   specific language governing permissions and limitations
   under the License.
 -->
-<wsdl:definitions name="GreeterService" targetNamespace="http://apache.org/hello_world_soap12_http" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:ns1="http://apache.org/hello_world_soap12_http" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ns2="http://apache.org/hello_world_soap12_http/types" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
+<wsdl:definitions name="GreeterService" targetNamespace="http://apache.org/hello_world_soap12_http" xmlns:tns="http://apache.org/hello_world_soap12_http" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:ns1="http://apache.org/hello_world_soap12_http/types" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
   <wsdl:types>
 <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="http://apache.org/hello_world_soap12_http/types" attributeFormDefault="unqualified" elementFormDefault="unqualified" targetNamespace="http://apache.org/hello_world_soap12_http/types">
 <xs:element name="faultDetail">
@@ -47,42 +47,42 @@
 </xs:schema>
   </wsdl:types>
   <wsdl:message name="sayHi">
-    <wsdl:part name="parameters" element="ns2:sayHi">
+    <wsdl:part name="parameters" element="ns1:sayHi">
     </wsdl:part>
   </wsdl:message>
   <wsdl:message name="sayHiResponse">
-    <wsdl:part name="result" element="ns2:sayHiResponse">
+    <wsdl:part name="parameters" element="ns1:sayHiResponse">
     </wsdl:part>
   </wsdl:message>
   <wsdl:message name="PingMeFault">
-    <wsdl:part name="fault" element="ns2:faultDetail">
+    <wsdl:part name="PingMeFault" element="ns1:faultDetail">
     </wsdl:part>
   </wsdl:message>
   <wsdl:message name="pingMeResponse">
-    <wsdl:part name="result" element="ns2:pingMeResponse">
+    <wsdl:part name="parameters" element="ns1:pingMeResponse">
     </wsdl:part>
   </wsdl:message>
   <wsdl:message name="pingMe">
-    <wsdl:part name="parameters" element="ns2:pingMe">
+    <wsdl:part name="parameters" element="ns1:pingMe">
     </wsdl:part>
   </wsdl:message>
   <wsdl:portType name="Greeter">
     <wsdl:operation name="sayHi">
-      <wsdl:input name="sayHi" message="ns1:sayHi">
+      <wsdl:input name="sayHi" message="tns:sayHi">
     </wsdl:input>
-      <wsdl:output name="sayHiResponse" message="ns1:sayHiResponse">
+      <wsdl:output name="sayHiResponse" message="tns:sayHiResponse">
     </wsdl:output>
     </wsdl:operation>
     <wsdl:operation name="pingMe">
-      <wsdl:input name="pingMe" message="ns1:pingMe">
+      <wsdl:input name="pingMe" message="tns:pingMe">
     </wsdl:input>
-      <wsdl:output name="pingMeResponse" message="ns1:pingMeResponse">
+      <wsdl:output name="pingMeResponse" message="tns:pingMeResponse">
     </wsdl:output>
-      <wsdl:fault name="PingMeFault" message="ns1:PingMeFault">
+      <wsdl:fault name="PingMeFault" message="tns:PingMeFault">
     </wsdl:fault>
     </wsdl:operation>
   </wsdl:portType>
-  <wsdl:binding name="GreeterServiceSoapBinding" type="ns1:Greeter">
+  <wsdl:binding name="GreeterServiceSoapBinding" type="tns:Greeter">
     <soap12:binding style="document" transport="http://www.w3.org/2003/05/soap/bindings/HTTP/"/>
     <wsdl:operation name="sayHi">
       <soap12:operation soapAction="" style="document"/>
@@ -107,7 +107,7 @@
     </wsdl:operation>
   </wsdl:binding>
   <wsdl:service name="GreeterService">
-    <wsdl:port name="GreeterPort" binding="ns1:GreeterServiceSoapBinding">
+    <wsdl:port name="GreeterPort" binding="tns:GreeterServiceSoapBinding">
       <soap12:address location="http://localhost:9090/hello"/>
     </wsdl:port>
   </wsdl:service>

Modified: incubator/cxf/branches/jliu/tools/javato/ws/src/test/java/org/apache/cxf/tools/java2wsdl/processor/expected/hello_world_fault_expected.wsdl
URL: http://svn.apache.org/viewvc/incubator/cxf/branches/jliu/tools/javato/ws/src/test/java/org/apache/cxf/tools/java2wsdl/processor/expected/hello_world_fault_expected.wsdl?rev=588283&r1=588282&r2=588283&view=diff
==============================================================================
--- incubator/cxf/branches/jliu/tools/javato/ws/src/test/java/org/apache/cxf/tools/java2wsdl/processor/expected/hello_world_fault_expected.wsdl (original)
+++ incubator/cxf/branches/jliu/tools/javato/ws/src/test/java/org/apache/cxf/tools/java2wsdl/processor/expected/hello_world_fault_expected.wsdl Thu Oct 25 10:09:20 2007
@@ -1,23 +1,23 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
-Licensed to the Apache Software Foundation (ASF) under one
-or more contributor license agreements. See the NOTICE file
-distributed with this work for additional information
-regarding copyright ownership. The ASF licenses this file
-to you 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.
+  Licensed to the Apache Software Foundation (ASF) under one
+  or more contributor license agreements. See the NOTICE file
+  distributed with this work for additional information
+  regarding copyright ownership. The ASF licenses this file
+  to you 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.
 -->
-<wsdl:definitions name="GreeterService" targetNamespace="http://apache.org/fault" xmlns:ns1="http://apache.org/fault" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ns2="http://apache.org/fault/types" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
+<wsdl:definitions name="GreeterService" targetNamespace="http://apache.org/fault" xmlns:tns="http://apache.org/fault" xmlns:ns1="http://apache.org/fault/types" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
   <wsdl:types>
 <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:tns="http://apache.org/fault/types" attributeFormDefault="unqualified" elementFormDefault="unqualified" targetNamespace="http://apache.org/fault/types">
 <xs:element name="BadRecordLit" nillable="true" type="xs:string"/>
@@ -67,50 +67,50 @@
 </xs:schema>
   </wsdl:types>
   <wsdl:message name="BadRecordLitFault">
-    <wsdl:part name="fault" element="ns2:BadRecordLit">
+    <wsdl:part name="BadRecordLitFault" element="ns1:BadRecordLit">
+    </wsdl:part>
+  </wsdl:message>
+  <wsdl:message name="NoSuchCodeLitFault">
+    <wsdl:part name="NoSuchCodeLitFault" element="ns1:NoSuchCodeLit">
     </wsdl:part>
   </wsdl:message>
   <wsdl:message name="testDocLitFault">
-    <wsdl:part name="parameters" element="ns2:testDocLitFault">
+    <wsdl:part name="parameters" element="ns1:testDocLitFault">
     </wsdl:part>
   </wsdl:message>
   <wsdl:message name="greetMeResponse">
-    <wsdl:part name="result" element="ns2:greetMeResponse">
+    <wsdl:part name="parameters" element="ns1:greetMeResponse">
     </wsdl:part>
   </wsdl:message>
   <wsdl:message name="testDocLitFaultResponse">
-    <wsdl:part name="result" element="ns2:testDocLitFaultResponse">
-    </wsdl:part>
-  </wsdl:message>
-  <wsdl:message name="NoSuchCodeLitFault">
-    <wsdl:part name="fault" element="ns2:NoSuchCodeLit">
+    <wsdl:part name="parameters" element="ns1:testDocLitFaultResponse">
     </wsdl:part>
   </wsdl:message>
   <wsdl:message name="greetMe">
-    <wsdl:part name="parameters" element="ns2:greetMe">
+    <wsdl:part name="parameters" element="ns1:greetMe">
     </wsdl:part>
   </wsdl:message>
   <wsdl:portType name="Greeter">
     <wsdl:operation name="greetMe">
-      <wsdl:input name="greetMe" message="ns1:greetMe">
+      <wsdl:input name="greetMe" message="tns:greetMe">
     </wsdl:input>
-      <wsdl:output name="greetMeResponse" message="ns1:greetMeResponse">
+      <wsdl:output name="greetMeResponse" message="tns:greetMeResponse">
     </wsdl:output>
-      <wsdl:fault name="NoSuchCodeLitFault" message="ns1:NoSuchCodeLitFault">
+      <wsdl:fault name="NoSuchCodeLitFault" message="tns:NoSuchCodeLitFault">
     </wsdl:fault>
     </wsdl:operation>
     <wsdl:operation name="testDocLitFault">
-      <wsdl:input name="testDocLitFault" message="ns1:testDocLitFault">
+      <wsdl:input name="testDocLitFault" message="tns:testDocLitFault">
     </wsdl:input>
-      <wsdl:output name="testDocLitFaultResponse" message="ns1:testDocLitFaultResponse">
+      <wsdl:output name="testDocLitFaultResponse" message="tns:testDocLitFaultResponse">
     </wsdl:output>
-      <wsdl:fault name="NoSuchCodeLitFault" message="ns1:NoSuchCodeLitFault">
+      <wsdl:fault name="BadRecordLitFault" message="tns:BadRecordLitFault">
     </wsdl:fault>
-      <wsdl:fault name="BadRecordLitFault" message="ns1:BadRecordLitFault">
+      <wsdl:fault name="NoSuchCodeLitFault" message="tns:NoSuchCodeLitFault">
     </wsdl:fault>
     </wsdl:operation>
   </wsdl:portType>
-  <wsdl:binding name="GreeterServiceSoapBinding" type="ns1:Greeter">
+  <wsdl:binding name="GreeterServiceSoapBinding" type="tns:Greeter">
     <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
     <wsdl:operation name="greetMe">
       <soap:operation soapAction="" style="document"/>
@@ -132,16 +132,16 @@
       <wsdl:output name="testDocLitFaultResponse">
         <soap:body use="literal"/>
       </wsdl:output>
-      <wsdl:fault name="NoSuchCodeLitFault">
-        <soap:fault name="NoSuchCodeLitFault" use="literal"/>
-      </wsdl:fault>
       <wsdl:fault name="BadRecordLitFault">
         <soap:fault name="BadRecordLitFault" use="literal"/>
       </wsdl:fault>
+      <wsdl:fault name="NoSuchCodeLitFault">
+        <soap:fault name="NoSuchCodeLitFault" use="literal"/>
+      </wsdl:fault>
     </wsdl:operation>
   </wsdl:binding>
   <wsdl:service name="GreeterService">
-    <wsdl:port name="GreeterPort" binding="ns1:GreeterServiceSoapBinding">
+    <wsdl:port name="GreeterPort" binding="tns:GreeterServiceSoapBinding">
       <soap:address location="http://localhost:9090/hello"/>
     </wsdl:port>
   </wsdl:service>

Modified: incubator/cxf/branches/jliu/tools/javato/ws/src/test/java/org/apache/cxf/tools/java2wsdl/processor/expected/list_expected.wsdl
URL: http://svn.apache.org/viewvc/incubator/cxf/branches/jliu/tools/javato/ws/src/test/java/org/apache/cxf/tools/java2wsdl/processor/expected/list_expected.wsdl?rev=588283&r1=588282&r2=588283&view=diff
==============================================================================
--- incubator/cxf/branches/jliu/tools/javato/ws/src/test/java/org/apache/cxf/tools/java2wsdl/processor/expected/list_expected.wsdl (original)
+++ incubator/cxf/branches/jliu/tools/javato/ws/src/test/java/org/apache/cxf/tools/java2wsdl/processor/expected/list_expected.wsdl Thu Oct 25 10:09:20 2007
@@ -1,32 +1,32 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
-Licensed to the Apache Software Foundation (ASF) under one
-or more contributor license agreements. See the NOTICE file
-distributed with this work for additional information
-regarding copyright ownership. The ASF licenses this file
-to you 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.
+  Licensed to the Apache Software Foundation (ASF) under one
+  or more contributor license agreements. See the NOTICE file
+  distributed with this work for additional information
+  regarding copyright ownership. The ASF licenses this file
+  to you 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.
 -->
-<wsdl:definitions name="SOAPService" targetNamespace="http://cxf.apache/" xmlns:ns1="http://cxf.apache/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
+<wsdl:definitions name="SOAPService" targetNamespace="http://cxf.apache/" xmlns:tns="http://cxf.apache/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
   <wsdl:types>
-<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://cxf.apache/" attributeFormDefault="unqualified" elementFormDefault="unqualified" targetNamespace="http://cxf.apache/">
-<xsd:element name="sayHi" type="sayHi"/>
+<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:tns="http://cxf.apache/" attributeFormDefault="unqualified" elementFormDefault="unqualified" targetNamespace="http://cxf.apache/">
+<xsd:element name="sayHi" type="tns:sayHi"/>
 <xsd:complexType name="sayHi">
 <xsd:sequence>
 <xsd:element minOccurs="0" name="arg0" type="xsd:string"/>
 </xsd:sequence>
 </xsd:complexType>
-<xsd:element name="sayHiResponse" type="sayHiResponse"/>
+<xsd:element name="sayHiResponse" type="tns:sayHiResponse"/>
 <xsd:complexType name="sayHiResponse">
 <xsd:sequence>
 <xsd:element maxOccurs="unbounded" minOccurs="0" name="return" type="xsd:anyType"/>
@@ -35,22 +35,22 @@
 </xsd:schema>
   </wsdl:types>
   <wsdl:message name="sayHiResponse">
-    <wsdl:part name="result" element="ns1:sayHiResponse">
+    <wsdl:part name="parameters" element="tns:sayHiResponse">
     </wsdl:part>
   </wsdl:message>
   <wsdl:message name="sayHi">
-    <wsdl:part name="parameters" element="ns1:sayHi">
+    <wsdl:part name="parameters" element="tns:sayHi">
     </wsdl:part>
   </wsdl:message>
   <wsdl:portType name="ListTest">
     <wsdl:operation name="sayHi">
-      <wsdl:input name="sayHi" message="ns1:sayHi">
+      <wsdl:input name="sayHi" message="tns:sayHi">
     </wsdl:input>
-      <wsdl:output name="sayHiResponse" message="ns1:sayHiResponse">
+      <wsdl:output name="sayHiResponse" message="tns:sayHiResponse">
     </wsdl:output>
     </wsdl:operation>
   </wsdl:portType>
-  <wsdl:binding name="SOAPServiceSoapBinding" type="ns1:ListTest">
+  <wsdl:binding name="SOAPServiceSoapBinding" type="tns:ListTest">
     <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
     <wsdl:operation name="sayHi">
       <soap:operation soapAction="" style="document"/>
@@ -63,7 +63,7 @@
     </wsdl:operation>
   </wsdl:binding>
   <wsdl:service name="SOAPService">
-    <wsdl:port name="SoapPort" binding="ns1:SOAPServiceSoapBinding">
+    <wsdl:port name="SoapPort" binding="tns:SOAPServiceSoapBinding">
       <soap:address location="http://localhost:9090/hello"/>
     </wsdl:port>
   </wsdl:service>

Modified: incubator/cxf/branches/jliu/tools/javato/ws/src/test/java/org/apache/cxf/tools/java2wsdl/processor/expected/my_hello_soap12.wsdl
URL: http://svn.apache.org/viewvc/incubator/cxf/branches/jliu/tools/javato/ws/src/test/java/org/apache/cxf/tools/java2wsdl/processor/expected/my_hello_soap12.wsdl?rev=588283&r1=588282&r2=588283&view=diff
==============================================================================
--- incubator/cxf/branches/jliu/tools/javato/ws/src/test/java/org/apache/cxf/tools/java2wsdl/processor/expected/my_hello_soap12.wsdl (original)
+++ incubator/cxf/branches/jliu/tools/javato/ws/src/test/java/org/apache/cxf/tools/java2wsdl/processor/expected/my_hello_soap12.wsdl Thu Oct 25 10:09:20 2007
@@ -1,4 +1,4 @@
-<?xml  version="1.0"  encoding="UTF-8"?>
+<?xml version="1.0" encoding="UTF-8"?>
 <!--
   Licensed to the Apache Software Foundation (ASF) under one
   or more contributor license agreements. See the NOTICE file
@@ -7,9 +7,9 @@
   to you 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
@@ -17,7 +17,7 @@
   specific language governing permissions and limitations
   under the License.
 -->
-<wsdl:definitions name="MyService" targetNamespace="http://apache.org/hello_world_soap12_http" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:ns1="http://apache.org/hello_world_soap12_http" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ns2="http://apache.org/hello_world_soap12_http/types" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
+<wsdl:definitions name="MyService" targetNamespace="http://apache.org/hello_world_soap12_http" xmlns:tns="http://apache.org/hello_world_soap12_http" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:ns1="http://apache.org/hello_world_soap12_http/types" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
   <wsdl:types>
 <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="http://apache.org/hello_world_soap12_http/types" attributeFormDefault="unqualified" elementFormDefault="unqualified" targetNamespace="http://apache.org/hello_world_soap12_http/types">
 <xs:element name="faultDetail">
@@ -47,42 +47,42 @@
 </xs:schema>
   </wsdl:types>
   <wsdl:message name="sayHi">
-    <wsdl:part name="parameters" element="ns2:sayHi">
+    <wsdl:part name="parameters" element="ns1:sayHi">
     </wsdl:part>
   </wsdl:message>
   <wsdl:message name="sayHiResponse">
-    <wsdl:part name="result" element="ns2:sayHiResponse">
+    <wsdl:part name="parameters" element="ns1:sayHiResponse">
     </wsdl:part>
   </wsdl:message>
   <wsdl:message name="PingMeFault">
-    <wsdl:part name="fault" element="ns2:faultDetail">
+    <wsdl:part name="PingMeFault" element="ns1:faultDetail">
     </wsdl:part>
   </wsdl:message>
   <wsdl:message name="pingMeResponse">
-    <wsdl:part name="result" element="ns2:pingMeResponse">
+    <wsdl:part name="parameters" element="ns1:pingMeResponse">
     </wsdl:part>
   </wsdl:message>
   <wsdl:message name="pingMe">
-    <wsdl:part name="parameters" element="ns2:pingMe">
+    <wsdl:part name="parameters" element="ns1:pingMe">
     </wsdl:part>
   </wsdl:message>
   <wsdl:portType name="Greeter">
     <wsdl:operation name="sayHi">
-      <wsdl:input name="sayHi" message="ns1:sayHi">
+      <wsdl:input name="sayHi" message="tns:sayHi">
     </wsdl:input>
-      <wsdl:output name="sayHiResponse" message="ns1:sayHiResponse">
+      <wsdl:output name="sayHiResponse" message="tns:sayHiResponse">
     </wsdl:output>
     </wsdl:operation>
     <wsdl:operation name="pingMe">
-      <wsdl:input name="pingMe" message="ns1:pingMe">
+      <wsdl:input name="pingMe" message="tns:pingMe">
     </wsdl:input>
-      <wsdl:output name="pingMeResponse" message="ns1:pingMeResponse">
+      <wsdl:output name="pingMeResponse" message="tns:pingMeResponse">
     </wsdl:output>
-      <wsdl:fault name="PingMeFault" message="ns1:PingMeFault">
+      <wsdl:fault name="PingMeFault" message="tns:PingMeFault">
     </wsdl:fault>
     </wsdl:operation>
   </wsdl:portType>
-  <wsdl:binding name="GreeterServiceSoapBinding" type="ns1:Greeter">
+  <wsdl:binding name="GreeterServiceSoapBinding" type="tns:Greeter">
     <soap12:binding style="document" transport="http://www.w3.org/2003/05/soap/bindings/HTTP/"/>
     <wsdl:operation name="sayHi">
       <soap12:operation soapAction="" style="document"/>
@@ -107,7 +107,7 @@
     </wsdl:operation>
   </wsdl:binding>
   <wsdl:service name="MyService">
-    <wsdl:port name="GreeterPort" binding="ns1:GreeterServiceSoapBinding">
+    <wsdl:port name="GreeterPort" binding="tns:GreeterServiceSoapBinding">
       <soap12:address location="http://localhost:9090/hello"/>
     </wsdl:port>
   </wsdl:service>

Modified: incubator/cxf/branches/jliu/tools/javato/ws/src/test/java/org/apache/cxf/tools/java2wsdl/processor/expected/rpc-hello-expected.wsdl
URL: http://svn.apache.org/viewvc/incubator/cxf/branches/jliu/tools/javato/ws/src/test/java/org/apache/cxf/tools/java2wsdl/processor/expected/rpc-hello-expected.wsdl?rev=588283&r1=588282&r2=588283&view=diff
==============================================================================
--- incubator/cxf/branches/jliu/tools/javato/ws/src/test/java/org/apache/cxf/tools/java2wsdl/processor/expected/rpc-hello-expected.wsdl (original)
+++ incubator/cxf/branches/jliu/tools/javato/ws/src/test/java/org/apache/cxf/tools/java2wsdl/processor/expected/rpc-hello-expected.wsdl Thu Oct 25 10:09:20 2007
@@ -17,7 +17,7 @@
   specific language governing permissions and limitations
   under the License.
 -->
-<wsdl:definitions name="RPCHelloService" targetNamespace="http://cxf.apache.org/rpc" xmlns:ns1="http://cxf.apache.org/rpc" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
+<wsdl:definitions name="RPCHelloService" targetNamespace="http://cxf.apache.org/rpc" xmlns:tns="http://cxf.apache.org/rpc" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
   <wsdl:message name="helloResponse">
     <wsdl:part name="return" type="xsd:string">
     </wsdl:part>
@@ -28,13 +28,13 @@
   </wsdl:message>
   <wsdl:portType name="RPCHello">
     <wsdl:operation name="hello">
-      <wsdl:input name="hello" message="ns1:hello">
+      <wsdl:input name="hello" message="tns:hello">
     </wsdl:input>
-      <wsdl:output name="helloResponse" message="ns1:helloResponse">
+      <wsdl:output name="helloResponse" message="tns:helloResponse">
     </wsdl:output>
     </wsdl:operation>
   </wsdl:portType>
-  <wsdl:binding name="RPCHelloServiceSoapBinding" type="ns1:RPCHello">
+  <wsdl:binding name="RPCHelloServiceSoapBinding" type="tns:RPCHello">
     <soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
     <wsdl:operation name="hello">
       <soap:operation soapAction="" style="rpc"/>
@@ -47,7 +47,7 @@
     </wsdl:operation>
   </wsdl:binding>
   <wsdl:service name="RPCHelloService">
-    <wsdl:port name="RPCHelloPort" binding="ns1:RPCHelloServiceSoapBinding">
+    <wsdl:port name="RPCHelloPort" binding="tns:RPCHelloServiceSoapBinding">
       <soap:address location="http://localhost:9090/hello"/>
     </wsdl:port>
   </wsdl:service>

Modified: incubator/cxf/branches/jliu/tools/javato/ws/src/test/java/org/apache/cxf/tools/java2wsdl/processor/expected/xml-bare-expected.wsdl
URL: http://svn.apache.org/viewvc/incubator/cxf/branches/jliu/tools/javato/ws/src/test/java/org/apache/cxf/tools/java2wsdl/processor/expected/xml-bare-expected.wsdl?rev=588283&r1=588282&r2=588283&view=diff
==============================================================================
--- incubator/cxf/branches/jliu/tools/javato/ws/src/test/java/org/apache/cxf/tools/java2wsdl/processor/expected/xml-bare-expected.wsdl (original)
+++ incubator/cxf/branches/jliu/tools/javato/ws/src/test/java/org/apache/cxf/tools/java2wsdl/processor/expected/xml-bare-expected.wsdl Thu Oct 25 10:09:20 2007
@@ -17,7 +17,7 @@
   specific language governing permissions and limitations
   under the License.
 -->
-<wsdl:definitions name="GreeterService" targetNamespace="http://apache.org/xml_bare" xmlns:ns1="http://apache.org/xml_bare" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ns2="http://apache.org/xml_bare/types" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
+<wsdl:definitions name="GreeterService" targetNamespace="http://apache.org/xml_bare" xmlns:tns="http://apache.org/xml_bare" xmlns:ns1="http://apache.org/xml_bare/types" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
   <wsdl:types>
 <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:tns="http://apache.org/xml_bare/types" attributeFormDefault="unqualified" elementFormDefault="unqualified" targetNamespace="http://apache.org/xml_bare/types">
 <xs:element name="myComplexStruct" nillable="true" type="tns:myComplexStructType"/>
@@ -31,71 +31,71 @@
 </xs:sequence>
 </xs:complexType>
 </xs:schema>
-<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://apache.org/xml_bare" xmlns:ns0="http://apache.org/xml_bare/types" attributeFormDefault="unqualified" elementFormDefault="qualified" targetNamespace="http://apache.org/xml_bare">
+<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ns0="http://apache.org/xml_bare/types" xmlns:tns="http://apache.org/xml_bare" attributeFormDefault="unqualified" elementFormDefault="qualified" targetNamespace="http://apache.org/xml_bare">
 <xsd:import namespace="http://apache.org/xml_bare/types"/>
 <xsd:element name="out" nillable="true" type="xsd:string"/>
 <xsd:element name="in" nillable="true" type="ns0:myComplexStructType"/>
 </xsd:schema>
   </wsdl:types>
   <wsdl:message name="sendReceiveData">
-    <wsdl:part name="in" element="ns1:in">
+    <wsdl:part name="in" element="tns:in">
     </wsdl:part>
   </wsdl:message>
   <wsdl:message name="testMultiParamPart">
-    <wsdl:part name="in2" element="ns2:myComplexStruct">
+    <wsdl:part name="in2" element="ns1:myComplexStruct">
     </wsdl:part>
-    <wsdl:part name="in1" element="ns2:requestType">
+    <wsdl:part name="in1" element="ns1:requestType">
     </wsdl:part>
   </wsdl:message>
   <wsdl:message name="greetMe">
-    <wsdl:part name="me" element="ns2:requestType">
+    <wsdl:part name="me" element="ns1:requestType">
     </wsdl:part>
   </wsdl:message>
   <wsdl:message name="sayHiResponse">
-    <wsdl:part name="out" element="ns1:out">
+    <wsdl:part name="out" element="tns:out">
     </wsdl:part>
   </wsdl:message>
   <wsdl:message name="sendReceiveDataResponse">
-    <wsdl:part name="out" element="ns1:out">
+    <wsdl:part name="out" element="tns:out">
     </wsdl:part>
   </wsdl:message>
   <wsdl:message name="testMultiParamPartResponse">
-    <wsdl:part name="out1" element="ns2:responseType">
+    <wsdl:part name="out1" element="ns1:responseType">
     </wsdl:part>
   </wsdl:message>
   <wsdl:message name="sayHi">
   </wsdl:message>
   <wsdl:message name="greetMeResponse">
-    <wsdl:part name="theResponse" element="ns2:responseType">
+    <wsdl:part name="theResponse" element="ns1:responseType">
     </wsdl:part>
   </wsdl:message>
   <wsdl:portType name="Greeter">
     <wsdl:operation name="sayHi">
-      <wsdl:input name="sayHi" message="ns1:sayHi">
+      <wsdl:input name="sayHi" message="tns:sayHi">
     </wsdl:input>
-      <wsdl:output name="sayHiResponse" message="ns1:sayHiResponse">
+      <wsdl:output name="sayHiResponse" message="tns:sayHiResponse">
     </wsdl:output>
     </wsdl:operation>
     <wsdl:operation name="testMultiParamPart">
-      <wsdl:input name="testMultiParamPart" message="ns1:testMultiParamPart">
+      <wsdl:input name="testMultiParamPart" message="tns:testMultiParamPart">
     </wsdl:input>
-      <wsdl:output name="testMultiParamPartResponse" message="ns1:testMultiParamPartResponse">
+      <wsdl:output name="testMultiParamPartResponse" message="tns:testMultiParamPartResponse">
     </wsdl:output>
     </wsdl:operation>
     <wsdl:operation name="greetMe">
-      <wsdl:input name="greetMe" message="ns1:greetMe">
+      <wsdl:input name="greetMe" message="tns:greetMe">
     </wsdl:input>
-      <wsdl:output name="greetMeResponse" message="ns1:greetMeResponse">
+      <wsdl:output name="greetMeResponse" message="tns:greetMeResponse">
     </wsdl:output>
     </wsdl:operation>
     <wsdl:operation name="sendReceiveData">
-      <wsdl:input name="sendReceiveData" message="ns1:sendReceiveData">
+      <wsdl:input name="sendReceiveData" message="tns:sendReceiveData">
     </wsdl:input>
-      <wsdl:output name="sendReceiveDataResponse" message="ns1:sendReceiveDataResponse">
+      <wsdl:output name="sendReceiveDataResponse" message="tns:sendReceiveDataResponse">
     </wsdl:output>
     </wsdl:operation>
   </wsdl:portType>
-  <wsdl:binding name="GreeterServiceSoapBinding" type="ns1:Greeter">
+  <wsdl:binding name="GreeterServiceSoapBinding" type="tns:Greeter">
     <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
     <wsdl:operation name="sayHi">
       <soap:operation soapAction="" style="document"/>
@@ -135,7 +135,7 @@
     </wsdl:operation>
   </wsdl:binding>
   <wsdl:service name="GreeterService">
-    <wsdl:port name="GreeterPort" binding="ns1:GreeterServiceSoapBinding">
+    <wsdl:port name="GreeterPort" binding="tns:GreeterServiceSoapBinding">
       <soap:address location="http://localhost:9090/hello"/>
     </wsdl:port>
   </wsdl:service>

Modified: incubator/cxf/branches/jliu/tools/javato/ws/src/test/java/org/apache/cxf/tools/java2wsdl/processor/internal/ServiceBuilderFactoryTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/branches/jliu/tools/javato/ws/src/test/java/org/apache/cxf/tools/java2wsdl/processor/internal/ServiceBuilderFactoryTest.java?rev=588283&r1=588282&r2=588283&view=diff
==============================================================================
--- incubator/cxf/branches/jliu/tools/javato/ws/src/test/java/org/apache/cxf/tools/java2wsdl/processor/internal/ServiceBuilderFactoryTest.java (original)
+++ incubator/cxf/branches/jliu/tools/javato/ws/src/test/java/org/apache/cxf/tools/java2wsdl/processor/internal/ServiceBuilderFactoryTest.java Thu Oct 25 10:09:20 2007
@@ -19,32 +19,45 @@
 
 package org.apache.cxf.tools.java2wsdl.processor.internal;
 
+import java.util.ArrayList;
+
+import org.apache.cxf.BusFactory;
 import org.apache.cxf.jaxws.JaxwsServiceBuilder;
 import org.apache.cxf.service.ServiceBuilder;
 import org.apache.cxf.simple.SimpleServiceBuilder;
 import org.apache.cxf.tools.fortest.classnoanno.docbare.Stock;
 import org.apache.cxf.tools.fortest.simple.Hello;
 import org.apache.cxf.tools.java2wsdl.processor.FrontendFactory;
+import org.apache.cxf.tools.java2wsdl.processor.JavaToWSDLProcessor;
 import org.junit.Assert;
+import org.junit.Before;
 import org.junit.Test;
+import org.springframework.context.ApplicationContext;
 
 public class ServiceBuilderFactoryTest extends Assert {
     ServiceBuilderFactory factory = ServiceBuilderFactory.getInstance();
-
+    private ApplicationContext applicationContext;
+    
+    @Before
+    public void setUp() {
+        applicationContext = JavaToWSDLProcessor.getApplicationContext(BusFactory.getDefaultBus(), 
+                                                                       new ArrayList<String>());
+    }
+    
     @Test
-    public void testGetBuilderClassName() {
+    public void testGetBuilderBeanName() {
         assertNotNull(factory);
-        assertEquals(JaxwsServiceBuilder.class.getName(),
-                     factory.getBuilderClassName(FrontendFactory.Style.Jaxws));
+        assertEquals("JaxwsServiceBuilderBean",
+                     factory.getBuilderBeanName(FrontendFactory.Style.Jaxws));
 
-        assertEquals(SimpleServiceBuilder.class.getName(),
-                     factory.getBuilderClassName(FrontendFactory.Style.Simple));
+        assertEquals("SimpleServiceBuilderBean",
+                     factory.getBuilderBeanName(FrontendFactory.Style.Simple));
     }
 
     @Test
     public void testGetJaxwsBuilder() {
         factory.setServiceClass(Stock.class);
-        ServiceBuilder builder = factory.newBuilder();
+        ServiceBuilder builder = factory.newBuilder(applicationContext);
         assertNotNull(builder);
         assertTrue(builder instanceof JaxwsServiceBuilder);
     }
@@ -52,7 +65,7 @@
     @Test
     public void testGetSimpleBuilder() {
         factory.setServiceClass(Hello.class);
-        ServiceBuilder builder = factory.newBuilder();
+        ServiceBuilder builder = factory.newBuilder(applicationContext);
         assertNotNull(builder);
         assertTrue(builder instanceof SimpleServiceBuilder);
     }

Modified: incubator/cxf/branches/jliu/tools/javato/ws/src/test/java/org/apache/cxf/tools/java2wsdl/processor/internal/jaxws/JaxwsServiceBuilderNoAnnoTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/branches/jliu/tools/javato/ws/src/test/java/org/apache/cxf/tools/java2wsdl/processor/internal/jaxws/JaxwsServiceBuilderNoAnnoTest.java?rev=588283&r1=588282&r2=588283&view=diff
==============================================================================
--- incubator/cxf/branches/jliu/tools/javato/ws/src/test/java/org/apache/cxf/tools/java2wsdl/processor/internal/jaxws/JaxwsServiceBuilderNoAnnoTest.java (original)
+++ incubator/cxf/branches/jliu/tools/javato/ws/src/test/java/org/apache/cxf/tools/java2wsdl/processor/internal/jaxws/JaxwsServiceBuilderNoAnnoTest.java Thu Oct 25 10:09:20 2007
@@ -41,9 +41,6 @@
         generator.setBus(builder.getBus());
     }
 
-    public void tearDown() {
-
-    }
 
     @Test
     public void testGeneratedWithElementryClass() throws Exception {

Modified: incubator/cxf/branches/jliu/tools/javato/ws/src/test/java/org/apache/cxf/tools/java2wsdl/processor/internal/jaxws/JaxwsServiceBuilderTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/branches/jliu/tools/javato/ws/src/test/java/org/apache/cxf/tools/java2wsdl/processor/internal/jaxws/JaxwsServiceBuilderTest.java?rev=588283&r1=588282&r2=588283&view=diff
==============================================================================
--- incubator/cxf/branches/jliu/tools/javato/ws/src/test/java/org/apache/cxf/tools/java2wsdl/processor/internal/jaxws/JaxwsServiceBuilderTest.java (original)
+++ incubator/cxf/branches/jliu/tools/javato/ws/src/test/java/org/apache/cxf/tools/java2wsdl/processor/internal/jaxws/JaxwsServiceBuilderTest.java Thu Oct 25 10:09:20 2007
@@ -95,7 +95,7 @@
 
         String expectedFile = this.getClass()
             .getResource("expected/expected_doc_lit_wrapped_no_wrapperclass.wsdl").getFile();
-        assertFileEquals(expectedFile, output.getAbsolutePath());
+        assertWsdlEquals(new File(expectedFile), output);
     }
     
 
@@ -112,7 +112,8 @@
 
         String expectedFile = this.getClass().getResource("expected/expected_hello_world_doc_lit.wsdl")
             .getFile();
-        assertFileEquals(expectedFile, output.getAbsolutePath());
+        assertWsdlEquals(new File(expectedFile), output);
+        //assertFileEquals(expectedFile, output.getAbsolutePath());
     }
  
     @Test
@@ -144,7 +145,7 @@
 
         String expectedFile = this.getClass()
             .getResource("expected/expected_doc_lit_wrapped_no_webparam.wsdl").getFile();
-        assertFileEquals(expectedFile, output.getAbsolutePath());
+        assertWsdlEquals(new File(expectedFile), output);
     }
     
     @Test
@@ -174,7 +175,8 @@
 
         String expectedFile = this.getClass().getResource("expected/expected_hello_world_async.wsdl")
             .getFile();
-        assertFileEquals(expectedFile, output.getAbsolutePath());
+
+        assertWsdlEquals(new File(expectedFile), output);
     }
 
     @Test
@@ -190,7 +192,7 @@
         assertTrue(output.exists());
 
         String expectedFile = this.getClass().getResource("expected/expected_rpc_lit.wsdl").getFile();
-        assertFileEquals(expectedFile, file.getAbsolutePath());
+        assertWsdlEquals(new File(expectedFile), file);
     }
 
 

Modified: incubator/cxf/branches/jliu/tools/javato/ws/src/test/java/org/apache/cxf/tools/java2wsdl/processor/internal/jaxws/expected/expected_doc_lit_wrapped_localName.wsdl
URL: http://svn.apache.org/viewvc/incubator/cxf/branches/jliu/tools/javato/ws/src/test/java/org/apache/cxf/tools/java2wsdl/processor/internal/jaxws/expected/expected_doc_lit_wrapped_localName.wsdl?rev=588283&r1=588282&r2=588283&view=diff
==============================================================================
--- incubator/cxf/branches/jliu/tools/javato/ws/src/test/java/org/apache/cxf/tools/java2wsdl/processor/internal/jaxws/expected/expected_doc_lit_wrapped_localName.wsdl (original)
+++ incubator/cxf/branches/jliu/tools/javato/ws/src/test/java/org/apache/cxf/tools/java2wsdl/processor/internal/jaxws/expected/expected_doc_lit_wrapped_localName.wsdl Thu Oct 25 10:09:20 2007
@@ -1,58 +1,40 @@
-<!--
-  Licensed to the Apache Software Foundation (ASF) under one
-  or more contributor license agreements. See the NOTICE file
-  distributed with this work for additional information
-  regarding copyright ownership. The ASF licenses this file
-  to you 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.
--->
 <?xml version="1.0" encoding="UTF-8"?>
-<wsdl:definitions name="StockService" targetNamespace="http://doc.withannotation.fortest.tools.cxf.apache.org/" xmlns:ns1="http://doc.withannotation.fortest.tools.cxf.apache.org/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
+<wsdl:definitions name="StockService" targetNamespace="http://doc.withannotation.fortest.tools.cxf.apache.org/" xmlns:tns="http://doc.withannotation.fortest.tools.cxf.apache.org/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
   <wsdl:types>
 <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="http://doc.withannotation.fortest.tools.cxf.apache.org/" attributeFormDefault="unqualified" elementFormDefault="unqualified" targetNamespace="http://doc.withannotation.fortest.tools.cxf.apache.org/">
-<xs:element name="getPrice">
-<xs:complexType>
-<xs:sequence>
-<xs:element name="responseType" type="xs:string"/>
-</xs:sequence>
-</xs:complexType>
-</xs:element>
-<xs:element name="getPriceResponse">
-<xs:complexType>
-<xs:sequence>
-<xs:element name="responseType" type="xs:float"/>
-</xs:sequence>
-</xs:complexType>
-</xs:element>
+    <xs:element name="getPrice" type="getPrice"/>
+    <xs:element name="getPriceResponse" type="getPriceResponse"/>
+    <xs:complexType name="getPriceResponse">
+        <xs:sequence>
+            <xs:element name="responseType" type="xs:float"/>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:complexType name="getPrice">
+        <xs:sequence>
+            <xs:element name="responseType" type="xs:string"/>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:element name="xXx" nillable="true" type="getPrice"/>
+    <xs:element name="zZz" nillable="true" type="getPriceResponse"/>
 </xs:schema>
   </wsdl:types>
   <wsdl:message name="getPriceResponse">
-    <wsdl:part name="result" element="ns1:getPriceResponse">
+    <wsdl:part name="parameters" element="tns:zZz">
     </wsdl:part>
   </wsdl:message>
   <wsdl:message name="getPrice">
-    <wsdl:part name="parameters" element="ns1:getPrice">
+    <wsdl:part name="parameters" element="tns:xXx">
     </wsdl:part>
   </wsdl:message>
   <wsdl:portType name="Stock">
     <wsdl:operation name="getPrice">
-      <wsdl:input name="getPrice" message="ns1:getPrice">
+      <wsdl:input name="getPrice" message="tns:getPrice">
     </wsdl:input>
-      <wsdl:output name="getPriceResponse" message="ns1:getPriceResponse">
+      <wsdl:output name="getPriceResponse" message="tns:getPriceResponse">
     </wsdl:output>
     </wsdl:operation>
   </wsdl:portType>
-  <wsdl:binding name="StockServiceSoapBinding" type="ns1:Stock">
+  <wsdl:binding name="StockServiceSoapBinding" type="tns:Stock">
     <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
     <wsdl:operation name="getPrice">
       <soap:operation soapAction="" style="document"/>
@@ -65,7 +47,7 @@
     </wsdl:operation>
   </wsdl:binding>
   <wsdl:service name="StockService">
-    <wsdl:port name="StockPort" binding="ns1:StockServiceSoapBinding">
+    <wsdl:port name="StockPort" binding="tns:StockServiceSoapBinding">
       <soap:address location="http://localhost:9090"/>
     </wsdl:port>
   </wsdl:service>

Modified: incubator/cxf/branches/jliu/tools/javato/ws/src/test/java/org/apache/cxf/tools/java2wsdl/processor/internal/jaxws/expected/expected_doc_lit_wrapped_no_webparam.wsdl
URL: http://svn.apache.org/viewvc/incubator/cxf/branches/jliu/tools/javato/ws/src/test/java/org/apache/cxf/tools/java2wsdl/processor/internal/jaxws/expected/expected_doc_lit_wrapped_no_webparam.wsdl?rev=588283&r1=588282&r2=588283&view=diff
==============================================================================
--- incubator/cxf/branches/jliu/tools/javato/ws/src/test/java/org/apache/cxf/tools/java2wsdl/processor/internal/jaxws/expected/expected_doc_lit_wrapped_no_webparam.wsdl (original)
+++ incubator/cxf/branches/jliu/tools/javato/ws/src/test/java/org/apache/cxf/tools/java2wsdl/processor/internal/jaxws/expected/expected_doc_lit_wrapped_no_webparam.wsdl Thu Oct 25 10:09:20 2007
@@ -17,7 +17,7 @@
   specific language governing permissions and limitations
   under the License.
 -->
-<wsdl:definitions name="HelloWithNoWebParamService" targetNamespace="http://apache.org/" xmlns:ns1="http://apache.org/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
+<wsdl:definitions name="HelloWithNoWebParamService" targetNamespace="http://apache.org/" xmlns:tns="http://apache.org/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
   <wsdl:types>
 <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:tns="http://doc.withannotation.fortest.tools.cxf.apache.org/" attributeFormDefault="unqualified" elementFormDefault="unqualified" targetNamespace="http://doc.withannotation.fortest.tools.cxf.apache.org/">
 <xs:element name="sayHi" type="tns:sayHi"/>
@@ -29,28 +29,28 @@
 </xs:complexType>
 <xs:complexType name="sayHiResponse"/>
 </xs:schema>
-<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://apache.org/" xmlns:ns0="http://doc.withannotation.fortest.tools.cxf.apache.org/" attributeFormDefault="unqualified" elementFormDefault="unqualified" targetNamespace="http://apache.org/">
+<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ns0="http://doc.withannotation.fortest.tools.cxf.apache.org/" xmlns:tns="http://apache.org/" attributeFormDefault="unqualified" elementFormDefault="unqualified" targetNamespace="http://apache.org/">
 <xsd:element name="sayHi" nillable="true" type="ns0:sayHi"/>
 <xsd:element name="sayHiResponse" nillable="true" type="ns0:sayHiResponse"/>
 </xsd:schema>
   </wsdl:types>
   <wsdl:message name="sayHiResponse">
-    <wsdl:part name="result" element="ns1:sayHiResponse">
+    <wsdl:part name="parameters" element="tns:sayHiResponse">
     </wsdl:part>
   </wsdl:message>
   <wsdl:message name="sayHi">
-    <wsdl:part name="parameters" element="ns1:sayHi">
+    <wsdl:part name="parameters" element="tns:sayHi">
     </wsdl:part>
   </wsdl:message>
   <wsdl:portType name="Hello">
     <wsdl:operation name="sayHi">
-      <wsdl:input name="sayHi" message="ns1:sayHi">
+      <wsdl:input name="sayHi" message="tns:sayHi">
     </wsdl:input>
-      <wsdl:output name="sayHiResponse" message="ns1:sayHiResponse">
+      <wsdl:output name="sayHiResponse" message="tns:sayHiResponse">
     </wsdl:output>
     </wsdl:operation>
   </wsdl:portType>
-  <wsdl:binding name="HelloWithNoWebParamServiceSoapBinding" type="ns1:Hello">
+  <wsdl:binding name="HelloWithNoWebParamServiceSoapBinding" type="tns:Hello">
     <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
     <wsdl:operation name="sayHi">
       <soap:operation soapAction="" style="document"/>
@@ -63,7 +63,7 @@
     </wsdl:operation>
   </wsdl:binding>
   <wsdl:service name="HelloWithNoWebParamService">
-    <wsdl:port name="HelloPort" binding="ns1:HelloWithNoWebParamServiceSoapBinding">
+    <wsdl:port name="HelloPort" binding="tns:HelloWithNoWebParamServiceSoapBinding">
       <soap:address location="http://localhost:9090"/>
     </wsdl:port>
   </wsdl:service>