[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [ecf-dev] Consuming a CXF/DOSGi based Service with ECF Client?
|
I think CXF/DOSGi does register an XML description of the service. In
case of my test service this look like:
<?xml version="1.0" encoding="UTF-8"?>
<endpoint-descriptions xmlns="http://www.osgi.org/xmlns/rsa/v1.0.0">
<endpoint-description>
<property name="endpoint.framework.uuid"
value="7464d128-cdc6-4817-bba8-c89ac18f2d54" />
<property name="endpoint.id" value="http://localhost:9191/libraryservice" />
<property name="endpoint.package.version.de.bht.pfk.serviceinterface"
value="0.0.0" />
<property name="endpoint.service.id" value-type="Long" value="31" />
<property name="objectClass">
<array>
<value>de.bht.pfk.serviceinterface.LibraryServiceREST</value>
</array>
</property>
<property name="org.apache.cxf.rs.address"
value="http://localhost:9191/libraryservice" />
<property name="org.apache.cxf.rs.databinding" value="jaxb" />
<property name="service.imported" value="true" />
<property name="service.imported.configs">
<array>
<value>org.apache.cxf.rs</value>
</array>
</property>
<property name="service.intents">
<array>
<value>HTTP</value>
</array>
</property>
</endpoint-description>
</endpoint-descriptions>
On the other hand, ECF seems to write the serialization of an
IServiceInfo object (wrapped into an
org.eclipse.ecf.provider.zookeeper.core.AdvertisedService object) to the
ZooKeeper node. The output of ZooKeeper for such a node is:
¼Ý ?sr ?java.util.HashMap?+-+?`Ð? ?F
loadFactorI thresholdxp?@ ? t ?discovery.service.locationsr
?java.net.URI¼?x.C×I½? ?L ?stringt ?Ljava/lang/String;xpt
Cecf.osgirsvc://localh
ost:9278/osgirsvc_9s+cJod3za4BEOTmyD7Y6i4nSD4=xt
?node.property.name.protocolsur
?[Ljava.lang.String;¡ÊVþÚ?{G? xp ?t defaultt ?node.property.name.servicesuq
~ ?t ?ecf.osgirsvct §node.property.name.nat ?ianat
?discovery.service.priority
sr ?java.lang.Integer?Ôáñ¸?ç8? ?I ?valuexr ?java.lang.Numberå¼ò??öÓï? xp t ?
discovery.service.weightq ~ ?t node.property.service.propertiessr
+org.eclipse.
ecf.discovery.ServiceProperties±ºƒ¢ô-ƒ2? ?L ?propst
?Ljava/util/Properties;xpsr
¶java.util.Properties9?ðzp6>ÿ? ?defaultsq ~ ?xr
?java.util.Hashtable?+¤%!Jõ©? ?F
loadFactorI thresholdxp?@ ? t ?endpoint.service.idt ?58t Fen
dpoint.package.version.org.eclipse.ecf.examples.remoteservices.hellot
?3.0.0t ?o
bjectClasst 4org.eclipse.ecf.examples.remoteservices.hello.IHellot
?endpoint.fra
mework.uuidt $3815d16d-d0fb-40b8-8922-260ebb056fb8t
?remote.intents.supportedt ?
passByValue exactlyOnce orderedt ?ecf.endpoint.id.nst
¶ecf.namespace.r_osgit ?re
mote.configs.supportedt ¤ecf.r_osgi.peert ?endpoint.idt
?r-osgi://localhost:9278
t ?service.imported.configsq ~ )xpt ?node.property.service.namet
%osgirsvc_9s+cJ
od3za4BEOTmyD7Y6i4nSD4=t ?node.property.name.scopeq ~ x
The method
org.eclipse.ecf.provider.zookeeper.core.ZooDiscoveryContainer::registerService(IServiceInfo
serviceInfo) delegates the registration of the service infos to
org.eclipse.ecf.provider.zookeeper.node.internal.WatchManager::publish(AdvertisedService
published) method.
I think I have to write a new WatchManager implementation to read the
CXF/DOSGi XML service descriptions and to build IServiceInfo objects
based on these. Is that feasable? Should I replace/extend the
implementation or is there a way to register a new one?
Marcus
Am 22.06.2011 13:13, schrieb Markus Alexander Kuppe:
On 06/22/2011 01:03 PM, Marcus Engelhardt wrote:
Hello guys,
I am trying to consume a service which is exported by Apache CXF/DOSGi
to a SOAP/HTTP endpoint. The endpoint is published to the ZooKeeper
discovery which stores a note similar to the one described in the
corresponding tutorial
(http://cxf.apache.org/dosgi-discovery-demo-page.html). I have also
written an ECF based consumer according to the the "Hello World" example
(r-osgi, zookeeper) found in the Apache dev repository.
Unfortunately, the ECF based consumer is not notified by the ZooKeeper
discovery service about the presence of the CXF/DOSGi based service. I
am not sure why this is happening. I also did export the service with
ECF which worked very well. Therefore, my questions are:
1) Is it overall possible to consume such a service with a ECF consumer?
Should be possible. :)
2) If yes, what is necessary to accomplish this? Do I have to write an
adapter (I recognized that both, ECF and CXF/DOSGi) write the service
metadata in different formats to the Zookeeper node) for it?
What does the metadata look like for ECF and CXF?
Markus
_______________________________________________
ecf-dev mailing list
ecf-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/ecf-dev