cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From e..@apache.org
Subject svn commit: r443321 - in /incubator/cxf/trunk/tools: common/src/main/java/org/apache/cxf/tools/common/ common/src/main/java/org/apache/cxf/tools/util/ wsdl2java/src/main/java/org/apache/cxf/tools/wsdl2java/databindings/jaxb/ wsdl2java/src/main/java/org...
Date Thu, 14 Sep 2006 11:40:43 GMT
Author: ema
Date: Thu Sep 14 04:40:41 2006
New Revision: 443321

URL: http://svn.apache.org/viewvc?view=rev&rev=443321
Log:
CXF-78

Modified:
    incubator/cxf/trunk/tools/common/src/main/java/org/apache/cxf/tools/common/DataBindingGenerator.java
    incubator/cxf/trunk/tools/common/src/main/java/org/apache/cxf/tools/util/ProcessorUtil.java
    incubator/cxf/trunk/tools/wsdl2java/src/main/java/org/apache/cxf/tools/wsdl2java/databindings/jaxb/JAXBBindErrorListener.java
    incubator/cxf/trunk/tools/wsdl2java/src/main/java/org/apache/cxf/tools/wsdl2java/databindings/jaxb/JAXBBindingGenerator.java
    incubator/cxf/trunk/tools/wsdl2java/src/main/java/org/apache/cxf/tools/wsdl2java/databindings/jaxb/Messages.properties
    incubator/cxf/trunk/tools/wsdl2java/src/main/java/org/apache/cxf/tools/wsdl2java/frontend/jaxws/AbstractGenerator.java
    incubator/cxf/trunk/tools/wsdl2java/src/main/java/org/apache/cxf/tools/wsdl2java/processor/Messages.properties
    incubator/cxf/trunk/tools/wsdl2java/src/main/java/org/apache/cxf/tools/wsdl2java/processor/WSDLToJavaProcessor.java
    incubator/cxf/trunk/tools/wsdl2java/src/main/java/org/apache/cxf/tools/wsdl2java/processor/WSDLToProcessor.java
    incubator/cxf/trunk/tools/wsdl2java/src/main/java/org/apache/cxf/tools/wsdl2java/processor/internal/ClassNameAllocatorImpl.java

Modified: incubator/cxf/trunk/tools/common/src/main/java/org/apache/cxf/tools/common/DataBindingGenerator.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/common/src/main/java/org/apache/cxf/tools/common/DataBindingGenerator.java?view=diff&rev=443321&r1=443320&r2=443321
==============================================================================
--- incubator/cxf/trunk/tools/common/src/main/java/org/apache/cxf/tools/common/DataBindingGenerator.java
(original)
+++ incubator/cxf/trunk/tools/common/src/main/java/org/apache/cxf/tools/common/DataBindingGenerator.java
Thu Sep 14 04:40:41 2006
@@ -25,9 +25,9 @@
 
 import com.sun.tools.xjc.api.Property;
 public interface DataBindingGenerator { 
-    void initialize(ToolContext penv);
+    void initialize(ToolContext penv) throws ToolException;
     void generate() throws ToolException;
     String getType(QName qn, boolean fullName);
-    String getJavaType(QName qn, boolean fullName);
+    String getJavaType(QName qn, boolean boxify);
     List<? extends Property> getBlock(Part part);
 }

Modified: incubator/cxf/trunk/tools/common/src/main/java/org/apache/cxf/tools/util/ProcessorUtil.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/common/src/main/java/org/apache/cxf/tools/util/ProcessorUtil.java?view=diff&rev=443321&r1=443320&r2=443321
==============================================================================
--- incubator/cxf/trunk/tools/common/src/main/java/org/apache/cxf/tools/util/ProcessorUtil.java
(original)
+++ incubator/cxf/trunk/tools/common/src/main/java/org/apache/cxf/tools/util/ProcessorUtil.java
Thu Sep 14 04:40:41 2006
@@ -41,6 +41,7 @@
 import com.sun.xml.bind.api.JAXBRIContext;
 
 import org.apache.cxf.helpers.JavaUtils;
+import org.apache.cxf.jaxb.JAXBUtils;
 import org.apache.cxf.tools.common.DataBindingGenerator;
 import org.apache.cxf.tools.common.ToolConstants;
 import org.apache.cxf.tools.common.ToolContext;
@@ -235,21 +236,38 @@
             .get(ToolConstants.BINDING_GENERATOR);
         String jtype = null;
         QName xmlTypeName = getElementName(part);
