WebService, Entity class problem with SchemaImporter

Posts   
 
    
Meteor
User
Posts: 67
Joined: 06-Apr-2007
# Posted on: 03-Oct-2007 02:57:18   

LLBLGen Pro v2.5; Adapter (with WebServiceHelper); vs2005 c# solution (.Net 2.0), WinForms client.

I have followed your instructions on using the SchemaImporter project, registering the assembly in the GAC, and modifying machine.config. In the WinForms project, I have a reference to the DatabaseGeneric project. In the WebService project I have references to both the DatabaseGeneric and the DBSpecific projects.

Everything compiles ok, but I have two problems with consuming the WebService in the WinForms project:

  1. When the webservice returns a collection, it returns a collection of type '<WebService>.EntityCollection', rather than '<DatabaseGeneric>.EntityCollection'.

  2. When the webservice returns an entity, it returns an XmlElement rather than an LLBLGen Entity (clearly visible in the Reference.cs file).

I can manually modify the Reference.cs file (in the WinForms project, under the WebService reference) to return the correct datatypes, but I thought that the whole idea of the SchemaImporter shenanigans was to overcome this? And of course, every time you choose 'Update Web Reference' after adding new methods to the WebService, you have to manually fix the resulting Reference.cs file again.

Am I misunderstanding something, or have I left out a crucial step? cry

Walaa avatar
Walaa
Support Team
Posts: 14950
Joined: 21-Aug-2005
# Posted on: 03-Oct-2007 15:45:36   

Same issue were discussed here: http://www.llblgen.com/TinyForum/Messages.aspx?ThreadID=9120

If the above thread doesn't help you, please post back here.

Meteor
User
Posts: 67
Joined: 06-Apr-2007
# Posted on: 04-Oct-2007 02:57:18   

Thanks Walaa,

I had actually read that already. The problem was that I missed the last part of the type statement- '.EntityClassesSchemaImporter' in the machine.config. The compiler kept telling me that it couldn't find the type in the assembly mentioned in the machine.config.

Now the types are all correct. Lack of attention to detail was the problem.