This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Web Services Certification (SCDJWS/OCEJWSD) and the fly likes Question on other WS binding and JAX-RS Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Certification » Web Services Certification (SCDJWS/OCEJWSD)
Bookmark "Question on other WS binding and JAX-RS" Watch "Question on other WS binding and JAX-RS" New topic
Author

Question on other WS binding and JAX-RS

Kumar Raja
Ranch Hand

Joined: Mar 18, 2010
Posts: 518
    
    2

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.


Regards
KumarRaja

Ivan Krizsan
Ranch Hand

Joined: Oct 04, 2006
Posts: 2198
    
    1
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!

My free books and tutorials: http://www.slideshare.net/krizsan
Dan Drillich
Ranch Hand

Joined: Jul 09, 2001
Posts: 1168
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

William Butler Yeats: All life is a preparation for something that probably will never happen. Unless you make it happen.
Kumar Raja
Ranch Hand

Joined: Mar 18, 2010
Posts: 518
    
    2

Thank you Dan and Ivan.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Question on other WS binding and JAX-RS
 
Similar Threads
What certification to choose?
Questions from RMH
How to access a remote SOAP using JAX-WS
New To Web Service
Passing binary files in webservices