Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » Eclipse Communications Framework (ECF) » EDEF xml Multiple endpoint problem(Can't get multiple services discovered through xml file)
EDEF xml Multiple endpoint problem [message #662793] Thu, 31 March 2011 23:51 Go to next message
Ajay  is currently offline Ajay Friend
Messages: 3
Registered: March 2011
Junior Member
I've run into several problems getting remote services working with ecf. I started with the the remoteservices.hello example (3-13-2011 release) and this wiki page.

The example works fine, but when I try to add multiple endpoint-description blocks in the same file, ecf only recognizes the first one. It looks like it may be a problem with the xml parser.

To get around that, I split up into multiple xml files. The files loaded fine, but still only my first service was reachable. I set endpoint.service.id to 0 like on the wiki page.

The only way I could get it to work was to start the server, note the endpoint.service.id that each service registered with, then use that id in the edef xml file on the client side. But these ids are generated at run time on the server side, so this is not a real solution.

Any thoughts on what I might be doing wrong?


Multiple services worked great with zeroconf/ecf-generic, but I've had these problems using edef/ecf-generic.


org.eclipse.ecf.osgi.services.remoteserviceadmin_1.0.0.v2011 0313-1843.jar

Here's one of my xml files. The others are the same with only the objectClass changed.

<?xml version="1.0" encoding="UTF-8"?>
<endpoint-descriptions xmlns="http://www.osgi.org/xmlns/rsa/v1.0.0">
  <endpoint-description>
    <property name="ecf.endpoint.id.ns" value-type="String" value="org.eclipse.ecf.core.identity.StringID"/>
    <property name="endpoint.framework.uuid" value-type="String" value="70cd3d4b-4931-0010-1b63-d64101cefd5e"/>
    <property name="endpoint.id" value-type="String" value="ecftcp://localhost:3787/server"/>
    <property name="endpoint.service.id" value-type="Long" value="0"/>
    <property name="objectClass" value-type="String">
      <array>
        <value>com.example.MyServiceInterface</value>
      </array>
    </property>
    <property name="remote.configs.supported" value-type="String">
      <array>
        <value>ecf.generic.server</value>
      </array>
    </property>
    <property name="remote.intents.supported" value-type="String">
      <array>
        <value>passByValue</value>
        <value>exactlyOnce</value>
        <value>ordered</value>
      </array>
    </property>
    <property name="service.imported" value-type="String" value="true"/>
    <property name="service.imported.configs" value-type="String">
      <array>
        <value>ecf.generic.server</value>
      </array>
    </property>
  </endpoint-description>
</endpoint-descriptions>


Re: EDEF xml Multiple endpoint problem [message #663078 is a reply to message #662793] Sun, 03 April 2011 10:08 Go to previous messageGo to next message
Markus Kuppe is currently offline Markus KuppeFriend
Messages: 177
Registered: July 2009
Senior Member
On 04/01/2011 01:51 AM, Ajay wrote:

> The example works fine, but when I try to add multiple
> endpoint-description blocks in the same file, ecf only recognizes the
> first one. It looks like it may be a problem with the xml parser.

Please open a bug report at https://bugs.eclipse.org

> Multiple services worked great with zeroconf/ecf-generic, but I've had
> these problems using edef/ecf-generic.

May I ask why you want to use file based discovery when Zeroconf works
for you?

Markus
Re: EDEF xml Multiple endpoint problem [message #663090 is a reply to message #663078] Sun, 03 April 2011 13:54 Go to previous messageGo to next message
Scott Lewis is currently offline Scott LewisFriend
Messages: 1038
Registered: July 2009
Senior Member
>The example works fine, but when I try to add multiple endpoint-description blocks in the same file, ecf only recognizes the first one. It looks like it may be a problem with the xml parser.

Please do open a bug report for this...as I suspect you are right...some minor issue with the parser not properly handling multiple endpoint descriptions in the edef file parsing.

Re: EDEF xml Multiple endpoint problem [message #663102 is a reply to message #663078] Sun, 03 April 2011 16:30 Go to previous messageGo to next message
Ajay  is currently offline Ajay Friend
Messages: 3
Registered: March 2011
Junior Member
Markus Alexander Kuppe wrote on Sun, 03 April 2011 06:08
On 04/01/2011 01:51 AM, Ajay wrote:

> The example works fine, but when I try to add multiple
> endpoint-description blocks in the same file, ecf only recognizes the
> first one. It looks like it may be a problem with the xml parser.

Please open a bug report at https://bugs.eclipse.org

> Multiple services worked great with zeroconf/ecf-generic, but I've had
> these problems using edef/ecf-generic.

May I ask why you want to use file based discovery when Zeroconf works
for you?

Markus


I've opened bug 341719.

Zeroconf only works in our development environment. For our production environment, we will have two JVMs running on a single ubuntu machine, and it may not have any external network interfaces (only loopback). In this situation, Zeroconf does not seem to work.

For now, I've come up with a (slightly involved) workaround:
On the server side, a RemoteServiceAdminListener stores all services that have been exported. A single ServerInfo service is used to share a list of class/endpoint.service.id pairs with the client.
The client uses edef to 'discover' the ServerInfo service and uses it to retrieve info about the other services exported on the server side. The client then has enough information to create EndpointDescription objects for each of the remote services and imports them with the RemoteServiceAdmin
Re: EDEF xml Multiple endpoint problem [message #663252 is a reply to message #662793] Mon, 04 April 2011 13:15 Go to previous message
Ajay  is currently offline Ajay Friend
Messages: 3
Registered: March 2011
Junior Member
Any thoughts on the endpoint.service.id? What is the proper way to set it?
Previous Topic:XMPPS connection fails on handshake
Next Topic:HTTP POST via ECF
Goto Forum:
  


Current Time: Fri Mar 29 13:00:55 GMT 2024

Powered by FUDForum. Page generated in 0.02592 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top