-        // if this flag is true , mapping to java Type first;
+        if (xmlTypeName == null) {
+            xmlTypeName = part.getTypeName();
+           
+        }
+
+        // if this flag  is true , mapping to java Type first;
         // if not found , findd the primitive type : int ,long 
         // if not found,  find in the generated class
        
+            
         if (boxify && dataBindingGenerator != null) {
             jtype = dataBindingGenerator.getJavaType(xmlTypeName, true);
         } 
         
         if (boxify && dataBindingGenerator == null) {
-            jtype = BuiltInTypesJavaMappingUtil.getJType(xmlTypeName.getNamespaceURI(),
-                                                         xmlTypeName.getLocalPart());
+            jtype = JAXBUtils.builtInTypeToJavaType(xmlTypeName.getLocalPart());        
  
         }
+        
         if (!boxify && dataBindingGenerator != null) {
-            jtype = dataBindingGenerator.getJavaType(xmlTypeName, true);
+            jtype = dataBindingGenerator.getJavaType(xmlTypeName, false);
+        }
+        
+        if (!boxify && dataBindingGenerator == null) {
+            Class holderClass = JAXBUtils.holderClass(xmlTypeName.getLocalPart());
+            jtype = holderClass == null ? null : holderClass.getName();
+            if (jtype == null) {
+                jtype = JAXBUtils.builtInTypeToJavaType(xmlTypeName.getLocalPart());
+            }
         }
+        
+        
+        
         String namespace = xmlTypeName.getNamespaceURI();
         String type = resolvePartType(part, env, true);
         String userPackage = env.mapPackageName(namespace);

Modified: incubator/cxf/trunk/tools/wsdl2java/src/main/java/org/apache/cxf/tools/wsdl2java/databindings/jaxb/JAXBBindErrorListener.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/wsdl2java/src/main/java/org/apache/cxf/tools/wsdl2java/databindings/jaxb/JAXBBindErrorListener.java?view=diff&rev=443321&r1=443320&r2=443321
==============================================================================
--- incubator/cxf/trunk/tools/wsdl2java/src/main/java/org/apache/cxf/tools/wsdl2java/databindings/jaxb/JAXBBindErrorListener.java
(original)
+++ incubator/cxf/trunk/tools/wsdl2java/src/main/java/org/apache/cxf/tools/wsdl2java/databindings/jaxb/JAXBBindErrorListener.java
Thu Sep 14 04:40:41 2006
@@ -18,10 +18,10 @@
  */
 
 package org.apache.cxf.tools.wsdl2java.databindings.jaxb;
-
 import com.sun.tools.xjc.api.ErrorListener;
-
 import org.apache.cxf.tools.common.ToolContext;
