Can anyone tell me if there is any tool that'll generate an xml schema from a xml file(similar to something like xsd.exe in .net)? I have a web service and I need to validate my request mesage at the server side using an xsd.
XML editors often do this, e.g. XML Spy, oXygen. However, the Schema that is created will need to be edited, in particular to set all of the multiplicities correctly. Those won't always be guessed correctly. You may also need to modify the simple types, which will probably all default to strings.
Also, to state the obvious, you need to use a sample XML file that contains all possible XPaths (element/attribute hierarchies) that your Schema needs to validate.