473,382 Members | 1,710 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

Using classic ASP as a web service client

Does any one know of resources or can you offer direction
on how to use classic ASP as a web service client.

I have found all kinds of stuff for the ASP.NET

But, I need to be able tap into a web service from a ASP
3.0 as a client

I have webservice on a IIS platform w/ the SOAP 3.0 kit
installed and can talk to it via a VB 6 client.

I'd like to also connect to it via an ASP page.

Thank in advance for any help.

Keith E.
Jul 19 '05 #1
6 26134
"Keith E." <ke*********@designforum.com> wrote in message
news:33****************************@phx.gbl...
Does any one know of resources or can you offer direction
on how to use classic ASP as a web service client.

I have found all kinds of stuff for the ASP.NET

But, I need to be able tap into a web service from a ASP
3.0 as a client

I have webservice on a IIS platform w/ the SOAP 3.0 kit
installed and can talk to it via a VB 6 client.

I'd like to also connect to it via an ASP page.

Thank in advance for any help.

Keith E.


http://www.4guysfromrolla.com/webtech/070302-1.shtml
Jul 19 '05 #2
Thanks for the tip. Now on to the glitch.

Just to keep things simple and get the maechnics going,
the webserver used for testing, just adds 2 numbers.

Here's the ASP page:

<%@ Language=VBScript %>
<html>
<head>
<title>Call AddServer Webservice</title>
<body>
<%
If Request.ServerVariables("REQUEST_METHOD") = "POST" Then
Dim oSOAP
Set oSOAP = Server.CreateObject("MSSOAP.SoapClient")
oSOAP.ClientProperty("ServerHTTPRequest") = True
oSOAP.mssoapinit
("http://192.168.1.12/WebServices/AddServer.WSDL")
Response.write("Sum 0f " & Request.Form("Num1") & "
+ " & Request.Form("Num2") & " = " & oSOAP.Add(Request.Form
("Num1") ,Request.Form("Num2")) & "<BR>")
End If
Set oSOAP = nothing
%>
<FORM method=POST name="form1">
Enter The numbers to add.<BR>
<INPUT type="text" name="Num1">&nbsp; + &nbsp; <INPUT
type="text" name="Num2">
<BR><BR>
<INPUT type="submit" value="Add" name="submit1">
</form>
</body>
</html>
The

oSOAP.mssoapinit
("http://192.168.1.12/WebServices/AddServer.WSDL")

line fails and produces the following error

Server object, ASP 0177 (0x800401F3)
Invalid ProgID.

Any ideas?

Keith E.
Jul 19 '05 #3
"Keith E." <ke*********@designforum.com> wrote in message
news:01****************************@phx.gbl...
Thanks for the tip. Now on to the glitch.

Just to keep things simple and get the maechnics going,
the webserver used for testing, just adds 2 numbers.

Here's the ASP page:

<%@ Language=VBScript %>
<html>
<head>
<title>Call AddServer Webservice</title>
<body>
<%
If Request.ServerVariables("REQUEST_METHOD") = "POST" Then
Dim oSOAP
Set oSOAP = Server.CreateObject("MSSOAP.SoapClient")
oSOAP.ClientProperty("ServerHTTPRequest") = True
oSOAP.mssoapinit
("http://192.168.1.12/WebServices/AddServer.WSDL")
Response.write("Sum 0f " & Request.Form("Num1") & "
+ " & Request.Form("Num2") & " = " & oSOAP.Add(Request.Form
("Num1") ,Request.Form("Num2")) & "<BR>")
End If
Set oSOAP = nothing
%>
<FORM method=POST name="form1">
Enter The numbers to add.<BR>
<INPUT type="text" name="Num1">&nbsp; + &nbsp; <INPUT
type="text" name="Num2">
<BR><BR>
<INPUT type="submit" value="Add" name="submit1">
</form>
</body>
</html>
The

oSOAP.mssoapinit
("http://192.168.1.12/WebServices/AddServer.WSDL")

line fails and produces the following error

Server object, ASP 0177 (0x800401F3)
Invalid ProgID.

Any ideas?

Keith E.


1. Do you have the SOAP SDK installed on the ASP (classic) web server?
2. Does the version correspond to the one upon which the web service is
deployed?
3. You did not specify a service name in the mssoapinit call. Is the
first service in the WSDL the one with the Add function?

-Chris Hohmann

Jul 19 '05 #4
>1. Do you have the SOAP SDK installed on the ASP
(classic) web server?

Yes the SOAP SDK is installed on the ASP (classic) web
server. However, I am not sure the installation is OK.
When I try and run the WDSL Generator program, it gives
a "runtime error 339 MSCOMCT2.OCX or one of its
dependencies could not be found". Which may indicate all
the parts are not there for IIS as well. So, to generate
the WDSL file I ran the WDSL Generator on my local PC
machine rather than the server and hand edited the path to
the DLL that is the WebSevice. All this works when a VB
application is the client consumer of the Web Service. So,
I figure the WDSL and the WSML and the ASP and the Wgen
files are OK, since the service works with VB client.
2. Does the version correspond to the one upon which the web service is deployed?

Yes the installation of the SOAP kit was a virgin install.
There were not previous versions of the SOAP kit on the
machine.
3. You did not specify a service name in the mssoapinit

call. Is the first service in the WSDL the one with the
Add function?

