I do this:
-open a new Windows application
-add a Service References
-change de Name Space to ws1 and clic accept
Here I receive the first surprise. Insted of see the list of methods handle by the webservice, I see an icon
In the App.config file I can see this
<client>
<endpoint address="http://cwp-vm-matrixw/Tiendas/service.asmx"
binding="basicHttpBinding" bindingConfiguration="ServiceSoap"
contract="ws1.ServiceSoap" name="ServiceSoap" />
</client>
What I have tried:
inside de code I try to write this: Dim wsMio As New ws1.ServiceSoap, but I receive the error "New can not be used in an interface"
When I write Dim wsMio As ws1.ServiceSoap I can go ahead
Private Sub Bt(sender As System.Object, e As System.EventArgs) Handles Button1.Click
Dim wsMio As ws1.ServiceSoap
TextBox1.Text = wsMio.Dobla(5)
End Sub
In this case when I write wsMio. I can see the list of methods, choose Dobla (duplicate a value in spanish) and the code is accepted and I let out a deep sigh, but when I clic the button, instead of receive the value 10 I receive an error: Object reference not set to an instance of an object. Use the word New to create an instance of the object.
Any idea to continue?
Is it ok not receive the list of methods when I add the service reference?
How can I declare a new instance of the object ws1?