Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 1.0 and 1.1 > BOOK: Beginning ASP.NET 1.0
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
BOOK: Beginning ASP.NET 1.0
This is the forum to discuss the Wrox book Beginning ASP.NET 1.0 with C# by Chris Goode, John Kauffman, Christopher L. Miller, Neil Raybould, S. Srinivasa Sivakumar, Dave Sussman, Ollie Cornes, Rob Birdwell, Matt Butler, Gary Johnson, Ajoy Krishnamoorthy, Juan T. Llibre, Chris Ullman; ISBN: 9780764543708
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning ASP.NET 1.0 section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
 
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old November 7th, 2004, 06:13 PM
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
  #2 (permalink)  
Old January 29th, 2005, 03:33 AM
Friend of Wrox
 
Join Date: May 2003
Location: Delhi, Delhi, India.
Posts: 230
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi,

I have tested the code you are referring and got it work after some changes. Please follow the instructions below:

Instructions to follow for Web Matrix..

Open ISBN.asmx in web matrix and run the file using web matrix inbuilt web server, in web browsers you will see something similar to “http://localhost:8080/isbn.asmx”. Copy this URL to somewhere for later use.

Now Generate the proxy Class for this web service by using “Web Service Proxy Generator” found in “Tools #61664; Web Service Proxy Generator”. On clicking this option a dialog box will appear.

In “XML Web Service Proxy Generator” dialog box fill the information as follows:

WSDL URL = “http://localhost:8080/isbn.asmx”

Namespace = ISBNService

Output Directory = C:\BegASPNET11\ch16

Source File = ISBNProxy

Generate Assembly = ISBNProxy.dll

Click on Generate. This will generate the source file named “ISBNProxy.vb” in the output directory and assembly named “ISBNProxy.dll” in the folder named bin under the output directory.

After process completion a confirmation message box will appear, click “OK” and then click “cancel” to get out of the “XML Web Service Proxy Generator” dialog box.

Now Open the aspx file named “BookInfo.aspx” and click on the “start” icon on the toolbar to run this file using the web matrix web server.

If all the instructions followed, you will see the result in web browser successfully.






Charul Shukla
  #3 (permalink)  
Old April 13th, 2005, 03:27 PM
TJA TJA is offline
Registered User
 
Join Date: Apr 2005
Location: , , .
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

OK but what about this error? the Proxy create worked fine.
I am using the samples from the download. moved to this DIR c:\inetpub\wwwroot\isbn
Compilation Error
Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.

Compiler Error Message: BC30002: Type 'ISBNService.ISBN' is not defined.

Source Error:



Line 4: <script language="vb" runat="server">
Line 5: Private Sub RetrieveBook(ByVal sender As System.Object, ByVal e As System.EventArgs)
Line 6: Dim ws As New ISBNService.ISBN()
Line 7: lblBookTitle.Text = ws.BookDetail(txtISBN.Text)
Line 8: End Sub


Source File: c:\inetpub\wwwroot\isbn\bookinfo.aspx Line: 6



 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Consumming Web Services Error durgesh Forum and Wrox.com Feedback 0 October 5th, 2007 03:19 PM
Chapter 26 XML Web Services - error handing? RichDiaz BOOK: Professional ASP.NET 2.0 and Special Edition; ISBN: 978-0-7645-7610-2; ISBN: 978-0-470-04178-9 0 August 20th, 2007 04:47 PM
Error to Add Web Reference from a Web service jdjbarrios ASP.NET 2.0 Professional 0 July 18th, 2006 02:58 PM
How do I get Directory Info from a Web Service ruairi ASP.NET 1.0 and 1.1 Professional 0 October 27th, 2005 07:53 AM
Reg :400 Error in Web Services sriram6781 XML 1 August 8th, 2005 07:59 PM



All times are GMT -4. The time now is 01:54 PM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.