Hi Gabriel,
I'm very glad my example helped you!
To make the example work in different machines, you need to change the 
machine's address in the metadata.xml file (under src/main/resources: 
https://github.com/renatoathaydes/osgi-run/blob/master/osgi-run-test/ipojo-dosgi/code-runner-server/src/main/resources/metadata.xml).

Currently, it just binds the server to localhost:

 <property name="org.apache.cxf.ws.address" 
value="http://localhost:8080/coderunner"/>


You should change this to point to either the IP address of the machine within 
your network (something like http://192.168.1.65:8080.... in the machine's 
terminal, type "ifconfig" to find out the machine's IP address), or just a 
hostname if you have one for the server (eg. http://machine01:8080). The 
":8080" refers to the port address. You can choose another port if you want...
Then, in the client's remote-services.xml file 
(https://github.com/renatoathaydes/osgi-run/blob/master/osgi-run-test/ipojo-dosgi/code-runner-ui/src/main/resources/OSGI-INF/remote-service/remote-services.xml),
 also change the server's address.
Notice that this example uses Apache CXF to provide the remote services 
implementation... IPojo just makes it easy to use that.
Check out the Apache CXF documentation for more details about configuring 
remote services:
http://cxf.apache.org/distributed-osgi-greeter-demo-walkthrough.html
Good luck,
Renato


> Date: Mon, 22 Feb 2016 14:30:00 -0300
> Subject: Re: Question about the tutorial "Using Distributed Services with 
> iPOJO"
> From: gabriel.fbsousa...@gmail.com
> To: users@felix.apache.org
> 
> thank you so much for your answer and for your example! it really worked,
> as you said!
> 
> I couldn't understand what was wrong with the example from Apache, but your
> example allowed me to study and understand how an application, using iPojo,
> can work in a server-client structure. It was really helpful.
> 
> I have only one question remaining: what (and how) should I do to execute
> this example in two different PCs (under the same network)? I mean, one of
> them running the Server, and the other PC with the Client. Is it possible?
> 
> Thank you for your help,
> 
> Gabriel
> 
> 2016-02-18 1:47 GMT-03:00 Paulo Renato de Athaydes <
> renatoathay...@hotmail.com>:
> 
> > Hello fellow Brazilian!
> > Here's a demo I wrote using IPojo and D-OSGi (with Gradle and the osgi-run
> > plugin, but these are optional):
> >
> > https://github.com/renatoathaydes/osgi-run/tree/master/osgi-run-test/ipojo-dosgi
> > This code definitely works, hope this helps you find out what's wrong.
> > Let me know if you need more help.
> > Renato
> >
> > Date: Wed, 17 Feb 2016 15:43:54 -0300
> > Subject: Question about the tutorial "Using Distributed Services with
> > iPOJO"
> > From: gabriel.fbsousa...@gmail.com
> > To: users@felix.apache.org
> > CC: sandro.andr...@gmail.com; icaro.je...@gmail.com
> >
> > Good evening,
> >
> > I'm Gabriel, a brazilian student. I tried to study iPOJO, in order to
> > understand how it can help to create and use distributed services. The
> > first tutorial I found was "Using Distributed Services with iPOJO", from
> > the Felix iPOJO documentation, in the following link:
> >
> >
> > http://felix.apache.org/documentation/subprojects/apache-felix-ipojo/apache-felix-ipojo-gettingstarted/apache-felix-ipojo-dosgi.html
> >
> > However, when I tried to follow the steps, I had two problems.
> >
> > The first of them happened when I tried to install/activate the
> > ServiceProvider bundle to the Server side, with the following line:
> > start
> > file:../AdderServiceProvider/target/AdderServiceProvider-0.0.1-SNAPSHOT.jarThe
> > result I got from it was:
> >
> >
> >
> >
> > I don't know how to solve this problem. And since it doesn't work, the
> > service is not available at http://localhost:9090/adder?wsdl.
> >
> > The second problem I got was when trying to install/activate the
> > ServiceImporter bundle into the Client side, with the following line:
> >
> > start
> > file:../AdderServiceImporter/target/AdderServiceImporter-0.0.1-SNAPSHOT.jar
> >
> > I got the following result from it:
> >
> >
> >
> >
> > I think it's important to say that I followed exactly what the tutorial
> > described, using the exact same felix and packages given in the tutorial. I
> > even tried to follow the steps on a different Operational System. Anyone
> > could please give me a hint in what to do to solve these problems?
> >
> > Thank you,
> >
> > Gabriel
> >
> >
                                          

Reply via email to