Import datacontract model to WSSF solution

Topics: General Discussion Forum, Service Factory Modeling Edition Forum
Jun 26, 2008 at 9:06 PM
Is it possible for WSSF to import datacontract model design that have been defined in other WSSF design solution. Otherwise whenever we start a WSSF service design, we have to create data contract design again and again which will downgrade the usefulness of WSSF.
Developer
Jun 27, 2008 at 12:23 AM
Edited Jun 27, 2008 at 12:32 AM
This is not as straightfoward as it might be but you have a simple workarround.
You may open the model file as XML (using the XML Editor in VS, "Open With..."option) copy the content and paste it in an empty model file in your target solution.
You also need to repeat the above step with the ".datacontract.diagram" file as well.
Notice that you may need to update the Project Mapping Table reference because the value set may vary in your target solution.
Jun 30, 2008 at 2:48 PM
I tried this (by copying underlying xml to empty model file) but this shuffles all the datacontracts in the diagram and results in a very difficult to read datacontract diagram.

Any solution to this?

Thanks,
vverma01
Developer
Jun 30, 2008 at 5:00 PM
Are you copying the contents of both, the model and the diagram files? Because in my case the shapes show up properly when going through the same process. Another workaround would be to use the Add Existing Item feature from VS and manually add both files (model and diagram). In this case you may have to manually move the files to the appropiate Service model folder.

Thanks
Jun 30, 2008 at 7:09 PM
I am copying only diagram file content (xml).
Please confirm if you are using VS 2005 + WSSF.

Thanks,
vverma01
Developer
Jun 30, 2008 at 10:57 PM
I am using VS2008 but that shouldn't be related to this issue. If you choose the workaround of copying the xml contents, make sure you copy the contents of both files.

If you go with the Add Existing Item, note that the model and diagram files added will show up in the Solution Items folder, but they will still be phisically located in the original directory. In order to have a local copy of those files in the new solution, you should drag and drop the added files into the Service Model tree node.

Thanks