You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cxf.apache.org by "Li, Tao (Tom)" <Ta...@iona.com> on 2006/11/15 07:26:33 UTC

CXF Config Help

Hi Andrea,

Currently does CXF support setting config value into map that means the bean being configed is a map, and the property name is not a field of the bean, but a key for accessing the config value in the map?

Thanks.
Tom

Re: CXF Config Help

Posted by Andrea Smyth <an...@iona.com>.
Dan Diephouse wrote:

> It is possible to set this other ways. If you have a JAX-WS endpoint:
>
> <bean class="org.apache.cxf.jaxws.EndpointImpl" id="...">
>  <property name="binding.mtomEnabled" value="true"/>
> </bean>
>
> Andrea: What does the bean id need to be here?

port QName, i.e. endpointInfo.getName();
The class need not be specified (as it is not instantiated by the 
container), so just the id and abstract="true", or lazy-init="true" will do.
Andrea.

>
> OR if you are using the JaxWsServerFactoryBean:
>
> <bean class="org.apache.cxf.jaxws.JaxWsServerFactoryBean" 
> id="serverFactory">
>  <property name="properties">
>    <map>
>      <entry key="mtom-enabled" value="true"/>
>    </map>
>  </property>
> </bean>
>
> Regards,
> - Dan
>
> Andrea Smyth wrote:
>
>> Li, Tao (Tom) wrote:
>>
>>> Hi Andrea,
>>>
>>> Currently does CXF support setting config value into map that means 
>>> the bean being configed is a map, and the property name is not a 
>>> field of the bean, but a key for accessing the config value in the map?
>>>  
>>>
>> No, the property name must correspond to a field in the bean - or 
>> rather there must be a corresponding setter for the property.
>> Andrea.
>>
>>> Thanks.
>>> Tom
>>>  
>>>
>>
>
>


Re: CXF Config Help

Posted by Dan Diephouse <da...@envoisolutions.com>.
It is possible to set this other ways. If you have a JAX-WS endpoint:

<bean class="org.apache.cxf.jaxws.EndpointImpl" id="...">
  <property name="binding.mtomEnabled" value="true"/>
</bean>

Andrea: What does the bean id need to be here?

OR if you are using the JaxWsServerFactoryBean:

<bean class="org.apache.cxf.jaxws.JaxWsServerFactoryBean" 
id="serverFactory">
  <property name="properties">
    <map>
      <entry key="mtom-enabled" value="true"/>
    </map>
  </property>
</bean>

Regards,
- Dan

Andrea Smyth wrote:

> Li, Tao (Tom) wrote:
>
>> Hi Andrea,
>>
>> Currently does CXF support setting config value into map that means 
>> the bean being configed is a map, and the property name is not a 
>> field of the bean, but a key for accessing the config value in the map?
>>  
>>
> No, the property name must correspond to a field in the bean - or 
> rather there must be a corresponding setter for the property.
> Andrea.
>
>> Thanks.
>> Tom
>>  
>>
>


-- 
Dan Diephouse
(616) 971-2053
Envoi Solutions LLC
http://netzooid.com


Re: CXF Config Help

Posted by Andrea Smyth <an...@iona.com>.
Li, Tao (Tom) wrote:

>Hi Andrea,
>
>Currently does CXF support setting config value into map that means the bean being configed is a map, and the property name is not a field of the bean, but a key for accessing the config value in the map?
>  
>
No, the property name must correspond to a field in the bean - or rather 
there must be a corresponding setter for the property.
Andrea.

>Thanks.
>Tom
>  
>