Rauland
Rauland

Reputation: 3044

Should I use a web service or wcf service with various endpoints? (Web service calling another web service on same server?)

I’m currently working on a web service application project which will run in IIS7 on Windows Server 2008. The web services will be invoked from various clients, from outside the server but also from other components from within the same server. (Other web services and windows services)

My view is that the purpose of web services is to expose functionality so that external clients can invoke it. I really don’t see much sense in a web service invoking another web service on the same server or a windows service invoking a web service on the same server. Please correct me if I’m wrong?

I’ve started looking into WCF, but I’m quite confused.

Would it be more appropriate to do the following?

Would my approach be correct or am I overcomplicating things?

Any suggestions or links which could point me in the right direction appreciated.

Thanks

Upvotes: 1

Views: 563

Answers (2)

Steven Licht
Steven Licht

Reputation: 770

BasicHttpBinding will give you most interoperability with external clients. named pipes will give you the best efficiency when both services are hosted on same machine.

BasicHttpBinding is like old asmx & XML web services.

Exposing both endpoints is AOK!

One service calling another service is NOT unusual.

Hosting multiple services on same machine is common. In the enterprise, running multiple instances of SQL-Server is commonplace. Of course it depends on hardware, services & response times.

Upvotes: 1

Jocke
Jocke

Reputation: 2284

A web service calling another web service?

If they have different responsibilities I think it's a good idea to separate them. You get better separation on concerns (easier to share with other projects / code bases), easier maintainability and independent deployability.

I would go with WCF and have two different endpoints for the different consumers, and for example use net.pipe for communication on the same server (if the client supports it) and http for external clients.

I think WCF gives you more power and flexibility that old xml web services, and the configuration part is really good.

Upvotes: 1

Related Questions