Link to home
Start Free TrialLog in
Avatar of curiouswebster
curiouswebsterFlag for United States of America

asked on

A web service using another web service

It seems logical for a web service to use another web service.

Are there any problems with this?  Are there any pitfalls I should know about?

thanks,
newbieweb
Avatar of gregoryyoung
gregoryyoung
Flag of Canada image

You generally dont want to do this though you can ... preferred is a bus or a hub and spoke model..

The reason for this is if this methodology (ervices calling eb services) is followed you end up with a web of depedencies
I have seen this used, and the only pitfall was that one of the web service layers was totally unnecessary- it added complexity needlesly. If you have a need for interprocess communications, then think about remoting or web services. However, if you just want a clean layer separation, just define some interfaces and separate the layers in their own DLLs.

David
anyoneis:

On a small scale its not an issue. In an enterprise its considerred an anti-pattern, there are numerous products to avoid it: Biztalk and other products like websphere or Sonic offer solutions to the problems http://en.wikipedia.org/wiki/Enterprise_service_bus descibes a bit about what a service bus is.

Basically the big issue can be easiest seen in deployment. Let's say I have a service which sits in front of a widget repository that the rest of my enterprise uses. There are 90 other services which use my service. I want to make a change to the widget web service to be queued service. I would now need to redeploy all 90 services that had dependencies on it (because they had a dependency on the endpint)

Another example of where it gets to be nasty is that there is no good way of seeing my actual workflow associated with the process. Each service is calling out other services my logic is heavily fragmented throughout my enterprise.

Another major issue is transaction management ..

http://www.infoworld.com/article/05/04/29/HNesb_1.html is a quick discussion DrDobbs had a great article on ESBs in July http://www.ddj.com/java/201200303;jsessionid=0PYMV4CA5XZHSQSNDLRCKHSCJUNN2JVN?pgno=1 definately worth a read through.

Avatar of curiouswebster

ASKER

I can see the disadvantage to this approach.  But if I were to need something quick, and for demo purposes, is it possible?

Could I add a web reference to a web service to point at another web service?  Will it work the way it works for a Windows Forms application?

newbieweb
ASKER CERTIFIED SOLUTION
Avatar of gregoryyoung
gregoryyoung
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial