cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From e..@apache.org
Subject svn commit: r532970 - in /incubator/cxf/trunk/tools: javato/src/main/java/org/apache/cxf/tools/java2wsdl/processor/ javato/src/test/java/org/apache/cxf/tools/java2wsdl/processor/ wsdlto/databinding/jaxb/src/main/java/org/apache/cxf/tools/wsdlto/databin...
Date Fri, 27 Apr 2007 05:39:30 GMT
Author: ema
Date: Thu Apr 26 22:39:29 2007
New Revision: 532970

URL: http://svn.apache.org/viewvc?view=rev&rev=532970
Log:
* [CXF-600] Enable -t flag for java2wsdl
* Enhanced error message for JAXBDatabinding

Modified:
    incubator/cxf/trunk/tools/javato/src/main/java/org/apache/cxf/tools/java2wsdl/processor/JavaToProcessor.java
    incubator/cxf/trunk/tools/javato/src/test/java/org/apache/cxf/tools/java2wsdl/processor/JavaToProcessorTest.java
    incubator/cxf/trunk/tools/wsdlto/databinding/jaxb/src/main/java/org/apache/cxf/tools/wsdlto/databinding/jaxb/JAXBBindErrorListener.java

Modified: incubator/cxf/trunk/tools/javato/src/main/java/org/apache/cxf/tools/java2wsdl/processor/JavaToProcessor.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/javato/src/main/java/org/apache/cxf/tools/java2wsdl/processor/JavaToProcessor.java?view=diff&rev=532970&r1=532969&r2=532970
==============================================================================
--- incubator/cxf/trunk/tools/javato/src/main/java/org/apache/cxf/tools/java2wsdl/processor/JavaToProcessor.java
(original)
+++ incubator/cxf/trunk/tools/javato/src/main/java/org/apache/cxf/tools/java2wsdl/processor/JavaToProcessor.java
Thu Apr 26 22:39:29 2007
@@ -67,6 +67,10 @@
 
         AbstractGenerator generator = factory.newGenerator();
         generator.setAllowImports(context.containsKey(ToolConstants.CFG_CREATE_XSD_IMPORTS));
+        if (context.containsKey(ToolConstants.CFG_TNS)) {
+            String ns = (String)context.get(ToolConstants.CFG_TNS);
+            service.setTargetNamespace(ns);
+        }
         generator.setServiceModel(service);
         generator.generate(output);
     }

Modified: incubator/cxf/trunk/tools/javato/src/test/java/org/apache/cxf/tools/java2wsdl/processor/JavaToProcessorTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/javato/src/test/java/org/apache/cxf/tools/java2wsdl/processor/JavaToProcessorTest.java?view=diff&rev=532970&r1=532969&r2=532970
==============================================================================
--- incubator/cxf/trunk/tools/javato/src/test/java/org/apache/cxf/tools/java2wsdl/processor/JavaToProcessorTest.java
(original)
+++ incubator/cxf/trunk/tools/javato/src/test/java/org/apache/cxf/tools/java2wsdl/processor/JavaToProcessorTest.java
Thu Apr 26 22:39:29 2007
@@ -154,7 +154,7 @@
         w2jProcessor.execute();
         
         
-        String tns = "http://apache.org/hello_world_doc_lit";
+        String tns = "http://apache.org/sepecifiedTns";
         String serviceName = "cxfService";
 
         System.setProperty("java.class.path", "");

Modified: incubator/cxf/trunk/tools/wsdlto/databinding/jaxb/src/main/java/org/apache/cxf/tools/wsdlto/databinding/jaxb/JAXBBindErrorListener.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/wsdlto/databinding/jaxb/src/main/java/org/apache/cxf/tools/wsdlto/databinding/jaxb/JAXBBindErrorListener.java?view=diff&rev=532970&r1=532969&r2=532970
==============================================================================
--- incubator/cxf/trunk/tools/wsdlto/databinding/jaxb/src/main/java/org/apache/cxf/tools/wsdlto/databinding/jaxb/JAXBBindErrorListener.java
(original)
+++ incubator/cxf/trunk/tools/wsdlto/databinding/jaxb/src/main/java/org/apache/cxf/tools/wsdlto/databinding/jaxb/JAXBBindErrorListener.java
Thu Apr 26 22:39:29 2007
@@ -27,27 +27,30 @@
 
 public class JAXBBindErrorListener implements ErrorListener {
     private ToolContext env;
+    private String prefix = "Thrown by JAXB : ";
 
     public JAXBBindErrorListener(ToolContext penv) {
         env = penv;
     }
 
     public void error(org.xml.sax.SAXParseException exception) {
-        throw new ToolException(exception.getLocalizedMessage());
+        throw new ToolException(prefix + exception.getLocalizedMessage(), exception);
 
     }
 
     public void fatalError(org.xml.sax.SAXParseException exception) {
-        throw new ToolException(exception.getLocalizedMessage());
+        throw new ToolException(prefix + exception.getLocalizedMessage(), exception);
     }
 
     public void info(org.xml.sax.SAXParseException exception) {
-
+        if (this.env.isVerbose()) {
+            System.out.println("JAXB Info: " + exception.toString());
+        }
     }
 
     public void warning(org.xml.sax.SAXParseException exception) {
         if (this.env.isVerbose()) {
-            System.err.println("Parsing schema warning " + exception.toString());
+            System.err.println("JAXB parsing schema warning " + exception.toString());
         }
     }
 }



Mime
View raw message