Domanda

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?

È stato utile?

Soluzione

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.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top