Add webservice reference, the classes in different file

Posted by ArunDhaJ on Stack Overflow See other posts from Stack Overflow or by ArunDhaJ
Published on 2010-04-27T10:00:33Z Indexed on 2010/04/27 10:03 UTC
Read the original article Hit count: 258

Hi, When I add webservice as service reference in my .Net project, it creates a service folder within "Service References". All the interfaces and classes are contained within that service folder. I wanted to know how to split the interface's method and classes. Actually I wanted the web service reference to import classes defined in different dll.

I wanted to define this way because of my design constraints. I've 3 layered application. Of which third layer is communication layer which holds all web service references. second is business layer and first is presentation layer. If the class declarations are in layer-3 and I'm accessing those classes from presentation layer, it is logically a cross-layer-access-violation.

Instead, I wanted a separate project which holds only the class declarations and this would be used in all 3 layers. I didn't faced any problems to achieve this with layer-1 and layer-2. But, I'm not sure how to make communication layer to use this common declaration dll.

Your suggestion would help me to design my application better.

Thanks in advance

Regards

ArunDhaJ

© Stack Overflow or respective owner

Related posts about .NET

Related posts about web-services