setServer
Description
Examples
This example shows how to create an OSLC client in MATLAB® and configure the client to connect to an OSLC service provider for the requirements management domain.
Create the OSLC client.
myClient = oslc.Client;
Set the user and server URL for your service provider. Then set the service root and catalog path for the requirements management domain and the configuration query path.
setUser(myClient,'jdoe'); setServer(myClient,'https://localhost:9443'); setServiceRoot(myClient,'rm'); setCatalogPath(myClient,'/oslc_rm/catalog'); setConfigurationQueryPath(myClient,'gc/oslc-query/configurations'); myClient
Log in to the client and enter your credentials when prompted.
login(myClient);
Get the available service providers in the specified catalog path and service root. Set the OSLC client to the desired service provider.
providers = getServiceProviderNames(myClient)
providers =
4×1 cell array
{'OSLC Plugin' }
{'Model Based Design with OSLC' }
{'OSLC4RM' }
{'Interactive Testing (Requirements Management)'}setServiceProvider(myClient,'OSLC Plugin');If applicable, get the available configuration contexts. Set the OSLC client to the desired configuration context.
configurations = getConfigurationContextNames(myClient)
configurations =
2×1 cell array
{'Initial Development'}
{'Initial Baseline' }setConfigurationContext(myClient,'Initial Development');Inspect the client properties.
myClient
myClient =
Client with properties:
ServiceProvider: 'OSLC Plugin'
ConfigurationContext: 'Initial Development'
CatalogUrl: 'https://localhost:9443/rm/oslc_rm/catalog'Input Arguments
OSLC client, specified as an oslc.Client object.
OSLC server URL to set the OSLC client to, specified as a character vector.
Version History
Introduced in R2021a
See Also
oslc.Client | setCatalogPath | setServiceRoot | login | setUser
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Sélectionner un site web
Choisissez un site web pour accéder au contenu traduit dans votre langue (lorsqu'il est disponible) et voir les événements et les offres locales. D’après votre position, nous vous recommandons de sélectionner la région suivante : .
Vous pouvez également sélectionner un site web dans la liste suivante :
Comment optimiser les performances du site
Pour optimiser les performances du site, sélectionnez la région Chine (en chinois ou en anglais). Les sites de MathWorks pour les autres pays ne sont pas optimisés pour les visites provenant de votre région.
Amériques
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)