Link to home
Start Free TrialLog in
Avatar of fmichail
fmichailFlag for Canada

asked on

consuming an asmx web service in winforms application

Hi,
I created a standard web service asmx on my site, and try to reference it from the application, but I cannot instantiate an object of the service. Here is the details:

I added a service reference to my simple web service containing only HelloWorld method. I named the service suredataWebservice
In code I am writing:

dim x as new suredataWebservice()

This is not accepted, and it says we need a type. And if I press . (dot) after the suredataWebservice the intellicense shows me about 4 methods for helloWorld like HelloWorldRequest, HelloWorldRequestbody, helloworldResponse, helloworldResponsebody.

I would expect only HelloWorld to show, and expect the dim statement to be accepted


What Am i doing wrong. Help please

Thanks
Avatar of Ryan Chong
Ryan Chong
Flag of Singapore image

Most likelihood... your web service would be running in a web server.

Are you able to open your web service asmx page in a web browser?

Have you ever consider to send the request to your web service via HTTP request?
ASKER CERTIFIED SOLUTION
Avatar of Tapan Pattanaik
Tapan Pattanaik
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of fmichail

ASKER

Thanks Tapan. It worked