FRAMES | NO FRAMES
Consuming Esri Business Analyst Server SOAP

In this tutorial, we will create a desktop client application in Microsoft Visual Studio 2010 to consume an Esri Business Analyst Server Web map service. The Business Analyst MapServer proxy and value objects for the Business Analyst service will be created dynamically in Visual Studio 2010 using the SOAP toolkit (wsdl.exe) included with the .NET 4.0+ SDK. The application will use the Esri Business Analyst Server SOAP via the Business Analyst proxy and value objects. An Esri Business Analyst Server map service that is enabled with Business Analyst capability as a Web service will be required for this tutorial.


Create the Windows Application Project

  1. In Visual Studio 2010, click File in the Menu Bar, then select New > Project in the menu.
  2. In the New Project dialog, select Visual C# > Windows project type.
  3. Then select Console Application template.
  4. Type a project name. For example, type BASMap.
  5. Click OK.

 

Add a Reference to Esri Business Analyst Server Web Map service

In the 1Solution Explorer window under your BASMap project, 2right-click the References folder to 3add a Service Reference.


Inside the Add Service Reference dialog you will need to click on the Advanced button and the subsequent Add Web Reference button as illustrated in the following two screenshots below.



In the Add Web Reference dialog, in the URL combo box, 1enter the Web service endpoint to the WSDL for a Esri Business Analyst Server Web map service and 2Click the green arrow. For example:

http://Localhost/arcgis/services/DefaultMap/mapserver/BAServer?wsdl

Note that "?wsdl" as appended to specify that the WSDL for the Business Analyst capable Map service should be returned. The methods on the Business Analyst Server SOAP proxy should be displayed. 3Change the Web Reference name to something intuitive, for example "BAServer_proxy", and 4click Add Reference. The Business Analyst Server's Map Service proxy and value objects are created for you.

Note - the Web reference name is the namespace for the Business Analyst Server's Map Service proxy and value objects.


Add Code

You can start consuming the WSDL SOAP and create your own applications now. The sample code below shows how to return a list of available report templates for summary reports.



By consuming the Business Analyst Server WSDL and generating the proxy classes and value types in your IDE, they will be integrated into and recognized by your development environment as if they were a standard coding library. This will make your job of developing custom applications with Business Analyst Server’s powerful analysis functions fast and easy.