Hi,

I would like use CXF- DOSGi in our Eclipse RCP/RAP XDocReport application
http://xdocreport-rap.opensagres.cloudbees.net/xdocreport?startup=fr.opensagres.xdocreport.eclipse.ui.applicationto
manage too Eclispe RCP which calls services with remoting.
We have started that and for Server side it's OK (we espose our services
with REST). But for client I have a question about the URL (endpoint.id) :

If I follow the docs
http://cxf.apache.org/dosgi-spring-dm-demo-page.htmlwe must write this
XML file:

----------------------------------------------------------
<endpoint-descriptions xmlns="http://www.osgi.org/xmlns/rsa/v1.0.0";>

  <endpoint-description>
    <property name="objectClass">
      <array>

        <value>org.apache.cxf.dosgi.samples.springdm.DinnerService</value>
      </array>
    </property>

    <property 
name="endpoint.id">http://localhost:9000/org/apache/cxf/dosgi/samples/springdm/DinnerService</property>

    <property name="service.imported.configs">org.apache.cxf.rs
<http://org.apache.cxf.ws></property>

  </endpoint-description>
</endpoint-descriptions>
----------------------------------------------------------

My problem is that URL is hard coded in the XML file:

----------------------------------------------------------
<property 
name="endpoint.id">http://localhost:9000/org/apache/cxf/dosgi/samples/springdm/DinnerService</property>

----------------------------------------------------------

I would like avoid to hard-coded the base URL "http://localhost:9000";
for each services that I expose. This URL depends on where the
services are deployed.

My question is : exists it a solution to set the base URL in a properties file?

If it's not possible, I thugh I could use jaxrs:client and benefits
from the Spring EL to set the base URL.

----------------------------------------------------------
<jaxrs:client id="restClient"
         address="${baseURL}/test/services/rest"
         serviceClass="org.apache.cxf.dosgi.samples.springdm.DinnerService"
         inheritHeaders="true">
  </jaxrs:client>
----------------------------------------------------------

Many thanks for your help.

Regards Angelo

Reply via email to