We've been using @XPathParam annotations for a while, but the supported data types are too limiting. This becomes very clear with web services being passed a user context object as their first parameter. Setting up an XPathParam annotation for each user context field in the endpoint methods spoils the elegance of using XPathParam annotations.
The attached patch makes it possible to define your endpoint methods like this:
by creating a UserContextParamConverter handling the conversion from a Node to the UserContext object, and registering this converter using the converters property in the bean definition of the ExtendableXPathParamAnnotationMethodEndpointAdapter class.
This implementation tries XPathParamAnnotationMethodEndpointAdapter's conversion support first, then asks each converter registered. If my approach makes sense, theres no reason why the existing conversion support cannot be moved into it's own ParamConverter implementation as well.
Please let me know if this is useful or if there are changes I could make to make it more acceptable.
The patch depends on my other issue,
|Fix Version/s||1.6 [ 10981 ]|
|Status||Open [ 1 ]||Resolved [ 5 ]|
|Resolution||Complete [ 8 ]|
|Status||Resolved [ 5 ]||Closed [ 6 ]|
|Transition||Time In Source Status||Execution Times||Last Executer||Last Execution Date|
|495d 20h 57m||1||Arjen Poutsma||04/Jan/11 3:52 AM|
|486d 3h 10m||1||Arjen Poutsma||04/May/12 7:03 AM|