Reputation: 417
I'm integrating one of our apps with a third-party provider's web service. I've added the service reference, but when I go to dimension a var as one of their types, the types aren't showing up for me in Intellisense.
I'm using VB.NET/VS 2008 on Windows 7 and a 2.0 Framework web site running on local IIS. I have imported System.Web and System.Web.Service in my codebehind. I also made sure to check the "Always generate message contracts" checkbox.
Anyone have an idea what I need to do to get the types to show up?
Upvotes: 8
Views: 5035
Reputation: 417
Well, I finally found the solution. First off, I had to update my code base from 2.0 to 3.5 just to get the "Add Service Reference" option to even show up in VS 2008 or 2010. Once I did that I noticed that the svcinfo files were essentially empty (having only closing tags) and no disco file was being created.
I found an article online with a Windows Phone 7 developer reporting the same problem. There was a recommendation there to uncheck the option "Reuse types in referenced assemblies" on the Advanced page of the Add Service Reference dialog. Once I did that everything worked like a charm.
Hopefully this info will benefit others at some point.
SteveDog, thanks for all the ideas and help!
Upvotes: 8
Reputation: 43743
You need to import the namespace generated by the web service reference. For instance, if your client project's namespace is MyClient
and your web reference is called MyWebReference
, you'd need to import:
Imports MyClient.MyWebReference
Upvotes: 0