• 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
  • Tim Cooke
  • paul wheaton
  • Liutauras Vilda
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Saloon Keepers:
  • Scott Selikoff
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
  • Frits Walraven
Bartenders:
  • Stephan van Hulst
  • Carey Brown

Is there a chance to use both SOAP and Rest webservices in the same project ?

 
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all,
I am new to webservices. Is there a chance to use both SOAP and Rest webservices in the same project ?
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What do you mean by "is there a chance"? It's certainly possible.
 
Ranch Hand
Posts: 645
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
if you can dance then there is a chance ..

As Ulf replied, yes its possible.

-P
 
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
My suggestion, don't get into SOAP unless you absolutely have to. RESTful style services are much easier.

Bill
 
Ranch Hand
Posts: 544
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi there,
SOAP is one of the protocols for messages used to communicate with webservices. By this I meant, the request and response messages shall adhere to SOAP standards.
Whereas REST is a architectural pattern to implement webservices in which you define URIs to access your webservices according to REST standards. For e.g. GET/POST etc. I am sure you must have read what is REST before you encountered this question. There is this Article by Martin Fowler on REST, it will be certainly helpful to you.
As William mentioned RESTful style is much easier as you can employ the webservices request and response in JSON (other formats like XML are also okay) format which I believe is easier to handle than SOAP. This also requires less boilerplate code than SOAP webservices.

Regards,
Amit
 
Ranch Hand
Posts: 88
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have done exactally that today, to develop a SOAP x REST benchmark. I talk about it at RESTlet slower than Axis2.

Jackson + RESTlet + RESTlet built-in HTTP client had really really bad results, both in stability and performance, compared to Axis2 and its built-in XML marshaller and HTTP client. Basically, Axis2 has all we need and can make dozens of thousands of sequential calls with ease and have 3-5 milisecs overhead on each, while Jackson + RESTlet + RESTlet built-in HTTP client timeout hangs after a couple hundred calls and have 4-6 milisecs overhead on each. With stability issues and worse performance, it's hard to advocate for REST, and with a few milisecs of overhead, Axis2 is very lightweigth for the features and flexibility it provides.

To do what you want, using Axis2, RESTlet and a unique Eclipse project, basically:

1) Create Axis2 WebService as normal, using Eclipse for automating it
2) Manually create RESTlet ServerResource, as Eclipse has no automation features (RESTlet seems to have an Eclipse plugin, but I was unable to install it and didn't need at all)
3) When routing URLs in RESTlet Resource, be careful to not use Axis2 paths
4) Together with Axis2 and RESTlet you can also develop traditional Servlets, just when creating them in Eclipse be careful to not conflict their paths with Axis2 and RESTlet ones
5) In WEB-INF/web.xml you'll need to bind RESTlet routes manually, tomorrow I can post an example of it, it's not hard
6) Export war file normally from Eclipse project, it will have (1), (2) and (4) all together
7) Deploy war file in Tomcat and test all URL paths you have created, testing their parameters and responses
8) Run many tests with thousands of calls in your RESTlet client, I had A LOT of issues in it!!
 
Politics n. Poly "many" + ticks "blood sucking insects". Tiny ad:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic