1

I have a web service which outputs a JSON serialised string object. This is just a simple object with simple properties. I would really like the consumers of the service to be able to deserialise the object so as to have the complete object to use easily in their projects.

My question is, is it possible for my clients to reference a DLL on my site (which I might update occasionally to provide further properties) from their projects so that they will always have the latest version of the DLL? Or is my only option to distribute a lightweight DLL for all client web service users with just the objects they need? Trouble is, with that method, if I update the object on the web service then all clients consuming the service will fall over until they update the DLL from me.

Any other options or solutions to this or have I missed something completely obvious?

John Saunders
  • 160,644
  • 26
  • 247
  • 397
Morph
  • 13
  • 2
  • Are you using the legacy ASMX technology? If so, then the answer is "no". – John Saunders Apr 30 '12 at 10:18
  • FYI, that's not "standard ASMX". It "legacy ASMX". It hasn't been the "standard" since 2006. It is not getting enhancements, and only the most critical of bug fixes. It _really_ shouldn't be used for new development at all. – John Saunders Apr 30 '12 at 14:35

1 Answers1

0

One of the more important ideas behind SOA is decoupling. That's the opposite of what you're trying to do - you'll be tightly coupling your clients to your service. Try to avoid doing that.

In any case, if you were using SOAP with WCF, then it would be trivial to do this. I don't know that you can use "Reuse types" with a JSON-based service.

And you certainly cannot do this with an ASMX service.

John Saunders
  • 160,644
  • 26
  • 247
  • 397
  • Thanks John. Just trying to get more control over how my clients use the service output. Might need to look to WCF instead. – Morph Apr 30 '12 at 10:32
  • In general, you don't want to control how your clients use the service output. That permits a greater variety of clients. – John Saunders Apr 30 '12 at 14:34