diff options
author | lmandel | 2005-11-30 05:08:50 +0000 |
---|---|---|
committer | lmandel | 2005-11-30 05:08:50 +0000 |
commit | 573dc5780ae8633891f9b0c35ff3a6a79b43ba65 (patch) | |
tree | 7b8bd3e61b586b3666417bfb10fb961aed1a6711 /tests/org.eclipse.wst.wsdl.validation.tests | |
parent | c14a03c126374b06581598be9a546d98bd9c5447 (diff) | |
download | webtools.webservices-573dc5780ae8633891f9b0c35ff3a6a79b43ba65.tar.gz webtools.webservices-573dc5780ae8633891f9b0c35ff3a6a79b43ba65.tar.xz webtools.webservices-573dc5780ae8633891f9b0c35ff3a6a79b43ba65.zip |
[115337] Removed default behaviour of allowing cross inline schema references with no import statement.
Diffstat (limited to 'tests/org.eclipse.wst.wsdl.validation.tests')
5 files changed, 53 insertions, 1 deletions
diff --git a/tests/org.eclipse.wst.wsdl.validation.tests/src/org/eclipse/wst/wsdl/validation/tests/internal/XSDTest.java b/tests/org.eclipse.wst.wsdl.validation.tests/src/org/eclipse/wst/wsdl/validation/tests/internal/XSDTest.java index 9fca5c413..a3fbd97ba 100644 --- a/tests/org.eclipse.wst.wsdl.validation.tests/src/org/eclipse/wst/wsdl/validation/tests/internal/XSDTest.java +++ b/tests/org.eclipse.wst.wsdl.validation.tests/src/org/eclipse/wst/wsdl/validation/tests/internal/XSDTest.java @@ -78,6 +78,19 @@ public class XSDTest extends BaseTestCase } /** + * Test /XSD/ReferToAnotherInlineType/ReferToAnotherInlineTypeNoImport.wsdl + */ + public void testReferToAnotherInlineTypeNoImport() + { + String testname = "ReferToAnotherInlineTypeNoImport"; + String testfile = FILE_PROTOCOL + PLUGIN_ABSOLUTE_PATH + SAMPLES_DIR + XSD_DIR + "ReferToAnotherInlineType/" + testname + ".wsdl"; + String loglocation = PLUGIN_ABSOLUTE_PATH + GENERATED_RESULTS_DIR + XSD_DIR + "ReferToAnotherInlineType/" + testname + ".wsdl-log"; + String idealloglocation = PLUGIN_ABSOLUTE_PATH + IDEAL_RESULTS_DIR + XSD_DIR + "ReferToAnotherInlineType/" + testname + ".wsdl-log"; + + runTest(testfile, loglocation, idealloglocation); + } + + /** * Test /XSD/InlineSchemaGeneratedImports/NoImportForUnprefixedAttribute.wsdl */ public void testNoImportForUnprefixedAttribute() diff --git a/tests/org.eclipse.wst.wsdl.validation.tests/testresources/idealResults/XSD/ReferToAnotherInlineType/ReferToAnotherInlineTypeNoImport.wsdl-log b/tests/org.eclipse.wst.wsdl.validation.tests/testresources/idealResults/XSD/ReferToAnotherInlineType/ReferToAnotherInlineTypeNoImport.wsdl-log new file mode 100644 index 000000000..ea8818836 --- /dev/null +++ b/tests/org.eclipse.wst.wsdl.validation.tests/testresources/idealResults/XSD/ReferToAnotherInlineType/ReferToAnotherInlineTypeNoImport.wsdl-log @@ -0,0 +1,9 @@ +number of errors : 2 +number of warnings : 0 + +------------error list------------------------------------------- +src-resolve.4.2: Error resolving component 'two:NewSimpleType'. It was detected that 'two:NewSimpleType' is in namespace 'http://tempuri.org/ReferToAnotherInlineType2/', but components from this namespace are not referenceable from schema document 'testresources/samples/XSD/ReferToAnotherInlineType/ReferToAnotherInlineTypeNoImport.wsdl'. If this is the incorrect namespace, perhaps the prefix of 'two:NewSimpleType' needs to be changed. If this is the correct namespace, then an appropriate 'import' tag should be added to 'testresources/samples/XSD/ReferToAnotherInlineType/ReferToAnotherInlineTypeNoImport.wsdl'. [13, 67] +src-resolve.4.2: Error resolving component 'one:NewSimpleType'. It was detected that 'one:NewSimpleType' is in namespace 'http://tempuri.org/ReferToAnotherInlineType1/', but components from this namespace are not referenceable from schema document 'testresources/samples/XSD/ReferToAnotherInlineType/ReferToAnotherInlineTypeNoImport.wsdl'. If this is the incorrect namespace, perhaps the prefix of 'one:NewSimpleType' needs to be changed. If this is the correct namespace, then an appropriate 'import' tag should be added to 'testresources/samples/XSD/ReferToAnotherInlineType/ReferToAnotherInlineTypeNoImport.wsdl'. [24, 67] +------------warning list----------------------------------------- +(none) +----------------------------------------------------------------- diff --git a/tests/org.eclipse.wst.wsdl.validation.tests/testresources/samples/XSD/OneErrorForInlineXSDRefInvalidInlineXSD/OneErrorForInlineXSDRefInvalidInlineXSD.wsdl b/tests/org.eclipse.wst.wsdl.validation.tests/testresources/samples/XSD/OneErrorForInlineXSDRefInvalidInlineXSD/OneErrorForInlineXSDRefInvalidInlineXSD.wsdl index 54a54dea1..5833d75a4 100644 --- a/tests/org.eclipse.wst.wsdl.validation.tests/testresources/samples/XSD/OneErrorForInlineXSDRefInvalidInlineXSD/OneErrorForInlineXSDRefInvalidInlineXSD.wsdl +++ b/tests/org.eclipse.wst.wsdl.validation.tests/testresources/samples/XSD/OneErrorForInlineXSDRefInvalidInlineXSD/OneErrorForInlineXSDRefInvalidInlineXSD.wsdl @@ -9,6 +9,7 @@ <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" targetNamespace="http://tempuri.org/OneErrorForInlineXSDRefInvalidInlineXSD/2"> + <xsd:import namespace="http://tempuri.org/OneErrorForInlineXSDRefInvalidInlineXSD/1"/> <xsd:complexType name="NewComplexType"> <xsd:sequence> <xsd:element ref="xsd1:NewGlobalElement"></xsd:element> diff --git a/tests/org.eclipse.wst.wsdl.validation.tests/testresources/samples/XSD/ReferToAnotherInlineType/ReferToAnotherInlineType.wsdl b/tests/org.eclipse.wst.wsdl.validation.tests/testresources/samples/XSD/ReferToAnotherInlineType/ReferToAnotherInlineType.wsdl index 9598fdac5..1f2d91580 100644 --- a/tests/org.eclipse.wst.wsdl.validation.tests/testresources/samples/XSD/ReferToAnotherInlineType/ReferToAnotherInlineType.wsdl +++ b/tests/org.eclipse.wst.wsdl.validation.tests/testresources/samples/XSD/ReferToAnotherInlineType/ReferToAnotherInlineType.wsdl @@ -5,6 +5,7 @@ elementFormDefault="qualified" targetNamespace="http://tempuri.org/ReferToAnotherInlineType1/" xmlns:two="http://tempuri.org/ReferToAnotherInlineType2/"> + <xsd:import namespace="http://tempuri.org/ReferToAnotherInlineType2/"/> <xsd:simpleType name="NewSimpleType"> <xsd:restriction base="xsd:string"> <xsd:minLength value="1"/> @@ -16,6 +17,7 @@ elementFormDefault="qualified" targetNamespace="http://tempuri.org/ReferToAnotherInlineType2/" xmlns:one="http://tempuri.org/ReferToAnotherInlineType1/"> + <xsd:import namespace="http://tempuri.org/ReferToAnotherInlineType1/"/> <xsd:simpleType name="NewSimpleType"> <xsd:restriction base="xsd:string"> <xsd:minLength value="1"/> @@ -24,4 +26,4 @@ <xsd:element name="NewGlobalElement" type="one:NewSimpleType"></xsd:element> </xsd:schema> </wsdl:types> -</wsdl:definitions> +</wsdl:definitions>
\ No newline at end of file diff --git a/tests/org.eclipse.wst.wsdl.validation.tests/testresources/samples/XSD/ReferToAnotherInlineType/ReferToAnotherInlineTypeNoImport.wsdl b/tests/org.eclipse.wst.wsdl.validation.tests/testresources/samples/XSD/ReferToAnotherInlineType/ReferToAnotherInlineTypeNoImport.wsdl new file mode 100644 index 000000000..9598fdac5 --- /dev/null +++ b/tests/org.eclipse.wst.wsdl.validation.tests/testresources/samples/XSD/ReferToAnotherInlineType/ReferToAnotherInlineTypeNoImport.wsdl @@ -0,0 +1,27 @@ +<?xml version="1.0" encoding="UTF-8"?> +<wsdl:definitions xmlns:tns="http://tempuri.org/ReferToAnotherInlineType/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="ReferToAnotherInlineType" targetNamespace="http://tempuri.org/ReferToAnotherInlineType/"> + <wsdl:types> + <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" + elementFormDefault="qualified" + targetNamespace="http://tempuri.org/ReferToAnotherInlineType1/" + xmlns:two="http://tempuri.org/ReferToAnotherInlineType2/"> + <xsd:simpleType name="NewSimpleType"> + <xsd:restriction base="xsd:string"> + <xsd:minLength value="1"/> + </xsd:restriction> + </xsd:simpleType> + <xsd:element name="NewGlobalElement" type="two:NewSimpleType"></xsd:element> + </xsd:schema> + <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" + elementFormDefault="qualified" + targetNamespace="http://tempuri.org/ReferToAnotherInlineType2/" + xmlns:one="http://tempuri.org/ReferToAnotherInlineType1/"> + <xsd:simpleType name="NewSimpleType"> + <xsd:restriction base="xsd:string"> + <xsd:minLength value="1"/> + </xsd:restriction> + </xsd:simpleType> + <xsd:element name="NewGlobalElement" type="one:NewSimpleType"></xsd:element> + </xsd:schema> + </wsdl:types> +</wsdl:definitions> |