7
Answers

using existing assemblies in a WS

james

james

21y
2.6k
1
okay, this is probably a dumb question, bu I'm not so proud that I can't ask those now and then. I have a class in an assemble that already exists. My class calulates the distance between zip codes (quite handy). I want to expose this on my web service. In the original class, the distance() method does not have a [WebMethod] attribute. So my question is what is the best procedure for exposing that class in my WS? Now, granted, I have the source code, and I could cut/paste it into the WS project quite easily. But I'm 99% certain thats the wrong way to do it, as it would defeat the purpose of creating seperate reusable assemblies. So can anyone point me in the right direction? Do I need do extend the class to a generic and override the method? That doesn't seem right either.. Is there an easier and more 'correct' way to do this? -James

Answers (7)