Hi James,
While it could be called a REST binding, REST is an architectual style,
not a specific implementation. When we talk about doing REST style
services, usually we're talking about doing HTTP. HTTP is a protocol
just like SOAP. We map operations to resources and http headers to
parameters.
One of the goals is to support the WSDL 2 HTTP binding [1] (which is
part of where the name comes from too). While CXF has some basic
XML/HTTP support it doesn't support the full range of things needed. For
instance, I can't easily map URIs and verbs to operations. With the Java
REST annotations which I've been working on, this is fairly trivial:
@Get
@HttpResource(location="/customers/{id}")
public Customer getCustomer(String id) { .. }
I can easily map an operation to any URI and also to any verb via
@Get/@Post/@Delete/@Put.
Does that help answer your questions?
- Dan
1. http://www.w3.org/TR/wsdl20-adjuncts/#http-binding
2. http://jra.codehaus.org
James Mao wrote:
Hi Dan,
What's the 'HTTP binding' for? is it just for REST?
If so why call it 'HTTP binding'? can we call it 'REST binding'?
'HTTP' sounds just like a transport.
The 'HTTP binding' is use HTTP transport, right? so we have 'HTTP over
HTTP'? sounds weird.
Another question is that current CXF REST support is based on
JAX-WS, why we need the 'HTTP binding' to expose the JAX-WS service
again?
Thanks,
James.
Author: dandiep
Date: Mon Oct 23 11:52:16 2006
New Revision: 467080
URL: http://svn.apache.org/viewvc?view=rev&rev=467080
Log:
Add an "HTTP binding" which uses the Java Rest Annotations (new
project at the
Codehaus which James Strachan and I started) to expose JAX-WS
services as REST style services.
Thanks to Guillaume Nodet who supplied the IriDecoderHelper class
which was
indispensible.
Currently this just includes:
o simple server side functionality to take JAX-WS operations and
expose them
as resources using the @HttpResource annotation and
@Get/@Put/@Post/@Delete.
o Ability to take URI parameters and construct an incoming XML document
according to WSDL 2 spec
o Ability to take URI parameters and an incoming XML document and
merge them
Other things in this commit:
o Fixed the JAXBDataBinding so we didn't twice initialize the Types
if the WSDLServiceBuilder already did it.
o Added support for recognizing unwrapped operations in
XMLOutInterceptor
--
Dan Diephouse
(616) 971-2053
Envoi Solutions LLC
http://netzooid.com