It would be nice if wscompile added support for the xsd:schema type.
_____
From: Royston Shufflebotham [mailto:roystons_at_i2.co.uk]
Sent: Monday, August 09, 2004 12:49 PM
To: anne_at_manes.net
Subject: Recent SOAP/WSDL question
Hi there,
I was just reading your answer to a recent SOAP/WSDL question:
http://searchwebservices.techtarget.com/ateQuestionNResponse/0,289625,sid26_
cid601977_tax289201,00.html
as I was having the same problem myself. I've actually managed to fix it,
and I think you'll be interested in the answer. (I would have replied on
the web site itself but I can't see a way to do that, so it seemed easier to
mail you directly. Perhaps you could post a follow-up?)
.NET DataSets are represented in WSDL as
<xs:sequence>
<xs:element ref="xs:schema" />
<xs:any />
</xs:sequence>
It's not .NET specific, but just requires a piece of XSD schema and then
some data (which hopefully satisfies that schema). So the problem that the
original questioner was having was that the wscompile tool couldn't figure
out what to do with an object of type "schema".
The answer is to point wscompile at the definition for XMLSchema (I'm a bit
surprised it doesn't know it itself!) by tweaking the local version of the
WSDL (which doesn't class as changing the interface!) to add
<xs:import namespace="
http://www.w3.org/2001/XMLSchema"
schemaLocation="XMLSchema.xsd"/>
and then copy the XML Schema xsd itself to XMLSchema.xsd
wscompile can then resolve the schema element happily, and it'll generate
the classes without problems then. It's working merrily for me, anyway!
Hope this is useful to you and other questioners!
Cheers,
Royston.