By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,169 Members | 1,417 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,169 IT Pros & Developers. It's quick & easy.

Web Reference added, no intellisense?

P: n/a
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
Mar 31 '06 #1
Share this Question
Share on Google+
1 Reply


P: n/a

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
Caine Chow wrote:
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

Mar 31 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.