Web Service Software Factory

Topics: General Discussion Forum, Service Factory Modeling Edition Forum
Aug 3, 2010 at 1:21 AM

I remember there was a tool DecorateTypeAsDataContract in the Web Service Software Factory Guidence Package to convert a class as a data contract in VS 2005. However, I can not find it in the Web Service Software Factory of the VS 2008 or VS2010. Does it have a different name?

Aug 3, 2010 at 11:26 AM

Hi Roy,

This "Recipe" was deprecated in the modeling editions after WSSF 2005 version. Notice that in the modeling versions you can define your DCs in the model and geenreated code from it. If you already have classes that you may want to turn them into DataContracts, then simply define them in the model and you will get the code from there. Remember the recommended practice of separate the contract form your business entities.



Aug 3, 2010 at 4:28 PM

Yes I do have the classes already and want to convert them as data contract. How do I import them into model and which tool to use to convert them as data contract?



Aug 5, 2010 at 11:44 AM


There's no tool to directly import your classes as DCs. The current version of the factory does not implement "round trip" scenario so you need to start from the model and generate code from it.

However there is also the "Contract First" approach where you can use an existing service and contract adding the "Import WSDL" add-on that let you import a Service from its WSDL and will also create the contract from the included schema in that WSDL.

If you want to use the modeling approach, the only way is to create the DC in the model from scratch. Recall the DC desing tips and se[aration of concerns with your business entities.

Some links here: