Adding a Reference to System.Data

Topics: General Discussion Forum
Mar 10, 2008 at 2:10 PM
Ive inherited a project that uses the Web Service Factory. Now if this is a silly question than apologies, but I cant seem to find an easy answer.

Ive been asked to add a new set of methods in to the project that return a DataSet. I know I can do this by hand, but that removes the point on my organisation trying to standardise on tools like this. SO, how do I add a reference to System.Data so I can return a DataSet?


Mar 10, 2008 at 8:53 PM
Can you elaborate further where do you want to add that reference?
On the other hand and regarding guidance, dealing with DataSets in the contract (defined at DC/MC) is not recommended but I assume you already know this and you have good resons to use that approach.
Mar 11, 2008 at 9:02 AM
I am trying to make sure that the webservices we are using are consistent and reflect the models created in the Software Factory. So I need to be able to create a message in the modelling tool (when I am defining the services) that contains a dataset.

The whole system was planned using objects which we passed about, as defined via our data contracts and then using translators. But it turns out that the latest SOAP toolkit for VBA doesnt like custom objects (despite what the manual says), and it rejects any object that it doesnt recognise. After some experimentaion I have determined that I can pass a dataset into Excel, hence we need to add a new interface to our service that will present a dataset rathar than a custom object.

So, I know that if I go to the ServiceContract Page I can create a new message type, and select a primitive return type. I also know that if I try to put in System.Data.DataSet as the Type (in the Browse and Select a .Net Type window) I get told the dll that the namespace is in, but I am not allowed to use it. The only referenced assemblies I can see / am allowed to use as return types are those in mscorlib, yet as there is teh facility to type in other assembly / namespaces, I am assuming that I must be able to change the setup here so I can add System.Data to the list of allowed references?

Mar 11, 2008 at 5:53 PM
You may try adding that type in your service contract model as described here:
Mar 12, 2008 at 10:14 AM
Edited Mar 12, 2008 at 10:56 AM
Thanks, and I dont know how I didnt see that when I searched before posting.

However, I have edited the file as suggested, and now get an error.

unable to find a target DSL named 'm?l://...'

When I look through the files generated, I can not see any reference to m?l, however, the error is such that Visual Studio is refusing to get latest from VSS, so it looks like I need to start again.

Fixed it. It appears that the text editor I used to open the file munged some of the uri's to the types.

Thanks for your help