how to define an XML Document with an unknown/variable element

Question:
How to define a structure of which you only know that it's an 
XMLDocument with a certain root???

Situation:
I have created a webservice and am defining the output message in the 
wsdl (web service description language).
The output message structure contains ALWAYS a root element:<xsd:element 
name="method2Response"> and is always an XML Document.
But the structure of the document depends completely on the input of the 
user. How do I define a schema for this situation??

Why do I want to do this?
All medical terms are defined in a hierarchy, while terms are defined by 
their concept (so varying spelling, case insensitive etc does not 
influence the hierarchy).
Each concept has a concept id, so the medical vocabulary is captured in 
a concept hierarchy. For my project, the user submits a gene id, I match 
it to a concept id, and return the hierarchy of concepts from the gene 
to its root concept in the hierarchy. So depending on the gene id, my 
result tree varies enormously.

Except for the fact that the response is always an XML Document with the 
root <xsd:element name="method2Response">. Is there a way to define this??


<xsd:schema 
xmlns:tns="http://biryani.med.yale.edu:8081/axis/services/GetUMLS"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
targetNamespace="http://biryani.med.yale.edu:8081/axis/services/GetUMLS">

<xsd:element name="method2Response">
    <xsd:element name="*" type="*" ...??
</xsd:element>

</xsd:schema>

thanks
remko

Received on Tuesday, 8 July 2003 16:24:33 UTC