• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

How restful webservice communicate to another webservice?

 
Ranch Hand
Posts: 191
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Good day,

Could someone please enlighten me how one webservice communicate to another webservice directly? if we need bi-directional communication does it means both side will required HttpClient to do so?

Thanks
 
Author and all-around good cowpoke
Posts: 13078
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The basic java.net library has all you need to create HttpURLConnections.

Do you want both "web services" to be able to initiate a request?

Bill
 
Nakataa Kokuyo
Ranch Hand
Posts: 191
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks William for the answer! May i know what are the basic java.net library that you mentioning? we using java, is that means of HttpComponent?

Our application will required bi-direction communication, what could be the best way to do that? Do i need to make client available on both side for communication?
 
William Brogden
Author and all-around good cowpoke
Posts: 13078
6
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The java.net package is part of the basic Java library and has been since version 1. The reason being that SUN's motto "the Network is the Computer" shows how much SUN emphasized communicating computers. The number of different ways two Java programs can communicate is rather large, selecting one will depend on your other requirements.

If you do not have a copy of the complete standard library JavaDocs on your work computer, get one and study the HttpURLConnection and URLConnection APIs.

Bill
 
Nakataa Kokuyo
Ranch Hand
Posts: 191
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks William !!
 
Ranch Hand
Posts: 2925
13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
As far as I understand webservices mean application functionality exposes on internet or network and available through XML. E.g a web service to fetch some Data .now in this context what does communicaiton of 2 web services mean?
thanks
 
William Brogden
Author and all-around good cowpoke
Posts: 13078
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Monica. Shiralkar wrote:As far as I understand webservices mean application functionality exposes on internet or network and available through XML. E.g a web service to fetch some Data .now in this context what does communicaiton of 2 web services mean?
thanks



Creating a web service by aggregating input from other services (ie communication) seems to be a pretty common idea.

Note that XML is not required for RESTful web service architectures.

Bill
 
Monica Shiralkar
Ranch Hand
Posts: 2925
13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
thanks..

Note that XML is not required for RESTful web service architectures.



thanks.but in restful web service response dont we also send XML as the return type from web service method with response type text/xml?It can also return other like JSON but is that impossible in SOAP?
 
Whose rules are you playing by? This tiny ad doesn't respect those rules:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic