Generating a schema from a record

I know its very easy to generate a record definition from a schema but is it possible to do the reverse ? To generate a w3c schema from a record definition.

Many thanks

Yes you can if you have webMethods IS 4.6.

Use the service pub.schema:createXSD giving it the record name as input.

HI Alec/Rupinder

To discuss the other side. we use XMLSPY to create database schema(xsd) for the database.
from this when we generate a record it asks for root element so that for a table a record is generated, also a schema for the db is generated.
Is there a way out to generate a record from webMethods schema object. The problem we face is everytime we generate a record for the table the schema is generated automatically containing all the table and its inforamtion.
In simple terms from webMethods Schema can a record structure be generated??

Thanx in advance