• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Question on other WS binding and JAX-RS

 
Kumar Raja
Ranch Hand
Posts: 547
2
Hibernate Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello All,

As we know, we specify the binding information in WSDL and BP as of now recommends SOAP/HTTP binding. This means the SOAP messages can be transmitted over HTTP. But we also know that XML/HTTP and JSON/HTTP binding is also possible (correct me, if I'm wrong).

1) Is XML/HTTP same as JAX-RS?

2) Are there any examples where non SOAP/HTTP binding is mentioned in WSDL ?

3) Also I read that for RESTful webservice, the service object is created for every incoming request. Does this not pose problems on huge load? How best Garbage collection works in clearing out the objects after the service invocation is complete.

Please advise.
 
Ivan Krizsan
Ranch Hand
Posts: 2198
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi!
Kumar Raja wrote:1) Is XML/HTTP same as JAX-RS?

Not necessarily. A web service sending and receiving XML over HTTP is not necessarily RESTful and does not have to use JAX-RS.
2) Are there any examples where non SOAP/HTTP binding is mentioned in WSDL ?

WSDL 2.0 can describe RESTful web services etc, but I have never seen any examples of WSDL 1.1 describing a non-SOAP web service.
3) Also I read that for RESTful webservice, the service object is created for every incoming request.

Note that the resource object is not necessarily created, but a representation of the resource.
Database queries may be cached, so in the case there is no cache in front of the RESTful web service, the representation may have to be created over and over again. Of course it may cause problems if there are a high number of concurrent requests and creating the resource representation requires a lot of memory.
However, another reason for using RESTful web services is the opportunity to place a cache in front of the web service. If there are multiple requests for one and the same resource, then the representation may be cached and subsequent requests may never even reach the web service, but may be served from the cache instead.
For instance, you can use the resource URL as cache key and the resource representation as cache value.
Best wishes!
 
Dan Drillich
Ranch Hand
Posts: 1183
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Kumar,

About XML/HTTP - another one of these good IBM articles at Tip: Use XML directly over HTTP for Web services (where appropriate).

As Ivan mentioned caching, the beloved article by Paul Prescod Roots of the REST/SOAP Debate says -

For instance caches know that by default GET is cachable (because it is side-effect-free) but POST is not.


A RESTful web service sends the request via HTTP GET, while a SOAP one is being sent over HTTP POST. Meaning, all the HTTP built in caching can't be used by SOAP. Paul explains it beautifully in his article.

Regards,
Dan
 
Kumar Raja
Ranch Hand
Posts: 547
2
Hibernate Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you Dan and Ivan.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic