Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > my code for calling webservice in asp is not working

Reply
Thread Tools

my code for calling webservice in asp is not working

 
 
sphere sphere is offline
Junior Member
Join Date: May 2008
Posts: 1
 
      05-22-2008
<head>
<meta http-equiv="Content-Language" content="en-us">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<meta name="GENER0ATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title>New Page 1</title>
</head>
<body>



<form name="form1" method="get">
<p>empdata&nbsp;&nbsp;&nbsp; <input type="text" name="empno" size="20">&nbsp;
FirstName <input type="text" name="FristName" size="20">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs p;&nbsp;&nbsp;&nbsp;
<input type="submit" value="Submit" name="B1"></p>
<p>&nbsp;</p>
</form>

<%
if request.form("B1")="Submit" then

Response.Write empdata("12345")

Function pandata(empno)
Dim webServiceUrl, httpReq, node, myXmlDoc


webServiceUrl = "http://localhost/webservices/MyWebService.asmx/empdata?empno='12345'"

Set httpReq = Server.CreateObject("MSXML2.ServerXMLHTTP")

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

Set myXmlDoc = Server.CreateObject("MSXML.DOMDocument")



myXmlDoc.load(httpReq.responseBody)

Set httpReq = Nothing

Set node = myXmlDoc.documentElement.selectSingleNode("//empdata1")


If Not node Is Nothing Then
empdata = node.text

Exit Function
Else
empdata = "<b>There is no data associated with this empno.</b>"
Exit Function
End If
End Function
--------------------------------------------------------------
thanks in advance



End Function
End If
%>
</body>
</html>
 

Last edited by sphere; 05-28-2008 at 08:54 AM..
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem! webservice.htc calling nonsecure webservice from a secured ssl https webpage batista ASP .Net 1 01-26-2006 12:05 PM
Problem! webservice.htc calling nonsecure webservice from a secured ssl https webpage batista ASP .Net Web Services 0 01-26-2006 08:14 AM
Problem! webservice.htc calling nonsecure webservice from a secured ssl https webpage batista ASP .Net 0 01-26-2006 08:13 AM
Calling a webservice from a webservice bgauvey@gmail.com ASP .Net Web Services 2 04-20-2005 02:02 PM
Webservice calling a webservice.....Error Peter Nordström ASP .Net Web Services 0 10-21-2003 12:02 PM



Advertisments