Community
Participate
Working Groups
In the Eclipse WSDL validator from the RAD7 base, an import without a schemaLocation attribute returns an error. For example: <xsd:schema targetNamespace="http://tempuri.org/DocLiteral/" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <xsd:import namespace="http://ThisResultsInAnError.com/"/> </xsd:schema> returns the error: schema_reference.4: Failed to read schema document 'null', because 1) could not find the document; 2) the document could not be read; 3) the root element of the document is not <xsd:schema>., Line: 2, Column: 58 This error can be removed by specifying a schemaLocation attribute in the import element: <xsd:import namespace="http://ThisResultsInAnError.com/" schemaLocation="test.xsd"/> However, the schemaLocation attribute should be optional as described in the spec: http://www.w3.org/TR/xmlschema-1/#composition-schemaImport
For some reason all validation problems reported by the inline schema validator - errors or warnings - are turned into WSDL validation errors. In this case Xerces reports only a warning but it's being turned into an error by the WSDL validator. I'll try to figure out why this was done.
This looks like a bug. Valentin, feel free to ping me or drop by if you want to review any part of the code.
Thank you Lawrence, will do.
Hi, This also gives an error in the follwoing situation: Type TA is defined inside WSDL WA and inside Namespace NA. WSDL WB imports wsdl WA. Inside the <types> section of wsdl WB there's an <xsd:import namespace="NA"> statement. This import is rendered wrong, because it misses location attribute. However it should not be neither error nor warning because there's a wsdl:import statement that imports WA. Regards, Hristo
Created attachment 127009 [details] Patch and unit test Surgical fix to take into account the error severity. I've also added a new JUnit.
Patch and unit test committed and released for WTP 3.1 builds > v200902271605 UTC
Closing.