VS2008 to VS2010 Issue - Service Model referencing Data Contracts

Topics: General Discussion Forum, Service Factory Modeling Edition Forum
Jun 10, 2010 at 8:28 PM

I have a fairly complex  Data contract and Service Contract models defined in VS2008. Message contracts are typically wrapped and contain one or more Data Contract members.  When going through conversion of the models in VS2010, data contracts work fine, however when Service Contract model is opened, only primitive message contract members work - every "link" that used to point to a DC type for a member of a message contract is "broken". Validation generates type errors. Bringing up dialog and selecting the DC fixes the issue. Has anyone experienced this? Any solutions/workarounds? I really don't want to go through every MC and re-point to proper DC by hand. Any help would be greatly appreciated.

Developer
Jun 10, 2010 at 11:13 PM

Hi,

The scenario that you describe regarding models migration should work flawless but in this case for some reason the migration seem to fail. Do you have your DCs and SCs in the same project? I just want to verify that the conversion code is not failing on resolving DC location where the SC reference points to. 

Do you get any warning when opening the SC with the broken refs?

Regards,

Hernan

Jun 11, 2010 at 2:50 PM
Edited Jun 11, 2010 at 2:52 PM

Hernan,
Thanks for the reply. Yes, they are in the same project. Here's the sequence of steps with warnings, errors and messages (each one shows up multiple times, for each DC or MC that is affected)

Opening DC Model First Time:
Error 2 There is an error in XML document (2, 6). Unexpected XML declaration. The XML declaration must be the first node in the document, and no white space characters are allowed to appear before it. Line 2, position 6. 0 0

Warning 406 Missing 'Id' attribute, a new Guid '01af17e5-d325-46a7-9da9-58bfe2895570' is auto-generated. C:\TFSPROD\SampleTeamProject\DEV\Services\Account.WS\MyNamespace.Account.WS.ModelNew\MyNamespace.Account.DataContracts.datacontract 1132 10 MyNamespace.Account.WS.ModelNew

Message 446 The 'Missing Id attribute' warnigns are temporary and they will be removed after saving this model file with the current version of the Web Service Software Factory 2010. C:\TFSPROD\SampleTeamProject\DEV\Services\Account.WS\MyNamespace.Account.WS.ModelNew\MyNamespace.Account.DataContracts.datacontract 1 1 MyNamespace.Account.WS.ModelNew

After Saving and opening DC Model Again:

Warning 1 Invalid property value '[]' for property 'edgePoints' with type 'EdgePointCollection', ignored. C:\TFSPROD\SampleTeamProject\DEV\Services\Account.WS\MyNamespace.Account.WS.ModelNew\MyNamespace.Account.DataContracts.datacontract.diagram 581 6 MyNamespace.Account.WS.ModelNew

After this, DC Model validates and is happy. Now, SC:

After Opening SC Model first time:

Warning 5 The referenced element in 'Microsoft.Practices.ServiceFactory.DataContracts\DataContractBase\GroupList@MyNamespace.Account.WS.Model\MyNamespace.Account.DataContracts' was not found or could not be resolved. 1 1 MyNamespace.Account.WS.ModelNew

Warning 1 Missing 'Id' attribute, a new Guid '7f1c6bd3-b057-4d01-8d0a-45fb11d16e61' is auto-generated. C:\TFSPROD\SampleTeamProject\DEV\Services\Account.WS\MyNamespace.Account.WS.ModelNew\MyNamespace.Account.ServiceContracts.servicecontract 4 6 MyNamespace.Account.WS.ModelNew

Message 141 The 'Missing Id attribute' warnigns are temporary and they will be removed after saving this model file with the current version of the Web Service Software Factory 2010. C:\TFSPROD\SampleTeamProject\DEV\Services\Account.WS\MyNamespace.Account.WS.ModelNew\MyNamespace.Account.ServiceContracts.servicecontract 1 1 MyNamespace.Account.WS.ModelNew

After saving, opening SC Model back up and validating:

Error 142 The Type property on DataContractMessagePart 'GroupsList' must refer to an existing model element. C:\TFSPROD\SampleTeamProject\DEV\Services\Account.WS\MyNamespace.Account.WS.ModelNew\MyNamespace.Account.ServiceContracts.servicecontract 0 1 MyNamespace.Account.WS.ModelNew

Error 146 MessageContract does not have parts. C:\TFSPROD\SampleTeamProject\DEV\Services\Account.WS\MyNamespace.Account.WS.ModelNew\MyNamespace.Account.ServiceContracts.servicecontract 0 1 MyNamespace.Account.WS.ModelNew


Warning 5 The referenced element in 'Microsoft.Practices.ServiceFactory.DataContracts\DataContractBase\GroupList@MyNamespace.Account.WS.Model\MyNamespace.Account.DataContracts' was not found or could not be resolved. 1 1 MyNamespace.Account.WS.ModelNew

Warning 3 Missing 'Id' attribute, a new Guid '22bcf758-f1bf-465c-870c-a8665a1bc265' is auto-generated. C:\TFSPROD\SampleTeamProject\DEV\Services\Account.WS\MyNamespace.Account.WS.ModelNew\MyNamespace.Account.ServiceContracts.servicecontract 345 10 MyNamespace.Account.WS.ModelNew

Message 141 The 'Missing Id attribute' warnigns are temporary and they will be removed after saving this model file with the current version of the Web Service Software Factory 2010. C:\TFSPROD\SampleTeamProject\DEV\Services\Account.WS\MyNamespace.Account.WS.ModelNew\MyNamespace.Account.ServiceContracts.servicecontract 1 1 MyNamespace.Account.WS.ModelNew

Jun 16, 2010 at 3:10 PM

Has anyone else come across this yet? I'm running into the same problem and it's a game breaker as far as upgrading to a 2010 solution. I know we could go through manually and re-associate all of the data contracts with their message contracts, but across 10+ services, that gets to be a hassle and we don't have that kind of time.

Jul 7, 2010 at 12:15 PM

We run into the same problem. With our 60 services we had lots to do to convert them manually.

Has someone any news this topic related?

Aug 2, 2010 at 7:38 AM

I have the same problem. Any news?

Developer
Aug 2, 2010 at 11:32 AM

Regarding the Warnings for Missing attributes, they should be gone after saving and reopening the model. For other errors about broken links, it would help to get a detailed diagnostics if someone can send me the model file (use my contact info) in order to repro the error.

Regards, Hernan

 

Developer
Aug 12, 2010 at 4:47 PM

Hey guys,

You can try the latest beta reresh version that should address these issues.

http://servicefactory.codeplex.com/releases/view/50482

Aug 18, 2010 at 9:04 AM

Yes, the new update fixes the problem. But unfortunately it is pretty useless to do the upgrade because VS2010 crashes when I do validate/validate all on a servicecontract. Memory consumptions goes up and then poof VS crashes. Another issues is it takes quite long time just to open up a service contract. 

Apr 10, 2011 at 2:31 PM

With the latest bits this problem still occurs for me.  Also, the "The 'Missing Id attribute' warnigns are temporary and they will be removed after saving this model file with the current version of the Web Service Software Factory 2010." does not go away after saving and re-opening the model.

Developer
Apr 11, 2011 at 8:58 PM

HI,

Did you try this version? http://servicefactory.codeplex.com/releases/view/51474 (It should address memory issue and may be also the Missing Id but not confirmed).

Thanks,

Hernan