Calling a webservice via ASP.Net

Discussion in 'ASP .Net' started by Guest, Nov 23, 2005.

  1. Guest

    Guest Guest

    Hi,
    I am trying to write my first web service. I have the following code:


    Imports System.Web.Services
    Public Class Service1
    Inherits System.Web.Services.WebService
    Private _ErrorText As String


    <WebMethod()> Public Function Verify(ByVal UserName As String,
    ByVal Password As String) As Boolean
    'Do user verification stuff here.
    End Function


    <WebMethod()> Public Function ErrorMsg() As String
    Return _ErrorText
    End Function
    End Class


    This works fine. I am trying to write an ASP.Net application in
    notepad. How do I go about calling the webservice? Also, is there a way

    to have public readonly properties that are accessable via an ASP.Net
    page in the webservice.


    Thanks
     
    Guest, Nov 23, 2005
    #1
    1. Advertisements

  2. Guest

    Guest Guest

    hi,

    In order to use your web service within another application without using
    VS, you need to generate the corresponding class with WSDL tool or DISCO
     
    Guest, Nov 23, 2005
    #2
    1. Advertisements

  3. Guest

    richard.hein Guest

  4. Guest

    richard.hein Guest

    You cannot expose properties via webservices in the manner you suggest.

    R. Hein
     
    richard.hein, Nov 23, 2005
    #4
  5. Guest

    Guest Guest

    Thank you for the response and link.
     
    Guest, Nov 23, 2005
    #5
  6. Guest

    Guest Guest

    OK. I made a .VB file using the wsdl application. So how do I go about
    calling the service?

    Thanks again for your help.
     
    Guest, Nov 23, 2005
    #6
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.