I think this could be useful to some people as I saw a lot of questions about it. Please excuse my English.
This are the step a followed to access a webservice (asmx) from a module:
First, get a simple module that is working OK, I use a sample from a book, can be one created from the StarterKit template.
I use VisualStudio 2008. With the module project loaded add a webservice reference as usual, nothing new here (I called it "ws").
VisualStudio will add a web.config file to the project, delete that file !!
To reference the webservice methods I use this code: (let say the webservice is named "webservice1" and have a method named "method1")
Private wservice As ws.webservice1
Public Function WebService() As ws.webservice1
If wservice Is Nothing Then
' Create web service proxy
wservice = New ws.webservice1
wservice.Url = "http://............. /webservice1.asmx"
End If
' Return the service proxy
Return wservice
End Function
'....Calling a method....
WebService.method1