WP7, How to use a service reference after adding it to Visual Studio 2010

CACuzcatlan picture CACuzcatlan · Nov 24, 2010 · Viewed 37.3k times · Source

I'm following this example for connecting to the Bing Maps geocode service:

http://blogs.msdn.com/b/dragoman/archive/2010/10/07/wp7-code-reverse-geocoding-with-the-bing-maps-service.aspx

About half way down the page, it explains how to add a service reference in Visual Studio 2010, which I was able to do successfully. Then it says to add "using GeoCode.GeoCodeService", but when I do, I get an error saying "The type or namespace 'GeoCode' could not be found"

Am I doing something wrong. The steps are pretty simple and nothing gave an error. What else do I need to do in order to access the service?

Answer

live-love picture live-love · Sep 19, 2014

After you added a Reference using your WSDL URL:

Under Solution, under Service References, right click on your Service Reference folder that you want to reference (example: com.gold.services.description1)

Select View in Object Browser. You will see the class name in the Object Browser window that will open up. (example: GoldWeb.com.gold.services.description1)

Copy and paste the class name into your code.

Example:

using GoldWeb.com.gold.services.description1;

Then you are ready to start using its classes.