473,385 Members | 1,813 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,385 software developers and data experts.

Consuming Soap 3.0 Web Services from ASP

Hello,

I have recently downloaded and installed the Soap Toolkit 3.0 from
microsoft. I have successfully created the example web service DocSample1
and am able to run this from the command line using the following .vbs
file.

Option Explicit

Dim soapClient3
set soapclient3 = CreateObject("MSSOAP.SoapClient30")
On Error Resume Next
Call SoapClient3.mssoapinit("DocSample1.wsdl", "DocSample1",
"Sample1SoapPort")
if err <> 0 then
wscript.echo "initialization failed " + err.description
end if

wscript.echo SoapClient3.EchoString("Bob")
if err <> 0 then
wscript.echo err.description
wscript.echo "faultcode=" + SoapClient3.faultcode
wscript.echo "faultstring=" + SoapClient3.faultstring
wscript.echo "faultactor=" + SoapClient3.faultactor
wscript.echo "detail=" + SoapClient3.detail
end if

wscript.echo SoapClient3.AddNumbers(2, 3)
if err <> 0 then
wscript.echo err.description
wscript.echo "faultcode=" + SoapClient3.faultcode
wscript.echo "faultstring=" + SoapClient3.faultstring
wscript.echo "faultactor=" + SoapClient3.faultactor
wscript.echo "detail=" + SoapClient3.detail
end if

This correctly produces
Bob
5

The application root of IIS is C:\Inetpub\logidev most of our .asp scripts
are in C:\Inetpub\logidev\aspScripts and generally they are simple wrappers
that call COM objects.

The SOAP 3.0 application that I call with the .vbs script resides in
C:\Inetpub\logidev\SOAP

Any attempt to run the Web Service from a .asp page gives me
initialisation errors.

WSDLReader error '80020009'

WSDLReader:XML Parser failed at linenumber 0, lineposition 0, reason is:
The system cannot find the path specified. HRESULT=0x1: Incorrect
function. - WSDLReader:Loading of the WSDL file failed HRESULT=0x80070057:
The parameter is incorrect. - Client:One of the parameters supplied is
invalid. HRESULT=0x80070057: The parameter is incorrect.

The .asp script I am using is listed below. I have cobbled it together
from various web sources.

Does anyone know how I can consume a Soap 3.0 web service from classic ASP
running W2K server.

Many thanks for any help you can provide.

<html>
<head>
<title>Calling a webservice from classic ASP, using the SOAP
Toolkit</title>
<body>
<%
If Request.ServerVariables("REQUEST_METHOD") = "POST" Then
Dim oSOAP
Set oSOAP = Server.CreateObject("MSSOAP.SoapClient30")
oSOAP.ClientProperty("ServerHTTPRequest") = True

'oSOAP.mssoapinit("http://www.wimdows.net/webservices/temperature.asmx?wsdl")
'Response.write("Temperature in fahrenheit: " &
oSOAP.cels2fahr(CDbl(Request.Form("text1"))) & "<BR>")
'Call
oSOAP.MSSoapInit("http://localhost/SOAP/SampleDoc1/Client/DocSample1.asmx?wsdl",
"DocSample1", "Sample1SoapPort")
'Call
oSOAP.MSSoapInit("http://logiweb2/SOAP/SampleDoc1/Client/DocSample1.wsdl",
"DocSample1", "Sample1SoapPort")
'Call oSOAP.MSSoapInit("DocSample1.wsdl", "DocSample1",
"Sample1SoapPort", "")
'Call oSOAP.MSSoapInit("DocSample1.wsdl", "", "", "")
'Call oSOAP.MSSoapInit("/SOAP/SampleDoc1/Client/DocSample1.asmx?WDSL",
"", "", "")
Call
oSOAP.MSSoapInit("../SOAP/SampleDoc1/Client/DocSample1.asmx?wsdl",
"DocSample1", "Sample1SoapPort")
Response.Write oSOAP.EchoString("Bob")
If err <> 0 Then
Response.Write err.description
Response.Write "faultcode=" + SoapClient3.faultcode
Response.Write "faultstring=" + SoapClient3.faultstring
Response.Write "faultactor=" + SoapClient3.faultactor
Response.Write "detail=" + SoapClient3.detail
End If

Response.Write oSOAP.AddNumbers(322, 37)
If err <> 0 Then
Response.Write err.description
Response.Write "faultcode=" + SoapClient3.faultcode
Response.Write "faultstring=" + SoapClient3.faultstring
Response.Write "faultactor=" + SoapClient3.faultactor
Response.Write "detail=" + SoapClient3.detail
End If

End If
%>

<FORM method=POST name=”form1”>
Push button to make SOAP call<BR>
<INPUT type="submit" value="Convert" name=”submit1”>
</form>

</body>
</html>

Jul 22 '05 #1
2 9516
mkosca01 wrote:
Any attempt to run the Web Service from a .asp page gives me
initialisation errors.

WSDLReader error '80020009'

WSDLReader:XML Parser failed at linenumber 0, lineposition 0, reason
is:
The system cannot find the path specified. HRESULT=0x1: Incorrect
function. - WSDLReader:Loading of the WSDL file failed
HRESULT=0x80070057:
The parameter is incorrect. - Client:One of the parameters supplied is
invalid. HRESULT=0x80070057: The parameter is incorrect.

I've never done this, so all I can suggest is to Google for these error
numbers and include the SOAB keyword in the search.

Bob Barrows
--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"
Jul 22 '05 #2
>I've never done this, so all I can suggest is to >Google for these error
numbers and include the SOAB keyword in the search.


Thanks Bob. I've already had a browse around the web. It appears as if
SOAP 3.0 works best with ASP.NET and not so well with classic ASP.

I think that SOAP 2.0 would do the trick but it look like Microsoft is no
longer offering this toolkit for download.

So it look like I may have to pick up some books and write the plumbing
etc.. from scratch.

Jul 22 '05 #3

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

Similar topics

0
by: umhlali | last post by:
I get the following exception when my VB.NET app calls a Java web service that returns an array of objects. The same call works for a single object though. So looks like there is no problem...
3
by: Matt D | last post by:
I've got two web services that use the same data types and that clients will have to consume. I read the msdn article on sharing types...
0
by: Jamie Phillips | last post by:
I'm sure this topic has been "around the block" a few times, but I have not been able to find ANY solutin that fits this particular problem. I have written a Java Axis web service that has a method...
7
by: Jamie Phillips | last post by:
I'm sure this topic has been "around the block" a few times, but I have not been able to find ANY solutin that fits this particular problem. I have written a Java Axis web service that has a method...
1
by: leslie_tighe | last post by:
Hello, I have webservice created with Axis 1.2.1 and that I am trying to consuming in .NET (VB) using the Microsoft provided tools. While I am able to consume methods on the service that return...
0
by: ryan | last post by:
I've been tasked with consuming a Perl web service that was written by a person in a different department of my company. The problem is it's the guy's first attempt at web services and he doesn't...
3
by: Jeremy Chapman | last post by:
I've writtin a very simple web service in axis which returns an array of classes. I consume it in a .net app. When receiving the response, my .net app generates an error "Cannot assign object...
1
by: Thomas Mueller | last post by:
Hi, I'm currently working on C# code consuming a PHP-webservice (soapserver-class of PHP5). A PHP test-client worked fine and achieved the requested data from the service's server. Using the...
2
by: arnomarga | last post by:
I am trying to consuming a .NET web service from a standard (classic) ASP, but having not so much luck as I dont have much experience about SOAP. Here is the webservice url:...
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: 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
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
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.