Validating WSDL file with 'element references' in schema
Posted: Thu Feb 28, 2008 3:50 pm
Hi, I'm new to WSDL files, XSD files and Oxygen and my task was just to test / validate some WSDL files. The problem was that the files didn't work as expected, yet Oxygen thinks they're valid. We're using the latest version of Oxygen (9.1) and clean install. When validating the same files in XMLSpy without configuring anything, the faults were found immediately.
Yet, we've already purchased Oxygen, so now we're looking to get comparable validation capabilities in Oxygen. I've seen it's possible to add custom validators of which some are included in Oxygen (although none are configured to work with WSDL files by default).
I've tried some of the custom validation stuff and other solutions to likewise problems in this forum, but I couldn't get the functionality working. Because of my lack of experience in XML and so (and English isn't my first language), I'll post an example below to show the type of files we're using and the errors that we're hoping Oxygen can detect:
test.wsdl:
test.xsd:
Now, in the above schema file, there are also more imports and stuff from other xsd-files, I've cut a lot of stuff out of there, but all of that was correct. The only faults left were due to typos, in this example:
test.wsdl is using elements with names AB:test1, AB:test2, AB:test3. But, in the schema file test.xsd, only elements test1, test2 and test4 are defined. As such, AB:test3 is an error, which XMLSpy does detect, but Oxygen does not (by default at least).
So, my question: Can Oxygen offer the same kind of validation? And if so, what would I need to do to get the type of validation that XMLSpy does offer. Which custom validator supports this and how to set this up?
Thanks in advance,
Colin
Yet, we've already purchased Oxygen, so now we're looking to get comparable validation capabilities in Oxygen. I've seen it's possible to add custom validators of which some are included in Oxygen (although none are configured to work with WSDL files by default).
I've tried some of the custom validation stuff and other solutions to likewise problems in this forum, but I couldn't get the functionality working. Because of my lack of experience in XML and so (and English isn't my first language), I'll post an example below to show the type of files we're using and the errors that we're hoping Oxygen can detect:
test.wsdl:
Code: Select all
<definitions xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:AB="http://www.test.com/test/AB" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<types>
<xs:schema>
<xs:import namespace="http://www.test.com/test/AB" schemaLocation="test.xsd"/>
</xs:schema>
</types>
<msg name="test1">
<item name="body" element="AB:test1"/>
</msg>
<msg name="test2">
<item name="body" element="AB:test2"/>
</msg>
<msg name="test3">
<item name="body" element="AB:test3"/>
</msg>
</definitions>
Code: Select all
<schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:AB="http://www.test.com/test/AB">
<element name="test1">
<complexType>
<!-- contents -->
</complexType>
</element>
<element name="test2">
<complexType>
<!-- contents -->
</complexType>
</element>
<element name="test4">
<complexType>
<!-- contents -->
</complexType>
</element>
</schema>
test.wsdl is using elements with names AB:test1, AB:test2, AB:test3. But, in the schema file test.xsd, only elements test1, test2 and test4 are defined. As such, AB:test3 is an error, which XMLSpy does detect, but Oxygen does not (by default at least).
So, my question: Can Oxygen offer the same kind of validation? And if so, what would I need to do to get the type of validation that XMLSpy does offer. Which custom validator supports this and how to set this up?
Thanks in advance,
Colin