Web Reference added, no intellisense?

C

Caine Chow

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
 
C

Caine Chow

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top