On 30/09/2010 13:36, gk wrote:
Could you please take a look at this..
Unlike SOAP-based web services, which have a standard vocabulary to
describe the web service interface through WSDL, RESTful web services
currently have no such grammar. For a service consumer to understand
the context and content of the data that must be sent to and received
from the service, both the service consumer and service producer must
have an out-of-band agreement. RESTful web services can be built by
JAX-WS standards as any other web service. These web services can be
consumed by Browser or any A J AX code.
I don't understand this part...
service consumer and service producer must have an out-of-band
agreement.
what is out-of-band agreement ? I'm not clear here. If anybody could
shed some light or any example at this part , will be just
wonderful.
I'm not aware of "in-band" being formally defined for WSDL but what they
mean by "out-of-band" is that the web-service deinition is not available
via the same data transport layer as the service itself.
If a web services endpoint is http://example.com/service then you may
often obtain the web-service definition at a related URL such as
http://example.com/service/wsdl - I don't think there is a formal
standard, but there is a convention that this should be the case. This
convention being reinforced by popular web-service tool-kits which
automatically publish WSDL at that URL when you develop or deploy a
web-service.
Some web-service client toolkits can dynamically construct a web-service
request on-the fly from an "in-band" definition with minimal programming.
The only example I know is Perl not Java.
#!perl -w
use SOAP::Lite;
print SOAP::Lite
-> service('http://www.xmethods.net/sd/StockQuoteService.wsdl')
-> getQuote('MSFT');
There are web pages where you can enter the URL of a WSDL and the server
will construct a form for entering the input parameters then construct and
transmit a request and finally display the results.
An "out-of-band" agreement would be where the definition is shared on
paper, by e-mail, by downloading from an ftp server or by some means that
is not using the same transport mechanism or is not at a "location"
prescribed by convention.
For almost all cases, "in-band" definitions are not really much more than
a slight convenience.
It's a bit more serious than that. There are lots of tools than can consume
WSDL and thus generate clients, or at least the stubs of clients. Lacking a
be hand-coded. That's a large difference in convenience.