473,734 Members | 2,211 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 26184
"Keith E." <ke*********@de signforum.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=VBScri pt %>
<html>
<head>
<title>Call AddServer Webservice</title>
<body>
<%
If Request.ServerV ariables("REQUE ST_METHOD") = "POST" Then
Dim oSOAP
Set oSOAP = Server.CreateOb ject("MSSOAP.So apClient")
oSOAP.ClientPro perty("ServerHT TPRequest") = True
oSOAP.mssoapini t
("http://192.168.1.12/WebServices/AddServer.WSDL" )
Response.write( "Sum 0f " & Request.Form("N um1") & "
+ " & Request.Form("N um2") & " = " & oSOAP.Add(Reque st.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">&nb sp; + &nbsp; <INPUT
type="text" name="Num2">
<BR><BR>
<INPUT type="submit" value="Add" name="submit1">
</form>
</body>
</html>
The

oSOAP.mssoapini t
("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*********@de signforum.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=VBScri pt %>
<html>
<head>
<title>Call AddServer Webservice</title>
<body>
<%
If Request.ServerV ariables("REQUE ST_METHOD") = "POST" Then
Dim oSOAP
Set oSOAP = Server.CreateOb ject("MSSOAP.So apClient")
oSOAP.ClientPro perty("ServerHT TPRequest") = True
oSOAP.mssoapini t
("http://192.168.1.12/WebServices/AddServer.WSDL" )
Response.write( "Sum 0f " & Request.Form("N um1") & "
+ " & Request.Form("N um2") & " = " & oSOAP.Add(Reque st.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">&nb sp; + &nbsp; <INPUT
type="text" name="Num2">
<BR><BR>
<INPUT type="submit" value="Add" name="submit1">
</form>
</body>
</html>
The

oSOAP.mssoapini t
("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.SoapClie nt needs to be
MSSOAP.SoapClie nt30

The following code works.

<%@ Language=VBScri pt %>
<html>
<head>
<title>Call AddServer Webservice</title>
<body>
<%
If Request.ServerV ariables("REQUE ST_METHOD") = "POST" Then
Dim oSOAP
Set oSOAP = Server.CreateOb ject("MSSOAP.So apClient30")
oSOAP.ClientPro perty("ServerHT TPRequest") = True
'Response.Write oSOAP.detail & "<br><br>"

oSOAP.mssoapini t "http://192.168.1.12/WebServices/AddServer
..WSDL","AddSer ver"
Response.write( "Sum 0f " & Request.Form("N um1") & "
+ " & Request.Form("N um2") & " = " & oSOAP.Add(Reque st.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">&nb sp; + &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*********@de signforum.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.SoapClie nt needs to be
MSSOAP.SoapClie nt30

The following code works.

<%@ Language=VBScri pt %>
<html>
<head>
<title>Call AddServer Webservice</title>
<body>
<%
If Request.ServerV ariables("REQUE ST_METHOD") = "POST" Then
Dim oSOAP
Set oSOAP = Server.CreateOb ject("MSSOAP.So apClient30")
oSOAP.ClientPro perty("ServerHT TPRequest") = True
'Response.Write oSOAP.detail & "<br><br>"

oSOAP.mssoapini t "http://192.168.1.12/WebServices/AddServer
.WSDL","AddServ er"
Response.write( "Sum 0f " & Request.Form("N um1") & "
+ " & Request.Form("N um2") & " = " & oSOAP.Add(Reque st.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">&nb sp; + &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
9328
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 recognise datasets and requires a recordset. Can the datatypes be converted? At the Classic ASP end or .NET end? Can SOAP toolkit provide the conversion, can any toolkit provide a conversion? ...
0
2496
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 webserver (therefore do not intend to use the session object- as you cannot gaurantee which server the user will go to). I want to store a small value (e.g. a Y/N value or an Id) on the client machine for the duration of their browsing session,...
1
6709
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 i do this? Here is how i try todo it now: Public Function getData(ByVal strParamValue As String)
3
2679
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" listing in my address book and (optionally) their name listed on my "news" page of my birtle.com website (listed as "Jane Smith is a Programming GOD") for at least a month. Why not take a moment to read more and possibly boost your ego to all time...
3
5082
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 our web service (The "Web Service Server") running on a separate machine (also .NET 2.0, Win2003 Server, system 2). The web service server (system 2) itself makes calls to methods in the CRM
5
10399
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 they need to consume this web service using HTTP. The developer's IDE is Notepad. Yeah, weird I know. How is this done? I guess if I can get it to run ASP, IDE independant, that should make them happy. Any references you can point me to?
3
13894
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 under a path on our server that requires a client certificate to reach both the service and the website that will use the service. The website however is in classic ASP, so I am having to use MSSOAP 3.0 to call the service from the ASP page. Here is...
2
6448
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 states "Invalid procedure call or argument: 'doScan'" - doScan is the method in my Java Web service. When browsing to the WSDL file I don't get any errors... Set oSOAP = Server.CreateObject("MSSOAP.SoapClient") ...
4
12697
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 place a stop directive in the code which ends up doing the same thing. The problem with this is that you can't debug browser side Javascript in the same debug run. You get a "The breakpoint will not currently be hit. The document is not loaded." if...
0
8776
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9449
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9310
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9236
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8186
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6031
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4550
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
2724
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2180
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.