You can use
org.apache.cxf.rs.address=/myservice
or
org.apache.cxf.ws.address

If you use a path that starts with "/" then CXF uses the http service. So not every service needs it own port.

See this for a full example:
https://github.com/cschneider/Karaf-Tutorial/blob/master/tasklist-ds/service/src/main/java/net/lr/tasklist/service/TaskServiceRest.java

On the client you can not change the url. The idea in DOSGi is that the endpoint is published to discovery and the client picks up these settings.

Btw. If you use DOSGi you should also take a look at:
http://aries.apache.org/modules/rsa.html

We just moved the core of CXF-DOSGi to Apache Aries. There is also a new transport using java serialization over tcp. So if you just need transparent remoting then this might be handy as you do not have all the CXF deps.

Christian

On 15.03.2016 11:20, conejo wrote:
Good Morning.
When I run a cxf-dosgi service on a remote instance I get the following
output:
java.net.ConnectException: Invoking ConnectException http: // localhost:
9000
...

I guess karaf are using localhost and port 9000 by default.

How I can specify the host and port where the services are?
Both server and client.

Thanx



--
View this message in context: 
http://karaf.922171.n3.nabble.com/CXF-Dosgi-tp4045786.html
Sent from the Karaf - User mailing list archive at Nabble.com.


--
Christian Schneider
http://www.liquid-reality.de

Open Source Architect
http://www.talend.com

Reply via email to