Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Web Service Reference does not enable API in code

Posted on 2004-04-27
15
Medium Priority
?
166 Views
Last Modified: 2010-04-15
Hi,

I'm working on a project for school, in which we got a web service called SQLMailWS, and are supposed to write a client which uses its methods. I've added a Web Reference to the service in the project, that worked fine, but now I can't seem to use any of the objects or methods in the service. It seems that the IDE doesn't recognize that the reference is there.

Any Ideas?
0
Comment
Question by:nargov
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
15 Comments
 
LVL 14

Expert Comment

by:AvonWyss
ID: 10929618
Did you pay attention to ass a uses clause with the proper namespace to your source code (probably "uses SQLMailWS;" - depending on the refrernce you added)? Alternatvely, you can also use fully qualified names ("SQLMailWS.ObjectName.Method()").
0
 
LVL 14

Expert Comment

by:AvonWyss
ID: 10929627
Oops. Slipped a key - wanted to write "add a uses clause". Sorry about that.
0
 
LVL 1

Author Comment

by:nargov
ID: 10929832
Couldn't even place the 'uses' clause, since the compiler doesn't seem to recognize the reference at all.
0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
LVL 14

Expert Comment

by:AvonWyss
ID: 10929866
Well, you created a new project and added the web service as web reference, right? Now in the main class (in the Class1.cs file by default), add the "using SQLMailWS;" clause. I don't see why you wouldn't be able to add this clause?
0
 
LVL 1

Author Comment

by:nargov
ID: 10930349
That's my question exactly, why can't I? It doesn't seem to compile.
0
 
LVL 14

Expert Comment

by:AvonWyss
ID: 10931835
When you open the object browser window, you see a liste of the referenced modules. If your web app in there? If yes, when you click on the [+], what opens up?
0
 
LVL 20

Expert Comment

by:TheAvenger
ID: 10933278
Maybe the proxy class' namespace has changed. Have a look at the generated classes, review the solution explorer to see what files are available, search for the files for the web service proxy and open them (if needed click the Show All button in solution explorer to see all files). Then have a look what exactly namespace was specified for the proxy class
0
 
LVL 2

Expert Comment

by:Vaishali_chaudhry
ID: 10935864
Once you have added the webreference you must have a "localhost"(by default) reference listed in the Web References section.

Now if you see that,

Use---> NameSpaceOfURProject.AppName.localhost.method();



 
0
 
LVL 1

Author Comment

by:nargov
ID: 10944082
for some reason, when I try to add the namespace:

uses myproject ...

I'm not getting any options after the project when typing the dot (.)
As if the project doesn't contain anything.
0
 
LVL 14

Expert Comment

by:AvonWyss
ID: 10944095
nargov, would you mind answering the questions I asked, expecially what the class explorer shows? How are we experts suppoed to help you if you don't provide us with needed information to answer your question?
0
 
LVL 14

Expert Comment

by:AvonWyss
ID: 10944106
Sorry, I meant object browser. But still, please answer this.
0
 
LVL 1

Author Comment

by:nargov
ID: 10944303
Sorry. :)
In the object browser I get the web reference, and in it there is:
Reference.map
SQLMailWS.disco
SQLMailWS.wsdl
0
 
LVL 14

Accepted Solution

by:
AvonWyss earned 2000 total points
ID: 10946822
Okay. So you can browse the names in the object browser and use them exactly like this in your code. This should work!
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction This article series is supposed to shed some light on the use of IDisposable and objects that inherit from it. In essence, a more apt title for this article would be: using (IDisposable) {}. I’m just not sure how many people would ge…
Introduction Hi all and welcome to my first article on Experts Exchange. A while ago, someone asked me if i could do some tutorials on object oriented programming. I decided to do them on C#. Now you may ask me, why's that? Well, one of the re…
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…

730 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question