Hi,
I've developed a web service and a test application. From the test
application, I was able to call the web service successfully. However, when
I tried to call it from a class library, I ran into compile error, even
though I did add the web reference in exactly the same way as the test
application. In the code, I have something like this:
using WebServiceConsumer.localhost;
namespace WebServiceConsumer
{
private localhost.MyWebService remoteService; // VS does not recognize
this in the class library while it recognizes it in the test application, how
come? reference to the web service is added in exactly the same manner.
}
Thanks for your help!
-Long
Long Nguyen - 29 Mar 2007 19:18 GMT
Please ignore my previous question. It was a silly error on my part. I
declared a variable outside of a class, which is wrong. Otherwise, consuming
a web service from a class library or an application would work just the same.