Mary,
There are a couple of ways to go about this, depending on your situation. If you already have a schema (XSD - created via XML Spy), the easiest thing to do is to build the webMethods document type from it. Right-click on the folder where you want to create the new document type and select “New->All Choices …” (this lets you use the wizard instead of defaulting to a blank document type). From the choices, select Document Type/Next, Enter name and folder/Next, then select “XML Schema” as the source and you can browse to your .xsd file. Select Finish and the wizard should generate a new Document Type based on your schema. I believe it may also create a schema object in the same folder automatically.
If you already have a webMethods document type and you just want to set the choices for an element/node in the document, right-click on the element in question and select Properties. The properties dialog will let you specify that this should be a choice list (and provide allowable values).
Your last statement may be more challenging. It sounds like you’re referring to what’s typically called a co-constraint. This is where you want to specify that “if element A is x, then element B can be y or z”. This type of constraint isn’t supported by XSDL or webMethods, as far as I know. There are some less-widely accepted schema languages that let you do this sort of thing (schematron, RelaxNG, etc.), but that’s a whole different ball game. HTH.
#Flow-and-Java-services#webMethods#Integration-Server-and-ESB