+import org.apache.cxf.tools.common.ToolException;
+
 
 public class JAXBBindErrorListener implements ErrorListener {
     private ToolContext env;
@@ -31,25 +31,16 @@
     }
 
     public void error(org.xml.sax.SAXParseException exception) {
-        if (this.env.isVerbose()) {
-            exception.printStackTrace();
-        } else {
-            System.err.println("Parsing schema error: \n" + exception.toString());
-        }
+        throw new ToolException(exception.getLocalizedMessage());
+
     }
 
     public void fatalError(org.xml.sax.SAXParseException exception) {
-        if (this.env.isVerbose()) {
-            exception.printStackTrace();
-        } else {
-            System.err.println("Parsing schema fatal error: \n" + exception.toString());
-        }
+        throw new ToolException(exception.getLocalizedMessage());
     }
 
     public void info(org.xml.sax.SAXParseException exception) {
-        if (this.env.isVerbose()) {
-            System.err.println("Parsing schema info: " + exception.toString());
-        }
+
     }
 
     public void warning(org.xml.sax.SAXParseException exception) {

Modified: incubator/cxf/trunk/tools/wsdl2java/src/main/java/org/apache/cxf/tools/wsdl2java/databindings/jaxb/JAXBBindingGenerator.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/wsdl2java/src/main/java/org/apache/cxf/tools/wsdl2java/databindings/jaxb/JAXBBindingGenerator.java?view=diff&rev=443321&r1=443320&r2=443321
==============================================================================
--- incubator/cxf/trunk/tools/wsdl2java/src/main/java/org/apache/cxf/tools/wsdl2java/databindings/jaxb/JAXBBindingGenerator.java
(original)
+++ incubator/cxf/trunk/tools/wsdl2java/src/main/java/org/apache/cxf/tools/wsdl2java/databindings/jaxb/JAXBBindingGenerator.java
Thu Sep 14 04:40:41 2006
@@ -20,10 +20,7 @@
 package org.apache.cxf.tools.wsdl2java.databindings.jaxb;
 
 import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileNotFoundException;
 import java.io.IOException;
-import java.io.InputStream;
 import java.util.ArrayList;
 import java.util.Collection;
 import java.util.List;
@@ -35,7 +32,6 @@
 import javax.wsdl.PortType;
 import javax.wsdl.extensions.schema.Schema;
 import javax.xml.namespace.QName;
-import javax.xml.transform.Result;
 import javax.xml.transform.TransformerConfigurationException;
 import javax.xml.transform.TransformerException;
 import javax.xml.transform.TransformerFactory;
@@ -50,16 +46,11 @@
 import org.xml.sax.InputSource;
 
 import com.sun.codemodel.JCodeModel;
-import com.sun.tools.xjc.BadCommandLineException;
-import com.sun.tools.xjc.Language;
-import com.sun.tools.xjc.ModelLoader;
-import com.sun.tools.xjc.Options;
 import com.sun.tools.xjc.api.Property;
 import com.sun.tools.xjc.api.S2JJAXBModel;
 import com.sun.tools.xjc.api.TypeAndAnnotation;
 import com.sun.tools.xjc.api.XJC;
 import com.sun.tools.xjc.api.impl.s2j.SchemaCompilerImpl;
-import com.sun.tools.xjc.model.Model;
 
 import org.apache.cxf.common.i18n.Message;
 import org.apache.cxf.common.logging.LogUtils;
@@ -78,12 +69,12 @@
     protected S2JJAXBModel rawJaxbModel;
     protected S2JJAXBModel rawJaxbModelGenCode;
     private boolean nestedJaxbBinding;
-    private Model model;
+    //private Model model;
     private ToolContext env;
     private int fileIDX;
 
     @SuppressWarnings("unchecked")
-    public void initialize(ToolContext penv) {
+    public void initialize(ToolContext penv) throws ToolException {
         env = penv;
 
         SchemaCompilerImpl schemaCompiler = (SchemaCompilerImpl)XJC.createSchemaCompiler();
@@ -99,6 +90,7 @@
         schemaCompiler.setClassNameAllocator(allocator);
         JAXBBindErrorListener listener = new JAXBBindErrorListener(env);
         schemaCompiler.setErrorListener(listener);
+        
 
         SchemaCompilerImpl schemaCompilerGenCode = schemaCompiler;
         String excludePackageName = "";
@@ -109,7 +101,7 @@
         }
         List schemaSystemidList = new ArrayList();
 
-        Options opt = new OptionsEx();
+        //Options opt = new OptionsEx();
         List<Schema> schemaList = env.getSchemaList();
         for (Schema schema : schemaList) {
 
@@ -133,11 +125,14 @@
                 systemid = schema.getDocumentBaseURI() + "#" + targetNamespace;
             }
             schemaSystemidList.add(systemid);
-            schemaCompiler.parseSchema(systemid, schemaElement);
-            schemaCompilerGenCode.parseSchema(systemid, schemaElement);
+           
             if (nestedJaxbBinding) {
-                processNestedBinding(schemaElement, systemid, opt);
-
+                InputSource ins = processNestedBinding(schemaElement, systemid);
+                schemaCompiler.parseSchema(ins);
+                schemaCompilerGenCode.parseSchema(ins);
+            } else {
+                schemaCompiler.parseSchema(systemid, schemaElement);
+                schemaCompilerGenCode.parseSchema(systemid, schemaElement);
             }
 
         }
@@ -149,54 +144,92 @@
                 schemaCompilerGenCode.parseSchema(bindingFile);
             }
         }
-        rawJaxbModel = schemaCompiler.bind();
+        try {
+            rawJaxbModel = schemaCompiler.bind();
+
+        } catch (ToolException e) {
+            throw e;
+        }
         if (env.isExcludeNamespaceEnabled()) {
             rawJaxbModelGenCode = schemaCompilerGenCode.bind();
         } else {
             rawJaxbModelGenCode = rawJaxbModel;
         }
