Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

Javascript is either disabled or not available in your Browser

I am getting a html response instead of xml response when I am running a code to read the catalog response saying Javascript is either disabled or not available in your Browser

I get proper xml response using the same credentials on REST Client on Firefox.

CLM version used is 6.0.3

<body class="claro">
 <noscript><div id="net-jazz-ajax-NoScriptMessage">Javascript is either disabled or not available in your Browser</div></noscript>
 <div id="net-jazz-ajax-InitialLoadMessage">Loading...</div>
 <div id="net-jazz-ajax-WorkbenchRoot"></div>
 
 <script type="text/javascript">
  djConfig = {
   isDebug: false,
   layout: "",
   usePlainJson: true,
   baseUrl: "/jts/web/dojo/",
   locale: "en-us",
   localizationComplete: true
  };
  /*null*/
  net = {jazz: {ajax: {}}};
  net.jazz.ajax._contextRoot = "/jts";
  net.jazz.ajax._appPath = "/jts/auth/authrequired";
  net.jazz.ajax._webuiPrefix = "/web/";
 </script>
 

Code snippet below

XPath catXpath = factory.newXPath();
    catXpath.setNamespaceContext(new RRCconfigNamespaceContextMap(new String[]
      { "rdf", "http://www.w3.org/1999/02/22-rdf-syntax-ns#",
      "oslc_rm","http://open-services.net/xmlns/rm/1.0/"}));
   
    // Parse the response body to retrieve the catalog URI
    InputSource source = new InputSource(rootServicesResponse.getEntity().getContent());
    Node catalogNode = (Node) (catXpath.evaluate(catalogXPath, source, XPathConstants.NODE));
    String serviceProvidersCatalog = catalogNode.getTextContent();
    rootServicesResponse.getEntity().consumeContent();
    System.out.println("serviceProvidersCatalog "+serviceProvidersCatalog);
  
    // Setup the catalog request
    HttpGet catalogDoc = new HttpGet(serviceProvidersCatalog);
    //catalogDoc.addHeader("Accept", "application/rdf+xml");
    //catalogDoc.addHeader("OSLC-Core-Version", "2.0");
    
    catalogDoc.addHeader("Accept", "application/rdf+xml");
    catalogDoc.addHeader("OSLC-Core-Version", "2.0");
   // Access to the Service Providers catalog
    HttpResponse catalogResponse = RRCconfigrHttpUtils.sendGetForSecureDocument(server, catalogDoc, login, password, httpclient,jtsServer);
     RRCconfigrHttpUtils.printResponseBody(catalogResponse);
    if (catalogResponse.getStatusLine().getStatusCode() == 200) {
        XPath spXpath = factory.newXPath();
       spXpath.setNamespaceContext(
      new RRCconfigNamespaceContextMap(new String[]{"rdf","http://www.w3.org/1999/02/22-rdf-syntax-ns#","oslc", "http://open-services.net/ns/core#",
          "dcterms","http://purl.org/dc/terms/","oslc_rm","http://open-services.net/xmlns/rm/1.0/"}));
    
     // Parse the response body to retrieve the Service Provider
       RRCconfigrHttpUtils.printResponseBody(catalogResponse);

0 votes

Comments

 I have very few knowledge about OSLC and JavaScript, but this looks to me like you are not authenticated to the system and you basically get the JTS login page back:


  net = {jazz: {ajax: {}}}; 
  net.jazz.ajax._contextRoot = "/jts"; 
  net.jazz.ajax._appPath = "/jts/auth/authrequired"; 

  net.jazz.ajax._webuiPrefix = "/web/";  


I have had similar issues when not being logged in and using a REST Client. Just a thought.

 Were you able to solve your problem. If Yes can you please guide me how to rectify this issue.



Thank you

1 vote


Accepted answer

Permanent link

Correct, this HTML content is the web login page for RQM.  You need to be authenticated with the RQM server before making any OSLC requests. 

Ralph Schoon selected this answer as the correct answer

0 votes

Comments

Is there an article that explains how to be authenticated with the RQM server ?


3 other answers

Permanent link

I always see this "error" if the URL is in the wrong security zone.

0 votes


Permanent link

 See https://jazz.net/library/article/635 and understand that a REST client embedded in the browser caries the authentication headers and cookies over.

0 votes


Permanent link

You can also look at the source for the RQM API Utility (https://jazz.net/wiki/bin/view/Main/RqmApi#RQM_API_Utility) or OSLC Cleaner Utility (https://jazz.net/wiki/bin/view/Main/RqmOslcQmV2Api#OSLC_Cleaner_Utility).

0 votes

Your answer

Register or log in 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.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details

Question asked: Mar 08 '17, 4:48 a.m.

Question was seen: 5,884 times

Last updated: Nov 02 '18, 10:22 p.m.

Confirmation Cancel Confirm