Hi Team,

Currently I was helping a team in building rest based services using CXF. I
noticed that for bean based service arguments (*Ex. String
getData(@FormParam("") TestObj tObj)*)
you have to include @FormParam with empty qualifer name and the request
parameter should follow bean property naming conventions. Say example
if TestObj has a property 'userName' (which is java style) then the request
parameter should be userName=Joe.
But in our requirement (mostly everywhere) the request parameters need not
use the Java Style. Here we were asked to use 'user.name'.

I know for non-bean based parameters CXF supports this as @FormParam("
user.name") String userName, Is this possible for Bean Based also?

As part of providing solution to team, I wrote a CXF Request Handler,
which transforms all the request based parmeters to bean based.
Now the TestObj will looks like,
class TestObject {
       @RequestParam("user.name")
       String userName;
...
}
Using the @ReuestParam I will be identifying the actual request param.
The component I wrote supports primitives, nested beans and collections
also.

*My Suggestion is can you include this feature in next version of CXF? and
Can I contribute my code?*

Biju B

Reply via email to