I have the following Request and Response Data Contract pair for a Webservice method call
<xs:element name="GetUserOptionsRequest">
<xs:complexType>
<xs:sequence>
<xs:element name="OptionType" type="entities:UserOption" />
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="GetUserOptionsResponse">
<xs:complexType>
<xs:sequence>
<xs:element name="Options" type="entities:UserOption" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
</xs:element>
The problem is that what I want to have is a way of saying (pseudocode)
GetUserResponse response = GetuserOptions(new GetUserOptionsRequest(Type T))
And to have the response contain an IList depending on what type I pass through.
With my above data contract XSD, it is expecting an instance of a class in the request object, when I just want to specify a Type definition.
Really I suppose what I would want it
GetUserResponse<T> response = GetUserOptions(new GetUserOptionsRequest<T>());
But Im not sure how to specify generic classes/methods in XSD. Can anyone point me at a good article or explain how I can define this in XSD?
I am using WSCF blue for code generation too.