Web Service

Connecting to a web service

You just have to know where to look!

http://www.anotherurl.com/webservice1/service1.asmx

How to make the connection...

Here's an example. Start with a new project. C# console application...

Add the web reference...

There's a highly accurate latitude longitude conversion routine at http://www.anotherurl.com/webservice1/service1.asmx

Click "Add Reference". The solution explorer tree updates...

Entering code directly picks up the interface after the "com."....

..but leads up up a blind alley...

.. until you're directed...

..then we're almost home...

... and dried. Run it!

With a breakpoint set, the return value can be inspected.

Library