Author: mmao
Date: Mon May 21 01:34:10 2007
New Revision: 540060
URL: http://svn.apache.org/viewvc?view=rev&rev=540060
Log:
CXF-645
* WSDLRefValidator support suppressWarnings. in order to validate logical wsdl,
you have to turn on this option
* Upgrade part of tools tests to JUnit4
* SchemaValidator only validate schema, extran WSDLRefValidator into upper level
Added:
incubator/cxf/trunk/tools/validator/src/test/java/org/apache/cxf/tools/validator/internal/resources/logical.wsdl
Modified:
incubator/cxf/trunk/common/common/src/main/java/org/apache/cxf/helpers/XMLUtils.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/common/ToolTestBase.java
incubator/cxf/trunk/tools/javato/src/test/java/org/apache/cxf/tools/java2wsdl/JavaToWSDLTest.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/ValidationResult.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/WSDLRefValidator.java
incubator/cxf/trunk/tools/validator/src/main/java/org/apache/cxf/tools/validator/wsdlvalidator.xml
incubator/cxf/trunk/tools/validator/src/test/java/org/apache/cxf/tools/validator/WSDLValidationTest.java
incubator/cxf/trunk/tools/validator/src/test/java/org/apache/cxf/tools/validator/internal/Stax2DOMTest.java
incubator/cxf/trunk/tools/validator/src/test/java/org/apache/cxf/tools/validator/internal/WSDL11ValidatorTest.java
incubator/cxf/trunk/tools/validator/src/test/java/org/apache/cxf/tools/validator/internal/WSDLRefValidatorTest.java
incubator/cxf/trunk/tools/validator/src/test/java/org/apache/cxf/tools/validator/internal/model/XNodeTest.java
incubator/cxf/trunk/tools/validator/src/test/java/org/apache/cxf/tools/validator/internal/resources/a.wsdl
incubator/cxf/trunk/tools/validator/src/test/java/org/apache/cxf/tools/validator/internal/resources/c.xsd
incubator/cxf/trunk/tools/validator/src/test/java/org/apache/cxf/tools/validator/internal/resources/nobinding.wsdl
incubator/cxf/trunk/tools/validator/src/test/java/org/apache/cxf/tools/validator/internal/resources/optionspt.wsdl
incubator/cxf/trunk/tools/validator/src/test/java/org/apache/cxf/tools/validator/internal/resources/physicalpt.wsdl
incubator/cxf/trunk/tools/validator/src/test/java/org/apache/cxf/tools/validator/internal/resources/schemapt.xsd
Modified:
incubator/cxf/trunk/common/common/src/main/java/org/apache/cxf/helpers/XMLUtils.java
URL:
http://svn.apache.org/viewvc/incubator/cxf/trunk/common/common/src/main/java/org/apache/cxf/helpers/XMLUtils.java?view=diff&rev=540060&r1=540059&r2=540060
==============================================================================
---
incubator/cxf/trunk/common/common/src/main/java/org/apache/cxf/helpers/XMLUtils.java
(original)
+++
incubator/cxf/trunk/common/common/src/main/java/org/apache/cxf/helpers/XMLUtils.java
Mon May 21 01:34:10 2007
@@ -19,11 +19,17 @@
package org.apache.cxf.helpers;
-import java.io.*;
-import java.util.*;
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.io.Writer;
+import java.util.Map;
+import java.util.Properties;
+import java.util.StringTokenizer;
import java.util.logging.Level;
import java.util.logging.Logger;
-
import javax.wsdl.Definition;
import javax.xml.namespace.QName;
import javax.xml.parsers.DocumentBuilder;
@@ -38,12 +44,19 @@
import javax.xml.transform.dom.DOMSource;
import javax.xml.transform.stream.StreamResult;
-import org.w3c.dom.*;
+import org.w3c.dom.Attr;
+import org.w3c.dom.DOMImplementation;
+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.w3c.dom.Text;
import org.w3c.dom.bootstrap.DOMImplementationRegistry;
import org.w3c.dom.ls.DOMImplementationLS;
import org.w3c.dom.ls.LSOutput;
import org.w3c.dom.ls.LSSerializer;
-
+import org.xml.sax.InputSource;
import org.xml.sax.SAXException;
import org.apache.cxf.common.logging.LogUtils;
@@ -74,6 +87,11 @@
public static DocumentBuilder getParser() throws
ParserConfigurationException {
return parserFactory.newDocumentBuilder();
+ }
+
+ public static Document parse(InputSource is) throws
ParserConfigurationException, SAXException,
+ IOException {
+ return getParser().parse(is.getSystemId());
}
public static Document parse(InputStream in) throws
ParserConfigurationException, SAXException,
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=540060&r1=540059&r2=540060
==============================================================================
---
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
Mon May 21 01:34:10 2007
@@ -119,7 +119,7 @@
public static final String CFG_SCHEMA_URL = "schemaURL";
public static final String CXF_SCHEMA_DIR = "cxf_schema_dir";
public static final String CXF_SCHEMAS_DIR_INJAR = "schemas/wsdl/";
-
+ public static final String CFG_SUPPRESS_WARNINGS = "suppressWarnings";
// WSDL2Java Processor Constants
Modified:
incubator/cxf/trunk/tools/common/src/main/java/org/apache/cxf/tools/common/ToolTestBase.java
URL:
http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/common/src/main/java/org/apache/cxf/tools/common/ToolTestBase.java?view=diff&rev=540060&r1=540059&r2=540060
==============================================================================
---
incubator/cxf/trunk/tools/common/src/main/java/org/apache/cxf/tools/common/ToolTestBase.java
(original)
+++
incubator/cxf/trunk/tools/common/src/main/java/org/apache/cxf/tools/common/ToolTestBase.java
Mon May 21 01:34:10 2007
@@ -22,11 +22,13 @@
import java.io.ByteArrayOutputStream;
import java.io.File;
import java.io.PrintStream;
-import junit.framework.TestCase;
import org.apache.cxf.helpers.FileUtils;
+import org.junit.After;
+import org.junit.Assert;
+import org.junit.Before;
-public abstract class ToolTestBase extends TestCase {
+public abstract class ToolTestBase extends Assert {
protected PrintStream oldStdErr;
protected PrintStream oldStdOut;
@@ -34,6 +36,7 @@
protected ByteArrayOutputStream errOut = new ByteArrayOutputStream();
protected ByteArrayOutputStream stdOut = new ByteArrayOutputStream();
+ @Before
public void setUp() {
oldStdErr = System.err;
oldStdOut = System.out;
@@ -41,7 +44,8 @@
System.setErr(new PrintStream(errOut));
System.setOut(new PrintStream(stdOut));
}
-
+
+ @After
public void tearDown() {
System.setErr(oldStdErr);
Modified:
incubator/cxf/trunk/tools/javato/src/test/java/org/apache/cxf/tools/java2wsdl/JavaToWSDLTest.java
URL:
http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/javato/src/test/java/org/apache/cxf/tools/java2wsdl/JavaToWSDLTest.java?view=diff&rev=540060&r1=540059&r2=540060
==============================================================================
---
incubator/cxf/trunk/tools/javato/src/test/java/org/apache/cxf/tools/java2wsdl/JavaToWSDLTest.java
(original)
+++
incubator/cxf/trunk/tools/javato/src/test/java/org/apache/cxf/tools/java2wsdl/JavaToWSDLTest.java
Mon May 21 01:34:10 2007
@@ -20,25 +20,31 @@
package org.apache.cxf.tools.java2wsdl;
import org.apache.cxf.tools.common.ToolTestBase;
+import org.junit.After;
+import org.junit.Test;
public class JavaToWSDLTest extends ToolTestBase {
+ @After
public void tearDown() {
super.tearDown();
}
+ @Test
public void testVersionOutput() throws Exception {
String[] args = new String[] {"-v"};
JavaToWSDL.main(args);
assertNotNull(getStdOut());
}
+ @Test
public void testHelpOutput() {
String[] args = new String[] {"-help"};
JavaToWSDL.main(args);
assertNotNull(getStdOut());
}
+ @Test
public void testNormalArgs() throws Exception {
System.err.println(getLocation("test.wsdl"));
String[] args = new String[] {"-o",
@@ -48,6 +54,7 @@
assertNotNull(getStdOut());
}
+ @Test
public void testBadUsage() {
String[] args = new String[] {"-ttt", "a.ww"};
JavaToWSDL.main(args);
@@ -55,6 +62,7 @@
}
+ @Test
public void testValidArgs() {
String[] args = new String[] {"a.ww"};
JavaToWSDL.main(args);
@@ -62,6 +70,7 @@
}
+ @Test
public void testNoOutPutFile() throws Exception {
String[] args = new String[] {"-o",
getLocation("nooutput.wsdl"),
@@ -69,7 +78,8 @@
JavaToWSDL.main(args);
assertNotNull(getStdOut());
}
-
+
+ @Test
public void testNoArg() {
String[] args = new String[] {};
JavaToWSDL.main(args);
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=540060&r1=540059&r2=540060
==============================================================================
---
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
Mon May 21 01:34:10 2007
@@ -31,7 +31,6 @@
import java.util.HashMap;
import java.util.List;
import java.util.Map;
-import java.util.Stack;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.wsdl.WSDLException;
@@ -51,7 +50,6 @@
import javax.xml.validation.Validator;
import org.w3c.dom.Document;
-import org.w3c.dom.Node;
import org.w3c.dom.ls.LSInput;
import org.w3c.dom.ls.LSResourceResolver;
import org.xml.sax.ErrorHandler;
@@ -61,7 +59,6 @@
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.ToolConstants;
import org.apache.cxf.tools.common.ToolException;
@@ -184,16 +181,6 @@
boolean isValid = false;
Schema schema;
try {
- Message msg = new Message("VALIDATE_WSDL", LOG,
wsdlsource.getSystemId());
- LOG.log(Level.INFO, msg.toString());
- Document document = docBuilder.parse(wsdlsource.getSystemId());
-
- Node node = DOMUtils.getChild(document, null);
- if (node != null && !"definitions".equals(node.getLocalName())) {
- msg = new Message("NOT_A_WSDLFILE", LOG,
wsdlsource.getSystemId());
- throw new ToolException(msg);
- }
-
SAXParserFactory saxFactory = SAXParserFactory.newInstance();
saxFactory.setFeature("http://xml.org/sax/features/namespaces",
true);
saxParser = saxFactory.newSAXParser();
@@ -229,36 +216,6 @@
def = reader.readWSDL(wsdlsource.getSystemId());
} catch (WSDLException e) {
throw new ToolException(e);
- }
-
- WSDLRefValidator wsdlRefValidator = new
WSDLRefValidator(wsdlsource.getSystemId(), document);
- isValid = wsdlRefValidator.isValid();
-
- if (!isValid) {
- StringBuffer sb = new StringBuffer();
- sb.append(wsdlRefValidator.getClass().getName());
- sb.append("\n Summary: ");
- sb.append(" Failures: ");
- Stack<String> errors =
wsdlRefValidator.getValidationResults().getErrors();
- sb.append(errors.size());
- Stack<String> warnings =
wsdlRefValidator.getValidationResults().getWarnings();
- sb.append(", Warnings: ");
- sb.append(warnings.size());
- if (errors.size() > 0) {
- sb.append("\n\n <<< ERROR! \n");
- while (!errors.empty()) {
- sb.append(errors.pop());
- sb.append("\n");
- }
- }
- if (warnings.size() > 0) {
- sb.append("\n <<< WARNING! \n");
- while (!warnings.empty()) {
- sb.append(warnings.pop());
- sb.append("\n");
- }
- }
- throw new ToolException(sb.toString());
}
isValid = true;
Modified:
incubator/cxf/trunk/tools/validator/src/main/java/org/apache/cxf/tools/validator/internal/ValidationResult.java
URL:
http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/validator/src/main/java/org/apache/cxf/tools/validator/internal/ValidationResult.java?view=diff&rev=540060&r1=540059&r2=540060
==============================================================================
---
incubator/cxf/trunk/tools/validator/src/main/java/org/apache/cxf/tools/validator/internal/ValidationResult.java
(original)
+++
incubator/cxf/trunk/tools/validator/src/main/java/org/apache/cxf/tools/validator/internal/ValidationResult.java
Mon May 21 01:34:10 2007
@@ -56,6 +56,30 @@
}
public boolean isSuccessful() {
- return errors.size() == 0;
+ return errors.size() == 0 && warnings.size() == 0;
}
+
+ public String toString() {
+ StringBuffer sb = new StringBuffer();
+ sb.append("\n Summary: ");
+ sb.append(" Failures: ");
+ sb.append(errors.size());
+ sb.append(", Warnings: ");
+ sb.append(warnings.size());
+ if (errors.size() > 0) {
+ sb.append("\n\n <<< ERROR! \n");
+ while (!errors.empty()) {
+ sb.append(errors.pop());
+ sb.append("\n");
+ }
+ }
+ if (warnings.size() > 0) {
+ sb.append("\n <<< WARNING! \n");
+ while (!warnings.empty()) {
+ sb.append(warnings.pop());
+ sb.append("\n");
+ }
+ }
+ return sb.toString();
+ }
}
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=540060&r1=540059&r2=540060
==============================================================================
---
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
Mon May 21 01:34:10 2007
@@ -33,18 +33,25 @@
import java.util.List;
import java.util.jar.JarEntry;
import java.util.jar.JarFile;
+import java.util.logging.Level;
+import java.util.logging.Logger;
import javax.wsdl.Definition;
+import org.w3c.dom.Document;
import org.xml.sax.InputSource;
+import org.apache.cxf.common.i18n.Message;
+import org.apache.cxf.common.logging.LogUtils;
import org.apache.cxf.common.util.StringUtils;
+import org.apache.cxf.helpers.XMLUtils;
import org.apache.cxf.resource.URIResolver;
import org.apache.cxf.tools.common.ToolConstants;
import org.apache.cxf.tools.common.ToolContext;
import org.apache.cxf.tools.common.ToolException;
+import org.apache.cxf.tools.util.URIParserUtil;
public class WSDL11Validator extends AbstractDefinitionValidator {
-
+ protected static final Logger LOG =
LogUtils.getL7dLogger(SchemaValidator.class);
private final List<AbstractValidator> validators = new
ArrayList<AbstractValidator>();
public WSDL11Validator(Definition definition) {
@@ -55,6 +62,15 @@
super(definition, pe);
}
+ private Document getWSDLDoc(String wsdl) {
+ LOG.log(Level.INFO, new Message("VALIDATE_WSDL", LOG,
wsdl).toString());
+ try {
+ return XMLUtils.parse(new
InputSource(URIParserUtil.getAbsoluteURI(wsdl)));
+ } catch (Exception e) {
+ throw new ToolException(e);
+ }
+ }
+
public boolean isValid() throws ToolException {
//boolean isValid = true;
String schemaDir = getSchemaDir();
@@ -64,26 +80,14 @@
// 1.ToolConstants.CFG_SCHEMA_DIR from ToolContext
// 2.ToolConstants.CXF_SCHEMA_DIR from System property
// 3.If 1 and 2 is null , then load these schema files from jar file
- if (!StringUtils.isEmpty(schemaDir)) {
- schemaValidator = new SchemaValidator(schemaDir,
(String)env.get(ToolConstants.CFG_WSDLURL),
- schemas);
- } else {
- try {
- schemaValidator = new SchemaValidator(getDefaultSchemas(),
(String)env
- .get(ToolConstants.CFG_WSDLURL), schemas);
- } catch (IOException e) {
- throw new ToolException("Schemas can not be loaded before
validating wsdl", e);
- }
+ String wsdl = (String)env.get(ToolConstants.CFG_WSDLURL);
- }
- if (!schemaValidator.isValid()) {
- this.addErrorMessage(schemaValidator.getErrorMessage());
- throw new ToolException(this.getErrorMessage());
+ WSDLRefValidator wsdlRefValidator = new WSDLRefValidator(wsdl,
getWSDLDoc(wsdl));
+
wsdlRefValidator.setSuppressWarnings(env.optionSet(ToolConstants.CFG_SUPPRESS_WARNINGS));
- } else {
- this.def = schemaValidator.def;
- }
+ this.def = wsdlRefValidator.getDefinition();
+ validators.add(wsdlRefValidator);
validators.add(new UniqueBodyPartsValidator(this.def));
validators.add(new WSIBPValidator(this.def));
validators.add(new MIMEBindingValidator(this.def));
@@ -94,6 +98,23 @@
throw new ToolException(this.getErrorMessage());
}
}
+
+ if (!StringUtils.isEmpty(schemaDir)) {
+ schemaValidator = new SchemaValidator(schemaDir, wsdl, schemas);
+ } else {
+ try {
+ schemaValidator = new SchemaValidator(getDefaultSchemas(),
wsdl, schemas);
+ } catch (IOException e) {
+ throw new ToolException("Schemas can not be loaded before
validating wsdl", e);
+ }
+
+ }
+ if (!schemaValidator.isValid()) {
+ this.addErrorMessage(schemaValidator.getErrorMessage());
+ throw new ToolException(this.getErrorMessage());
+
+ }
+
return true;
}
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=540060&r1=540059&r2=540060
==============================================================================
---
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
Mon May 21 01:34:10 2007
@@ -40,6 +40,7 @@
import javax.wsdl.Port;
import javax.wsdl.PortType;
import javax.wsdl.Service;
+import javax.wsdl.WSDLException;
import javax.xml.namespace.QName;
import javax.xml.stream.Location;
import javax.xml.xpath.XPathConstants;
@@ -71,8 +72,7 @@
import org.apache.ws.commons.schema.XmlSchemaElement;
import org.apache.ws.commons.schema.XmlSchemaType;
-
-public class WSDLRefValidator {
+public class WSDLRefValidator extends AbstractValidator {
protected static final Logger LOG =
LogUtils.getL7dLogger(WSDLRefValidator.class);
protected List<XNode> vNodes = new ArrayList<XNode>();
@@ -87,6 +87,8 @@
private List<XmlSchemaCollection> schemas;
private XmlSchemaCollection schemaCollection = new XmlSchemaCollection();
+ private boolean suppressWarnings;
+
public WSDLRefValidator() {
}
@@ -104,6 +106,9 @@
importedDefinitions.addAll(wsdlBuilder.getImportedDefinitions());
}
} catch (Exception e) {
+ if (e.getCause() instanceof WSDLException) {
+ throw new ToolException(e.getCause().getMessage());
+ }
throw new ToolException(e);
}
@@ -117,6 +122,10 @@
}
}
+ public void setSuppressWarnings(boolean s) {
+ this.suppressWarnings = s;
+ }
+
public ValidationResult getValidationResults() {
return this.vResults;
}
@@ -184,7 +193,6 @@
collectValidationPoints();
List<Document> wsdlDocs = getWSDLDocuments();
-
for (XNode vNode : vNodes) {
if (!isExist(wsdlDocs, vNode)) {
@@ -325,9 +333,17 @@
return mNode;
}
+ private void addWarning(String warningMsg) {
+ if (suppressWarnings) {
+ return;
+ }
+ vResults.addWarning(warningMsg);
+ }
+
+ @SuppressWarnings("unchecked")
private void collectValidationPoints() {
if (getServices().size() == 0) {
- vResults.addWarning("WSDL document does not define any services");
+ addWarning("WSDL document does not define any services");
portTypeRefNames.addAll(this.definition.getAllPortTypes().keySet());
} else {
collectValidationPointsForBindings();
@@ -415,19 +431,14 @@
}
if (typeName != null && elementName == null) {
-
boolean valid =
validatePartType(typeName.getNamespaceURI(),
typeName.getLocalPart(),
false);
-
if (!valid) {
vResults.addError(new Message("TYPE_REF_NOT_FOUND",
LOG, message.getQName(),
part.getName(),
typeName));
}
-
}
-
-
}
}
}
@@ -440,8 +451,8 @@
XNode vOperationNode = getOperationXNode(vPortTypeNode,
operation.getName());
javax.wsdl.Message inMsg = operation.getInput().getMessage();
if (inMsg == null) {
- vResults.addWarning("Operation " + operation.getName() + "
in PortType: "
- + portType.getQName() + " has no input
message");
+ addWarning("Operation " + operation.getName() + " in
PortType: "
+ + portType.getQName() + " has no input
message");
} else {
XNode vInMsgNode = getXNode(inMsg);
vInMsgNode.setFailurePoint(getInputXNode(vOperationNode,
operation.getInput().getName()));
@@ -453,8 +464,8 @@
javax.wsdl.Message outMsg =
operation.getOutput().getMessage();
if (outMsg == null) {
- vResults.addWarning("Operation " + operation.getName()
+ " in PortType: "
- + portType.getQName() + " has no
output message");
+ addWarning("Operation " + operation.getName() + " in
PortType: "
+ + portType.getQName() + " has no output
message");
} else {
XNode vOutMsgNode = getXNode(outMsg);
vOutMsgNode.setFailurePoint(getOutputXNode(vOperationNode,
@@ -510,5 +521,13 @@
}
}
return partvalid;
- }
+ }
+
+ public String getErrorMessage() {
+ return vResults.toString();
+ }
+
+ public Definition getDefinition() {
+ return this.definition;
+ }
}
Modified:
incubator/cxf/trunk/tools/validator/src/main/java/org/apache/cxf/tools/validator/wsdlvalidator.xml
URL:
http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/validator/src/main/java/org/apache/cxf/tools/validator/wsdlvalidator.xml?view=diff&rev=540060&r1=540059&r2=540060
==============================================================================
---
incubator/cxf/trunk/tools/validator/src/main/java/org/apache/cxf/tools/validator/wsdlvalidator.xml
(original)
+++
incubator/cxf/trunk/tools/validator/src/main/java/org/apache/cxf/tools/validator/wsdlvalidator.xml
Mon May 21 01:34:10 2007
@@ -52,6 +52,14 @@
<annotation>schema-url</annotation>
</associatedArgument>
</option>
+
+ <option id="suppressWarnings">
+ <annotation>
+ Suppress warnings
+ </annotation>
+ <switch>w</switch>
+ </option>
+
<!--option id="deep" maxOccurs="1">
<annotation>Deep level validation like wsdl imports
validation and wsdl semantics check.</annotation>
Modified:
incubator/cxf/trunk/tools/validator/src/test/java/org/apache/cxf/tools/validator/WSDLValidationTest.java
URL:
http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/validator/src/test/java/org/apache/cxf/tools/validator/WSDLValidationTest.java?view=diff&rev=540060&r1=540059&r2=540060
==============================================================================
---
incubator/cxf/trunk/tools/validator/src/test/java/org/apache/cxf/tools/validator/WSDLValidationTest.java
(original)
+++
incubator/cxf/trunk/tools/validator/src/test/java/org/apache/cxf/tools/validator/WSDLValidationTest.java
Mon May 21 01:34:10 2007
@@ -23,12 +23,16 @@
import java.util.Enumeration;
import org.apache.cxf.tools.common.ToolTestBase;
+import org.junit.Before;
+import org.junit.Test;
public class WSDLValidationTest extends ToolTestBase {
+ @Before
public void setUp() {
super.setUp();
}
+ @Test
public void testValidateUniqueBody() {
try {
@@ -41,6 +45,7 @@
}
}
+ @Test
public void testValidateMixedStyle() {
try {
@@ -54,7 +59,8 @@
e.printStackTrace();
}
}
-
+
+ @Test
public void testValidateTypeElement() {
try {
@@ -68,20 +74,25 @@
}
}
+ @Test
public void testValidateAttribute() {
try {
String[] args = new String[] {"-verbose",
getLocation("/validator_wsdl/hello_world_error_attribute.wsdl")};
WSDLValidator.main(args);
+ String expected = "WSDLException (at
/wsdl:definitions/wsdl:message[1]/wsdl:part): "
+ + "faultCode=INVALID_WSDL: Encountered illegal extension
attribute 'test'. "
+ + "Extension attributes must be in a namespace other than
WSDL's";
assertTrue("Attribute error should be discovered: " + getStdErr(),
- getStdErr().indexOf(" is not allowed to appear in
element") > -1);
+ getStdErr().indexOf(expected) > -1);
} catch (Exception e) {
e.printStackTrace();
}
}
+ @Test
public void testValidateReferenceError() throws Exception {
try {
@@ -96,21 +107,23 @@
e.printStackTrace();
}
}
-
+
+ @Test
public void testBug305872() throws Exception {
try {
String[] args = new String[] {"-verbose",
getLocation("/validator_wsdl/bug305872/http.xsd")};
WSDLValidator.main(args);
-
+ String expected = "Expected element
'{http://schemas.xmlsoap.org/wsdl/}definitions'.";
assertTrue("Tools should check if this file is a wsdl file: " +
getStdErr(),
- getStdErr().indexOf("is not a wsdl file") > -1);
+ getStdErr().indexOf(expected) > -1);
} catch (Exception e) {
e.printStackTrace();
}
}
+ @Test
public void testImportWsdlValidation() throws Exception {
try {
String[] args = new String[] {"-verbose",
@@ -125,6 +138,7 @@
}
+ @Test
public void testImportSchemaValidation() throws Exception {
try {
String[] args = new String[] {"-verbose",
@@ -139,6 +153,7 @@
}
+ @Test
public void testWSIBP2210() throws Exception {
try {
String[] args = new String[] {"-verbose",
@@ -150,6 +165,7 @@
}
}
+ @Test
public void testWSIBPR2726() throws Exception {
try {
String[] args = new String[] {"-verbose",
@@ -161,6 +177,7 @@
}
}
+ @Test
public void testWSIBPR2205() throws Exception {
try {
String[] args = new String[] {"-verbose",
@@ -172,6 +189,7 @@
}
}
+ @Override
protected String getLocation(String wsdlFile) throws Exception {
Enumeration<URL> e =
WSDLValidationTest.class.getClassLoader().getResources(wsdlFile);
while (e.hasMoreElements()) {
Modified:
incubator/cxf/trunk/tools/validator/src/test/java/org/apache/cxf/tools/validator/internal/Stax2DOMTest.java
URL:
http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/validator/src/test/java/org/apache/cxf/tools/validator/internal/Stax2DOMTest.java?view=diff&rev=540060&r1=540059&r2=540060
==============================================================================
---
incubator/cxf/trunk/tools/validator/src/test/java/org/apache/cxf/tools/validator/internal/Stax2DOMTest.java
(original)
+++
incubator/cxf/trunk/tools/validator/src/test/java/org/apache/cxf/tools/validator/internal/Stax2DOMTest.java
Mon May 21 01:34:10 2007
@@ -23,11 +23,13 @@
import org.w3c.dom.Document;
-import junit.framework.TestCase;
import org.apache.cxf.helpers.XMLUtils;
+import org.junit.Assert;
+import org.junit.Test;
-public class Stax2DOMTest extends TestCase {
+public class Stax2DOMTest extends Assert {
+ @Test
public void testGetDocument() throws Exception {
File wsdl = new
File(getClass().getResource("/validator_wsdl/jms_test.wsdl").toURI());
Document doc = new Stax2DOM().getDocument(wsdl);
Modified:
incubator/cxf/trunk/tools/validator/src/test/java/org/apache/cxf/tools/validator/internal/WSDL11ValidatorTest.java
URL:
http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/validator/src/test/java/org/apache/cxf/tools/validator/internal/WSDL11ValidatorTest.java?view=diff&rev=540060&r1=540059&r2=540060
==============================================================================
---
incubator/cxf/trunk/tools/validator/src/test/java/org/apache/cxf/tools/validator/internal/WSDL11ValidatorTest.java
(original)
+++
incubator/cxf/trunk/tools/validator/src/test/java/org/apache/cxf/tools/validator/internal/WSDL11ValidatorTest.java
Mon May 21 01:34:10 2007
@@ -19,12 +19,12 @@
package org.apache.cxf.tools.validator.internal;
-import junit.framework.TestCase;
import org.apache.cxf.tools.common.ToolConstants;
import org.apache.cxf.tools.common.ToolContext;
+import org.junit.Assert;
import org.junit.Test;
-public class WSDL11ValidatorTest extends TestCase {
+public class WSDL11ValidatorTest extends Assert {
private ToolContext context = new ToolContext();
@Test
Modified:
incubator/cxf/trunk/tools/validator/src/test/java/org/apache/cxf/tools/validator/internal/WSDLRefValidatorTest.java
URL:
http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/validator/src/test/java/org/apache/cxf/tools/validator/internal/WSDLRefValidatorTest.java?view=diff&rev=540060&r1=540059&r2=540060
==============================================================================
---
incubator/cxf/trunk/tools/validator/src/test/java/org/apache/cxf/tools/validator/internal/WSDLRefValidatorTest.java
(original)
+++
incubator/cxf/trunk/tools/validator/src/test/java/org/apache/cxf/tools/validator/internal/WSDLRefValidatorTest.java
Mon May 21 01:34:10 2007
@@ -23,12 +23,13 @@
import java.util.HashSet;
import java.util.Set;
-import junit.framework.TestCase;
import org.apache.cxf.common.i18n.Message;
+import org.apache.cxf.tools.common.ToolException;
import org.apache.cxf.tools.validator.internal.model.XNode;
+import org.junit.Assert;
import org.junit.Test;
-public class WSDLRefValidatorTest extends TestCase {
+public class WSDLRefValidatorTest extends Assert {
@Test
public void testNoService() throws Exception {
@@ -52,7 +53,7 @@
String text =
"{http://apache.org/hello_world/messages}[portType:GreeterA][operation:sayHi]";
Message msg = new Message("FAILED_AT_POINT",
WSDLRefValidator.LOG,
- 8,
+ 27,
2,
new File(new java.net.URI(wsdl)).toString(),
text);
@@ -103,14 +104,40 @@
String t = results.getWarnings().pop();
assertEquals("WSDL document does not define any services", t);
+ WSDLRefValidator v = new WSDLRefValidator(wsdl);
+ v.setSuppressWarnings(true);
+ assertTrue(v.isValid());
+ }
+
+ @Test
+ public void testLogicalWSDL() throws Exception {
+ String wsdl =
getClass().getResource("resources/logical.wsdl").toURI().toString();
+ WSDLRefValidator validator = new WSDLRefValidator(wsdl);
+ validator.isValid();
+ ValidationResult results = validator.getValidationResults();
+
assertEquals(1, results.getErrors().size());
String text =
"{http://schemas.apache.org/yoko/idl/OptionsPT}[message:getEmployee]";
Message msg = new Message("FAILED_AT_POINT",
WSDLRefValidator.LOG,
- 23,
+ 42,
6,
new File(new java.net.URI(wsdl)).toString(),
text);
assertEquals(msg.toString(), results.getErrors().pop());
+ }
+
+ @Test
+ public void testNotAWsdl() throws Exception {
+ String wsdl =
getClass().getResource("resources/c.xsd").toURI().toString();
+ try {
+ WSDLRefValidator validator = new WSDLRefValidator(wsdl);
+ validator.isValid();
+ } catch (Exception e) {
+ assertTrue(e instanceof ToolException);
+ String expected = "WSDLException (at /xs:schema):
faultCode=INVALID_WSDL: "
+ + "Expected element
'{http://schemas.xmlsoap.org/wsdl/}definitions'.";
+ assertEquals(expected, e.getMessage());
+ }
}
}
Modified:
incubator/cxf/trunk/tools/validator/src/test/java/org/apache/cxf/tools/validator/internal/model/XNodeTest.java
URL:
http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/validator/src/test/java/org/apache/cxf/tools/validator/internal/model/XNodeTest.java?view=diff&rev=540060&r1=540059&r2=540060
==============================================================================
---
incubator/cxf/trunk/tools/validator/src/test/java/org/apache/cxf/tools/validator/internal/model/XNodeTest.java
(original)
+++
incubator/cxf/trunk/tools/validator/src/test/java/org/apache/cxf/tools/validator/internal/model/XNodeTest.java
Mon May 21 01:34:10 2007
@@ -19,10 +19,18 @@
package org.apache.cxf.tools.validator.internal.model;
-import junit.framework.TestCase;
import org.apache.cxf.tools.common.WSDLConstants;
+import org.junit.Assert;
+import org.junit.Test;
-public class XNodeTest extends TestCase {
+public class XNodeTest extends Assert {
+ @Test
+ public void testWSDLDefinition() {
+ XDef def = new XDef();
+ assertEquals("/wsdl:definitions", def.toString());
+ }
+
+ @Test
public void testGetXPath() {
XNode node = new XNode();
node.setQName(WSDLConstants.QNAME_BINDING);
@@ -33,6 +41,7 @@
assertEquals("[binding:SOAPBinding]", node.getPlainText());
}
+ @Test
public void testParentNode() {
XDef definition = new XDef();
String ns = "{http://apache.org/hello_world/messages}";
Modified:
incubator/cxf/trunk/tools/validator/src/test/java/org/apache/cxf/tools/validator/internal/resources/a.wsdl
URL:
http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/validator/src/test/java/org/apache/cxf/tools/validator/internal/resources/a.wsdl?view=diff&rev=540060&r1=540059&r2=540060
==============================================================================
---
incubator/cxf/trunk/tools/validator/src/test/java/org/apache/cxf/tools/validator/internal/resources/a.wsdl
(original)
+++
incubator/cxf/trunk/tools/validator/src/test/java/org/apache/cxf/tools/validator/internal/resources/a.wsdl
Mon May 21 01:34:10 2007
@@ -1,4 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+
<wsdl:definitions name="HelloWorldImport"
xmlns="http://schemas.xmlsoap.org/wsdl/"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:tns="http://apache.org/hello_world"
xmlns:x1="http://apache.org/hello_world/messages"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
targetNamespace="http://apache.org/hello_world">
<wsdl:import namespace="http://apache.org/hello_world/messages"
location="b.wsdl"/>
Modified:
incubator/cxf/trunk/tools/validator/src/test/java/org/apache/cxf/tools/validator/internal/resources/c.xsd
URL:
http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/validator/src/test/java/org/apache/cxf/tools/validator/internal/resources/c.xsd?view=diff&rev=540060&r1=540059&r2=540060
==============================================================================
---
incubator/cxf/trunk/tools/validator/src/test/java/org/apache/cxf/tools/validator/internal/resources/c.xsd
(original)
+++
incubator/cxf/trunk/tools/validator/src/test/java/org/apache/cxf/tools/validator/internal/resources/c.xsd
Mon May 21 01:34:10 2007
@@ -1,4 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+
<xs:schema attributeFormDefault="unqualified"
elementFormDefault="unqualified"
targetNamespace="http://apache.org/hello_world/types"
Added:
incubator/cxf/trunk/tools/validator/src/test/java/org/apache/cxf/tools/validator/internal/resources/logical.wsdl
URL:
http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/validator/src/test/java/org/apache/cxf/tools/validator/internal/resources/logical.wsdl?view=auto&rev=540060
==============================================================================
---
incubator/cxf/trunk/tools/validator/src/test/java/org/apache/cxf/tools/validator/internal/resources/logical.wsdl
(added)
+++
incubator/cxf/trunk/tools/validator/src/test/java/org/apache/cxf/tools/validator/internal/resources/logical.wsdl
Mon May 21 01:34:10 2007
@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+
+<wsdl:definitions
targetNamespace="http://schemas.apache.org/yoko/idl/OptionsPT"
+ xmlns:tns="http://schemas.apache.org/yoko/idl/OptionsPT"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
+
xmlns:xsd1="http://schemas.apache.org/yoko/idl/OptionsPT-types"
+ xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
+ <wsdl:types>
+ <xsd:schema>
+ <xsd:import
namespace="http://schemas.apache.org/yoko/idl/OptionsPT-types"
schemaLocation="schemapt.xsd"/>
+ </xsd:schema>
+ </wsdl:types>
+ <wsdl:message name="getEmployeeA">
+ <wsdl:part name="inparameter" element="xsd1:getEmployee">
+ </wsdl:part>
+ </wsdl:message>
+ <wsdl:message name="getEmployeeResponse">
+ <wsdl:part name="outparameter" element="xsd1:getEmployeeResponse">
+ </wsdl:part>
+ </wsdl:message>
+ <wsdl:portType name="foo.bar">
+ <wsdl:operation name="getEmployee">
+ <wsdl:input name="getEmployeeRequest" message="tns:getEmployee">
+ </wsdl:input>
+ <wsdl:output name="getEmployeeResponse"
message="tns:getEmployeeResponse">
+ </wsdl:output>
+ </wsdl:operation>
+ </wsdl:portType>
+</wsdl:definitions>
\ No newline at end of file
Modified:
incubator/cxf/trunk/tools/validator/src/test/java/org/apache/cxf/tools/validator/internal/resources/nobinding.wsdl
URL:
http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/validator/src/test/java/org/apache/cxf/tools/validator/internal/resources/nobinding.wsdl?view=diff&rev=540060&r1=540059&r2=540060
==============================================================================
---
incubator/cxf/trunk/tools/validator/src/test/java/org/apache/cxf/tools/validator/internal/resources/nobinding.wsdl
(original)
+++
incubator/cxf/trunk/tools/validator/src/test/java/org/apache/cxf/tools/validator/internal/resources/nobinding.wsdl
Mon May 21 01:34:10 2007
@@ -1,4 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+
<wsdl:definitions
targetNamespace="http://schemas.apache.org/yoko/idl/OptionsPT"
xmlns:tns="http://schemas.apache.org/yoko/idl/OptionsPT"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
@@ -10,7 +29,7 @@
<xsd:import
namespace="http://schemas.apache.org/yoko/idl/OptionsPT-types"
schemaLocation="schemapt.xsd"/>
</xsd:schema>
</wsdl:types>
- <wsdl:message name="getEmployeeA">
+ <wsdl:message name="getEmployee">
<wsdl:part name="inparameter" element="xsd1:getEmployee">
</wsdl:part>
</wsdl:message>
Modified:
incubator/cxf/trunk/tools/validator/src/test/java/org/apache/cxf/tools/validator/internal/resources/optionspt.wsdl
URL:
http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/validator/src/test/java/org/apache/cxf/tools/validator/internal/resources/optionspt.wsdl?view=diff&rev=540060&r1=540059&r2=540060
==============================================================================
---
incubator/cxf/trunk/tools/validator/src/test/java/org/apache/cxf/tools/validator/internal/resources/optionspt.wsdl
(original)
+++
incubator/cxf/trunk/tools/validator/src/test/java/org/apache/cxf/tools/validator/internal/resources/optionspt.wsdl
Mon May 21 01:34:10 2007
@@ -1,4 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+
<wsdl:definitions
targetNamespace="http://schemas.apache.org/yoko/idl/OptionsPT"
xmlns:tns="http://schemas.apache.org/yoko/idl/OptionsPT"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
Modified:
incubator/cxf/trunk/tools/validator/src/test/java/org/apache/cxf/tools/validator/internal/resources/physicalpt.wsdl
URL:
http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/validator/src/test/java/org/apache/cxf/tools/validator/internal/resources/physicalpt.wsdl?view=diff&rev=540060&r1=540059&r2=540060
==============================================================================
---
incubator/cxf/trunk/tools/validator/src/test/java/org/apache/cxf/tools/validator/internal/resources/physicalpt.wsdl
(original)
+++
incubator/cxf/trunk/tools/validator/src/test/java/org/apache/cxf/tools/validator/internal/resources/physicalpt.wsdl
Mon May 21 01:34:10 2007
@@ -1,4 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+
<wsdl:definitions
targetNamespace="http://schemas.apache.org/yoko/idl/OptionsPT"
xmlns:tns="http://schemas.apache.org/yoko/idl/OptionsPT"
xmlns:corba="http://schemas.apache.org/yoko/bindings/corba"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
Modified:
incubator/cxf/trunk/tools/validator/src/test/java/org/apache/cxf/tools/validator/internal/resources/schemapt.xsd
URL:
http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/validator/src/test/java/org/apache/cxf/tools/validator/internal/resources/schemapt.xsd?view=diff&rev=540060&r1=540059&r2=540060
==============================================================================
---
incubator/cxf/trunk/tools/validator/src/test/java/org/apache/cxf/tools/validator/internal/resources/schemapt.xsd
(original)
+++
incubator/cxf/trunk/tools/validator/src/test/java/org/apache/cxf/tools/validator/internal/resources/schemapt.xsd
Mon May 21 01:34:10 2007
@@ -1,4 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+
<xs:schema attributeFormDefault="unqualified" elementFormDefault="unqualified"
targetNamespace="http://schemas.apache.org/yoko/idl/OptionsPT-types"
xmlns:tns="http://schemas.apache.org/yoko/idl/OptionsPT-types"
xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:complexType name="foo.bar.Employee">
<xs:sequence>