camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stan Lewis <gashcr...@gmail.com>
Subject Re: newbie: Camel for Non CXF webservices
Date Thu, 17 Sep 2009 23:36:50 GMT
On Thu, Sep 17, 2009 at 7:06 PM, Winsks <abk3419@gmail.com> wrote:
>
> Thanks for the info... I am able to do that now with the help of
> <camel:convertBodyTo type="java.lang.String" /> tag along the route to
> convert the SOAPMessage to string...
> I have an other doubt; While configuring Camel CxF endpoints through spring
> configuration like below,
>
> <cxf:cxfEndpoint id="serviceEndPoint"
>                address="http://localhost:8080/websvc/JaxWsService"
>                serviceClass="com.websvc.jaxws.JaxWs"/>
>
> Are there any way of configuring URL host/port dynamically in Spring
> configuration ?
> any link to tutorial to test case would help..

Use a PropertyPlaceholderConfigurer for that -

    <bean id="propertyConfigurer"
class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
        <property name="location" value="classpath:myconfig.properties"/>
    </bean>

 <cxf:cxfEndpoint id="serviceEndPoint"
                address="http://${some.host}:${some.port}/websvc/JaxWsService"
                serviceClass="com.websvc.jaxws.JaxWs"/>

where "myconfig.properties" would contain -

some.host=localhost
some.port=8080

Mime
View raw message