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 / Languages / C# / March 2006

Tip: Looking for answers? Try searching our database.

Web Reference added, no intellisense?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Caine Chow - 31 Mar 2006 19:09 GMT
I am working on a C# Class Library that does Remoting. I would like my
library to call my web service so I added a Web reference to my service
with out problems.

I am encountering problems when I try to instantiate an object of the
web service type. So say my web reference is named MyWebReference and my
Class library namespace is MyNameSpace, then in my code I am trying to
do like so:

public void HelloWorld()
{
    MyWebReference.Service oRef;

    oRef = new global::MyNameSpace.MyWebReference.Service();
}

The problem I am having is that the references to "MyWebReference" in
the function code isn't recognized and generates the error:

"The type or namespace name 'PrintelligenceSystem' could not be found
(are you missing a using directive or an assembly reference?)"

Is there anything extra that I have to do to get web service call to
work from a Class library?

Thanks,

Caine
Caine Chow - 31 Mar 2006 19:41 GMT
I have found the problem. After creating the Class library project, I
changed the namespace in my class.cs code, but neglected to change the
default name space for the project. This caused the web reference to
seem not intellisense when infact it was getting confused by the
erroneous name space.

Caine

> I am working on a C# Class Library that does Remoting. I would like my
> library to call my web service so I added a Web reference to my service
[quoted text clipped - 24 lines]
>
> Caine

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.