Oops, I actually did it by linking the conduit to the service API instead:
<http-conf:conduit name="{http://mynamespace/}IMyService.http-conduit" >
...
</http-conf:conduit>
<jaxrs:client id="MyClientService"
bus="bus"
address="${client.URL}"
serviceClass="mynamespace.IMyService">
This works with CXF 2.4.10 (earlier versions of 2.4 had a bug here). I haven't
tried it with 2.7.X.
If you need to debug it to get the right names, the method that does the bean
initialization of the conduit is
org.apache.cxf.transport.http.HTTPTransportFactory.getConduit(EndpointInfo,
EndpointReferenceType) (at least for 2.4.10)
-----Original Message-----
From: Ivan.Latysh [mailto:[email protected]]
Sent: Wednesday, January 30, 2013 7:33 PM
To: [email protected]
Subject: RE: <cxf-http:conduit/> with parameterizable name
Sven Zethelius wrote
> I've done the below using spring placeholders to swap out the server
> name just fine. You may need to debug into the CXF code that is
> actually building the HttpConduit from the spring to double check the
> actual URL you need to put into there because when I did it I remember
> it being sensitive in what it expected there.
Can you show the snippet ?
The following does work only for the properties, bean names are not resolved ...
<jaxrs:client id="client1"
address="http://${server1.name}:${server1.port}/services/service"/>
<context:property-placeholder/>
<bean
class="org.springframework.web.context.support.ServletContextPropertyPlaceholderConfigurer">
<property name="order" value="1"/>
<property name="ignoreUnresolvablePlaceholders" value="false"/>
</bean>
--
View this message in context:
http://cxf.547215.n5.nabble.com/cxf-http-conduit-with-parameterizable-name-tp5722488p5722531.html
Sent from the cxf-user mailing list archive at Nabble.com.