6

I'm going insane, I beleive.

That is, I've never had an issue like this before, and nobody (that Google has indexed) seems to be having the same issue.

Whenever I add a reference to a particular ASMX service to a VS2010 project, all of the code is generated, there is an interface ServiceSoap that represents all of the features of the service, but there is no concrete implementation of that interface anywhere in the solution!

What am I doing wrong? I just right click project, add service reference, paste url to .asmx, type 'Blah' in the namespace box, click OK.

Everything seems to happen OK. I'm just bat-shit insane, I guess...


Update:
If I go to Advanced... in the add service reference dialog, and choose to add it as a .NET 2.0 service, everything works, but I don't particularly want to do it that way.
The actual namespace I'm using is Remedy and the service .asmx file is Service.asmx.
John Gietzen
  • 48,783
  • 32
  • 145
  • 190
  • instead of "adding a reference" why don't you generate the classfiles from the .asmx using the command line tools? That's what I prefer to do, even tho it means losing the ability to auto-update a reference. But if the reference changes that often, you might have other issues to consider, yeah? – jcolebrand Nov 17 '10 at 15:58
  • But no, I don't have that issue that you're describing. – jcolebrand Nov 17 '10 at 15:59

5 Answers5

9

Try this...

right click on the service reference. then go to configure service reference. then uncheck reuse types in referenced assemblies checkbox. upd

this solved mine, hope it will help somebody else too

smoothumut
  • 3,423
  • 1
  • 25
  • 35
5

Try these steps:

  1. Look in the Output window to see if there are any errors when you use the "Add Service Reference".
  2. Look in the Reference.cs to see if there are any errors (generated as comments).
  3. Finally, try using svcutil.exe to generate the proxies, since it will be easier to see error messages.
John Saunders
  • 160,644
  • 26
  • 247
  • 397
3

Have you tried clicking "Show all files"?

alt text

With this feature on, the Service Reference can be expanded to its various "source" files.

Shadow The GPT Wizard
  • 66,030
  • 26
  • 140
  • 208
  • 1
    @John - I understand the following from reading your question: when you add Service Reference to .asmx web service you can't find the class implementing the interface RemedyServiceSoap that contains the definition of all the web methods. Am I correct so far, or did I misunderstand? – Shadow The GPT Wizard Nov 17 '10 at 10:27
  • No, the class isn't being generated, as far as I can tell. I know how to find it if it were there, but it doesn't seem to be. I'll edit the question to clarify. – John Gietzen Nov 17 '10 at 15:53
  • @John - OK, I understand now. The previous title was indeed confusing. – Shadow The GPT Wizard Nov 17 '10 at 18:58
1

While clicking "show all files" icon. There is another folder which they hold the same name. while deleting the folder. and clean the solution. Add new services with the same name. Now its working fine.

0

Right click on the reference, then - "View in Object Browser" Just double click on one of the methods/properties inside the object explorer.

Brosto
  • 4,445
  • 2
  • 34
  • 51
  • What? OK, yeah, it's confirmed that it is an interface, not a class... was that supposed to help? – John Gietzen Nov 16 '10 at 16:26
  • Sorry I misunderstood. I thought you were asking how you could see the generated code from the service reference. – Brosto Nov 16 '10 at 16:28