cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From m...@apache.org
Subject svn commit: r558993 - in /incubator/cxf/trunk/tools: javato/core/src/main/java/org/apache/cxf/tools/java2wsdl/ javato/core/src/main/java/org/apache/cxf/tools/java2wsdl/processor/ validator/src/main/java/org/apache/cxf/tools/validator/internal/ wsdlto/c...
Date Tue, 24 Jul 2007 09:56:10 GMT
Author: mmao
Date: Tue Jul 24 02:56:09 2007
New Revision: 558993

URL: http://svn.apache.org/viewvc?view=rev&rev=558993
Log:
* CXF-798
  Fixed  wsdlvalidator cannot validate on-line wsdl


Modified:
    incubator/cxf/trunk/tools/javato/core/src/main/java/org/apache/cxf/tools/java2wsdl/JavaToWSDLContainer.java
    incubator/cxf/trunk/tools/javato/core/src/main/java/org/apache/cxf/tools/java2wsdl/processor/JavaToProcessor.java
    incubator/cxf/trunk/tools/validator/src/main/java/org/apache/cxf/tools/validator/internal/SchemaValidator.java
    incubator/cxf/trunk/tools/validator/src/main/java/org/apache/cxf/tools/validator/internal/Stax2DOM.java
    incubator/cxf/trunk/tools/validator/src/main/java/org/apache/cxf/tools/validator/internal/WSDLRefValidator.java
    incubator/cxf/trunk/tools/validator/src/main/java/org/apache/cxf/tools/validator/internal/WSIBPValidator.java
    incubator/cxf/trunk/tools/wsdlto/core/src/main/java/org/apache/cxf/tools/wsdlto/WSDLToJava.java

