I am creating a webpage that needs to use a webservice wsdl at a remote url (https://sitename/ws/general.asmx)
I added the webservice to the project folder as generalWS (right click in VS2010, add Web service) and the editor recognizes the webservice methods.
I then used wsdl.exe to create the proxy file general.vb, which has partial classes and an interface, and copied it into my project folder.
Im now trying to reference this webservice by creating a new object for the webservice, but it does not compile:
BC30002: Type ‘GeneralWS.general’ is not defined.
Can someone guide me in the right direction?
Do I need to reference the interface file in the aspx.vb file?
Do I need to do something special with the web.config file?
Thanks!
Deploying on IIS6.0 with .NET Framework 2.0
Using MS Visual Studio 2010
myPage.aspx.vb
Imports System.Web.Services
Imports System.Xml
Imports System.IO
Partial Class _Default
Inherits System.Web.UI.Page
'declare the web services
Public wsg As New generalWS.general() ''ERROR COMPILE LINE''
'
'
'
'
generalWS.vb
Public Interface generalSoap
Function1
Function2
'
'
Public Partial class method1
Public Partial class method2
Public Partial class method3
Instead of using “Add Web Reference” within Visual Studio, I used “Add Service Reference”.
On the server side, I upgraded to .NET 3.5