Hi
Hi All,
A few questions:
1. On methods annotated as POST/PUT/DELETE, should the parameters be using @QueryParam or @FormParam. I see no compilation error
in using both,
It is really up to the developer. I don't think CXF should try to enforce some kind of 'best practice' on individual resources. I
would not be surprised if some services existed which accepted either Query or Form params with both PUT and POST, afaik there's
been some devs in HTML 5.0 forms (can't confirm) to do with PUTs being also supported, etc. A CXF user asked awhile back about
@DELETE methods not accepting queries....
but I see no change in the generated WADL. Actuallt, using @FormParam still yields the
WADL generated as style="query"
See a table in http://www.w3.org/Submission/wadl/#x3-270002.12.2 (parameter of
type 'query' with 'representation' parents)
2. I noticed that with the generated WADL, complex objects are represented as
follows:
<param name="null" style="request_body"/>
Is it possible through annotation, to supply a name?
This is a bug, can you please show the corresponding method signature ? It really should not happen but I've just looked at the
source, it might be that if you have a method like this :
@Consumes("application/x-www-form-urlencoded")
void form(@FormParam("a"), @FormParam("b"), SomeObject someBody)
or
@Consumes("application/x-www-form-urlencoded")
void form(MultivaluedMap map)
I've added a check to the code to ensure no bogus <param name="null" style="request_body"/> is printed...Generally, request bodies
are mapped to representation elements
Using @MatrixParam also changes the style, not sure if this is the same as
before.
@MatrixParam should have a 'matrix' style
cheers, Sergey
Gabo