Hi everybody,

I configure in camel.xml a serviceFactory which should inject some dummy
security context

/<beans xmlns="http://www.springframework.org/schema/beans";
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
           xmlns:cxf="http://camel.apache.org/schema/cxf"; 
           xmlns:camel="http://camel.apache.org/schema/spring";
       xsi:schemaLocation="
       http://www.springframework.org/schema/beans 
       http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
       http://camel.apache.org/schema/spring 
       http://camel.apache.org/schema/spring/camel-spring.xsd
           http://camel.apache.org/schema/cxf 
           http://camel.apache.org/schema/cxf/camel-cxf.xsd";>  
           
           
  
  
  <cxf:cxfEndpoint id="cdcPersPartnerRelationship"
        address="https://xxxxx/xxxx/PersPartnerRelationship/V4!NS"; 

wsdlURL="target/wsdl/ia-gen/ia_AY1094_provisioning_read_ch_personal_PersPartnerRelationship.wsdl">
        <cxf:properties>
                        <entry key="dataFormat" value="PAYLOAD" />
        </cxf:properties>

        <cxf:serviceFactory> 
      <bean class="com.ubs.pts.util.DummySecurityContextServiceFactory"/> 
    </cxf:serviceFactory>
  </cxf:cxfEndpoint> ..../

Now I get always an exception, which states that he can't write the property

/Invalid property 'serviceFactory' of bean class
[org.apache.camel.component.cxf.CxfSpringEndpoint]: Bean property
'serviceFactory' is not writable or has an invalid setter method. Does the
parameter type of the setter match the return type of the getter?/

I debug mode I found the bean class where camel wants to set the property
'serviceFactory'  attributed:

*org.apache.camel.component.cxf.CxfEndpoint*.

Now analyzing the code there is no set method for serviceFactory but only
setServiceFactoryBean, what puzzles me what I'm doing wrong. Any help
appreciated.

BTW. My ServiceFactor class looks like, follows i.e. let the super class
create the service and attach the security context. Not sure if that plays
already role in the above problem.

import org.apache.cxf.frontend.ClientProxy;
import org.apache.cxf.service.Service;
import org.apache.cxf.service.factory.ReflectionServiceFactoryBean;

/public class DummySecurityContextServiceFactory extends
ReflectionServiceFactoryBean
 {

        public  Service create()  {
                        Service srv = super.create();
                        System.out.println("Attach Dummy Security Context");
                        try {
                
DummySecurityContext.attachDummySecurityContext(ClientProxy.getClient(srv));
                        return srv;
                        } catch (Exception e) { e.printStackTrace();}
                        return null;
        }

}/






 







--
View this message in context: 
http://camel.465427.n5.nabble.com/ServiceFactoryBean-attribute-cannot-be-set-via-camel-xml-tp5746994.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to