This week's book giveaway is in the Other Languages forum.
We're giving away four copies of Functional Reactive Programming and have Stephen Blackheath and Anthony Jones on-line!
See this thread for details.
Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

REST webservice consumers should change their API to support REST

 
Rithanya Laxmi
Ranch Hand
Posts: 185
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I am migrating from JAXWS with CXF to REST WS. When client consuming the REST WS needs to change their API to support REST WS or still they can go with JAXWS? We have 10 consumers hence i here system an change is neded to consume REST WS exposed from our app? What is pros and cons of REST compared to JAXWS? Please clarify and let me know opinion on the same about the impact,etc.

Thanks.
 
Ulf Dittmer
Rancher
Posts: 42968
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Depends on the client API you're using. Technically it would be possible to create a client API that that can access both SOAP and REST WS using the same API (just using a different URL, or maybe different parameters), but it sounds unlikely to me. So normally you would have to adapt the client.
 
Rithanya Laxmi
Ranch Hand
Posts: 185
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks. The producer is completely based on REST WS , for consuming jersey REST client is used. Hence please clarify how we create a client API which supports both SOAP & REST WS? Whether it is the best way of doing ? If not then it is always better to use REST Client API if the producer is also REST? Please clarify.
 
Ulf Dittmer
Rancher
Posts: 42968
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm not following. If you're using the Jersey API for the client -as you said you do-, then there's no way to consume a SOAP WS. Jersey simply doesn't do that.

If you have a REST WS, then you need a REST client. If you have a SOAP WS, then you need a SOAP client.
 
Rithanya Laxmi
Ranch Hand
Posts: 185
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Ulf, my question is without using the REST client by sending only WADL to the client can they generate the client API to consume the REST WS which uses jersey as an implementor? which will ensure that from the client side they dont have to create any REST API to consume REST WS? Is it possible? I hope I am clear with my question.
 
Ulf Dittmer
Rancher
Posts: 42968
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, the WADL is sufficient to build a REST client, whichever client library is used. I suggest you build a client yourself using just the WADL so that you know what's involved.
 
Rithanya Laxmi
Ranch Hand
Posts: 185
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Ulf again, which clearly states irrespective of the REST webservice implementer which we use like jersey, cxf, restlet, etc for producing a REST webservice, for the client to consume the REST WS if we send a WADL , they can create the client API on their own can be jersey or cxf or restlet to consume the REST WS right? So for producing a WS we can use jersey and for consuming we can use CXF right? Please clarify.
 
Ulf Dittmer
Rancher
Posts: 42968
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have no idea what client support CXF has, so I can't speak to that. What I'll state again (and I thought me previous post was already unequivocably clear on that, but maybe not) is that the WADL constitutes the contract - it doesn't matter what technology is used on either side.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic