Hello,
I want to develop a webservice that returns a XSD (a string with the content of one XSD file to be more exactly). That webservice gets the XSDs from a directory (or database). Now the tricky part:
The XSD files can include or import other XSD files, but my webservice needs to return the content of 1 working XSD file. So I need code witch can merge a tree of multiple XSD files to one XSD file.
Do you know where I can get this code?
Thanks,
Ward
-
Merge XSD documents (XML Schemas) in java program (1 messages)
- Posted by: Ward Bergmans
- Posted on: August 18 2004 07:48 EDT
Threaded Messages (1)
- You can't by Web Master on August 18 2004 17:37 EDT
-
You can't[ Go to top ]
- Posted by: Web Master
- Posted on: August 18 2004 17:37 EDT
- in response to Ward Bergmans
You can't merge two arbitrary XSD's into one (what are you going to do with target namespaces?). Instead you could do:
<wsdl:types>
<xs:schema>
<xs:import schemaLocation="a.xsd" namespace="http://a"/>
<xs:import schemaLocation="b.xsd" namespace="http://b"/>
</xs:schema>
</wsdl:types>
or
<wsdl:types>
<xs:schema targetNamesace="http://a"...>
...
</xs:schema>
<xs:schema targetNamesace="http://b"...>
...
</xs:schema>
</wsdl:types>
Although later form might not be well supported by various buggy platforms.