validating soap requests

Hi!
I have a problem writing an schema. We have developed a XML interface that
accepts the requests to our system using SOAP (but it's use is optional).
The xml requests are grouped with the tag <requests_set>... </requests_set>
and may be more than one. The request as a whole would be:

<?xml version="1.0" encoding="UTF-8" ?>
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<SOAP-ENV:Body>

     <requests_set>
         <request1>
             ...
         </request1>
              .
              .
              .
     </requests_set>

</SOAP-ENV:Body>
</SOAP-ENV:Envelope>

I have written an schema to validate the incoming requests, starting from
the complex type "requests_set". The validation is ok if I don't write the
outer SOAP tags, but I get a validating error when the requests come into
the soap-env:body tag because this does not appear in my schema. The problem
is that I don't know how to include the soap elements in the schema I've
written. Now, the schema is starting like this:

<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
elementFormDefault="qualified" >
     <xsd:element name="requests_set" type="aux_type"/>
     <xsd:complexType name="aux_type">
         <xsd:sequence>
             <xsd:element name="request1" type="t1" minOccurs="0"
maxOccurs="unbounded"/>
             <xsd:element name="request2" type="t2" minOccurs="0"
maxOccurs="unbounded"/> etc.

How do I indicate that the "requests_set" may be in a SOAP block?

Thank you in advance. 

Received on Monday, 23 December 2002 12:01:12 UTC