473,386 Members | 1,609 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,386 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 26135
"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: 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: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.