cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From peterjo...@apache.org
Subject svn commit: r462922 - in /incubator/cxf/trunk: rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/ tools/common/src/main/java/org/apache/cxf/tools/common/ tools/common/src/main/java/org/apache/cxf/tools/util/ tools/misctools/src/main/java/org/apache/...
Date Wed, 11 Oct 2006 19:59:11 GMT
Author: peterjones
Date: Wed Oct 11 12:59:10 2006
New Revision: 462922

URL: http://svn.apache.org/viewvc?view=rev&rev=462922
Log:
[CXF-117] Couple of validator fixes.

Found another problem case for the schema validator with imported wsdls.
Made a small fix and updated the test cases.
Made UniqueBodyParts validator check per portType.
Removed a bit of unnecessary dependency between SchemaValidator and
WSDLElementReferenceValidator.

Added:
    incubator/cxf/trunk/tools/validator/src/main/java/org/apache/cxf/tools/validator/internal/ValidatorUtil.java   (with props)
    incubator/cxf/trunk/tools/validator/src/test/resources/validator_wsdl/schema2.xsd   (with props)
Modified:
    incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/CodeFirstTest.java
    incubator/cxf/trunk/tools/common/src/main/java/org/apache/cxf/tools/common/ToolConstants.java
    incubator/cxf/trunk/tools/common/src/main/java/org/apache/cxf/tools/util/WSDLExtensionRegister.java
    incubator/cxf/trunk/tools/misctools/src/main/java/org/apache/cxf/tools/misc/processor/AbstractWSDLToProcessor.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/UniqueBodyPartsValidator.java
    incubator/cxf/trunk/tools/validator/src/main/java/org/apache/cxf/tools/validator/internal/WSDL11Validator.java
    incubator/cxf/trunk/tools/validator/src/main/java/org/apache/cxf/tools/validator/internal/WSDLElementReferenceValidator.java
    incubator/cxf/trunk/tools/validator/src/test/resources/validator_wsdl/hello_world_import.wsdl
    incubator/cxf/trunk/tools/validator/src/test/resources/validator_wsdl/hello_world_schema_import.wsdl
    incubator/cxf/trunk/tools/validator/src/test/resources/validator_wsdl/schema1.xsd
    incubator/cxf/trunk/tools/wsdl2java/src/main/java/org/apache/cxf/tools/wsdl2java/processor/WSDLToProcessor.java
    incubator/cxf/trunk/tools/wsdl2java/src/test/java/org/apache/cxf/tools/wsdl2java/processor/WSDLToJavaProcessorTest.java

Modified: incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/CodeFirstTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/CodeFirstTest.java?view=diff&rev=462922&r1=462921&r2=462922
==============================================================================
--- incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/CodeFirstTest.java (original)
+++ incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/CodeFirstTest.java Wed Oct 11 12:59:10 2006
@@ -102,8 +102,7 @@
         
         ServiceWSDLBuilder wsdlBuilder = 
             new ServiceWSDLBuilder(service.getServiceInfo());
-        Definition d = wsdlBuilder.build();
-        return d;
+        return wsdlBuilder.build();
     }
 
     public void testEndpoint() throws Exception {

Modified: incubator/cxf/trunk/tools/common/src/main/java/org/apache/cxf/tools/common/ToolConstants.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/common/src/main/java/org/apache/cxf/tools/common/ToolConstants.java?view=diff&rev=462922&r1=462921&r2=462922
==============================================================================
--- incubator/cxf/trunk/tools/common/src/main/java/org/apache/cxf/tools/common/ToolConstants.java (original)
+++ incubator/cxf/trunk/tools/common/src/main/java/org/apache/cxf/tools/common/ToolConstants.java Wed Oct 11 12:59:10 2006
@@ -132,7 +132,7 @@
 
     //public static final String RAW_JAXB_MODEL = "rawjaxbmodel";
 
-    // JMS adress
+    // JMS address
     public static final String NS_JMS_ADDRESS = "http://cxf.apache.org/transports/jms";
     public static final QName  JMS_ADDRESS = new QName(NS_JMS_ADDRESS, "address");
 

Modified: incubator/cxf/trunk/tools/common/src/main/java/org/apache/cxf/tools/util/WSDLExtensionRegister.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/common/src/main/java/org/apache/cxf/tools/util/WSDLExtensionRegister.java?view=diff&rev=462922&r1=462921&r2=462922
==============================================================================
--- incubator/cxf/trunk/tools/common/src/main/java/org/apache/cxf/tools/util/WSDLExtensionRegister.java (original)
+++ incubator/cxf/trunk/tools/common/src/main/java/org/apache/cxf/tools/util/WSDLExtensionRegister.java Wed Oct 11 12:59:10 2006
@@ -54,7 +54,7 @@
         wsdlreader = reader;
     }
 
