Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
A paltering Web Reference or (user error)
Message
From
17/07/2003 03:50:25
 
 
To
17/07/2003 01:15:59
Keith Payne
Technical Marketing Solutions
Florida, United States
General information
Forum:
ASP.NET
Category:
Web Services
Miscellaneous
Thread ID:
00810794
Message ID:
00810985
Views:
8
Ahhh, :) I say at 3:46AM. I am of on conference until monday. Many thanks as this would have bugged me to no end!! It was a late night of details. BTW, I ditched the Imports. It worked great! Now I have to wait to create a meaningful service.

Joe.

>>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.)
~Joe Johnston USA

"If ye love wealth better than liberty, the tranquility of servitude better than the animated contest of freedom, go home from us in peace. We ask not your counsel or arms. Crouch down and lick the hands which feed you. May your chains set lightly upon you, and may posterity forget that ye were our countrymen."
~Samuel Adams

Previous
Reply
Map
View

Click here to load this message in the networking platform