I didn't have any trouble using the following WSDL, which is very similar to yours. If you post your code I can take a look at it...
<types> <s:schema elementFormDefault="qualified" targetNamespace="http://tempuri.org/"> <s:element name="Test"> <s:complexType /> </s:element> <s:element name="TestResponse"> <s:complexType> <s:sequence> <s:element minOccurs="0" maxOccurs="1" name="TestResult" type="s0:Composite" /> </s:sequence> </s:complexType> </s:element> <s:complexType name="Composite"> <s:choice> <s:element name="PO" minOccurs="1" maxOccurs="1" type="s0:PO"/> <s:element name="Invoice" minOccurs="0" maxOccurs="unbounded" type="s0:Invoice"/> </s:choice> </s:complexType> <s:complexType name="PO"> <s:sequence> <s:element minOccurs="1" maxOccurs="1" name="poNumber" type="s:int" /> </s:sequence> </s:complexType> <s:complexType name="Invoice"> <s:sequence> <s:element minOccurs="1" maxOccurs="1" name="invoiceNumber" type="s:int" /> </s:sequence> </s:complexType> </s:schema> </types> Greg Reinacker Reinacker & Associates, Inc. http://www.rassoc.com >It looks like wsdl supports something like a union, using <choice> (in fact >wsdl schema uses it): > ><complexType name="Composite"> > <choice> > <element name="PO" minOccurs="1" maxOccurs="1" >type="tns:POType"/> > <element name="Invoice" minOccurs="0" >maxOccurs="unbounded" type="tns:InvoiceType"/> > </choice> > </complexType> > >I've tried to define something like this in my wsdl and I'm getting the >following error when I try to build the wrapper class: > >'Nested groups may not be specified' > >I'm guessing that .NET can't find a way to map this onto its type system. > >Ultimately what I would like is a method to return a variety of types. In >essence its an interface to an event queue, where the event data payload >depends on the event type. Do I have to use 'xsd:anyType' ? and if so, what >does the proxy actually return? Its prototype returns 'object'. > >Thanks! > >-John You can read messages from the DOTNET archive, unsubscribe from DOTNET, or subscribe to other DevelopMentor lists at http://discuss.develop.com.