fmichail
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
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
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks Tapan. It worked
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?