2017-07-13 4 views
1

Dans le code suivant "Http.ResponseText" retourne un problème de licence.
S'il vous plaît laissez-moi savoir la solution:HttpResponseText Retourne un numéro de licence

popup error

Public Function GetServicebyProjectName (http, url, projectName) 

    Dim text 
    Dim doc 
    Dim xmldoc 
    Dim element, elements 


'http.Open "GET", url&"/rootservices", False 

    ' Since Rational Team Concert workitem catalog service is fixed, skip rootservice 
    ' checking. 
    http.Open "GET", url&"/oslc/workitems/catalog.xml", False 
    http.Send 

    Set doc = http.ResponseXML 

    Set xmldoc = CreateObject("MSXML2.DOMDocument") 

    xmldoc.loadXML(Http.ResponseText) 

    'Obtain list of services from service provider for input project. 
    set elements = xmldoc.getElementsByTagName("oslc_disc:ServiceProvider") 

    For each element in elements 
     If element.text = projectName Then 

      set services = element.getElementsByTagName("oslc_disc:services") 
      For each service in services 

       ' Parse service XML structure to get "rdf.resouce" 
       ' Attribute(0) is the resource value. 
       service_url = service.attributes(0).nodeValue 

      Next 

     End If 
    Next 

    GetServicebyProjectName = service_url 

End Function 

L'erreur pop-up est:

<!DOCTYPE html> Licensed Materials - Property of IBM (c) Copyright IBM Corporation 2005, 2015. All Rights Reserved. 
Note to U.S. Government Users Restricted Rights: Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp. 
<html > <head> <meta http-equiv="content-type" content="text/html; charset=UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=10"> <title> </title> 
<link type="tect/css" rel="stylesheet" href="/ccm/web/_style/?include=A—&etag=DNUG8pOy1Eg_en_US&_proxyURL= %2Fccm&ss=K7RWd"> <link rel="shortcut icon" href="/ccm/web/netjazz.ajailjazz.ico"> 
< style type="tect/css"> #net-jazz-ajax-NoScriptMessage { width: 100%; color: #000000; font-size gem; text-align: center; position: absolute top: 1%; z-index: 999; 
</style> 
</head> 
<body class="claro"> <noscript> <div id="net-jazz-ajax-NoScriptMessage">lavascript is either disabled or not available in your Browser</div> </noscript> <div id="net-jazz-ajax-InitialLoadMessage"> Loading...</div> 

pour référence:

Public Function JazzLogin(url, userid, password) 

    Dim jazzUserid 
    Dim JazzPassword 

    JazzUserid = "j_username=jazzadmin" 
    JazzPassword = "j_password=jazzadmin" 


    Set http = CreateObject("MSXML2.serverXMLHTTP")[enter image description here][1] 

    ' login to jazz server specified in the parameter section. 
    http.Open "GET", url&"/authenticated/identity", False 
    http.Send 

    http.Open "POST", url&"/authenticated/j_security_check", False 
    http.setRequestHeader "Content-Type", "application/x-www-form-urlencoded" 
    http.Send JazzUserid&"&"&JazzPassword 

    Set JazzLogin = http 


End Function 

Répondre

1

Il n'est pas un « problème de licence ".
La licence fait simplement partie de l'en-tête de la page HTML renvoyée par votre requête.
Le message réel dans cette page HTML est:

Javascript is either disabled or not available in your Browser 

Comme seen here, c'est un symptôme d'un manque d'authentification. Ou votre fonction d'authentification n'a pas entièrement fonctionné.