cxf-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Trenaman, Adrian" <>
Subject RE: Feedback on RESTful services in CXF
Date Wed, 29 Aug 2007 09:08:08 GMT
Hi Dan, 

Thanks for this - have raised CXF-952 and CXF-954 for issues one and two

<pontificationResponse> <!-- Ha ha: Hurray for Wrapped Doc Literal-->
I hadn't realised that we were using a WDSL model under the covers for
our RESTful services; sounds to me like we're pushing a big stone up a
big hill with this approach (as per Jervis's email). There is something
very cool about having a the restful_http_binding demo that lets the
same service be exposed as a web service, XML RESTful service, and JSON
RESTful service, but then, I don't know of anyone who really requires
that kind of flexibility in a production system: designers will have
decided to go one way or the other (WSDL service or REST service). Given
that trying to do both with the same core is causing us grief, I think
it makes sense to separate them out at this point. 

Having our own support for JAX-RS sounds much more attractive: if we
need to implement it ourselves on Apache for licensing reasons then
let's fire ahead. If we can piggyback on Jersey then I'm happy with that
too. If the former, should we spin off a separate Apache project? 


-----Original Message-----
From: Dan Diephouse [] 
Sent: 28 August 2007 21:34
Subject: Re: Feedback on RESTful services in CXF

Trenaman, Adrian wrote:
> First problem: I didn't realise that I needed to have a 
> in the package. Without this, my Person object 
> (which represents the payload of the PUT) has null contents in the 
> serverside code. Through a lot of trial and error I discovered that I 
> hadn't included file in the Java package (it's still

> not clear to me why I should need it...).
I hate how JAXB defaults to UNQUALIFIED, its rather silly.

Did you file a JIRA for this? Sounds like a bug in the schema parsing
> Second problem: for some reason CXF insists that the payload 
> document's root element is not prefixed with an XML namespace prefix. 
> For example; the following valid XML results in a server-side
Did you file a JIRA for this? Sounds like a bug in an interceptor. I
would like to see the stack trace and see if we can get this fixed for
> Third problem: in the update scenario, if I send the XML to 
> /people/123 then the ID (123) gets injected into the payload over the 
> existing id (42). I think this behaviour, where we override the data 
> in the payload, may lead to a lot of confusion: what if someone wants 
> to update the id (or is that RESTful heresy)? what if someone has sent

> the payload to the wrong HTTP URL? Would it be better if we simply 
> reject the call if the "injecting" parameters don't match the payload?
This is part of the problem of trying to fulfill the WSDL2 HTTP Binding.

I should probably look up the details of whats required here.

My original intention was to support the WSDL2 HTTP binding, but its
ended up in soooo many confusing things that I'm beginning to think the
whole HTTP binding as it currently stands is a mistake.

After playing with Jersey (the Sun JSR 311 impl) for a bit, I'm much
more inclined to go down that route. The WSDL model just doesn't work
with REST at all. Right now we have all sorts of weirdness -
wrapped/unwrapped mode being the biggest one. Its a source of
never-ending confusion to users.

Which brings us to the question - how do you properly integrate RESTful
support into a web service framework which operates on a WSDL model :-)

Regarding the future of our REST support, I suppose we have two roads to
go down:
1. Build our own JSR 311 impl. Cons: mapping the internal WSDL like
model to a RESTful one 2. Create bridges to something like Jersey. i.e.
we would just proxy the request. Although at this point, I'm a bit
confused as to what value we're really providing.


- Dan

Dan Diephouse
MuleSource |

IONA Technologies PLC (registered in Ireland)
Registered Number: 171387
Registered Address: The IONA Building, Shelbourne Road, Dublin 4, Ireland

View raw message