SeanLAllen
SeanLAllen

Reputation: 123

If I use a DataContractResolver, does this restrict me to .NET only clients?

I have attempted to use the SharedTypeResolver, also the less generic DataContractResolver's from this blog post.

The post mentions how the SharedTypeResolver requires .NET, and for tightly coupled scenarios, such as have the assembly shared by the service, and the client.

However, my question is this: Doesn't using a DataContractResolver AT ALL, require .NET and shared assemblies? How would the client use the Resolver, if it didn't have access to the same assemblies?

Currently all I have is .NET clients, but I don't want to alienate any potential customer who might be writing clients in Java.

Upvotes: 1

Views: 175

Answers (2)

Bartosz Wójtowicz
Bartosz Wójtowicz

Reputation: 1401

That would make harder, but not impossible, for your java clients to generate proxies as your wsdl wouldn't contain the types you will send over the wire. There are tools that can be used to generate proxies automatically. Obviously they wouldn't be sufficient for generating the data model that is not described in wsdl. Those data models would have to be created manually. Therefore it is possible however it's probably too much effort and it'll be never done. For those reasons I'd advice you to avoid it.

Upvotes: 2

Eric Scherrer
Eric Scherrer

Reputation: 3408

Except for perhaps named pipes, ANY client running in ANY platform can talk with WCF. Whether or not it will be an enjoyably experience is the issue.

For cross platform communication I have had success with WCF binding WebHttpBinding (REST): http://msdn.microsoft.com/en-us/magazine/dd315413.aspx

But if your going to go that route then your missing out on so much that WCF has to offer, transactions, security, etc and might as well use the ASP.Net Web API.

Upvotes: 0

Related Questions