Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / Web Services / March 2007

Tip: Looking for answers? Try searching our database.

Consuming web service from a class library

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Long Nguyen - 29 Mar 2007 18:32 GMT
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.

Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.