Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

.Net/WSDL bombs

2 views
Skip to first unread message

Dave Hodson

unread,
Apr 15, 2002, 4:57:53 PM4/15/02
to
following the steps from the FAQ to create a simple client in .Net, I
can't get past step #2 (run wsdl.exe). When I do this, I receive the
following error message:

G:\Program Files\Microsoft Visual Studio .NET\FrameworkSDK\Bin>wsdl
d:\temp\goog
lesearch.wsdl
Microsoft (R) Web Services Description Language Utility
[Microsoft (R) .NET Framework, Version 1.0.3705.0]
Copyright (C) Microsoft Corporation 1998-2001. All rights reserved.

Error: Error when reading file 'd:\temp\googlesearch.wsdl'.
- Missing required Web Services section of the Web.config file.

Anyone run into this? Solutions?

Regards,

Dave

----------

Google FAQ

23. What is the exact sequence of steps needed to make a simple search
client in Microsoft Visual Studio.NET?

Create a new project, such as a Windows Application

Run wsdl.exe GoogleSearch.wsdl to generate GoogleSearchService.cs, the
C# client class.

Add a reference to the System.Web.Services DLL to your project.

Write your code to call GoogleSearchService.

Darshan Singh

unread,
Apr 15, 2002, 11:08:44 PM4/15/02
to
Try following steps:

a.) Create a new folder (subdirectory)
b.) Copy the WSDL file in this newly created subfolder. So the only
file we have in this subfolder is the WSDL file.
c.) Run WSDL.exe against this .wsdl file.
d.) It will create the GoogleSearchService.cs or
GoogleSearchService.vb (depending on what /language option you have
set (or skipped)).
e.) Create a new .NET Project. Copy the .cs or .vb file into this
project folder, add it to the project and start using the Google API.

I created the GoogleSearchService.vb file using the above steps,
created a VB .NET console app, added reference to System.Web.Services
dll and here is how VB .NET code looks like:

Imports System.Web.Services
Module Module1

Sub Main()

Dim ObjGoogleSearchAPI As New GoogleSearchService()
Dim SearchResults As GoogleSearchResult

SearchResults = ObjGoogleSearchAPI.doGoogleSearch("****KEY
VALUE GOES HERE***", "xml +filetype:pdf", 0, 10, False, "", False, "",
"", "")

Console.Write(String.Format("Found {0} items in {1} secs",
SearchResults.estimatedTotalResultsCount, SearchResults.searchTime))

End Sub

End Module

In the above code, I am searching for all PDF files containing XML -
and get back the following output:
Found 300000 items in 0.154689 secs

Best wishes,
Darshan Singh
http://www.PerfectXML.com


dav...@speakeasy.net (Dave Hodson) wrote in message news:<c9dfe654.02041...@posting.google.com>...

0 new messages