View Single Post
  #1 (permalink)  
Old November 7th, 2004, 06:13 PM
ElPato ElPato is offline
Registered User
 
Join Date: Apr 2004
Location: , , .
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default Web Services Error (Ch18) - No Web Disc. Info.

In creating a proxy (p690) I am receiving the below error when I attempt to use the wsdl command to create the proxy. Any suggestions would be appreciated.

Thanks

--------------------------------------------------------------------

Error: There was an error processing 'http://localhost/BegASPNET/Ch18/ISBN.asmx?
WSDL'.
  - The HTML document does not contain Web service discovery information.

************************************************** ***
The command I am using (all on one line) is as below:
************************************************** ***
wsdl /l:vb /o:ISBNProxy.vb http://localhost/BegASPNET/Ch18/ISBN.asmx?WSDL /n:ISBNService


************************************************** ***
ISBN.asmx is copied in below (as in the book - but just in case)********************************************* ********
<%@ WebService Language="vb" Class="ISBN" %>
Imports System.Web.Services
Imports System.Data
Imports System.Data.OleDb

Public Class ISBN
    Inherits System.Web.Services.WebService

    <WebMethod()> _
    Public Function BookDetail(ByVal strIsbn As String) As String
        Return GetBookDetails(strIsbn)
    End Function

    Private Function GetBookDetails(ByVal strIsbn As String) As String
        Dim objLibraryDR As OleDbDataReader
        Dim objLibraryConn As OleDbConnection
        Dim objLibraryCmd As OleDbCommand
        Dim strConn As String = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath("Library.mdb") & ";"
        Dim strSQL As String = "select Title from Books where ISBN = '" & strIsbn & "'"
        Dim strBookTitle As String

        objLibraryConn = New OleDbConnection(strConn)
        objLibraryCmd = New OleDbCommand(strSQL, objLibraryConn)
        objLibraryConn.Open()

        objLibraryDR = objLibraryCmd.ExecuteReader(CommandBehavior.CloseC onnection)
        If objLibraryDR.Read() Then
            strBookTitle = objLibraryDR(0)
        Else
            strBookTitle = "Book not found in the database"
        End If
        objLibraryDR.Close()

        Return strBookTitle
    End Function

End Class