Discovering OSLC services

OSLC Services are declared in a way that their URLs should always be discovered and not the result of string concatenations.
The only fixed URL is for the Root Services document and is https://SERVER:PORT/Windchill/oslc-connect/rootservices.

Discovering the Root Services document

The Root Services document is the entry point for recursively discovering OSLC services.
This entry point does not require user authentication.

<rdf:Description rdf:about="https://SERVER:PORT/rest/oslc/1.0/rootservices"
  ...
  <oslc_cm:cmServiceProviders rdf:resource="https://SERVER:PORT/Windchill/oslc-connect/cm/catalog"/>
  ...
  <oslc_am:amServiceProviders rdf:resource="https://SERVER:PORT/Windchill/oslc-connect/am/catalog"/>
  ...
</rdf:Description>

Discovering the Service Provider Catalog

The Service Provider Catalog is the list of Windchill products and libraries for a given OSLC domain.

<rdf:RDF>
  <oslc:ServiceProviderCatalog rdf:about="https://SERVER:PORT/Windchill/oslc-connect/cm/catalog">
    <oslc:serviceProvider>
      <oslc:ServiceProvider rdf:about="https://SERVER:PORT/Windchill/oslc-connect/cm/provider?serviceProvider=PRODUCT_ID>
        <dcterms:title rdf:parseType="Literal">My Project</dcterms:title>
      </oslc:ServiceProvider>
      ...
    </oslc:serviceProvider>
    ...
  </oslc:ServiceProviderCatalog>
</rdf:RDF>

Discovering Service Providers

A Service Provider is an OSLC representation of a Windchill product or library for a given OSLC domain.
A service provider declares OSLC services, that are capabilities exposed for a Windchill product or library. It notably enables querying Windchill artifacts using OSLC vocabulary.

<rdf:RDF 
  ...
  <oslc:ServiceProvider rdf:about="https://SERVER:PORT/Windchill/oslc-connect/cm/provider?serviceProvider=PRODUCT_ID">
    ...
    <oslc:service>
      <oslc:Service>
        <oslc:domain rdf:resource="http://open-services.net/ns/cm#"/>
        <oslc:queryCapability>
          <oslc:QueryCapability>
            <oslc:queryBase rdf:resource="https://SERVER:PORT/Windchill/oslc-connect/cm/query?serviceProvider=OR:wt.pdmlink.PDMLinkProduct:PRODUCT_ID;type=ChangeRequest"/>
            <oslc:resourceType rdf:resource="http://open-services.net/ns/cm#ChangeRequest"/>
          </oslc:QueryCapability>
        </oslc:queryCapability>
        ...
      </oslc:Service>
    </oslc:service>
  </rdf:Description>
</rdf:RDF>