Modified: incubator/cxf/trunk/tools/javato/core/src/main/java/org/apache/cxf/tools/java2wsdl/JavaToWSDLContainer.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/javato/core/src/main/java/org/apache/cxf/tools/java2wsdl/JavaToWSDLContainer.java?view=diff&rev=558993&r1=558992&r2=558993
==============================================================================
--- incubator/cxf/trunk/tools/javato/core/src/main/java/org/apache/cxf/tools/java2wsdl/JavaToWSDLContainer.java
(original)
+++ incubator/cxf/trunk/tools/javato/core/src/main/java/org/apache/cxf/tools/java2wsdl/JavaToWSDLContainer.java
Tue Jul 24 02:56:09 2007
@@ -34,7 +34,7 @@
 import org.apache.cxf.tools.util.AnnotationUtil;
 
 public class JavaToWSDLContainer extends AbstractCXFToolContainer {
-   
+
     private static final String TOOL_NAME = "java2wsdl";
 
     public JavaToWSDLContainer(ToolSpec toolspec) throws Exception {
@@ -43,7 +43,6 @@
 
     public void execute(boolean exitOnFinish) throws ToolException {
         Processor processor = null;
-
         try {
             super.execute(exitOnFinish);
             if (!hasInfoOption()) {
@@ -58,7 +57,7 @@
                 processor.setEnvironment(env);
                 processor.process();
             }
-        } catch (ToolException ex) {            
+        } catch (ToolException ex) {
             if (ex.getCause() instanceof BadUsageException) {
                 printUsageException(TOOL_NAME, (BadUsageException)ex.getCause());
                 if (isVerboseOn()) {
@@ -72,7 +71,7 @@
             if (isVerboseOn()) {
                 ex.printStackTrace();
             }
-            
+
             throw new ToolException(ex.getMessage(), ex.getCause());
         }
     }
@@ -82,7 +81,7 @@
                                         getClass().getClassLoader());
     }
 
-    
+
 
     public void checkParams(ErrorVisitor errors) throws ToolException {
         if (errors.getErrors().size() > 0) {

Modified: incubator/cxf/trunk/tools/javato/core/src/main/java/org/apache/cxf/tools/java2wsdl/processor/JavaToProcessor.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/javato/core/src/main/java/org/apache/cxf/tools/java2wsdl/processor/JavaToProcessor.java?view=diff&rev=558993&r1=558992&r2=558993
==============================================================================
--- incubator/cxf/trunk/tools/javato/core/src/main/java/org/apache/cxf/tools/java2wsdl/processor/JavaToProcessor.java
(original)
+++ incubator/cxf/trunk/tools/javato/core/src/main/java/org/apache/cxf/tools/java2wsdl/processor/JavaToProcessor.java
Tue Jul 24 02:56:09 2007
@@ -96,20 +96,11 @@
         generators.add(getWSDLGenerator(wsdlFile));
         generators.add(getWrapperBeanGenerator());
         generators.add(getFaultBeanGenerator());
-        //generators.add(getDateTypeCustGenerator(wsdlFile));
 
         generate(service, outputDir);
         System.setProperty(JAVA_CLASS_PATH, oldClassPath);
         LOG.log(Level.INFO, "RESUME_CP", oldClassPath);
     }
-
-//     private AbstractGenerator getDateTypeCustGenerator(final File wsdlFile) {
-//         DateTypeCustomGenerator generator = new DateTypeCustomGenerator();
-//         generator.setAllowImports(context.containsKey(ToolConstants.CFG_CREATE_XSD_IMPORTS));
-//         generator.setWSDLFile(wsdlFile);
-//         generator.setServiceClass(getServiceClass());
-//         return generator;
-//     }
 
     private AbstractGenerator getWrapperBeanGenerator() {
         WrapperBeanGenerator generator = new WrapperBeanGenerator();

Modified: incubator/cxf/trunk/tools/validator/src/main/java/org/apache/cxf/tools/validator/internal/SchemaValidator.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/validator/src/main/java/org/apache/cxf/tools/validator/internal/SchemaValidator.java?view=diff&rev=558993&r1=558992&r2=558993
==============================================================================
--- incubator/cxf/trunk/tools/validator/src/main/java/org/apache/cxf/tools/validator/internal/SchemaValidator.java
(original)
+++ incubator/cxf/trunk/tools/validator/src/main/java/org/apache/cxf/tools/validator/internal/SchemaValidator.java
Tue Jul 24 02:56:09 2007
@@ -63,21 +63,21 @@
 
 public class SchemaValidator extends AbstractDefinitionValidator {
     protected static final Logger LOG = LogUtils.getL7dLogger(SchemaValidator.class);
-    
+
     protected String[] defaultSchemas;
-   
+
     protected String schemaLocation = "./";
 
     private String wsdlsrc;
 
     private String[] xsds;
-    
+
     private List<InputSource> schemaFromJar;
 
     private DocumentBuilder docBuilder;
 
     private SAXParser saxParser;
-    
+
 
     public SchemaValidator(String schemaDir) throws ToolException {
         schemaLocation = schemaDir;
@@ -90,7 +90,7 @@
         wsdlsrc = wsdl;
         xsds = schemas;
     }
-    
+
     public SchemaValidator(List<InputSource> defaultSchemas, String wsdl, String[]
schemas) {
         schemaLocation = null;
         schemaFromJar = defaultSchemas;
@@ -118,15 +118,16 @@
         return validate(is, schemas);
 
     }
-    
-    private Schema createSchema(List<InputSource> xsdsInJar, String[] schemas) 
+
+    private Schema createSchema(List<InputSource> xsdsInJar, String[] schemas)
         throws SAXException, IOException {
+
         SchemaFactory sf = SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI);
 
         SchemaResourceResolver resourceResolver = new SchemaResourceResolver();
 
         sf.setResourceResolver(resourceResolver);
-        
+
         List<Source> sources = new ArrayList<Source>();
 
         for (InputSource is : xsdsInJar) {
@@ -137,21 +138,20 @@
             stream.setSystemId(is.getSystemId());
             sources.add(stream);
         }
-        
+
         if (schemas != null) {
             for (int i = 0; i < schemas.length; i++) {
                 Document doc = docBuilder.parse(schemas[i]);
                 DOMSource stream = new DOMSource(doc, schemas[i]);
                 sources.add(stream);
-            } 
+            }
         }
-        
         Source[] args = new Source[sources.size()];
         sources.toArray(args);
         return sf.newSchema(args);
-    
+
     }
-    
+
     private Schema createSchema(String[] schemas) throws SAXException, IOException {
 
         SchemaFactory sf = SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI);
@@ -167,7 +167,7 @@
             Document doc = docBuilder.parse(schemas[i]);
 
             DOMSource stream = new DOMSource(doc, schemas[i]);
-            
+
             sources[i] = stream;
         }
         return sf.newSchema(sources);
@@ -186,12 +186,12 @@
                 schemas = addSchemas(defaultSchemas, schemas);
                 schema = createSchema(schemas);
             } else {
-                schema = createSchema(schemaFromJar, schemas); 
+                schema = createSchema(schemaFromJar, schemas);
             }
 
 
             Validator validator = schema.newValidator();
-            
+
             NewStackTraceErrorHandler errHandler = new NewStackTraceErrorHandler();
             validator.setErrorHandler(errHandler);
             SAXSource saxSource = new SAXSource(saxParser.getXMLReader(), wsdlsource);
@@ -338,7 +338,7 @@
 
 class SchemaResourceResolver implements LSResourceResolver {
     private static final Logger LOG = LogUtils.getL7dLogger(SchemaValidator.class);
-    private static final Map<String, String> NSFILEMAP = new HashMap<String, String>();
  
+    private static final Map<String, String> NSFILEMAP = new HashMap<String, String>();
     static {
         NSFILEMAP.put(ToolConstants.XML_NAMESPACE_URI, "xml.xsd");
         NSFILEMAP.put(ToolConstants.WSDL_NAMESPACE_URI, "wsdl.xsd");
@@ -357,7 +357,7 @@
         }
         return lsin;
     }
-    
+
     public LSInput resolveResource(String type, String namespaceURI, String publicId, String
systemId,
             String baseURI) {
         Message msg = new Message("RESOLVE_SCHEMA", LOG, namespaceURI, systemId, baseURI);
@@ -410,13 +410,13 @@
         }  else {
             return null;
         }
-        
-        
+
+
         URIResolver resolver;
         try {
             msg = new Message("RESOLVE_FROM_LOCAL", LOG, localFile);
             LOG.log(Level.INFO, msg.toString());
-            
+
             resolver = new URIResolver(localFile);
             if (resolver.isResolved()) {
                 lsin = new LSInputImpl();

Modified: incubator/cxf/trunk/tools/validator/src/main/java/org/apache/cxf/tools/validator/internal/Stax2DOM.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/validator/src/main/java/org/apache/cxf/tools/validator/internal/Stax2DOM.java?view=diff&rev=558993&r1=558992&r2=558993
==============================================================================
--- incubator/cxf/trunk/tools/validator/src/main/java/org/apache/cxf/tools/validator/internal/Stax2DOM.java
(original)
+++ incubator/cxf/trunk/tools/validator/src/main/java/org/apache/cxf/tools/validator/internal/Stax2DOM.java
Tue Jul 24 02:56:09 2007
@@ -22,6 +22,9 @@
 import java.io.File;
 import java.io.FileNotFoundException;
 import java.io.FileReader;
+import java.io.IOException;
+import java.net.URI;
+import java.net.URL;
 import java.util.Iterator;
 import javax.xml.parsers.ParserConfigurationException;
 import javax.xml.stream.XMLEventReader;
@@ -40,6 +43,7 @@
 import org.apache.cxf.common.util.StringUtils;
 import org.apache.cxf.helpers.XMLUtils;
 import org.apache.cxf.tools.common.ToolException;
+import org.apache.cxf.tools.util.URIParserUtil;
 import org.apache.cxf.wsdl.WSDLConstants;
 
 public class Stax2DOM {
@@ -48,7 +52,7 @@
     private  Document doc;
     private XMLInputFactory factory;
     private  XMLEventReader reader;
-    
+
     public Stax2DOM() {
     }
 
@@ -62,6 +66,34 @@
         }
     }
 
+    public Document getDocument(String wsdl) throws ToolException {
+        try {
+            URI wsdlURI = new URI(URIParserUtil.getAbsoluteURI(wsdl));
+            if (wsdlURI.toString().startsWith("http")) {
+                return getDocument(wsdlURI.toURL());
+            }
+            return getDocument(new File(wsdlURI));
+        } catch (Exception e) {
+            throw new ToolException(e);
+        }
+    }
+
+    public Document getDocument(URL url) throws ToolException {
+        if (reader == null) {
+            init();
+            try {
+                reader = factory.createXMLEventReader(url.openStream());
+            } catch (FileNotFoundException fe) {
+                throw new ToolException("Cannot get the wsdl " + url, fe);
+            } catch (XMLStreamException e) {
+                throw new ToolException(e);
+            } catch (IOException ioe) {
+                throw new ToolException(ioe);
+            }
+        }
+        return getDocument(reader, url.toString());
+    }
+
     public Document getDocument(File wsdl) throws ToolException {
         if (reader == null) {
             init();
@@ -70,24 +102,24 @@
             } catch (FileNotFoundException fe) {
                 throw new ToolException("Cannot get the wsdl " + wsdl, fe);
             } catch (XMLStreamException e) {
-                throw new ToolException(e);                
+                throw new ToolException(e);
             }
 
         }
-        return getDocument(reader, wsdl);
+        return getDocument(reader, wsdl.toString());
     }
-    
+
     public Document getDocument(XMLEventReader xmlEventReader) throws ToolException {
         return getDocument(xmlEventReader, null);
     }
-    
-    public Document getDocument(XMLEventReader xmlEventReader, File wsdlurl) throws ToolException
{
+
+    public Document getDocument(XMLEventReader xmlEventReader, String wsdlurl) throws ToolException
{
         try {
             doc = XMLUtils.newDocument();
         } catch (ParserConfigurationException e) {
             throw new ToolException(e);
         }
-        doc.setDocumentURI(wsdlurl.toString());
+        doc.setDocumentURI(wsdlurl);
 
         currentElement = doc.getDocumentElement();
 

Modified: incubator/cxf/trunk/tools/validator/src/main/java/org/apache/cxf/tools/validator/internal/WSDLRefValidator.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/validator/src/main/java/org/apache/cxf/tools/validator/internal/WSDLRefValidator.java?view=diff&rev=558993&r1=558992&r2=558993
==============================================================================
--- incubator/cxf/trunk/tools/validator/src/main/java/org/apache/cxf/tools/validator/internal/WSDLRefValidator.java
(original)
+++ incubator/cxf/trunk/tools/validator/src/main/java/org/apache/cxf/tools/validator/internal/WSDLRefValidator.java
Tue Jul 24 02:56:09 2007
@@ -19,9 +19,7 @@
 
 package org.apache.cxf.tools.validator.internal;
 
-import java.io.File;
 import java.io.IOException;
-import java.net.URI;
 import java.net.URISyntaxException;
 import java.util.ArrayList;
 import java.util.HashMap;
@@ -53,7 +51,6 @@
 import org.apache.cxf.common.util.StringUtils;
 import org.apache.cxf.helpers.XPathUtils;
 import org.apache.cxf.tools.common.ToolException;
-import org.apache.cxf.tools.util.URIParserUtil;
 import org.apache.cxf.tools.validator.internal.model.FailureLocation;
 import org.apache.cxf.tools.validator.internal.model.XBinding;
 import org.apache.cxf.tools.validator.internal.model.XDef;
@@ -75,7 +72,7 @@
 public class WSDLRefValidator extends AbstractDefinitionValidator {
     protected static final Logger LOG = LogUtils.getL7dLogger(WSDLRefValidator.class);
     protected List<XNode> vNodes = new ArrayList<XNode>();
-    
+
     private Set<QName> portTypeRefNames = new HashSet<QName>();
     private Set<QName> messageRefNames = new HashSet<QName>();
 
@@ -95,7 +92,7 @@
     public WSDLRefValidator(final String wsdl) {
         this(wsdl, null);
     }
-    
+
     public WSDLRefValidator(final String wsdl, final Document doc) {
         WSDLDefinitionBuilder wsdlBuilder = new WSDLDefinitionBuilder();
         try {
@@ -130,18 +127,14 @@
         return this.vResults;
     }
 
-    private File getWSDLFile(String location) throws URISyntaxException {
-        return new File(new URI(URIParserUtil.getAbsoluteURI(location)));
-    }
-
     private Document getWSDLDocument(final String wsdl) throws URISyntaxException {
-        return new Stax2DOM().getDocument(getWSDLFile(wsdl));
+        return new Stax2DOM().getDocument(wsdl);
     }
-    
+
     private Document getWSDLDocument() throws Exception {
         return getWSDLDocument(this.definition.getDocumentBaseURI());
     }
-    
+
     private List<Document> getWSDLDocuments() {
         List<Document> docs = new ArrayList<Document>();
         try {
@@ -156,7 +149,7 @@
             e.printStackTrace();
             // ignore
         }
-        
+
         return docs;
     }
 
@@ -186,21 +179,18 @@
         }
         return null;
     }
-    
+
     public boolean isValid() {
         try {
 
             collectValidationPoints();
-            
+
             List<Document> wsdlDocs = getWSDLDocuments();
             for (XNode vNode : vNodes) {
 
                 if (!isExist(wsdlDocs, vNode)) {
                     FailureLocation loc = getFailureLocation(wsdlDocs, vNode.getFailurePoint());
-                    if (loc == null) {
-                        System.out.println("---vNode--- " + vNode);
-                    }
-                    
+
                     vResults.addError(new Message("FAILED_AT_POINT",
                                                   LOG,
                                                   loc.getLocation().getLineNumber(),
@@ -268,7 +258,7 @@
         pNode.setParentNode(vService);
         return pNode;
     }
-    
+
     private XNode getXNode(Service service) {
         XDef xdef = new XDef();
         xdef.setTargetNamespace(service.getQName().getNamespaceURI());
@@ -278,7 +268,7 @@
         sNode.setParentNode(xdef);
         return sNode;
     }
-    
+
     private XNode getXNode(Binding binding) {
         XDef xdef = new XDef();
         xdef.setTargetNamespace(binding.getQName().getNamespaceURI());
@@ -343,7 +333,7 @@
         }
         vResults.addWarning(warningMsg);
     }
-    
+
     @SuppressWarnings("unchecked")
     private void collectValidationPoints() {
         if (getServices().size() == 0) {
@@ -362,7 +352,7 @@
         for (Service service : getServices().values()) {
             vBindingNodes.putAll(getBindings(service));
         }
-        
+
         for (QName bName : vBindingNodes.keySet()) {
             Binding binding = this.definition.getBinding(bName);
             XNode vBindingNode = getXNode(binding);
@@ -496,15 +486,15 @@
 
         if (namespace.equals(WSDLConstants.NU_SCHEMA_XSD)) {
             if (isElement) {
-                XmlSchemaElement  schemaEle = 
-                    schemaCollection.getElementByQName(new QName(WSDLConstants.NU_SCHEMA_XSD,
name));    
+                XmlSchemaElement  schemaEle =
+                    schemaCollection.getElementByQName(new QName(WSDLConstants.NU_SCHEMA_XSD,
name));
                 partvalid = schemaEle != null ? true : false;
             } else {
-                XmlSchemaType schemaType = 
-                    schemaCollection.getTypeByQName(new QName(WSDLConstants.NU_SCHEMA_XSD,
name));  
+                XmlSchemaType schemaType =
+                    schemaCollection.getTypeByQName(new QName(WSDLConstants.NU_SCHEMA_XSD,
name));
                 partvalid = schemaType != null ? true : false;
             }
-            
+
         } else {
             if (isElement) {
                 for (XmlSchemaCollection schema : schemas) {

Modified: incubator/cxf/trunk/tools/validator/src/main/java/org/apache/cxf/tools/validator/internal/WSIBPValidator.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/validator/src/main/java/org/apache/cxf/tools/validator/internal/WSIBPValidator.java?view=diff&rev=558993&r1=558992&r2=558993
==============================================================================
--- incubator/cxf/trunk/tools/validator/src/main/java/org/apache/cxf/tools/validator/internal/WSIBPValidator.java
(original)
+++ incubator/cxf/trunk/tools/validator/src/main/java/org/apache/cxf/tools/validator/internal/WSIBPValidator.java
Tue Jul 24 02:56:09 2007
@@ -48,7 +48,7 @@
 public class WSIBPValidator extends AbstractDefinitionValidator {
     private List<String> operationMap = new ArrayList<String>();
     private WSDLHelper wsdlHelper = new WSDLHelper();
-    
+
     public WSIBPValidator(Definition def) {
         super(def);
     }
@@ -145,12 +145,12 @@
             List parts = soapBody.getParts();
             int boundPartSize = parts == null ? inmessagePartsCount : parts.size();
             SoapHeader soapHeader = SOAPBindingUtil.getBindingInputSOAPHeader(bop);
-            boundPartSize = soapHeader != null 
+            boundPartSize = soapHeader != null
                 && soapHeader.getMessage().equals(
                     operation.getInput().getMessage()
                     .getQName())
                 ? boundPartSize - 1 : boundPartSize;
-            
+
             if (parts != null) {
                 Iterator partsIte = parts.iterator();
                 while (partsIte.hasNext()) {
@@ -176,8 +176,8 @@
                     return false;
                 }
             }
-            
-            
+
+
             if (boundPartSize > 1) {
                 addErrorMessage("Violate WSI-BP-1.0  R2201 operation '" + operation.getName()
                                 + "' more than one part bound to body");
@@ -195,7 +195,7 @@
             List parts = soapBody.getParts();
             int boundPartSize = parts == null ? outmessagePartsCount : parts.size();
             SoapHeader soapHeader = SOAPBindingUtil.getBindingOutputSOAPHeader(bop);
-            boundPartSize = soapHeader != null 
+            boundPartSize = soapHeader != null
                 && soapHeader.getMessage().equals(
                     operation.getOutput().getMessage()
                     .getQName())
@@ -235,7 +235,7 @@
         }
         return true;
     }
-    
+
     public boolean checkBinding() {
         for (PortType portType : wsdlHelper.getPortTypes(def)) {
             Iterator ite = portType.getOperations().iterator();
@@ -282,7 +282,7 @@
         }
         return false;
     }
-    
+
     public boolean checkR2203And2204() {
 
         for (Iterator ite = def.getBindings().values().iterator(); ite.hasNext();) {
@@ -371,10 +371,8 @@
 
                 for (Fault fault : faults) {
                     Message message = fault.getMessage();
-                    System.err.println("message:" + message.getQName());                
   
                     Collection<Part> parts = message.getParts().values();
                     for (Part part : parts) {
-                        System.err.println("Part: " + part.getElementName());
                         if (part.getElementName() == null) {
                             addErrorMessage("Violate WSI-BP-1.0 R2205: In Message " + message.getQName()
                                             + ", part " + part.getName()

Modified: incubator/cxf/trunk/tools/wsdlto/core/src/main/java/org/apache/cxf/tools/wsdlto/WSDLToJava.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/wsdlto/core/src/main/java/org/apache/cxf/tools/wsdlto/WSDLToJava.java?view=diff&rev=558993&r1=558992&r2=558993
==============================================================================
--- incubator/cxf/trunk/tools/wsdlto/core/src/main/java/org/apache/cxf/tools/wsdlto/WSDLToJava.java
(original)
+++ incubator/cxf/trunk/tools/wsdlto/core/src/main/java/org/apache/cxf/tools/wsdlto/WSDLToJava.java
Tue Jul 24 02:56:09 2007
@@ -35,12 +35,12 @@
 
 public class WSDLToJava {
 
-    
+
     public static final String DEFAULT_FRONTEND_NAME = "jaxws";
     public static final String DEFAULT_DATABINDING_NAME = "jaxb";
-    
+
     private String[] args;
-    
+
     private PluginLoader pluginLoader = PluginLoader.getInstance();
 
     public WSDLToJava() {
@@ -49,7 +49,7 @@
     public WSDLToJava(String pargs[]) {
         args = pargs;
     }
-    
+
     private FrontEndProfile loadFrontEnd(String name) {
         if (StringUtils.isEmpty(name)) {
             name = DEFAULT_FRONTEND_NAME;
@@ -69,7 +69,7 @@
         }
         return pluginLoader.getDataBindingProfile(name);
     }
-    
+
     private boolean isExitOnFinish() {
         String exit = System.getProperty("exitOnFinish");
         if (StringUtils.isEmpty(exit)) {
@@ -86,19 +86,19 @@
         } else {
             frontend = loadFrontEnd("");
         }
-        
-        
+
+
         context.put(FrontEndProfile.class, frontend);
-               
+
         DataBindingProfile databinding = loadDataBinding(getDataBindingName(args));
-        
-        
+
+
         context.put(DataBindingProfile.class, databinding);
-        
+
         Class<? extends ToolContainer> containerClass = frontend.getContainerClass();
 
         InputStream toolspecStream = getResourceAsStream(containerClass, frontend.getToolspec());
-         
+
         ToolRunner.runTool(containerClass,
                            toolspecStream,
                            false,
@@ -106,17 +106,17 @@
                            isExitOnFinish(),
                            context);
     }
-        
+
     protected boolean isVerbose() {
         return isSet(new String[]{"-V", "-verbose"});
     }
-    
+
     private boolean isSet(String[] keys) {
         if (args == null) {
             return false;
         }
         List<String> pargs = Arrays.asList(args);
-        
+
         for (String key : keys) {
             if (pargs.contains(key)) {
                 return true;
@@ -150,7 +150,7 @@
         }
         return null;
     }
-    
+
     protected String getFrontEndName(String[] pargs) {
         return getOptionValue(pargs, new String[]{"-frontend", "-fe"});
     }
@@ -167,9 +167,9 @@
 
         WSDLToJava w2j = new WSDLToJava(pargs);
         try {
-            
+
             w2j.run(new ToolContext());
-            
+
         } catch (ToolException ex) {
             System.err.println();
             System.err.println("WSDLToJava Error : " + ex.getMessage());
@@ -192,7 +192,7 @@
         }
         if (w2j.isExitOnFinish()) {
             System.exit(0);
-        }        
+        }
     }
 
     private static InputStream getResourceAsStream(Class clz, String file) {



Mime
View raw message