Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 183
  • Last Modified:

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
0
newbieweb
Asked:
newbieweb
  • 3
1 Solution
 
gregoryyoungCommented:
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
0
 
anyoneisCommented:
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
0
 
gregoryyoungCommented:
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.

0
 
newbiewebSr. Software EngineerAuthor Commented:
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
0
 
gregoryyoungCommented:
yeah there is no technical difficulty in doing it ... as I said it can be done and in a small scale app isnt a problem but its not really a scalable model.

Cheers,

Greg
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now