-        if (nestedJaxbBinding) {
+        
+        /*if (nestedJaxbBinding) {
             opt.classNameAllocator = allocator;
             model = ModelLoader.load(opt, new JCodeModel(), new JAXBErrorReceiver(env));
             model.generateCode(opt, new JAXBErrorReceiver(env));
+        }   */    
+        addedEnumClassToCollector(schemaList, allocator);
+    }
+  
+    
+    //Jaxb's bug . Jaxb ClassNameCollecotr may not be invoked when generated class is an
enum.
+    //So we need use this method to add the missed file to classCollector
+    
+    private void addedEnumClassToCollector(List<Schema> schemaList, ClassNameAllocatorImpl
allocator) {
+        for (Schema schema : schemaList) {
+            Element schemaElement = schema.getElement();
+            String targetNamespace = schemaElement.getAttribute("targetNamespace");
+            if (StringUtils.isEmpty(targetNamespace)) {
+                continue;
+            }
+            String packageName = ProcessorUtil.parsePackageName(targetNamespace, null);
+            if (!addedToClassCollector(packageName)) {
+                allocator.assignClassName(packageName, "*");
+            }
         }
-
+    }
+    
+    private boolean addedToClassCollector(String packageName) {
+        ClassCollector classCollector = (ClassCollector)env.get(ToolConstants.GENERATED_CLASS_COLLECTOR);
+        List<String> files = (List<String>)classCollector.getGeneratedFileInfo();
+        for (String file : files) {
+            int dotIndex = file.lastIndexOf(".");
+            String sub = file.substring(0, dotIndex - 1);
+            if (sub.equals(packageName)) {
+                return true;
+            }
+        }
+        return false;
+        
     }
 
