I need to bind the string value of the spring bean to an existing string and then set it as an attribute of another bean:
<bean id="inet" class="org.springframework.beans.factory.config.MethodInvokingFactoryBean"> <property name="targetClass"><value>java.net.InetAddress</value></property> <property name="targetMethod"><value>getLocalHost</value></property> </bean> <bean id="host" class="org.springframework.beans.factory.config.MethodInvokingFactoryBean"> <property name="targetObject"><ref local="inet"/></property> <property name="targetMethod"><value>getHostName</value></property> </bean>
At this point, I have the host name in the 'host' bean. Now I need to combine it and pass it to the publishEndpointUrl attribute. Something like that:
<jaxws:endpoint id="foo" publishedEndpointUrl= "http://" + host + "/Foo" implementor="com.example.v1.foo" address="/v1/Foo"/>
How to do this using spring xml configuration?
java spring spring-ws jax-ws cxf
rouble
source share