Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
A paltering Web Reference or (user error)
Message
De
17/07/2003 01:15:59
Keith Payne
Technical Marketing Solutions
Floride, États-Unis
 
 
Information générale
Forum:
ASP.NET
Catégorie:
Web Services
Divers
Thread ID:
00810794
Message ID:
00810956
Vues:
15
This message has been marked as the solution to the initial question of the thread.
>I have a test webservice in place at http://cyberjetx.com/wspopsmack/service1.asmx I have set a reference to it. Discovery went well. The wsApp\Web References\wsWebRef folder was created and the wsdl file and the reference files were created. However, in my sample below HelloWorld is 'not declared' :( HelloWorld is spelled correctly and displays in the 'Add Web Reference' Dialog. I have also right clicked on the wsWebRef object in the solution explorer and updated the Web Reference.
>
>The webservice is public so currently anyone caring to look at it may...
>
>
Imports wsApp.wsWebRef '<- Is this really needed
>
>Public Class frmTestWebService
>    Inherits System.Windows.Forms.Form
>
>'#Region " Windows Form Designer generated code " removed for post brevity
>
>    Private Sub cmdTestWs_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdTestWs.Click
>        'txtWorld.Text = HelloWorld("Dino") '<- Why is this not declared?!?
>    End Sub
>
>End Class
>
>Any help will be appreciated,

Joe,

In addition to adding the web reference to the project, you have to instantiate the web service class:
Dim myWs as New wsApp.wsWebRef()
txtWorld.Text = ws.HelloWorld("Dino")
Also, the Imports statement is not neccessary. An Imports statement loads all of the type definitions from your class so you don't have to type out a complete specification every time you reference your class (A web service, like everything else in .NET, is a class.)
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform