cxf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ivan Bondarenko (JIRA)" <j...@apache.org>
Subject [jira] [Comment Edited] (CXF-5362) Spring jaxrs scheme and bean definition parser must allow alternative property setting
Date Fri, 25 Oct 2013 14:52:30 GMT

    [ https://issues.apache.org/jira/browse/CXF-5362?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13805348#comment-13805348
] 

Ivan Bondarenko edited comment on CXF-5362 at 10/25/13 2:50 PM:
----------------------------------------------------------------

Schema allows it, but JAXRSServerFactoryBeanDefinitionParser.mapElement(...) method handles
inner elements in a certain way, so any tag inside <jaxrs:serviceBeans> will be interpreted
as an element of list. xsd:anyType must be applied one level upper (to jaxrs:server) or something
like this.
As for "ref" attribute, it is better than nothing, but it restricts to using only ref, while
one may want to use tags from "util" or something else.
Meanwhile, we are creating server in pure spring way: {code}<bean class="org.apache.cxf.jaxrs.spring.JAXRSServerFactoryBeanDefinitionParser$SpringJAXRSServerFactoryBean"
init-method="init">...</bean>{code}
Not bad actually, though using jaxrs:server is kind of higher abstraction level.
As for what I want to do is something like this:
{code}<jaxrs:server>
	<property name="serviceBeans">
		<myNameSpace:doSomethingComplicated/>
	<property>
</jaxrs:server>{code}
or maybe even
{code}<jaxrs:server>
	<myNameSpace:setInComplicatedWay name="serviceBeans" />
</jaxrs:server>{code}


was (Author: buzzeri):
Schema allows it, but JAXRSServerFactoryBeanDefinitionParser.mapElement(...) method handles
inner elements in a certain way, so any tag inside <jaxrs:serviceBeans> will be interpreted
as an element of list. xsd:anyType must be applied one level upper (to jaxrs:server) or something
like this.
As for "ref" attribute, it is better than nothing, but it restricts to using only ref, while
one may want to use tags from "util" or something else.
Meanwhile, we are creating server in pure spring way: {code}<bean class="org.apache.cxf.jaxrs.spring.JAXRSServerFactoryBeanDefinitionParser$SpringJAXRSServerFactoryBean"
init-method="init">...</bean>{code}
Not bad actually, though using jaxrs:server is kind of higher abstraction level.
As for what I want to do is something like this:
{code}<jaxrs:server>
	<property name="serviceBeans">
		<myNameSpace:doSomethingComplicated/>
	<property>
</jaxrs:server>{code}

> Spring jaxrs scheme and bean definition parser must allow alternative property setting
> --------------------------------------------------------------------------------------
>
>                 Key: CXF-5362
>                 URL: https://issues.apache.org/jira/browse/CXF-5362
>             Project: CXF
>          Issue Type: Improvement
>          Components: JAX-RS
>            Reporter: Ivan Bondarenko
>
> http://cxf.apache.org/schemas/jaxrs.xsd scheme in conjunction with JAXRSServerFactoryBeanDefinitionParser
class must allow alternative property set.
> For example to set 'serviceBeans' now one must write:
> {code}<jaxrs:server>
> 	<jaxrs:serviceBeans>
> 		<ref bean="bean1"/>
> 		...
> 		<ref bean="beanN"/>
> 	</jaxrs:serviceBeans>
> </jaxrs:server>{code}
> However there is no way to set this if number and set of beans is unknown beforehand
(in case of different configurations etc).
> The easiest and most non-breaking way I see is to allow in scheme the default bean tags
everywhere properties can be set. So user can do e.g. following:
> {code}<jaxrs:server>
> 	<property name="serviceBeans">
> 		_something_here_
> 	<property>
> </jaxrs:server>{code}
> Thus user can put almost anything (probably calculated in a complicated way) into 'serviceBeans'
(and other properties).



--
This message was sent by Atlassian JIRA
(v6.1#6144)

Mime
View raw message