-    public void registerExtenstions() {
+    public void registerExtensions() {
         ExtensionRegistry registry = wsdlreader.getExtensionRegistry();
         if (registry == null) {
             registry = wsdlFactory.newPopulatedExtensionRegistry();

Modified: incubator/cxf/trunk/tools/misctools/src/main/java/org/apache/cxf/tools/misc/processor/AbstractWSDLToProcessor.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/misctools/src/main/java/org/apache/cxf/tools/misc/processor/AbstractWSDLToProcessor.java?view=diff&rev=462922&r1=462921&r2=462922
==============================================================================
--- incubator/cxf/trunk/tools/misctools/src/main/java/org/apache/cxf/tools/misc/processor/AbstractWSDLToProcessor.java (original)
+++ incubator/cxf/trunk/tools/misctools/src/main/java/org/apache/cxf/tools/misc/processor/AbstractWSDLToProcessor.java Wed Oct 11 12:59:10 2006
@@ -118,7 +118,7 @@
             wsdlReader = wsdlFactory.newWSDLReader();
             wsdlReader.setFeature("javax.wsdl.verbose", false);
             WSDLExtensionRegister register = new WSDLExtensionRegister(wsdlFactory, wsdlReader);
-            register.registerExtenstions();
+            register.registerExtensions();
             wsdlDefinition = wsdlReader.readWSDL(wsdlURL);
             parseImports(wsdlDefinition);
             buildWSDLDefinition();

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=462922&r1=462921&r2=462922
==============================================================================
--- 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 Wed Oct 11 12:59:10 2006
@@ -20,35 +20,24 @@
 package org.apache.cxf.tools.validator.internal;
 
 import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileNotFoundException;
-import java.io.FileReader;
 import java.io.FilenameFilter;
 import java.io.IOException;
 import java.io.InputStream;
 import java.io.Reader;
 import java.net.MalformedURLException;
-import java.net.URI;
-import java.net.URISyntaxException;
 import java.util.ArrayList;
-import java.util.HashMap;
 import java.util.List;
-import java.util.Map;
 import java.util.logging.Logger;
 
 import javax.wsdl.WSDLException;
 import javax.wsdl.factory.WSDLFactory;
 import javax.wsdl.xml.WSDLReader;
 import javax.xml.XMLConstants;
-import javax.xml.namespace.QName;
 import javax.xml.parsers.DocumentBuilder;
 import javax.xml.parsers.DocumentBuilderFactory;
 import javax.xml.parsers.ParserConfigurationException;
 import javax.xml.parsers.SAXParser;
 import javax.xml.parsers.SAXParserFactory;
-import javax.xml.stream.XMLEventReader;
-import javax.xml.stream.XMLInputFactory;
-import javax.xml.stream.XMLStreamException;
 import javax.xml.transform.Source;
 import javax.xml.transform.dom.DOMSource;
 import javax.xml.transform.sax.SAXSource;
@@ -57,9 +46,7 @@
 import javax.xml.validation.Validator;
 
 import org.w3c.dom.Document;
-import org.w3c.dom.Element;
 import org.w3c.dom.Node;
-import org.w3c.dom.NodeList;
 import org.w3c.dom.ls.LSInput;
 import org.w3c.dom.ls.LSResourceResolver;
 
@@ -71,12 +58,10 @@
 import org.apache.cxf.common.i18n.Message;
 import org.apache.cxf.common.logging.LogUtils;
 import org.apache.cxf.helpers.DOMUtils;
+import org.apache.cxf.resource.URIResolver;
 import org.apache.cxf.tools.common.ToolException;
-import org.apache.cxf.tools.common.WSDLConstants;
 import org.apache.cxf.tools.util.WSDLExtensionRegister;
 
-import org.apache.ws.commons.schema.XmlSchemaCollection;
-
 public class SchemaValidator extends AbstractValidator {
     protected static final Logger LOG = LogUtils.getL7dLogger(SchemaValidator.class);
 
@@ -92,18 +77,6 @@
 
     private SAXParser saxParser;
 
-    private Document schemaValidatedDoc;
-
-    private Map<String, Document> wsdlImportDocs;
-
-    private Map<String, XmlSchemaCollection> xmlSchemaMap = new HashMap<String, XmlSchemaCollection>();
-
-    private Map<QName, List> msgPartsMap = new HashMap<QName, List>();
-
-    private Map<QName, Map> portTypes = new HashMap<QName, Map>();
-
-    private Map<QName, QName> bindingMap = new HashMap<QName, QName>();
-
     public SchemaValidator(String schemaDir) throws ToolException {
         super(schemaDir);
         schemaLocation = schemaDir;
@@ -198,39 +171,20 @@
                 throw new ToolException(errHandler.getErrorMessages());
             }
 
-            XMLEventReader xmlEventReader = null;
             try {
                 WSDLFactory wsdlFactory = WSDLFactory.newInstance();
                 WSDLReader reader = wsdlFactory.newWSDLReader();
                 reader.setFeature("javax.wsdl.verbose", false);
                 WSDLExtensionRegister register = new WSDLExtensionRegister(wsdlFactory, reader);
-                register.registerExtenstions();
+                register.registerExtensions();
                 def = reader.readWSDL(wsdlsource.getSystemId());
-
-                XMLInputFactory factory = XMLInputFactory.newInstance();
-                factory.setProperty(XMLInputFactory.IS_NAMESPACE_AWARE, true);
-
-                File file = new File(new URI(wsdlsource.getSystemId()));
-                xmlEventReader = factory.createXMLEventReader(new FileReader(file));
-
             } catch (WSDLException e) {
                 throw new ToolException(e);
-            } catch (XMLStreamException streamEx) {
-                throw new ToolException(streamEx);
-            } catch (URISyntaxException e) {
-                throw new ToolException(e);
-            }
-
-            doSchemaValidation(document, errHandler);
-
-            if (!errHandler.isValid()) {
-                throw new ToolException(errHandler.getErrorMessages());
             }
 
-            this.schemaValidatedDoc = document;
-
-            WSDLElementReferenceValidator wsdlRefValidator = new WSDLElementReferenceValidator(def, this,
-                    xmlEventReader);
+            WSDLElementReferenceValidator wsdlRefValidator = new 
+                WSDLElementReferenceValidator(def, this,
+                wsdlsource.getSystemId(), document);
 
             isValid = wsdlRefValidator.isValid();
 
@@ -241,7 +195,7 @@
             isValid = true;
 
         } catch (IOException ioe) {
-            throw new ToolException("Can not get the wsdl " + wsdlsource.getSystemId(), ioe);
+            throw new ToolException("Cannot get the wsdl " + wsdlsource.getSystemId(), ioe);
         } catch (SAXException saxEx) {
             throw new ToolException(saxEx);
         } catch (ParserConfigurationException e) {
@@ -250,54 +204,6 @@
         return isValid;
     }
 
-    private void doSchemaValidation(Document doc, NewStackTraceErrorHandler handler) throws IOException,
-            SAXException {
-
-        XmlSchemaCollection schemaCol = new XmlSchemaCollection();
-        schemaCol.setBaseUri(def.getDocumentBaseURI());
-        NodeList nodes = doc.getElementsByTagNameNS(WSDLConstants.NS_XMLNS, "schema");
-        for (int x = 0; x < nodes.getLength(); x++) {
-            Node schemaNode = nodes.item(x);
-            Element schemaEl = (Element) schemaNode;
-            String tns = schemaEl.getAttribute("targetNamespace");
-            try {
-                schemaCol.read(schemaEl, tns);
-            } catch (java.lang.RuntimeException ex) {
-                //
-                // Couldn't find schema... check if it's relative to wsdl.
-                // XXX - Probably the setBaseUri() above should take care of
-                // this but it doesn't seem to work with ws commons 1.0.2.
-                //
-                schemaCol.read(schemaEl, def.getDocumentBaseURI());
-            }
-            xmlSchemaMap.put(tns, schemaCol);
-        }
-        // Now do same for imported wsdl files.
-        nodes = doc.getElementsByTagNameNS(WSDLConstants.NS_WSDL, "import");
-        Map<String, Document> docMap = new HashMap<String, Document>();
-        for (int x = 0; x < nodes.getLength(); x++) {
-            org.w3c.dom.NamedNodeMap attributes = nodes.item(x).getAttributes();
-            String systemId;
-            String namespace = attributes.getNamedItem("namespace").getNodeValue();
-            try {
-                systemId = getWsdlUrl(attributes.getNamedItem("location").getNodeValue());
-            } catch (IOException ioe) {
-                throw new ToolException(ioe);
-            }
-            if (namespace != null && systemId != null) {
-                Document docImport = docBuilder.parse(systemId);
-                Node node = DOMUtils.getChild(docImport, null);
-                if (node != null && !"definitions".equals(node.getLocalName())) {
-                    Message msg = new Message("NOT_A_WSDLFILE", LOG, systemId);
-                    throw new ToolException(msg);
-                }
-                doSchemaValidation(docImport, handler);
-                docMap.put(namespace, docImport);
-            }
-        }
-        this.wsdlImportDocs = docMap;
-    }
-
     private String[] addSchemas(String[] defaults, String[] schemas) {
         if (schemas == null || schemas.length == 0) {
             return defaultSchemas;
@@ -352,37 +258,8 @@
         if (file != null && file.exists()) {
             return file.toURL().toString();
         }
-        // Import may have a relative path        
-        File wsdlSrcFile = new File(wsdlsrc);
-        file = new File(wsdlSrcFile.getParent(), path);
-        if (file != null && file.exists()) {
-            return file.toURL().toString();
-        }
-        return null;
-    }
-
-    public Document getSchemaValidatedDoc() {
-        return schemaValidatedDoc;
-    }
-
-    public Map<String, Document> getWsdlImportDocs() {
-        return wsdlImportDocs;
-    }
-
-    public Map<String, XmlSchemaCollection> getXMLSchemaMap() {
-        return xmlSchemaMap;
-    }
-
-    public Map<QName, List> getMsgPartsMap() {
-        return msgPartsMap;
-    }
-
-    public Map<QName, Map> getPortTypesMap() {
-        return portTypes;
-    }
 
-    public Map<QName, QName> getBindingMap() {
-        return bindingMap;
+        return null;
     }
 
 }
@@ -468,26 +345,21 @@
             systemId = schemaLocation + systemId;
         }
 
-        LSInput lsin = new LSInputImpl();
-        URI uri = null;
+        URIResolver resolver = null;
         try {
-            uri = new URI(systemId);
-        } catch (URISyntaxException e1) {
+            resolver = new URIResolver(systemId);
+        } catch (IOException e1) {
             return null;
         }
 
-        File file = new File(uri);
-        FileInputStream inputStream = null;
-
-        try {
-            inputStream = new FileInputStream(file);
-        } catch (FileNotFoundException e) {
+        if (resolver.getInputStream() != null) {
+            LSInput lsin = new LSInputImpl();
+            lsin.setSystemId(systemId);
+            lsin.setByteStream(resolver.getInputStream());
+            return lsin;
+        } else {
             return null;
         }
-
-        lsin.setSystemId(systemId);
-        lsin.setByteStream(inputStream);
-        return lsin;
     }
 }
 

Modified: incubator/cxf/trunk/tools/validator/src/main/java/org/apache/cxf/tools/validator/internal/UniqueBodyPartsValidator.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/validator/src/main/java/org/apache/cxf/tools/validator/internal/UniqueBodyPartsValidator.java?view=diff&rev=462922&r1=462921&r2=462922
==============================================================================
--- incubator/cxf/trunk/tools/validator/src/main/java/org/apache/cxf/tools/validator/internal/UniqueBodyPartsValidator.java (original)
+++ incubator/cxf/trunk/tools/validator/src/main/java/org/apache/cxf/tools/validator/internal/UniqueBodyPartsValidator.java Wed Oct 11 12:59:10 2006
@@ -31,7 +31,7 @@
 import javax.xml.namespace.QName;
 
 public class UniqueBodyPartsValidator extends AbstractValidator {
-    private Map<QName, String> uniqueBodyPartsMap = new HashMap<QName, String>();
+    private Map<QName, String> uniqueBodyPartsMap;
 
     public UniqueBodyPartsValidator(Definition def) {
         super(def);
@@ -41,6 +41,11 @@
     public boolean isValid() {
         Iterator ite = def.getPortTypes().values().iterator();
         while (ite.hasNext()) {
+            //
+            // Only check for unique body parts per portType.
+            // (Create a new Map for each portType.)
+            //
+            uniqueBodyPartsMap = new HashMap<QName, String>();
             PortType portType = (PortType)ite.next();
             Iterator ite2 = portType.getOperations().iterator();
             while (ite2.hasNext()) {

Added: incubator/cxf/trunk/tools/validator/src/main/java/org/apache/cxf/tools/validator/internal/ValidatorUtil.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/validator/src/main/java/org/apache/cxf/tools/validator/internal/ValidatorUtil.java?view=auto&rev=462922
==============================================================================
--- incubator/cxf/trunk/tools/validator/src/main/java/org/apache/cxf/tools/validator/internal/ValidatorUtil.java (added)
+++ incubator/cxf/trunk/tools/validator/src/main/java/org/apache/cxf/tools/validator/internal/ValidatorUtil.java Wed Oct 11 12:59:10 2006
@@ -0,0 +1,182 @@
+/**
+ * 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.
+ */
+
+package org.apache.cxf.tools.validator.internal;
+
+import java.io.File;
+import java.io.IOException;
+import java.net.URI;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.logging.Logger;
+
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.DocumentBuilderFactory;
+import javax.xml.parsers.ParserConfigurationException;
+
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+import org.w3c.dom.NamedNodeMap;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
+
+import org.xml.sax.SAXException;
+
+import org.apache.cxf.common.i18n.Message;
+import org.apache.cxf.common.logging.LogUtils;
+import org.apache.cxf.helpers.DOMUtils;
+import org.apache.cxf.tools.common.ToolException;
+import org.apache.cxf.tools.common.WSDLConstants;
+
+import org.apache.ws.commons.schema.XmlSchemaCollection;
+
+public final class ValidatorUtil {
+    private static final Logger LOG = LogUtils.getL7dLogger(ValidatorUtil.class);
+
+    private ValidatorUtil() {
+    }
+
+    /**
+     * Get a list of schemas found in a wsdl Document.
+     * The list will include any schemas from imported wsdls.
+     * 
+     * @param document The wsdl Document.
+     * @param baseURI The URI of the wsdl. Allows schemas with relative
+     *                paths to be resolved. 
+     * @return XmlSchemaCollection list
+     * @throws IOException
+     * @throws SAXException
+     */
+    public static List<XmlSchemaCollection> getSchemaList(Document document,
+            String baseURI) throws IOException, SAXException {
+        List<XmlSchemaCollection> schemaList = new ArrayList<XmlSchemaCollection>();
+        if (document == null) {
+            return schemaList;
+        }
+        XmlSchemaCollection schemaCol = new XmlSchemaCollection();
+        NodeList nodes = document.getElementsByTagNameNS(
+            WSDLConstants.NS_XMLNS, "schema");
+        for (int x = 0; x < nodes.getLength(); x++) {
+            Node schemaNode = nodes.item(x);
+            Element schemaEl = (Element) schemaNode;
+            String tns = schemaEl.getAttribute("targetNamespace");
+            try {
+                schemaCol.read(schemaEl, tns);
+            } catch (java.lang.RuntimeException ex) {
+                //
+                // Couldn't find schema... check if it's relative to wsdl.
+                // XXX - Using setBaseUri() on the XmlSchemaCollection,
+                // only seems to work for the first imported xsd... so pass
+                // in the baseURI here.
+                //
+                schemaCol.read(schemaEl, baseURI);
+            }
+        }
+        schemaList.add(schemaCol);
+        
+        // Now add schemas from imported wsdl files.
+        Map<String, Document> wsdlImports = getImportedWsdlMap(
+            document, baseURI);
+        for (Document wsdlImport : wsdlImports.values()) {
+            schemaList.addAll(getSchemaList(wsdlImport, baseURI));
+        }
+        
+        return schemaList;
+    }
+    
+    /**
+     * Get a map of wsdls imported by the given wsdl.  Keys in the
+     * map are the imported namespaces.  Values are the imported
+     * wsdl Documents.
+     * 
+     * @param document The wsdl Document
+     * @param basePath The path of the wsdl
+     * @return map of imported wsdls
+     * @throws IOException
+     * @throws SAXException
+     */
+    public static Map<String, Document> getImportedWsdlMap(Document document,
+        String basePath) throws IOException, SAXException {
+        Map<String, Document> docMap = new HashMap<String, Document>();
+        if (document == null) {
+            return docMap;
+        }
+        
+        DocumentBuilder docBuilder = null;
+        try {
+            DocumentBuilderFactory docFactory = DocumentBuilderFactory.newInstance();
+            docFactory.setNamespaceAware(true);
+            docBuilder = docFactory.newDocumentBuilder();
+        } catch (ParserConfigurationException e) {
+            throw new ToolException(e);
+        }
+        
+        NodeList nodes = document.getElementsByTagNameNS(WSDLConstants.NS_WSDL, "import");
+        // Remove the scheme part of a URI.
+        String myBasePath = basePath;
+        try {
+            myBasePath = new URI(basePath).getPath();
+        } catch (java.net.URISyntaxException e1) {
+            // Is this ok?
+        }
+        for (int x = 0; x < nodes.getLength(); x++) {
+            NamedNodeMap attributes = nodes.item(x).getAttributes();
+            String systemId;
+            String namespace = attributes.getNamedItem("namespace").getNodeValue();
+            // Is this ok?
+            if (docMap.containsKey(namespace)) {
+                continue;
+            }
+            try {
+                systemId = getImportedUrl(
+                    attributes.getNamedItem("location").getNodeValue(), myBasePath);
+            } catch (IOException ioe) {
+                throw new ToolException(ioe);
+            }
+            if (namespace != null && systemId != null) {
+                Document docImport = docBuilder.parse(systemId);
+                Node node = DOMUtils.getChild(docImport, null);
+                if (node != null && !"definitions".equals(node.getLocalName())) {
+                    Message msg = new Message("NOT_A_WSDLFILE", LOG, systemId);
+                    throw new ToolException(msg);
+                }
+                docMap.putAll(getImportedWsdlMap(docImport, myBasePath));
+                docMap.put(namespace, docImport);
+            }
+        }
+
+        return docMap;
+    }
+
+    private static String getImportedUrl(String theImportPath, String baseURI) throws IOException {
+        File file = new File(theImportPath);
+        if (file != null && file.exists()) {
+            return file.toURL().toString();
+        }
+        // Import may have a relative path
+        File baseFile = new File(baseURI);
+        file = new File(baseFile.getParent(), theImportPath);
+        if (file != null && file.exists()) {
+            return file.toURL().toString();
+        }
+        return null;
+    }
+}

Propchange: incubator/cxf/trunk/tools/validator/src/main/java/org/apache/cxf/tools/validator/internal/ValidatorUtil.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/cxf/trunk/tools/validator/src/main/java/org/apache/cxf/tools/validator/internal/ValidatorUtil.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Modified: incubator/cxf/trunk/tools/validator/src/main/java/org/apache/cxf/tools/validator/internal/WSDL11Validator.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/validator/src/main/java/org/apache/cxf/tools/validator/internal/WSDL11Validator.java?view=diff&rev=462922&r1=462921&r2=462922
==============================================================================
--- incubator/cxf/trunk/tools/validator/src/main/java/org/apache/cxf/tools/validator/internal/WSDL11Validator.java (original)
+++ incubator/cxf/trunk/tools/validator/src/main/java/org/apache/cxf/tools/validator/internal/WSDL11Validator.java Wed Oct 11 12:59:10 2006
@@ -62,7 +62,7 @@
                 this.def = schemaValidator.def;
             }
         } else {
-            throw new ToolException("Schema dir should be defined before validate wsdl");
+            throw new ToolException("Schema dir should be defined before validating wsdl");
         }
 
         validators.add(new UniqueBodyPartsValidator(this.def));

Modified: incubator/cxf/trunk/tools/validator/src/main/java/org/apache/cxf/tools/validator/internal/WSDLElementReferenceValidator.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/validator/src/main/java/org/apache/cxf/tools/validator/internal/WSDLElementReferenceValidator.java?view=diff&rev=462922&r1=462921&r2=462922
==============================================================================
--- incubator/cxf/trunk/tools/validator/src/main/java/org/apache/cxf/tools/validator/internal/WSDLElementReferenceValidator.java (original)
+++ incubator/cxf/trunk/tools/validator/src/main/java/org/apache/cxf/tools/validator/internal/WSDLElementReferenceValidator.java Wed Oct 11 12:59:10 2006
@@ -19,6 +19,12 @@
 
 package org.apache.cxf.tools.validator.internal;
 
+import java.io.File;
+import java.io.FileNotFoundException;
+import java.io.FileReader;
+import java.io.IOException;
+import java.net.URI;
+import java.net.URISyntaxException;
 import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.Iterator;
@@ -40,12 +46,16 @@
 import javax.xml.namespace.QName;
 import javax.xml.stream.Location;
 import javax.xml.stream.XMLEventReader;
+import javax.xml.stream.XMLInputFactory;
+import javax.xml.stream.XMLStreamException;
 
 import org.w3c.dom.Document;
 import org.w3c.dom.NamedNodeMap;
 import org.w3c.dom.Node;
 import org.w3c.dom.NodeList;
+import org.xml.sax.SAXException;
 
+import org.apache.cxf.tools.common.ToolException;
 import org.apache.cxf.tools.common.WSDLConstants;
 
 import org.apache.ws.commons.schema.XmlSchemaCollection;
@@ -53,29 +63,51 @@
 import org.apache.ws.commons.schema.XmlSchemaType;
 
 public class WSDLElementReferenceValidator {
-    private Map<String, XmlSchemaCollection> schemas;
     private Definition def;
-    private Map<QName, List> msgPartsMap;
     private SchemaValidator schemaWSDLValidator;
-    private Map<QName, QName> bindingMap;
-    private Map<QName, Map> portTypes;
+
+    private List<XmlSchemaCollection> schemas;
+    private Map<QName, QName> bindingMap = new HashMap<QName, QName>();
+    private Map<QName, List> msgPartsMap = new HashMap<QName, List>();
+    private Map<QName, Map> portTypes = new HashMap<QName, Map>();
+
     private Document document;
     private Document locationDocument;
     private boolean isValid = true;
-    private  XmlSchemaCollection schemaCollection;
+    // XXX - schemaCollection never seems to be populated?
+    private XmlSchemaCollection schemaCollection = new XmlSchemaCollection();
 
-    public WSDLElementReferenceValidator(Definition definition, SchemaValidator wsdlValidator,
-                                         XMLEventReader reader) {
+    public WSDLElementReferenceValidator(Definition definition, 
+                                         SchemaValidator validator, 
+                                         String wsdlId,
+                                         Document wsdlDocument) {
         def = definition;
-        schemaWSDLValidator = wsdlValidator;
-        schemas = wsdlValidator.getXMLSchemaMap();
-        msgPartsMap = wsdlValidator.getMsgPartsMap();
-        portTypes = wsdlValidator.getPortTypesMap();
-        bindingMap = wsdlValidator.getBindingMap();
-        document = wsdlValidator.getSchemaValidatedDoc();
+        schemaWSDLValidator = validator;
+        document = wsdlDocument;
+        try {
+            schemas = ValidatorUtil.getSchemaList(document, def.getDocumentBaseURI());
+        } catch (IOException ex) {
+            throw new ToolException("Cannot get schema list " + def.getDocumentBaseURI(), ex);
+        } catch (SAXException ex) {
+            throw new ToolException(ex);
+        }
+
+        XMLEventReader reader = null;
+        try {
+            XMLInputFactory factory = XMLInputFactory.newInstance();
+            factory.setProperty(XMLInputFactory.IS_NAMESPACE_AWARE, true);
+            File file = new File(new URI(wsdlId));
+            reader = factory.createXMLEventReader(new FileReader(file));
+        } catch (XMLStreamException streamEx) {
+            throw new ToolException(streamEx);
+        } catch (URISyntaxException e) {
+            throw new ToolException(e);
+        } catch (FileNotFoundException e) {
+            throw new ToolException("Cannot get the wsdl " + wsdlId, e);
+        }
+
         Stax2DOM stax2dom = new Stax2DOM();
         locationDocument = stax2dom.getDocument(reader);
-        schemaCollection = new XmlSchemaCollection();
     }
 
     public boolean isValid() {
@@ -83,6 +115,7 @@
         this.validatePortType();
         this.validateBinding();
         this.validateService();
+
         return isValid;
     }
 
@@ -92,7 +125,15 @@
 
         Map messageMap = def.getMessages();
 
-        Map<String, Document> wsdlImports = schemaWSDLValidator.getWsdlImportDocs();
+        Map<String, Document> wsdlImports = null;
+        try {
+            wsdlImports = ValidatorUtil.getImportedWsdlMap(document,
+                def.getDocumentBaseURI());
+        } catch (IOException ex) {
+            throw new ToolException("Cannot get wsdl imports " + def.getDocumentBaseURI(), ex);
+        } catch (SAXException ex) {
+            throw new ToolException(ex);
+        }
         for (Iterator iter = wsdlImports.keySet().iterator(); iter.hasNext();) {
             String tnsImport = (String)iter.next();
             Document wsdlImportDoc = (Document)wsdlImports.get(tnsImport);
@@ -135,11 +176,10 @@
                     Location loc = this.getErrNodeLocation(WSDLConstants.QNAME_MESSAGE, msg.getQName()
                         .getLocalPart(), part.getName());
 
-                    schemaWSDLValidator
-                        .addError(loc, "The part does not have a type defined. Every part must "
-                                       + "specify a type from some type system. The type can "
-                                       + "be specified using the built in 'element' or 'type' attributes "
-                                       + "or may be specified using an extension attribute.");
+                    addError(loc, "The part does not have a type defined. Every part must "
+                                + "specify a type from some type system. The type can "
+                                + "be specified using the built in 'element' or 'type' attributes "
+                                + "or may be specified using an extension attribute.");
 
                     isValid = false;
 
@@ -148,9 +188,8 @@
                 if (elementName != null && typeName != null) {
                     Location loc = this.getErrNodeLocation(WSDLConstants.QNAME_MESSAGE, msg.getQName()
                         .getLocalPart(), part.getName());
-                    schemaWSDLValidator.addError(loc,
-                                                 "The part has both an element and a type defined. Every "
-                                                     + "part must only have an element or a type defined.");
+                    addError(loc, "The part has both an element and a type defined. Every "
+                                + "part must only have an element or a type defined.");
                     isValid = false;
 
                 }
@@ -161,7 +200,7 @@
                     if (!valid) {
                         Location loc = this.getErrNodeLocation(WSDLConstants.QNAME_MESSAGE, msg.getQName()
                             .getLocalPart(), part.getName());
-                        schemaWSDLValidator.addError(loc, elementName + " cannot find reference");
+                        addError(loc, elementName + " cannot find reference");
 
                         isValid = false;
                     }
@@ -175,7 +214,7 @@
                     if (!valid) {
                         Location loc = this.getErrNodeLocation(WSDLConstants.QNAME_MESSAGE, msg.getQName()
                             .getLocalPart(), part.getName());
-                        schemaWSDLValidator.addError(loc, "reference cannot be found");
+                        addError(loc, "reference cannot be found");
                         isValid = false;
                     }
 
@@ -205,19 +244,21 @@
             }
             
         } else {
-            Iterator ite = schemas.values().iterator();
-            while (ite.hasNext()) {
-                XmlSchemaCollection schema = (XmlSchemaCollection)ite.next();
-                if (schema != null && isElement
-                    && schema.getElementByQName(new QName(namespace, name)) != null) {
-                    partvalid = true;
-                    break;
-
+            if (isElement) {
+                for (XmlSchemaCollection schema : schemas) {
+                    if (schema != null && schema.getElementByQName(
+                            new QName(namespace, name)) != null) {
+                        partvalid = true;
+                        break;
+                    }
                 }
-                if (schema != null && !isElement 
-                    && schema.getTypeByQName(new QName(namespace, name)) != null) {
-                    partvalid = true;
-                    break;
+            } else {
+                for (XmlSchemaCollection schema : schemas) {
+                    if (schema != null && schema.getTypeByQName(
+                            new QName(namespace, name)) != null) {
+                        partvalid = true;
+                        break;
+                    }
                 }
             }
         }
@@ -242,7 +283,7 @@
             if (!portTypes.containsKey(typeName)) {
                 Location loc = getErrNodeLocation(WSDLConstants.QNAME_DEFINITIONS, null, bindingName
                     .getLocalPart());
-                schemaWSDLValidator.addError(loc, typeName + " is not defined");
+                addError(loc, typeName + " is not defined");
                 isValid = false;
             } else {
 
@@ -262,8 +303,8 @@
 
                         Location loc = this.getErrNodeLocation(WSDLConstants.QNAME_BINDING, bindingName
                             .getLocalPart(), bop.getName());
-                        schemaWSDLValidator.addError(loc, "BindingOperation " + bop.getName()
-                                                          + " is not defined");
+                        addError(loc, "BindingOperation " + bop.getName()
+                                    + " is not defined");
 
                         isValid = false;
 
@@ -273,16 +314,16 @@
                         if (op.getInput() == null && bop.getBindingInput() != null) {
                             Location loc = this.getErrNodeLocation(WSDLConstants.QNAME_BINDING, bindingName
                                 .getLocalPart(), bop.getName());
-                            schemaWSDLValidator.addError(loc, "BindingOperation " + bop.getName()
-                                                              + " binding input is not defined");
+                            addError(loc, "BindingOperation " + bop.getName()
+                                        + " binding input is not defined");
                             isValid = false;
                         }
 
                         if (op.getInput() != null && bop.getBindingInput() == null) {
                             Location loc = this.getErrNodeLocation(WSDLConstants.QNAME_BINDING, bindingName
                                 .getLocalPart(), bop.getName());
-                            schemaWSDLValidator.addError(loc, "BindingOperation " + bop.getName()
-                                                              + " binding input is not resolved");
+                            addError(loc, "BindingOperation " + bop.getName()
+                                        + " binding input is not resolved");
 
                             isValid = false;
                         }
@@ -290,16 +331,16 @@
                         if (op.getOutput() == null && bop.getBindingOutput() != null) {
                             Location loc = this.getErrNodeLocation(WSDLConstants.QNAME_BINDING, bindingName
                                 .getLocalPart(), bop.getName());
-                            schemaWSDLValidator.addError(loc, "BindingOperation " + bop.getName()
-                                                              + " binding output is not defined");
+                            addError(loc, "BindingOperation " + bop.getName()
+                                        + " binding output is not defined");
                             isValid = false;
                         }
 
                         if (op.getOutput() != null && bop.getBindingOutput() == null) {
                             Location loc = this.getErrNodeLocation(WSDLConstants.QNAME_BINDING, bindingName
                                 .getLocalPart(), bop.getName());
-                            schemaWSDLValidator.addError(loc, "BindingOperation " + bop.getName()
-                                                              + " binding output is not resolved");
+                            addError(loc, "BindingOperation " + bop.getName()
+                                        + " binding output is not resolved");
 
                             isValid = false;
                         }
@@ -307,8 +348,8 @@
                         if (op.getFaults().size() != bop.getBindingFaults().size()) {
                             Location loc = this.getErrNodeLocation(WSDLConstants.QNAME_BINDING, bindingName
                                 .getLocalPart(), bop.getName());
-                            schemaWSDLValidator.addError(loc, "BindingOperation " + bop.getName()
-                                                              + " binding fault resolved error");
+                            addError(loc, "BindingOperation " + bop.getName()
+                                        + " binding fault resolved error");
                             isValid = false;
                         }
 
@@ -336,8 +377,8 @@
                 if (!bindingMap.containsKey(binding.getQName())) {
                     Location loc = this.getErrNodeLocation(WSDLConstants.QNAME_SERVICE, service.getQName()
                         .getLocalPart(), port.getName());
-                    schemaWSDLValidator.addError(loc, " port : " + port.getName()
-                                                      + " reference binding is not defined");
+                    addError(loc, " port : " + port.getName()
+                                + " reference binding is not defined");
                     isValid = false;
                 }
             }
@@ -380,8 +421,8 @@
                                 && !msgPartsMap.containsKey(input.getMessage().getQName())) {
                                 Location loc = this.getErrNodeLocation(WSDLConstants.QNAME_OPERATION,
                                                                        operation.getName(), input.getName());
-                                schemaWSDLValidator.addError(loc, " input : " + input.getName()
-                                                                  + " reference is not defined");
+                                addError(loc, " input : " + input.getName()
+                                            + " reference is not defined");
                                 isValid = false;
                             }
 
@@ -390,8 +431,8 @@
                                 && !msgPartsMap.containsKey(output.getMessage().getQName())) {
                                 Location loc = this.getErrNodeLocation(WSDLConstants.QNAME_OPERATION,
                                                                        operation.getName(), output.getName());
-                                schemaWSDLValidator.addError(loc, " output : " + output.getName()
-                                                                  + " reference is not defined");
+                                addError(loc, " output : " + output.getName()
+                                            + " reference is not defined");
                                 isValid = false;
                             }
 
@@ -421,7 +462,6 @@
 
     private void addError(Location loc, String msg) {
         schemaWSDLValidator.addError(loc, msg);
-
     }
 
     public Location getErrNodeLocation(QName wsdlParentNode, String parentNameValue,

Modified: incubator/cxf/trunk/tools/validator/src/test/resources/validator_wsdl/hello_world_import.wsdl
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/validator/src/test/resources/validator_wsdl/hello_world_import.wsdl?view=diff&rev=462922&r1=462921&r2=462922
==============================================================================
--- incubator/cxf/trunk/tools/validator/src/test/resources/validator_wsdl/hello_world_import.wsdl (original)
+++ incubator/cxf/trunk/tools/validator/src/test/resources/validator_wsdl/hello_world_import.wsdl Wed Oct 11 12:59:10 2006
@@ -27,6 +27,23 @@
   <wsdl:import namespace="http://apache.org/hello_world_soap_http/types" 
                location="hello_world_types.wsdl" />
 
+  <wsdl:types>
+    <schema targetNamespace="http://apache.org/hello_world_soap_http/types"
+        xmlns="http://www.w3.org/2001/XMLSchema"
+        elementFormDefault="qualified">
+      <element name="anotherGreetMe">
+        <complexType>
+          <sequence>
+            <element name="requestType" type="string"/>
+          </sequence>
+        </complexType>
+      </element>
+    </schema>
+  </wsdl:types>
+
+  <wsdl:message name="anotherGreetMeRequest">
+    <wsdl:part name="in" element="x1:anotherGreetMe"/>
+  </wsdl:message>
   <wsdl:message name="greetMeRequest">
     <wsdl:part name="in" element="x1:greetMe"/>
   </wsdl:message>

Modified: incubator/cxf/trunk/tools/validator/src/test/resources/validator_wsdl/hello_world_schema_import.wsdl
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/validator/src/test/resources/validator_wsdl/hello_world_schema_import.wsdl?view=diff&rev=462922&r1=462921&r2=462922
==============================================================================
--- incubator/cxf/trunk/tools/validator/src/test/resources/validator_wsdl/hello_world_schema_import.wsdl (original)
+++ incubator/cxf/trunk/tools/validator/src/test/resources/validator_wsdl/hello_world_schema_import.wsdl Wed Oct 11 12:59:10 2006
@@ -21,12 +21,14 @@
 		  xmlns="http://schemas.xmlsoap.org/wsdl/" 
 		  xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" 
 		  xmlns:tns="http://apache.org/hello_world_soap_http"
-		  xmlns:x1="http://apache.org/hello_world_soap_http/types"
+		  xmlns:x1="http://apache.org/hello_world_soap_http/types1"
+		  xmlns:x2="http://apache.org/hello_world_soap_http/types2"
 		  xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" 
 		  xmlns:xsd="http://www.w3.org/2001/XMLSchema">
     <wsdl:types>
 	<xsd:schema>
-	    <xsd:import namespace="http://apache.org/hello_world_soap_http/types" schemaLocation="schema1.xsd"/>
+	    <xsd:import namespace="http://apache.org/hello_world_soap_http/types1" schemaLocation="schema1.xsd"/>
+	    <xsd:import namespace="http://apache.org/hello_world_soap_http/types2" schemaLocation="schema2.xsd"/>
 	</xsd:schema>
     </wsdl:types>
     <wsdl:message name="sayHiRequest">
@@ -45,13 +47,13 @@
 	<wsdl:part element="x1:greetMeOneWay" name="in"/>
     </wsdl:message>
     <wsdl:message name="pingMeRequest">
-	<wsdl:part name="in" element="x1:pingMe"/>
+	<wsdl:part name="in" element="x2:pingMe"/>
     </wsdl:message>
     <wsdl:message name="pingMeResponse">
-	<wsdl:part name="out" element="x1:pingMeResponse"/>
+	<wsdl:part name="out" element="x2:pingMeResponse"/>
     </wsdl:message>		
     <wsdl:message name="pingMeFault">
-	<wsdl:part name="faultDetail" element="x1:faultDetail"/>
+	<wsdl:part name="faultDetail" element="x2:faultDetail"/>
     </wsdl:message>
     
     <wsdl:portType name="Greeter">

Modified: incubator/cxf/trunk/tools/validator/src/test/resources/validator_wsdl/schema1.xsd
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/validator/src/test/resources/validator_wsdl/schema1.xsd?view=diff&rev=462922&r1=462921&r2=462922
==============================================================================
--- incubator/cxf/trunk/tools/validator/src/test/resources/validator_wsdl/schema1.xsd (original)
+++ incubator/cxf/trunk/tools/validator/src/test/resources/validator_wsdl/schema1.xsd Wed Oct 11 12:59:10 2006
@@ -17,7 +17,7 @@
   specific language governing permissions and limitations
   under the License.
 -->
-<xs:schema version="1.0" targetNamespace="http://apache.org/hello_world_soap_http/types" xmlns:xs="http://www.w3.org/2001/XMLSchema">
+<xs:schema version="1.0" targetNamespace="http://apache.org/hello_world_soap_http/types1" xmlns:xs="http://www.w3.org/2001/XMLSchema">
 
   <xs:element name="sayHi">
     <xs:complexType/>
@@ -55,21 +55,5 @@
     </xs:complexType>
   </xs:element>
 
-  <xs:element name="pingMe">
-    <xs:complexType/>
-  </xs:element>
-
-  <xs:element name="faultDetail">
-    <xs:complexType>
-      <xs:sequence>
-        <xs:element name="minor" type="xs:short" form="qualified" minOccurs="0"/>
-        <xs:element name="major" type="xs:short" form="qualified" minOccurs="0"/>
-      </xs:sequence>
-    </xs:complexType>
-  </xs:element>
-
-  <xs:element name="pingMeResponse">
-    <xs:complexType/>
-  </xs:element>
 </xs:schema>
 

Added: incubator/cxf/trunk/tools/validator/src/test/resources/validator_wsdl/schema2.xsd
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/validator/src/test/resources/validator_wsdl/schema2.xsd?view=auto&rev=462922
==============================================================================
--- incubator/cxf/trunk/tools/validator/src/test/resources/validator_wsdl/schema2.xsd (added)
+++ incubator/cxf/trunk/tools/validator/src/test/resources/validator_wsdl/schema2.xsd Wed Oct 11 12:59:10 2006
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<!--
+  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.
+-->
+<xs:schema version="1.0" targetNamespace="http://apache.org/hello_world_soap_http/types2" xmlns:xs="http://www.w3.org/2001/XMLSchema">
+
+  <xs:element name="pingMe">
+    <xs:complexType/>
+  </xs:element>
+
+  <xs:element name="faultDetail">
+    <xs:complexType>
+      <xs:sequence>
+        <xs:element name="minor" type="xs:short" form="qualified" minOccurs="0"/>
+        <xs:element name="major" type="xs:short" form="qualified" minOccurs="0"/>
+      </xs:sequence>
+    </xs:complexType>
+  </xs:element>
+
+  <xs:element name="pingMeResponse">
+    <xs:complexType/>
+  </xs:element>
+</xs:schema>
+

Propchange: incubator/cxf/trunk/tools/validator/src/test/resources/validator_wsdl/schema2.xsd
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/cxf/trunk/tools/validator/src/test/resources/validator_wsdl/schema2.xsd
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: incubator/cxf/trunk/tools/validator/src/test/resources/validator_wsdl/schema2.xsd
------------------------------------------------------------------------------
    svn:mime-type = text/xml

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=462922&r1=462921&r2=462922
==============================================================================
--- 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 Wed Oct 11 12:59:10 2006
@@ -145,7 +145,7 @@
             wsdlReader = wsdlFactory.newWSDLReader();
             wsdlReader.setFeature("javax.wsdl.verbose", false);
             WSDLExtensionRegister register = new WSDLExtensionRegister(wsdlFactory, wsdlReader);
-            register.registerExtenstions();
+            register.registerExtensions();
             wsdlDefinition = wsdlReader.readWSDL(wsdlURL);
             parseImports(wsdlDefinition);
             buildImportedMaps();

Modified: incubator/cxf/trunk/tools/wsdl2java/src/test/java/org/apache/cxf/tools/wsdl2java/processor/WSDLToJavaProcessorTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/wsdl2java/src/test/java/org/apache/cxf/tools/wsdl2java/processor/WSDLToJavaProcessorTest.java?view=diff&rev=462922&r1=462921&r2=462922
==============================================================================
--- incubator/cxf/trunk/tools/wsdl2java/src/test/java/org/apache/cxf/tools/wsdl2java/processor/WSDLToJavaProcessorTest.java (original)
+++ incubator/cxf/trunk/tools/wsdl2java/src/test/java/org/apache/cxf/tools/wsdl2java/processor/WSDLToJavaProcessorTest.java Wed Oct 11 12:59:10 2006
@@ -1061,7 +1061,7 @@
             processor.setEnvironment(env);
             processor.process();
         } catch (Exception e) {
-            assertTrue("Invalid wsdl should be diagnoised", e.getMessage()
+            assertTrue("Invalid wsdl should be diagnosed", e.getMessage()
                 .indexOf("Invalid WSDL,wsdl:operation") > -1);
         }
 



Mime
View raw message