-    private void processNestedBinding(Element schemaElement, String systemid, Options opt)
{
+    private InputSource processNestedBinding(Element schemaElement, String systemid) {
         String xsdFile = "schema" + (fileIDX++);
         File file = null;
         try {
             file = File.createTempFile(xsdFile, ".xsd");
         } catch (IOException e) {
-            // TODO Auto-generated catch block
             e.printStackTrace();
         }
-        Result result = new StreamResult(file);
+
+        StreamResult result = new StreamResult(file);
+        
         DOMSource source = new DOMSource(schemaElement);
 
         try {
             TransformerFactory.newInstance().newTransformer().transform(source, result);
         } catch (TransformerConfigurationException e) {
-            // TODO Auto-generated catch block
             e.printStackTrace();
         } catch (TransformerException e) {
-            // TODO Auto-generated catch block
             e.printStackTrace();
         } catch (TransformerFactoryConfigurationError e) {
-            // TODO Auto-generated catch block
             e.printStackTrace();
         }
+
         InputSource insource = null;
-        try {
-            insource = new InputSource((InputStream)new FileInputStream(file));
-        } catch (FileNotFoundException e) {
-            // TODO Auto-generated catch block
-            e.printStackTrace();
-        }
-        insource.setSystemId(systemid);
-        opt.setSchemaLanguage(Language.XMLSCHEMA);
-        opt.addGrammar(file);
+       
+        insource = new InputSource(result.getSystemId());
+            //insource.setByteStream((InputStream)new FileInputStream(file));
+        System.err.println(result.getSystemId());
+           // insource.setSystemId(result.getSystemId());
+        
+        
+        return insource;
+        /*opt.setSchemaLanguage(Language.XMLSCHEMA);
+        opt.addGrammar(file);*/
     }
 
     public void generate() throws ToolException {
@@ -211,9 +244,9 @@
 
             TypesCodeWriter fileCodeWriter = new TypesCodeWriter(new File(dir), env.getExcludePkgList());
 
-            if (rawJaxbModelGenCode instanceof S2JJAXBModel && !nestedJaxbBinding)
{
+            if (rawJaxbModelGenCode instanceof S2JJAXBModel) {
                 S2JJAXBModel schem2JavaJaxbModel = (S2JJAXBModel)rawJaxbModelGenCode;
-
+                
                 JCodeModel jcodeModel = schem2JavaJaxbModel.generateCode(null, null);
                 jcodeModel.build(fileCodeWriter);
                 for (String str : fileCodeWriter.getExcludeFileList()) {
@@ -221,12 +254,12 @@
                 }
             }
 
-            if (rawJaxbModelGenCode instanceof S2JJAXBModel && nestedJaxbBinding)
{
+           /* if (rawJaxbModelGenCode instanceof S2JJAXBModel && nestedJaxbBinding)
{
                 model.codeModel.build(fileCodeWriter);
                 for (String str : fileCodeWriter.getExcludeFileList()) {
                     env.getExcludeFileList().add(str);
                 }
-            }
+            }*/
 
             return;
         } catch (IOException e) {
@@ -273,7 +306,7 @@
             if (boxify) {           
                 jtypeClass = jtype.getTypeClass().boxify().fullName();
             } else {
-                jtypeClass = jtype.getTypeClass().name();
+                jtypeClass = jtype.getTypeClass().fullName();
             }
         }
         
@@ -351,7 +384,7 @@
         return new ArrayList<Property>();
     }
 
-    private class OptionsEx extends Options {
+    /*private class OptionsEx extends Options {
 
         protected Mode mode = Mode.CODE;
 
@@ -359,10 +392,10 @@
 
             return super.parseArgument(args, i);
         }
-    }
+    }*/
 
-    private enum Mode {
+   /* private enum Mode {
         CODE, BGM, SIGNATURE, FOREST, DRYRUN, ZIP,
-    }
+    }*/
 
 }

Modified: incubator/cxf/trunk/tools/wsdl2java/src/main/java/org/apache/cxf/tools/wsdl2java/databindings/jaxb/Messages.properties
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/wsdl2java/src/main/java/org/apache/cxf/tools/wsdl2java/databindings/jaxb/Messages.properties?view=diff&rev=443321&r1=443320&r2=443321
==============================================================================
--- incubator/cxf/trunk/tools/wsdl2java/src/main/java/org/apache/cxf/tools/wsdl2java/databindings/jaxb/Messages.properties
(original)
+++ incubator/cxf/trunk/tools/wsdl2java/src/main/java/org/apache/cxf/tools/wsdl2java/databindings/jaxb/Messages.properties
Thu Sep 14 04:40:41 2006
@@ -1,3 +1,4 @@
+GENERATE_TYPES_ERROR = Generate types error
 FAIL_TO_GENERATE_TYPES = Fail to generate types
 
 

Modified: incubator/cxf/trunk/tools/wsdl2java/src/main/java/org/apache/cxf/tools/wsdl2java/frontend/jaxws/AbstractGenerator.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/wsdl2java/src/main/java/org/apache/cxf/tools/wsdl2java/frontend/jaxws/AbstractGenerator.java?view=diff&rev=443321&r1=443320&r2=443321
==============================================================================
--- incubator/cxf/trunk/tools/wsdl2java/src/main/java/org/apache/cxf/tools/wsdl2java/frontend/jaxws/AbstractGenerator.java
(original)
+++ incubator/cxf/trunk/tools/wsdl2java/src/main/java/org/apache/cxf/tools/wsdl2java/frontend/jaxws/AbstractGenerator.java
Thu Sep 14 04:40:41 2006
@@ -109,6 +109,11 @@
 
     protected Writer parseOutputName(String packageName, String filename) throws ToolException
{
         ClassCollector collector = (ClassCollector)env.get(ToolConstants.GENERATED_CLASS_COLLECTOR);
+        
+        if (ToolConstants.SEI_GENERATOR.equals(name)) {
+            collector.addSeiClassName(packageName , filename , packageName + "." + filename);
+        }
+        
         if (ToolConstants.CLT_GENERATOR.equals(name)) {
             collector.addClientClassName(packageName , filename , packageName + "." + filename);
         }

Modified: incubator/cxf/trunk/tools/wsdl2java/src/main/java/org/apache/cxf/tools/wsdl2java/processor/Messages.properties
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/wsdl2java/src/main/java/org/apache/cxf/tools/wsdl2java/processor/Messages.properties?view=diff&rev=443321&r1=443320&r2=443321
==============================================================================
--- incubator/cxf/trunk/tools/wsdl2java/src/main/java/org/apache/cxf/tools/wsdl2java/processor/Messages.properties
(original)
+++ incubator/cxf/trunk/tools/wsdl2java/src/main/java/org/apache/cxf/tools/wsdl2java/processor/Messages.properties
Thu Sep 14 04:40:41 2006
@@ -6,7 +6,7 @@
 WRAPPER_STYLE_TWO_RETURN_TYPES = Wrapper style can not have two return types
 CANNOT_FIND_WSDL = Can not find the wsdl from : {0}
 BINDING_SPECIFY_ONE_PROTOCOL = Binding : {0} must specify one protocol
-FAIL_TO_CREATE_DATABINDING_MODEL = File to create databinding model
+FAIL_TO_CREATE_DATABINDING_MODEL = Fail to create databinding model : {0}
 
 FAIL_TO_COMPILE_GENERATE_CODES = Fail to compile generated code
 FAIL_TO_COPY_GENERATED_RESOURCE_FILE = Fail to copy generated resource file

Modified: incubator/cxf/trunk/tools/wsdl2java/src/main/java/org/apache/cxf/tools/wsdl2java/processor/WSDLToJavaProcessor.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/wsdl2java/src/main/java/org/apache/cxf/tools/wsdl2java/processor/WSDLToJavaProcessor.java?view=diff&rev=443321&r1=443320&r2=443321
==============================================================================
--- incubator/cxf/trunk/tools/wsdl2java/src/main/java/org/apache/cxf/tools/wsdl2java/processor/WSDLToJavaProcessor.java
(original)
+++ incubator/cxf/trunk/tools/wsdl2java/src/main/java/org/apache/cxf/tools/wsdl2java/processor/WSDLToJavaProcessor.java
Thu Sep 14 04:40:41 2006
@@ -248,13 +248,14 @@
         }
 
         String outPutDir = (String)env.get(ToolConstants.CFG_OUTPUTDIR);
-
+       
         Set<String> dirSet = new HashSet<String>();
         Iterator ite = classCollector.getGeneratedFileInfo().iterator();
         while (ite.hasNext()) {
             String fileName = (String)ite.next();
             fileName = fileName.replace('.', File.separatorChar);
             String dirName = fileName.substring(0, fileName.lastIndexOf(File.separator) +
1);
+            
             String path = outPutDir + File.separator + dirName;
             if (!dirSet.contains(path)) {
 
@@ -282,6 +283,11 @@
             }
 
         }
+        //Jaxb's bug . Jaxb ClassNameCollecotr may not be invoked when generated class is
an enum.
+        //So we need recheck whether we add all generated source files to  fileList
+        
+       
+        
 
         String[] arguments = new String[argList.size() + fileList.size() + 1];
         arguments[0] = "javac";
@@ -294,7 +300,6 @@
 
         for (Object o : fileList.toArray()) {
             String file = (String)o;
-
             arguments[i] = file;
             i++;
         }

Modified: incubator/cxf/trunk/tools/wsdl2java/src/main/java/org/apache/cxf/tools/wsdl2java/processor/WSDLToProcessor.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/wsdl2java/src/main/java/org/apache/cxf/tools/wsdl2java/processor/WSDLToProcessor.java?view=diff&rev=443321&r1=443320&r2=443321
==============================================================================
--- incubator/cxf/trunk/tools/wsdl2java/src/main/java/org/apache/cxf/tools/wsdl2java/processor/WSDLToProcessor.java
(original)
+++ incubator/cxf/trunk/tools/wsdl2java/src/main/java/org/apache/cxf/tools/wsdl2java/processor/WSDLToProcessor.java
Thu Sep 14 04:40:41 2006
@@ -262,7 +262,7 @@
         } catch (Exception e) {
             org.apache.cxf.common.i18n.Message msg =
                 new org.apache.cxf.common.i18n.Message("FAIL_TO_CREATE_DATABINDING_MODEL",
-                                                             LOG);
+                                                             LOG, new Object[] {e.getLocalizedMessage()});
             LOG.log(Level.SEVERE, msg.toString());
             throw new ToolException(msg, e);
         }
@@ -318,6 +318,7 @@
 
     @SuppressWarnings("unchecked")
     private void addSchema(Schema schema) {
+   
         Map<String, List> imports = schema.getImports();
         if (imports != null && imports.size() > 0) {
             Collection<String> importKeys = imports.keySet();

Modified: incubator/cxf/trunk/tools/wsdl2java/src/main/java/org/apache/cxf/tools/wsdl2java/processor/internal/ClassNameAllocatorImpl.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/wsdl2java/src/main/java/org/apache/cxf/tools/wsdl2java/processor/internal/ClassNameAllocatorImpl.java?view=diff&rev=443321&r1=443320&r2=443321
==============================================================================
--- incubator/cxf/trunk/tools/wsdl2java/src/main/java/org/apache/cxf/tools/wsdl2java/processor/internal/ClassNameAllocatorImpl.java
(original)
+++ incubator/cxf/trunk/tools/wsdl2java/src/main/java/org/apache/cxf/tools/wsdl2java/processor/internal/ClassNameAllocatorImpl.java
Thu Sep 14 04:40:41 2006
@@ -45,7 +45,6 @@
         if (isNameCollision(packageName, className)) {
             fullClzName = className + TYPE_SUFFIX;
         }
-
         collector.addTypesClassName(packageName, className, packageName + "." + fullClzName);
         return fullClzName;
     }



Mime
View raw message