james

james

  • NA
  • 1.1k
  • 334.5k

using existing assemblies in a WS

Oct 28 2003 10:03 AM
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)