# ServiceProviderCatalog discovery not working with DNG

**URL:** <https://forum.open-services.net/t/serviceprovidercatalog-discovery-not-working-with-dng/627>\
**Category:** Lyo\
**Created:** [May 29, 2022, 9:09pm UTC](https://forum.open-services.net/t/serviceprovidercatalog-discovery-not-working-with-dng/627 "2022-05-29T21:09:55Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![TWilmer](https://forum.open-services.net/user_avatar/forum.open-services.net/twilmer/32/200_2.png) [@TWilmer](https://forum.open-services.net/u/TWilmer)\
**Post date:** [May 29, 2022, 9:09pm UTC](https://forum.open-services.net/t/serviceprovidercatalog-discovery-not-working-with-dng/627/1 "2022-05-29T21:09:55Z")

</div>

Hi

I am new to OSLC/lyo and the @Oslc… magic lyo is using. Bear with me, if I my mistake is obvious.

I use a recent DNG 7.0.2 and I try to use the ETMSample (changes certain locations from QM to RM) after fetching the rootservices it’s loading the catalog from ttps://dng.example.one:9443/rm/oslc\_rm/catalog

\<?xml version="1.0" encoding="UTF-8"?\>

\<oslc\_disc:ServiceProviderCatalog  
xmlns:rdf=“[http://www.w3.org/1999/02/22-rdf-syntax-ns#](http://www.w3.org/1999/02/22-rdf-syntax-ns#)”  
xmlns:dcterms=“[DCMI: DCMI Metadata Terms](http://purl.org/dc/terms/)”  
xmlns:oslc\_disc=“[http://open-services.net/xmlns/discovery/1.0/](http://open-services.net/xmlns/discovery/1.0/)”  
xmlns:jp=“[http://jazz.net/xmlns/prod/jazz/process/1.0/](http://jazz.net/xmlns/prod/jazz/process/1.0/)”  
rdf:about=“[https://dng.example.one:9443/rm/oslc\_rm/catalog](https://dng.example.one:9443/rm/oslc_rm/catalog)”\>  
dcterms:titleRMCatalog\</dcterms:title\>  
\<oslc\_disc:entry\>  
\<oslc\_disc:ServiceProvider\>  
dcterms:titleTest\</dcterms:title\>  
\<oslc\_disc:details rdf:resource=“[https://dng.example.one:9443/rm/process/project-areas/\_HPdqQMCrEeycW9snq2oQSw](https://dng.example.one:9443/rm/process/project-areas/_HPdqQMCrEeycW9snq2oQSw)”/\>  
\<jp:consumerRegistry rdf:resource=“[https://dng.example.one:9443/rm/process/project-areas/\_HPdqQMCrEeycW9snq2oQSw/links](https://dng.example.one:9443/rm/process/project-areas/_HPdqQMCrEeycW9snq2oQSw/links)”/\>  
\<oslc\_disc:services rdf:resource=“[https://dng.example.one:9443/rm/oslc\_rm/\_HPdqQMCrEeycW9snq2oQSw/services.xml](https://dng.example.one:9443/rm/oslc_rm/_HPdqQMCrEeycW9snq2oQSw/services.xml)”/\>  
\</oslc\_disc:ServiceProvider\>  
\</oslc\_disc:entry\>

\</oslc\_disc:ServiceProviderCatalog\>

Which looks like this specification is followed:  
[https://archive.open-services.net/bin/view/Main/OslcServiceProviderCatalogV1.html](https://archive.open-services.net/bin/view/Main/OslcServiceProviderCatalogV1.html)

If I read the class ServiceProviderCatalog I could easily imagine that this specification is followed:

> **[OSLC Core Version 3.0. Part 2: Discovery](https://docs.oasis-open-projects.org/oslc-op/core/v3.0/os/discovery.html#serviceProviderCatalogShape)**
>
> This document outlines a common approach for HTTP/LDP-based servers to be able to publish their RESTful API capabilities and how clients discover and use them.

In line 443 of OslcClient happens the magic to convert this response to a ServiceProviderCatalog  
ServiceProviderCatalog catalog = response.readEntity(ServiceProviderCatalog.class);

In this catalog object the number of ServiceProviders is 0 (catalog.getServiceProviders().length==0).

Obviously lyo is expecting a newer version of the standard than what DNG is providing.

Is there a chance to have a switch to distiguish between these two ServiceProviderCatalog versions?

Could one construct a 150% ServiceProviderCatalog to also digest the DNG Version?

Can I solve this as a user of the lyo API?

How would one model the oslc\_disc:entry?

Would one use an intermediate class entry and then the ServiceProvider or can I kind of “grab-all” ServiceProvider?

Is there a chance to peek into the response to “know” which class to use to decode the response?

Thanks for any help and Kind Regards  
Thorsten

---

<div class="post-metadata">

**Author:** ![TWilmer](https://forum.open-services.net/user_avatar/forum.open-services.net/twilmer/32/200_2.png) [@TWilmer](https://forum.open-services.net/u/TWilmer)\
**Post date:** [May 29, 2022, 10:15pm UTC](https://forum.open-services.net/t/serviceprovidercatalog-discovery-not-working-with-dng/627/2 "2022-05-29T22:15:03Z")

</div>

Hi

to hint someone in the future with the same problem:

DNG is serving the above file in the browser if asksd for RDF like oslc is doing, the right contents is served, with different structure.

The root cause was that the used user for testing didn’t have access to any Project Areas.

Kind Regards  
Thorsten

---

<div class="post-metadata">

**Author:** ![jad](https://forum.open-services.net/user_avatar/forum.open-services.net/jad/32/42_2.png) [@jad](https://forum.open-services.net/u/jad)\
**Post date:** [June 2, 2022, 7:49am UTC](https://forum.open-services.net/t/serviceprovidercatalog-discovery-not-working-with-dng/627/3 "2022-06-02T07:49:36Z")

</div>

So is this problem solved? it was not an issue with Lyo after all?