Not sure how I would specify a service name in
the "mssoapinit". Example?? The Add function is the only
funcion in the web service DLL. I kept things simple,
while I sorted out the mechanics.

Keith E.
Jul 19 '05 #5
Figured it out.

There is a sligh change in object names between the SOAP
2.0 kit and the SOAP 3.0 kit. The
http://www.4guysfromrolla.com/webtech/070302-1.shtml
uses 3.0. So, MSSOAP.SoapClient needs to be
MSSOAP.SoapClient30

The following code works.

<%@ Language=VBScript %>
<html>
<head>
<title>Call AddServer Webservice</title>
<body>
<%
If Request.ServerVariables("REQUEST_METHOD") = "POST" Then
Dim oSOAP
Set oSOAP = Server.CreateObject("MSSOAP.SoapClient30")
oSOAP.ClientProperty("ServerHTTPRequest") = True
'Response.Write oSOAP.detail & "<br><br>"

oSOAP.mssoapinit "http://192.168.1.12/WebServices/AddServer
..WSDL","AddServer"
Response.write("Sum 0f " & Request.Form("Num1") & "
+ " & Request.Form("Num2") & " = " & oSOAP.Add(Request.Form
("Num1") ,Request.Form("Num2")) & "<BR>")
End If
Set oSOAP = nothing
%>
<FORM method=POST name="form1">
Enter The numbers to add.<BR>
<INPUT type="text" name="Num1">&nbsp; + &nbsp; <INPUT
type="text" name="Num2">
<BR><BR>
<INPUT type="submit" value="Add" name="submit1">
</form>
</body>
</html>

Jul 19 '05 #6
"Keith E." <ke*********@designforum.com> wrote in message
news:05****************************@phx.gbl...
Figured it out.

There is a sligh change in object names between the SOAP
2.0 kit and the SOAP 3.0 kit. The
http://www.4guysfromrolla.com/webtech/070302-1.shtml
uses 3.0. So, MSSOAP.SoapClient needs to be
MSSOAP.SoapClient30

The following code works.

<%@ Language=VBScript %>
<html>
<head>
<title>Call AddServer Webservice</title>
<body>
<%
If Request.ServerVariables("REQUEST_METHOD") = "POST" Then
Dim oSOAP
Set oSOAP = Server.CreateObject("MSSOAP.SoapClient30")
oSOAP.ClientProperty("ServerHTTPRequest") = True
'Response.Write oSOAP.detail & "<br><br>"

oSOAP.mssoapinit "http://192.168.1.12/WebServices/AddServer
.WSDL","AddServer"
Response.write("Sum 0f " & Request.Form("Num1") & "
+ " & Request.Form("Num2") & " = " & oSOAP.Add(Request.Form
("Num1") ,Request.Form("Num2")) & "<BR>")
End If
Set oSOAP = nothing
%>
<FORM method=POST name="form1">
Enter The numbers to add.<BR>
<INPUT type="text" name="Num1">&nbsp; + &nbsp; <INPUT
type="text" name="Num2">
<BR><BR>
<INPUT type="submit" value="Add" name="submit1">
</form>
</body>
</html>


Glad you got it working. As you already figured out, the second
parameter of the mssoapinit method is the service name. As a general
note, Microsoft seems to be making a move to deprecate version
independent component calls as demonstrated both in this case and in the
case of MSXML 4.0. In the long run I feel this is a good thing, but in
the short term, it's worth being aware of.

HTH
-Chris Hohmann
Jul 19 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

19
by: Adam Short | last post by:
I am trying to write a routine that will connect a .NET server with a classic ASP server. I know the following code doesn't work! The data is being returned as a dataset, however ASP does not...
0
by: obhayes | last post by:
Hi All, Im using classic ASP (3.0) and I have a web farm with 2 webservers (webserver A and webserver B, both windows server 2003). I do not want to store any client specific information on the...
1
by: Van Steenbergen Jan | last post by:
Hi everyone, I'm making a SOAP request to a webservice from classic asp with(SOAP Toolkit v3.0). This function has to return the XML document or the xmlstring to the classic asp page. How can...
3
by: Brian Birtle | last post by:
**** A CHALLENGE TO THE GURUS - refute the statement "It's impossible to build a file upload progress meter using ASP.NET" **** First person to prove me wrong gets "All Time .NET Programming GOD"...
3
by: Michael Hoehne | last post by:
Hi, I'm currently facing a problem with a mixed environment using .NET 1.1 and ..NET 2.0 web services. We have a client application (the "client", system 1) running on .NET 2.0/WinXP, calling...
5
by: David Lozzi | last post by:
Howdy, I wrote a web service in .Net for my customer. My customer has another vendor who now has to consume it but they are not using Visual Studio. Most of their pages are jsp, and they said...
3
by: jwillams77 | last post by:
I have searched extensively though Google and Experts Exchange and have not quite found the answer to this problem. Here is the scenario: I have a .NET 2.0 c# web service that is installed...
2
by: adevikreates | last post by:
Greetings All! I have a Java Web service that I wrote. I need to use Classic ASP as the client for this web service. I have the following code in an asp page but I keep getting an error that...
4
by: =?Utf-8?B?TWlrZSBHYWxl?= | last post by:
VS 2008 initially didn't debug classic ASP. SP1 fixes this in some ways. You can debug if you select the debug option to "Start Without Debugging, then either attach the debugger manually or...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.