This is a migrated thread and some comments may be shown as answers.

DSW and generated service woes?

5 Answers 81 Views
Web Services
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Jonathan
Top achievements
Rank 1
Jonathan asked on 24 Aug 2010, 04:18 PM
Help! I'm really struggling the the DSW. After lots of trial and error, here's what is happening. (I'm using VS2010 and .Net4)

I create a new Windows class project and add a new OpenAccess domain model. For the purposes of this test, I connect to SQL2008 R2 on my laptop, pick a table called tCustomers from the database and click finish. The rlink file generates OK with one entity called TCustomer.

Next I add an empty web application project to the solution and fire up the DSW, picking the class library as the entity source and the web application as the service host. The entity TCustomer is listed in the next step of the wizard and I select 'Data Services for .NET4 version 2' as the data service to create. Click Next and Finish and the service creates OK.

The problem arises when I try to create a reference to this new service. If I add a new service reference and pick the newly created service from the wizard's services list, I get an error which basically says 'The remote server returned an error: (500) Internal Server Error.If the service is defined in the current solution, try building the solution and adding the service reference again.'

If I try to create and old-fashioned web service, I get the slightly more useful error message: '

The server encountered an error processing the request. The exception message is 'On data context type 'DataManager', there is a top IQueryable property 'TCustomers' whose element type is not an entity type. Make sure that the IQueryable property is of entity type or specify the IgnoreProperties attribute on the data context type to ignore this property.'. See server logs for more details. The exception stack trace is: ...'.

So after much testing and trial and error, I found that if I change the name of the table from tCustomers to Customers and repeat the above steps, everything works fine! I can create a service reference or web service without any problems at all.

However, if I keep the table name the same (tCustomers) and use the OpenAccess domain wizard to strip the t from the name of the entity (or simply rename the entity to Customer in the domain model viewer), I get to the issue where DSW does not list the entity in the grid as the table name is different from the entity name, so DSW will not proceed further.

This is very frustrating as I have spent about 3 days on a really large database schema renaming entities and properties to make them more understandable in the domain model and whereas this does generate a working context, the whole point of the exercise was to move to a services oriented approach to the new applications being developed. And of course this does not seem to work.

Also, it is not possible simply to rename the tables to make everything work as this is a live system and the services model needs to be developed alongside the existing databases and stored procs until the updated applications can take over.

Am I doing something wrong, or what is happening here?
Regards,
Jonathan



5 Answers, 1 is accepted

Sort by
0
Missing User
answered on 25 Aug 2010, 03:15 PM
Hi Jonathan Simmons,

This problem where some entities will not show has already been fixed and the fix  will be available with the next release.
I have attached the required files for this fix at your ticket with the same title.

Sorry for the inconvenience this has caused you

Regards,
Rizk Sobhi
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Kenneth
Top achievements
Rank 1
answered on 30 Aug 2010, 08:26 PM
I am having the same problem. Can I get the fix you have referenced?
0
Missing User
answered on 01 Sep 2010, 07:10 AM
Hello Kenneth,

Of course you can.
You just need to open a ticket so that I can attach the required files.

Kind regards,
Rizk Sobhi
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Kenneth
Top achievements
Rank 1
answered on 01 Sep 2010, 11:12 AM
I created a support ticket - just before I created this forum reply. No ones responded to it yet, though.
0
Missing User
answered on 02 Sep 2010, 07:45 AM
Hello Kenneth,

I have just replied on the other thread. Please, find your answer there.

Best wishes,
Rizk Sobhi
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
Web Services
Asked by
Jonathan
Top achievements
Rank 1
Answers by
Missing User
Kenneth
Top achievements
Rank 1
Share this question
or