Consuming Web Service in Classic ASP

Joined
Apr 17, 2009
Messages
2
Reaction score
0
Hi,
I am using the same code to consume web service in my ASP page. I am very new to .ASP page. Please verify the code bellow and let me know where I am wrong.

<html>
<head>
<title></title>
</head>
<body>

<%

Dim webServiceUrl, httpReq, node, myXmlDoc

webServiceUrl = "ttp://cpp.cisco.com/cpp/CPPLDAP/CPPLDAP.asmx/AuthenticateCiscoUser?db=1&_username=MyUserName&_p assword=MyPassword"
Set httpReq = Server.CreateObject("MSXML2.ServerXMLHTTP") '("WinHttp.WinHttpRequest.5.1")

httpReq.Open "GET", webServiceUrl, False
httpReq.Send

Set myXmlDoc =Server.CreateObject("MSXML.DOMDocument")
myXmlDoc.load(httpReq.responseBody)

Set httpReq = Nothing

Set objLst = myxmlDoc.getElementsByTagName("*")
If objLst is Nothing Then
Response.Write("There are no Nodes")
Else
Response.Write("There are nodes")
Response.Write("</BR>Number of nodes in response:" & objLst.length)
'For i = 0 to (objLst.length-1)
'Response.Write(CStr(objLst.item(i).nodeName))
'Next
End If


'Set node = myXmlDoc.documentElement.selectSingleNode("//fullname")
'If Not node Is Nothing Then
'consumeWebService = "<b>No User present in AD</b><font color = blue>" & node.text & "</font>"

'Else
'consumeWebService = "<b>User is present in AD</b>"

'End If

'Response.write(consumeWebService)

%>

</body>
</html>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,537
Members
45,020
Latest member
GenesisGai

Latest Threads

Top