On 17 Apr 2014, at 5:50 PM, Sergey Beryozkin <[email protected]> wrote:
> It is not possible to return Response<User>. > If you only had > > <representation mediaType="application/xml"/> > > then you'd get Response, but I agree having a schema element reference may be > useful for the 3rd party consumers of WADL. > > We will need to introduce an option to return Response even if a link to the > generated class like Users is available As a workaround I tried to override the mapping through the use of the -tMap option as per the docs at http://cxf.apache.org/docs/jaxrs-services-description.html. I got the error that the -tMap option was unexpected. [ERROR] Failed to execute goal org.apache.cxf:cxf-wadl2java-plugin:2.7.10:wadl2java (generate-sources) on project users-api: org.apache.cxf.tools.common.toolspec.parser.BadUsageException: Unexpected option: -tMap {http://foo.bar.net/users-api/user}date=net.bar.foo.users.jaxrs.service.UserResponse -> [Help 1] I tried to specify it like this: <extraargs> <extraarg>-generateEnums</extraarg> <extraarg>-noVoidForEmptyResponses</extraarg> <extraarg>-tMap {http://foo.bar.net/users-api/user}date=net.bar.foo.users.jaxrs.service.UserResponse</extraarg> <extraarg>-tMap {http://foo.bar.net/users-api/group}date=net.bar.foo.users.jaxrs.service.GroupResponse</extraarg> <extraarg>-tMap {http://foo.bar.net/users-api/role}date=net.bar.foo.users.jaxrs.service.RoleResponse</extraarg> </extraargs> Is there another way to do this? Regards, Graham --
