Cannot set a object type for a data contract class

Feb 22, 2008 at 11:59 AM
Hi,

I would like to define a collection of key/values in my data contract model.

I have modeled a KeyValues class as a data contract collection, and a KeyValue class as a data contract. For the latter, I defined a Key attribute as string primitive data type.

For the Value attribute, the type is not defined and could be any type, so I would like to set a Object data type.
Unfortunately, this is not possible.

In a previous web service project developed without the service factory, I set an object datatype and the datatype was not defined in the wsdl but only in the resulting soap message.

Is this not possible with the factory, or what could you suggest as workaround?
thank you
Feb 22, 2008 at 7:49 PM
Since the type picker does not allow to select o="System.Object type, the workaround here will be to open the DC model file with the XML Editor and add the type="System.Object" attribute to your primitive element.