在下面的代码中,“Http.ResponseText
”会返回某些许可证问题
请让我知道解决方案:
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
弹出错误是:
<!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>
供参考:
Public Function JazzLogin(url, userid, password)
Dim jazzUserid
Dim JazzPassword
JazzUserid = "j_username=jazzadmin"
JazzPassword = "j_password=jazzadmin"
Set http = CreateObject("MSXML2.serverXMLHTTP")
' 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
答案 0 :(得分:1)
这不是“许可证问题” 许可证只是查询返回的HTML页面标题的一部分 该HTML页面中的实际消息是:
Javascript is either disabled or not available in your Browser
作为seen here,这是缺乏身份验证的症状。或者您的身份验证功能无法完全正常工作。