Adding a reference to a .asmx Web service to a VBA project
I am doing a project in VBA. I want to add the .asmx Web service created in
.NET to my Office Word 2000 VBA Application. The asmx Web service is in my virtual directory. I have already installed the Web Service Reference Toolkit in my System. However, it allows me to add only WSDL and VSDISCO files in my project as a class module but not an asmx file. How can I add a reference to the Web service in my current VBA Project?
When you register, you'll begin receiving targeted emails from my team of award-winning writers. Our goal is to keep you informed on recent service-oriented architecture (SOA) and SOA-related topics such as integration, governance, Web services, Cloud and more.
Hannah Smalltree, Editorial Director
When you add a reference to a Web service using the toolkit it will generate
a local proxy class that wraps the functionality necessary to invoke the
service you reference. Using the toolkit interface, you can add a reference
to the .asmx file, and .NET will automatically generate a WSDL contract for
the service. For example, if you type the URL to the .asmx in the browser,
with a "wsdl" query string as follows:
http://www.somedomain.com/yourservice.asmx?wsdl
You'll see the service WSDL contract. You can save this WSDL contract to a
file and make it available as a file from your Web site:
http://www.somedomain.com/yourservice.wsdl
and either syntax will work from the Web Services Reference Tool, Web
Service URL section. This is also documented at the following MSDN link:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnxpwst/html/odc_ofwsrt.asp
Dig Deeper
-
People who read this also read...
This was first published in February 2004