Hi

If you are using Camel 2.9.0-SNPSHOT, the cxfEndpoint support placeholders out of box.
As the cxfEndpoint can't deal with the xmlns:tns with the placeholder,
You have to use the placeholders on the serviceName and endpointName like this

<cxf:cxfEndpoint id="referentielOut" address="{{referentiel.address}}"
wsdlURL="{{referentiel.wsdl}}" serviceName="{referentiel.serviceName}"
                endpointName="{referentiel.endpointName}" />

You can find more information about the issue CAMEL-4351[1]

[1]https://issues.apache.org/jira/browse/CAMEL-4351

On Wed Sep 28 16:36:49 2011, cexbrayat wrote:
Hi,

I'm trying to do a very simple thing : externalize a few properties of my
endpoints in a file (some properties such as the endpoint's address depends
on the target platform) but I can't get it done.

Here's my camel-context.xml

        <bean id="referentielProperties"
                
class="org.apache.camel.component.properties.PropertiesComponent">
                <property name="location" value="classpath:endpoint.properties" 
/>
        </bean>
        
        <camelContext xmlns="http://camel.apache.org/schema/spring";>
                <package>com.groupemb</package>
        </camelContext>

        <cxf:cxfEndpoint id="referentielOut" address="{{referentiel.address}}"
                wsdlURL="{{referentiel.wsdl}}" 
serviceName="tns:PanierApiService"
                endpointName="tns:PanierApiPort" 
xmlns:tns="{{referentiel.namespace}}">
                <cxf:properties>
                        <entry key="dataFormat" value="PAYLOAD" />
                </cxf:properties>
        </cxf:cxfEndpoint>

I thought it would be pretty straightforward but I might be missing
something as my properties aren't replaced. I also tried to use a Spring
PropertyPlaceholder instead of Camel PropertiesComponent. I shall add that
everything works fine without properties.

Any ideas ?

--
View this message in context: 
http://camel.465427.n5.nabble.com/CXF-endpoint-and-properties-tp4848384p4848384.html
Sent from the Camel - Users mailing list archive at Nabble.com.



--
Willem
----------------------------------
FuseSource
Web: http://www.fusesource.com
Blog:    http://willemjiang.blogspot.com (English)
         http://jnn.javaeye.com (Chinese)
Twitter: willemjiang
Weibo: willemjiang

Reply via email to