It's all about the answers!

Ask a question

Unable to initialize JazzRootServicesHelper class with webContextUrl for QM and OSLC constants from OSLC4Net


Sach Pat (112) | asked Feb 18 '21, 4:07 a.m.
edited Feb 18 '21, 4:18 a.m.

 I am trying get the service provider catalog from QM root services with the help of JazzRootServicesHelper class from OSLC4Net library.

When I tried to initialize the JazzRootServicesHelper with below code:
//Step 1
JazzRootServicesHelper helper = new JazzRootServicesHelper(webContextUrl, OSLCConstants.OSLC_QM_V2);

//STEP 2: Create a new Form Auth client with the supplied user/password
JazzFormAuthClient client = helper.InitFormClient(user, passwd);

//STEP 3: Login in to Jazz Server
if (client.FormLogin() == HttpStatusCode.OK)
{
Console.WriteLine("Jazz client login sucessfully ");
//STEP 4: Get the URL of the OSLC QualityManagement catalog
String catalogUrl = helper.GetCatalogUrl();

//STEP 5: Find the OSLC Service Provider for the project area we want to work with
String serviceProviderUrl = client.LookupServiceProviderUrl(catalogUrl, projectArea);

//STEP 6: Get the Query Capabilities URL so that we can run some OSLC queries
String queryCapability = client.LookupQueryCapability(serviceProviderUrl,
  OSLCConstants.OSLC_QM_V2,
  OSLCConstants.QM_TEST_RESULT_QUERY);


}

At Step 1  below Exception occur :

Message = "OSLCC003: An error occurred processing the root services document.  Server location: https://servername:9443/qm/rootservice."

InnerException = {"[Line 1 Column 2] Cannot resolve the QName ':html' in the Default Namespace since the namespace is not defined.  Did you to forget to define a namespace for the : prefix?\r\n"}


One answer



permanent link
David Honey (1.8k17) | answered Feb 18 '21, 4:47 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

The root services document is usually named rootservices not rootservice.
Check that you can do a GET on the URI using a browser plugin such as Poster, RESTed etc.

You might also want to post your question on OSLC Forum for OSLC4NET since OSLC4NET is OSLC Open Project code and not Jazz code.


Comments
Sach Pat commented Feb 18 '21, 10:36 p.m.
Thanks for the information.

 

Your answer


Register or to post your answer.


Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.