Validating WSDL file with 'element references' in schema

Oxygen general issues.
colinb
Posts: 2
Joined: Thu Feb 28, 2008 2:56 pm

Validating WSDL file with 'element references' in schema

Post by colinb »

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:

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>
test.xsd:

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>
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
Last edited by colinb on Thu Feb 28, 2008 5:09 pm, edited 1 time in total.
Radu
Posts: 9434
Joined: Fri Jul 09, 2004 5:18 pm

Re: Validating WSDL file with 'element references' in schema

Post by Radu »

Dear Colin,

Thank you for contacting us.

For the moment we offer WSDL validation only against the WSDL XML Schema with SOAP extensions so no checking is done to see if the messages refer to existing elements or if those elements can be composed successfully.

However when the WSDL file is analyzed using the "WSDL SOAP Analyser" toolbar action and you select an operation in the dialog which makes use of the message you should receive an error in the dialog specifying that the element referred by the message could not be referred.

I added an improvement request to our internal list to enhance the validation capability offered for WSDL files and we will notify you of the progress.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
colinb
Posts: 2
Joined: Thu Feb 28, 2008 2:56 pm

Re: Validating WSDL file with 'element references' in schema

Post by colinb »

Dear Radu,

Thank you for your quick response. I've tried the "WSDL SOAP Analyser" and it does indeed work for those kinds of errors, so we're happy with that. Also, great that you're considering enhancing the validation of these files, thanks!

Regards,

Colin
Post Reply