Вы находитесь на странице: 1из 222

Introduction to

ArcGIS Server
(Prototype)
Copyright © 2006 ESRI

All rights reserved.

Course version 1.0. Revised December 2006.

Printed in the United States of America.

The information contained in this document is the exclusive property of ESRI. This work is protected under United States copyright law
and other international copyright treaties and conventions. No part of this work may be reproduced or transmitted in any form or by any
means, electronic or mechanical, including photocopying and recording, or by any information storage or retrieval system, except as
expressly permitted in writing by ESRI. All requests should be sent to Attention: Contracts and Legal Services Manager, ESRI, 380 New
York Street, Redlands, CA 92373-8100, USA

The information contained in this document is subject to change without notice.

U. S. GOVERNMENT RESTRICTED/LIMITED RIGHTS


Any software, documentation, and/or data delivered hereunder is subject to the terms of the License
Agreement. In no event shall the U.S. Government acquire greater than RESTRICTED/LIMITED RIGHTS. At
a minimum, use, duplication, or disclosure by the U.S. Government is subject to restrictions as set forth in FAR
52.227-14 Alternates I, II, and III (JUN 1987); FAR 52.227-19 (JUN 1987) and/or FAR 12.211/12.212
(Commercial Technical Data/Computer Software); and DFARS 252.227-7015 (NOV 1995) (Technical Data)
and/or DFARS 227.7202 (Computer Software), as applicable. Contractor/Manufacturer is ESRI, 380 New
York Street, Redlands, CA 92373-8100, USA.

@esri.com, 3D Analyst, ADF, AML, ARC/INFO, ArcAtlas, ArcCAD, ArcCatalog, ArcCOGO, ArcData, ArcDoc, ArcEdit, ArcEditor,
ArcEurope, ArcExplorer, ArcExpress, ArcFM, ArcGIS, ArcGlobe, ArcGrid, ArcIMS, ArcInfo Librarian, ArcInfo, ArcInfo-Professional
GIS, ArcInfo-The World's GIS, ArcLocation, ArcLogistics, ArcMap, ArcNetwork, ArcNews, ArcObjects, ArcOpen, ArcPad, ArcPlot,
ArcPress, ArcQuest, ArcReader, ArcScan, ArcScene, ArcSchool, ArcSDE, ArcSdl, ArcStorm, ArcSurvey, ArcTIN, ArcToolbox, ArcTools,
ArcUSA, ArcUser, ArcView, ArcVoyager, ArcWatch, ArcWeb, ArcWorld, Atlas GIS, AtlasWare, Avenue, BusinessMAP, Database
Integrator, DBI Kit, ESRI, ESRI-Team GIS, ESRI-The GIS Company, ESRI-The GIS People, FormEdit, Geographic Design System,
Geography Matters, Geography Network, GIS by ESRI, GIS Day, GIS for Everyone, GISData Server, InsiteMAP, JTX, MapBeans,
MapCaf, MapObjects, ModelBuilder, MOLE, NetEngine, PC ARC/ INFO, PC ARCPLOT, PC ARCSHELL, PC DATA CONVERSION,
PC STARTER KIT, PC TABLES, PC ARCEDIT, PC NETWORK, PC OVERLAY, PLTS, Rent-a-Tech, RouteMAP, SDE, SML, Spatial
Database Engine, StreetEditor, StreetMap, TABLES, the ARC/INFO logo, the ArcCAD logo, the ArcCAD WorkBench logo, the
ArcCOGO logo, the ArcData logo, the ArcData Online logo, the ArcEdit logo, the ArcExplorer logo, the ArcExpress logo, the ArcFM
logo, the ArcFM Viewer logo, the ArcGIS logo, the ArcGrid logo, the ArcIMS logo, the ArcInfo logo, the ArcLogistics Route logo, the
ArcNetwork logo, the ArcPad logo, the ArcPlot logo, the ArcPress for ArcView logo, the ArcPress logo, the ArcScan logo, the ArcScene
logo, the ArcSDE CAD Client logo, the ArcSDE logo, the ArcStorm logo, the ArcTIN logo, the ArcTools logo, the ArcView 3D Analyst
logo, the ArcView Business Analyst logo, the ArcView Data Publisher logo, the ArcView GIS logo, the ArcView Image Analysis logo, the
ArcView Internet Map Server logo, the ArcView logo, the ArcView Network Analyst logo, the ArcView Spatial Analyst logo, the
ArcView StreetMap 2000 logo, the ArcView StreetMap logo, the ArcView Tracking Analyst logo, the Atlas GIS logo, the Avenue logo,
the BusinessMAP logo, the Data Automation Kit logo, the ESRI ArcAtlas Data logo, the ESRI ArcEurope Data logo, the ESRI ArcScene
Data logo, the ESRI ArcUSA Data logo, the ESRI ArcWorld Data logo, the ESRI Digital Chart of the World Data logo, the ESRI globe
logo, the ESRI Press logo, the Geography Network logo, the MapCaf logo, the MapObjects Internet Map Server logo, the MapObjects
logo, the MOLE logo, the NetEngine logo, the PC ARC/INFO logo, the Production Line Tool Set logo, the RouteMAP IMS logo, the
RouteMAP logo, the SDE logo, The World's Leading Desktop GIS, Water Writes, www.esri.com, www.geographynetwork.com,
www.gisday.com, and Your Personal Geographic Information System are trademarks, registered trademarks, or service marks of ESRI in
the United States, the European Community, or certain other jurisdictions.

Other companies and products mentioned herein are trademarks or registered trademarks of their respective trademark owners.
C O N T E N T S
1 Introduction
Exercise 1: Install the course data 1-1
Record user information 1-1
Log in to Windows 1-1
Install the data 1-1
Record ArcGIS Server access information 1-2
Explore the ArcGIS Server help 1-3
(Optional) Create an ESRI Global Account 1-5

2 ArcGIS Server overview


Exercise 2: Explore ArcGIS Server 2-1
Use ArcMap to author GIS service content 2-1
Connect to the GIS server 2-3
Publish a map service using ArcCatalog 2-12
Publish a map service using ArcGIS Server Manager 2-15
Create a Web mapping application 2-18
Use ArcGIS Explorer to view services 2-27
(Optional) View other ArcGIS Explorer maps 2-30

3 Map and globe services


Exercise 3: Work with map and globe services 3-1
Author a map document 3-1
Create an address locator 3-2
Create a map service and a geocoding service 3-5
Create a parcel search application 3-8
Test the parcel search application 3-17
Author content for a globe service 3-22
Use Manager to publish a globe service 3-24
Consume the globe service from ArcGIS Explorer 3-30
Explore caching options 3-34

4 Geoprocessing services
Exercise 4: Publish and use a geoprocessing service 4-1
Create a toolbox 4-1
Set up the geoprocessing environment 4-5
Author a geoprocessing model 4-8
Test the model 4-18

Copyright © 2006 ESRI i


Introduction to ArcGIS Server Contents

Add the model as a tool layer to the map 4-20


Publish map and geoprocessing services 4-22
Create an application that contains a geoprocessing task 4-23
Consume a geoprocessing service in a Web mapping application 4-27
(Optional) Consume a geoprocessing service in ArcMap 4-32

5 Editing in a Web mapping application


Exercise 5: Edit from a Web client 5-1
Author a map containing editable layers 5-1
Publish and configure a map service 5-3
Create a Web mapping application 5-6
Experiment with editing in a Web mapping application 5-10
Add features and edit attributes 5-16

6 Geodata services
Exercise 6: Publish and work with a geodata service 6-1
Publish a map document and enable the Geodata Access capability 6-1
Extract data from the service 6-5
Create a checkout/check-in replica 6-12
Make edits to a replica 6-16
Synchronize your edits 6-21

7 Customization options
Exercise 7: Customize ArcGIS Explorer 7-1
Create a default map for your server 7-1
Set ArcGIS Explorer's home server 7-5
Configure settings for your ArcGIS Explorer home server 7-7
Provide a custom task from your server 7-10

8 Administration and optimization


Exercise 8: Read log files and troubleshoot data access issues 8-1
Publish a map service 8-1
View server log files 8-3
Fix data access problems for ArcGIS Server 8-4

Appendix A: ESRI data license agreement

ii Copyright © 2006 ESRI


1
Introduction

Exercise 1: Install the course data


Estimated time: 10 minutes
Exercise 1

Exercise 1: Install the course data


Estimated time: 10 minutes

In this exercise, you will install the data that will be used throughout this course. The data
is stored on a CD and will be copied to your hard drive by an automated install program.
After installing the data, you will have the opportunity to create an ESRI Global Account,
which will allow you to access all pages on the ESRI Support Center, a valuable online
technical resource.

Step 1: Record user information


You need to log in to your Windows workstation to install the course data. A unique user
name, password, and domain (if applicable) are required to log in. Your instructor will
provide these to you.

Record the workstation information provided by your instructor in the spaces below.
▪ Workstation user name: ____________________________________
▪ Workstation password: ____________________________________
▪ Workstation domain, if any: ________________________________

Step 2: Log in to Windows


Verify that your computer and monitor are turned on.

In the Log On to Windows dialog box, enter the workstation user name and password
provided by your instructor.

If your workstation is part of a domain, in the "Log on to" drop-down list, choose the
appropriate domain.

Click OK.
Note: If you have trouble logging in to Windows, ask your instructor for help.

Step 3: Install the data


Now that you are logged in, you can install the course data.

Copyright © 2006 ESRI 1-1


Introduction to ArcGIS Server

Remove the training data CD from the back of your exercise book and place it in the
CD drive.

Click Yes to accept the ESRI license agreement.

Click Next on the welcome panel.


By default, the course data will be installed to the C:\Student folder.
Note: If for some reason you need to install the course data to a different location,
browse to that location. Select the folder where you want to store the course data, then
click OK. Be sure to note the location of the folder you've selected so that you can easily
access the data in the upcoming exercises.

Click Next.

Click Finish when the data installation is complete.

Remove the training data CD from your CD drive and return it to its sleeve in your
exercise book.

Step 4: Record ArcGIS Server access information


Throughout this course, you will log in to ArcGIS® Server as an administrative user. To
perform many of the tasks required to serve GIS data using ArcGIS Server, you will need
to use an account that has administrator privileges on the local machine and is also a
member of the ArcGIS Server Administrators group (agsadmin).

1-2 Copyright © 2006 ESRI


Exercise 1

Record the administrative information provided by your instructor in the spaces below.
▪ GIS server host name: ________________________________
▪ ArcGIS Server instance name: __________________________
▪ Administrator user name: ______________________________
▪ Administrator password: ______________________________

Step 5: Explore the ArcGIS Server help


The ArcGIS Server help provides an overview of the entire ArcGIS Server system. In it,
you will find descriptions of how to publish GIS content, create Web mapping
applications, and administer ArcGIS Server components. You will also find information
about the various editions of the software and helpful tutorials to walk you through some
common tasks.
The ArcGIS Server help documentation provides information about authoring,
publishing, and consuming GIS services. There are several additional sources of help
available that describe working with the ArcGIS Server system. For help authoring GIS
content for ArcGIS Server, such as map and globe documents or custom geoprocessing
models, you may wish to consult the ArcGIS Desktop help. The Developer help provides
documentation and examples for creating custom applications that consume ArcGIS
Server services, and the ArcGIS Explorer help describes how to use this popular Web
mapping client. For up-to-date ArcGIS documentation, you can also visit the online help
resources available at http://webhelp.esri.com.
You can access the ArcGIS Server help system in Manager via the Help link, or on your
desktop using the Start menu.

Copyright © 2006 ESRI 1-3


Introduction to ArcGIS Server

Click the Start button on your desktop and navigate to All Programs > ArcGIS >
ArcGIS Server > ArcGIS Server Help.

Use the ArcGIS Server Help to answer the following questions:


Question 1: What three editions are available for ArcGIS Server?
______________________________________________________________________

Question 2: ArcGIS Server's optional extensions allow you to add capabilities to your
system and create applications leveraging advanced features. What is one extension
available for ArcGIS Server? Hint: Consult the topic ArcGIS Server editions.
______________________________________________________________________

Question 3: As you use ArcGIS Server, you will follow a workflow of three steps to
make your geographic information available through the server: What are these three
steps? Hint: Consult the topic Working with an ArcGIS Server system.
______________________________________________________________________
______________________________________________________________________

1-4 Copyright © 2006 ESRI


Exercise 1

Conclusion
You have now installed the data that you will work with in the upcoming exercises in this
course. If you have any problems accessing this data, please ask your instructor for
assistance.

Step 6: (Optional) Create an ESRI Global Account


When navigating the ESRI Support Center, you may be asked to log in with an ESRI
Global Account to access a particular page. If you want to access all of the Web
resources that ESRI has to offer, you need a Global Account. Creating the account is free
and takes only a few moments.

If you don't already have an ESRI Global Account, open Internet Explorer.

Type support.esri.com in the Address bar of the browser window.

On the left side of the Web page, click the Create Account link under the ESRI
Support Login section.

Copyright © 2006 ESRI 1-5


Introduction to ArcGIS Server

In the form that displays, provide a user name and password of your choice and fill out
the remaining required fields (shown in bold).

When you have filled in the required fields, click "create my ESRI Global Account."
If the user name you chose is already taken, you will be prompted to choose another one.
Your account will be created and activated upon confirmation of your e-mail address.

1-6 Copyright © 2006 ESRI


Exercise 1

Answers to Exercise 1 Questions


Question 1: What three editions are available for ArcGIS Server?

Answer: The three editions are: Basic, Standard, and Advanced.

Question 2: ArcGIS Server's optional extensions allow you to add capabilities to your
system and create applications leveraging advanced features. What is one extension
available for ArcGIS Server? Hint: Consult the topic ArcGIS Server editions.

Answer: Extensions include: the 3D Extension, Data Interoperability Extension,


Network Extension, and Spatial Extension.

Question 3: As you use ArcGIS Server, you will follow a workflow of three steps to
make your geographic information available through the server: What are these three
steps? Hint: Consult the topic Working with an ArcGIS Server system.
1. Author the GIS resource using ArcGIS Desktop.
2. Publish the resource as a service using ArcGIS Server.
3. Use the service through a client application.

Copyright © 2006 ESRI 1-7


2
ArcGIS Server
overview

Exercise 2: Explore ArcGIS Server


Estimated time: 45 minutes
Exercise 2

Exercise 2: Explore ArcGIS Server


Estimated time: 45 minutes

In this exercise, you will complete the entire process required to make GIS information
available on the Web. You will author content using familiar ArcGIS Desktop
applications, publish GIS services using both ArcCatalog™ and the ArcGIS Server
Manager, and create a Web mapping application that will consume your services.
In this exercise, you will:
▪ Author content for a GIS service
▪ Connect to a GIS server
▪ Publish GIS services
▪ Create a Web mapping application
▪ Utilize a variety of clients for consuming GIS services
▪ Explore the different types of GIS services that ArcGIS Server can provide

Step 1: Use ArcMap to author GIS service content


In this step, you will create a simple map document containing data you wish to publish
as a map service. In general, the process of authoring a map document (.mxd file) for
publication in ArcGIS Server is no different than authoring any other map document.
You can include as many data frames or layers as you wish, use the same vector and
raster data formats as you would for any other map, and symbolize and label layers using
all available symbology.
There are performance considerations that you should take into account when authoring
GIS content for the Web. You will learn various tips for optimizing your maps in a later
lesson.

Click the Start button on your desktop and navigate to All Programs > ArcGIS >
ArcMap to start ArcMap™.

Copyright © 2006 ESRI 2-1


Introduction to ArcGIS Server

When prompted, choose to start using ArcMap with a new empty map.

Click the Add Data button .

Navigate to the \Student\ISRV\Exercise02\California folder and select some layers to


add to your map. Choose whichever layers you like.

Use the Layer Properties dialog box to symbolize and label the layers as you like. Hint:
To access a given layer's properties, right-click the layer name in the table of contents
and choose Properties.

! Make sure to use hollow fill symbols for the state boundary or county
layers if they exist in your map.

2-2 Copyright © 2006 ESRI


Exercise 2

When you are finished symbolizing the map layers, save your map document in the
\Student\ISRV\Exercise02 folder. Name the new map California.mxd.

Close ArcMap.
You have successfully completed the first step required to publish GIS content on the
Web. As you have seen, you can author content for ArcGIS Server using familiar ArcGIS
Desktop applications such as ArcMap. You will now use another familiar application,
ArcCatalog, to establish a connection to ArcGIS Server and to eventually publish your
map document as a map service.

Step 2: Connect to the GIS server


There are two applications that can be used to publish and administer GIS services:
ArcCatalog and ArcGIS Server Manager. In this step, you will use ArcCatalog to
establish a connection to the GIS server so you can begin working with GIS services.
Regardless of the application you use, you must connect to ArcGIS Server with an
administrator account in order to publish or administer GIS services. The account you

Copyright © 2006 ESRI 2-3


Introduction to ArcGIS Server

connect with must be 1) an administrator on the local machine, and 2) a member of the
ArcGIS Server Administrators group (agsadmin).
Before creating a connection, you will first make sure that your account is in the ArcGIS
Server Administrators group.

Use your operating system tools to verify that your account belongs to the agsadmin
group. Follow the set of instructions below that corresponds to your version of ArcGIS
Server.

For the .NET Framework

Right-click the My Computer icon on your computer's desktop and choose Manage
from the context menu to open the Computer Management window.
Note: If you do not have a My Computer icon on your desktop, click your Start menu >
Control Panel > Administrative Tools > Computer Management.

Expand the Local Users and Groups folder.

2-4 Copyright © 2006 ESRI


Exercise 2

Click the Groups folder.

Copyright © 2006 ESRI 2-5


Introduction to ArcGIS Server

In the panel on the right, double-click the agsadmin group.

Verify that your account (login) appears in the agsadmin group.


Note: If your account does not appear here, click Add to add it to the group. If you have
trouble adding your account, ask your instructor for assistance. After adding your
account, log out of your workstation and then log back on.

When you are finished, close the agsadmin Properties dialog box, the Computer
Management window, and the Administrative Tools window.

For Java

Click the Start button on your desktop and click All Programs > ArcGIS > ArcGIS
Server for Java > ArcGIS Server Manager to start the ArcGIS Server Manager
application.

2-6 Copyright © 2006 ESRI


Exercise 2

When prompted with the login page, enter the user name and password for an
administrative user account and click Log In. Hint: You recorded your ArcGIS Server
administrator user name and password in the last exercise on page 1-3.
Note: Your user name should be entered in the form <domain name>\<user name> (if
you are logged in to your local machine, use the host name in place of a domain name).

At the top of the application, click the GIS Server tab.

Copyright © 2006 ESRI 2-7


Introduction to ArcGIS Server

In the View panel on the left side of the application, click Users.

Verify that your account (login) appears in the users list as a member of the agsadmin
group.

Note: If your account does not appear here, make sure to add it to the group. If you have
trouble adding your account, please ask your instructor for assistance.

Close ArcGIS Server Manager.


Once you are sure that your account is part of the ArcGIS Server Administrators group
(agsadmin), you can connect to your server in ArcCatalog and publish a new map service.

Click the Start button on your desktop and navigate to All Programs > ArcGIS >
ArcCatalog to start ArcCatalog.

2-8 Copyright © 2006 ESRI


Exercise 2

In the Catalog tree, expand the GIS Servers folder.

ArcCatalog allows you to establish connections with a variety of GIS servers, including
WMS (Web Map Server) servers, ArcIMS servers, and ArcGIS servers. These
connections might be to a server running locally on your machine, on your local network
(intranet), or on the Internet.

Double-click Add ArcGIS Server.


You can create either user or administrative connections made to an ArcGIS server. In
order to publish and administer GIS services, you will need to establish an administrative
connection.

Copyright © 2006 ESRI 2-9


Introduction to ArcGIS Server

In the first panel of the Add ArcGIS Server wizard, select the option to manage GIS
services (as opposed to simply using them).

Click Next.
On this panel, you will enter your server's URL. The URL is built using the host name
(your machine name) and ArcGIS Server instance name in the format http://<host
name>/<instance name>/services. For example, the URL for a GIS server running
locally on a machine called "Servo" using the default ArcGIS Server instance name
"ArcGIS" would be http://Servo/ArcGIS/Services.

Enter your server's URL. Hint: You recorded your host name and ArcGIS Server
instance name in the last exercise on page 1-3.

Next, enter your host name.

Click Finish to complete the wizard and create the connection to your GIS server.
Your new GIS server connection appears in the GIS Servers folder. The name of your
connection should be "<host name> (admin)" (where "<host name>" is the name of your
machine).

2-10 Copyright © 2006 ESRI


Exercise 2

Right-click the connection and choose Server Properties from the context menu.

Use the tabs on the ArcGIS Server Properties dialog box to explore the default settings
for your GIS server.
Question 1: Where are the server log files written?
______________________________________________________________________
______________________________________________________________________

Question 2: What is the current logging level?


______________________________________________________________________
______________________________________________________________________

Question 3: How many host machines are managed by the server?


______________________________________________________________________
______________________________________________________________________

Question 4: What are the three types of directories used by ArcGIS Server?
______________________________________________________________________
______________________________________________________________________

Copyright © 2006 ESRI 2-11


Introduction to ArcGIS Server

Question 5: What are some types of GIS services that can be hosted by this server?
______________________________________________________________________
______________________________________________________________________

Close the ArcGIS Server Properties dialog box when you are finished.
Now that you have established an administrative connection to the ArcGIS server running
on your machine, you have the ability to control which GIS services are provided and
how they are made available to people who may wish to use them. In the next step, you
will publish the California.mxd map document you created earlier as a new map service.

Step 3: Publish a map service using ArcCatalog


Once an administrative connection has been established, it is simple to publish, start, or
stop GIS services using ArcCatalog. In this step, you will use one of the wizards
available in ArcCatalog to publish your map document as a new map service. ArcCatalog
can also act as a simple client for viewing services. Once you have published your map,
you will use ArcCatalog to preview the service and verify that it is running.

In the Catalog tree, navigate to the \Student\ISRV\Exercise02 folder and locate the
California.mxd map document you created earlier.

Right-click the map and choose Publish to ArcGIS Server.

On the first panel of the wizard, change the service name to CaliforniaService.

! GIS service names cannot contain a space.

2-12 Copyright © 2006 ESRI


Exercise 2

On the same panel, choose the option to create a new folder.

Name the new folder Maps.

Click Next.

In the following panel, keep the default capabilities checked (mapping only) and click
Next.

Click Finish to complete the wizard.


This is the quickest and easiest way to publish a GIS service. By right-clicking a GIS
resource (map document, globe document, geodatabase, address locator, etc.) in
ArcCatalog, you are only a few mouse clicks away from creating a GIS service. While
this method does not allow you to specify many of the available preferences for the new
service, you can always edit these properties later.
Upon completing the wizard, you see the service listed under your server folder (in the
Maps folder that you specified). You will now preview the service to verify that it is
running as expected.

Copyright © 2006 ESRI 2-13


Introduction to ArcGIS Server

In the Catalog tree, click the CaliforniaService listing under your server folder.

On the right, click the Preview tab to view the map service.

Use some of the navigation tools (Pan, Identify, Zoom In, Zoom Out) to interact with
the map.

When you are done exploring the map service, close ArcCatalog.
ArcCatalog is a familiar ArcGIS Desktop application that can be used to publish and
administer GIS services. ArcGIS Server provides another application for managing your
GIS server, working with services, and even creating Web mapping applications: the
ArcGIS Server Manager. In the next step, you will learn how to publish services using
this application.

2-14 Copyright © 2006 ESRI


Exercise 2

Step 4: Publish a map service using ArcGIS Server Manager


ArcGIS Server Manager is a Web-based application for administering a GIS server and
any of the GIS services that it provides. As with using ArcCatalog to manage your server,
an administrator login is required to use the tools available in the ArcGIS Server
Manager. In addition to publishing and administering GIS services, the ArcGIS Server
Manager contains wizards that allow you (as a member of your server's Administrators
group) to easily produce a Web mapping application to consume these services.
In this step, you will log in to Manager and use it to publish another map service. You
will also use it to start and stop services and to view their properties.

Start ArcGIS Server Manager. Hint: Click the Start button on your desktop and click
All Programs > ArcGIS > ArcGIS Server > ArcGIS Server Manager.
Note: Depending on the version of ArcGIS Server you are using, you will either see
ArcGIS Server for the Microsoft .NET Framework or ArcGIS Server for Java (e.g., All
Programs > ArcGIS > ArcGIS Server for the Microsoft .NET Framework > ArcGIS
Server Manager).

When prompted with the login page, enter the user name and password for an
administrative user account and click Log In. Hint: You recorded your ArcGIS Server
administrator user name and password in the last exercise on page 1-3.
Note: Your user name should be entered in the form <domain name>\<user name> (if
you are logged in to your local machine, use the host name in place of a domain name).

Copyright © 2006 ESRI 2-15


Introduction to ArcGIS Server

The functionality provided by Manager is organized into three categories: Services,


Applications, and GIS Server. The tabs at the top of the application allow you to publish
and manage GIS services, create Web mapping applications, or administer your GIS
server, respectively.

Click the Services tab at the top of the page.


The left side of the application shows the folders that have been created to contain your
services.

Click the Maps folder.


The contents of the Maps folder display on the right.
Notice that the CaliforniaService map service you created in the last step using
ArcCatalog is displayed in Manager. Services published using one application can be
administered in the other and vice versa.

2-16 Copyright © 2006 ESRI


Exercise 2

At the top of the Services panel, click Publish a GIS Resource.


You see the Publish a GIS Resource wizard. This wizard is more or less a Web version of
the ArcCatalog Publish to ArcGIS Server wizard that you used to publish your first
service.

In the first panel, click the Resource down arrow and navigate to the Tahoe.mxd map
document in the \Student\ISRV\Exercise02 folder.
Note: Only shared folders will appear in the Resource drop-down list. If you wish to
publish a resource that does not appear here, you will first need to use operating system
tools to designate the containing folder as shared. As part of the setup for this course,
your \Student\ISRV folder has been configured as a shared folder.

Name the new service Tahoe and publish it in the existing Maps folder.

Click Next to move to the next panel.

Keep the default capabilities (mapping only) and click Next.

Click Finish to publish the Tahoe service.

On the Services tab of Manager, expand the listings for your map services to view their
properties and a thumbnail preview.
Note: Don't worry about things you see that you might not understand yet (such as
pooling and capabilities). You will learn about them later in the course.

Copyright © 2006 ESRI 2-17


Introduction to ArcGIS Server

Try starting and stopping your services: check the service(s) you wish to start or stop
and click the appropriate button at the top of the Services panel.

When you are finished, leave both services running.


Now that you have a couple of map services running on your GIS server, you will create
a Web mapping application that will allow users to interact with your services from an
ordinary Web browser.

Step 5: Create a Web mapping application


While both ArcCatalog and ArcGIS Server Manager can be used to publish and manage
GIS services, only Manager has the ability to create new Web mapping applications. In
this step, you will use the wizard-driven tools in Manager to create a client application
that will consume your new map services. You will see how easy it is to produce a Web
mapping application using Manager and will become familiar with some of the options
available when creating such a client.

In Manager, click the Services tab to view the GIS services currently available on the
server.
When you create a Web application, only services that are currently running will be
available to you.

You want to use all your services in your Web application, so make sure that the status
for all of them is listed as Started. If a service is stopped, check the box next to the
service and click Start.

At the top of the Manager application, click the Applications tab.

2-18 Copyright © 2006 ESRI


Exercise 2

The Web Applications panel displays a list of applications you've created previously (if
any). In addition to creating new applications, Manager also allows you to delete or edit
existing applications.

At the top of the Web Applications panel, click Create Web Application.
Manager will now step you through a series of wizard panels to create the new
application.

In the first panel, specify the name and description for the new application as shown
below (for the host, keep the default value, which is the name of your machine):
▪ Name: California Web App
▪ Description: A simple Web mapping application created using Manager.

Click Next.
You will now be prompted for the map services you wish to include in your new
application. You can add as many map services as you like when building a Web
application, but should only add those that make sense in the same Web mapping
application. Each service in the output application will be shown as a separate group
layer in the table of contents.

Copyright © 2006 ESRI 2-19


Introduction to ArcGIS Server

In order to access the services you've created, you will need to establish a connection to
your GIS server.

Under the Available Services list box, click Add GIS Server.

In the dialog box that appears, choose to create an ArcGIS Server local connection.

2-20 Copyright © 2006 ESRI


Exercise 2

Type the name of your server in the Host text box.

Click Add Server.


The new connection is appears in the Available Services list box. If you expand the folder
for this connection, you will see the services you created earlier.

Use the same process to add an Internet connection to your server.

You have now established two distinct connections to your local GIS server: one that
uses communication over the local area network, and one that uses HTTP over the
Internet. You may use either connection to choose map services for your Web mapping
application. The decision to use one type of connection or the other will be driven by
whether or not you need to use your Web server's built-in security features (Internet
connection), or the type of functionality you require for the application (e.g., editing
requires a local connection).

Expand the folder for your Internet GIS server connection.

Copyright © 2006 ESRI 2-21


Introduction to ArcGIS Server

Choose the CaliforniaService map service from the local connection, then click Add to
add it to the Selected Services list box.

Repeat to add the Tahoe map service.

Click Next.
The next panel will prompt you for GIS the tasks that you wish to include in the new
application. Many of these tasks require a supporting GIS service. The Find Address task,
for example, requires a geocoding service. If you do not have the required supporting
service, you cannot include such a task.

Do not choose to add any tasks (you will work with these later in the course). Click
Next.

On the Set Page Properties panel, give a title and a theme for the application (you may
keep the defaults or provide your own).

Click Next.

Keep all the default settings on the Enable Map Elements panel (include all elements).

Click the Settings button for the North Arrow element, and select your favorite north
arrow symbol.

2-22 Copyright © 2006 ESRI


Exercise 2

Click Next.
The last panel of the wizard shows a summary of your new Web mapping application.
Question 6: What is the URL of your new Web application?
______________________________________________________________________
______________________________________________________________________

On the summary panel, make sure that the option to view the Web application in a new
browser window is checked.

Click Finish to complete the application.


Your application opens in a new browser window.
Note: Pop-up blocking software may prevent the application from launching when you
complete the wizard. If this is the case, start the Web mapping application by clicking its
hyperlink on the Applications tab of Manger.

You will now explore the application a little to get a feel for the kind of functionality it
delivers and to see the effect of some of your configuration choices.

All Web mapping applications that you build with Manager will have the same basic
layout that you see in this application. The largest portion of the application is used for

Copyright © 2006 ESRI 2-23


Introduction to ArcGIS Server

the map display, the console area along the left contain tools (such as a layer list and
overview) for working with the map, and a toolbar near the upper left of the application
contains familiar tools for interacting with the map (such as Zoom In, Zoom Out,
Identify, and Pan).

Use the interactive navigation tools to zoom in and pan around a section of the map.

When you build a Web mapping application with Manager, a help system is also
provided to assist your users in working with the map. You can edit these help documents
to add/remove information, redesign their appearance, add your own logos, etc.
Next, you will explore the default help system provided in a Web mapping application.

Click the Help link in the upper right of the application to open the help page.

Use the help to answer the following questions about interacting with the map:

2-24 Copyright © 2006 ESRI


Exercise 2

Question 7: What is the keyboard shortcut for zooming in on the map?


______________________________________________________________________

Question 8: When interacting with the map, what effect does spinning the mouse wheel
backward have?
______________________________________________________________________

Close the help window.

Click a feature on the map using the Identify tool.


The Results panel in the Web mapping application is used to display information returned
by tools such as Identify.

Expand the listings in the Results panel and examine the information returned.
All the windows along the left side of the application can be expanded or collapsed as
needed to save space.

Experiment with the control on the Results panel for expanding or collapsing the
window.

All the windows in the application can be docked or floated.

Copyright © 2006 ESRI 2-25


Introduction to ArcGIS Server

Experiment with the control for docking or floating the Results window.

Expand the Map Contents window, if it is not already expanded.


Notice that the map services used for your application are displayed as group layers in the
Map Contents window. By expanding the folder for one of the services, you can see all
the layers it contains. You can click the check box next to the map service folder to turn
on or off all layers for that service, or you can toggle each layer's visibility individually
using the check box next to each layer name.
When configuring a new Web mapping application, you can choose to restrict users from
toggling layer visibility. You may also hide layer symbology if you wish.

Experiment with turning individual layers on and off.

Expand the Navigation window on the left side of the application.


You see the north arrow symbol that you chose in the wizard.

Point your mouse pointer over the north tip of the north arrow, then click and hold
down your mouse button.

The map continuously pans north as long as you hold the mouse button down.

Use the control to pan in other directions.


Note: The Navigation control allows you to pan in eight directions: N, NE, E, SE, S,
SW, W, and NW.

2-26 Copyright © 2006 ESRI


Exercise 2

Expand the Overview window.


The Overview window contains a map of the full map service extent, with the current
extent of the main map shown with a red rectangle. When configuring a Web application,
you can choose which map service to display as the overview map.

Click the red rectangle in the Overview window and drag it to a new location.
Notice that the extent of the main map is updated as you move the rectangle.

When you are finished exploring your Web application, close the browser window and
the Manager window.
In this step, you've seen how easy it is to use Manager to build a Web mapping
application that uses your map services. In the next step, you will use ArcGIS® Explorer,
a powerful, freely downloadable, out-of-the-box client, to work with your map services.

Step 6: Use ArcGIS Explorer to view services


ArcGIS Explorer is an out-of-the-box application that can be used to work with GIS
services. It has a similar look and feel to a Web mapping application built with Manager,
but provides additional functionality, such as the ability to view data in three dimensions
and to combine data from multiple map services on the fly.
As you will soon see, the most compelling aspect of working with ArcGIS Explorer is the
advanced 3D visualization of GIS information that it provides. Maps displayed in ArcGIS
Explorer are draped over a globe, resulting in a more realistic and interesting
representation of geographic features.
ArcGIS Explorer can be installed from the ArcGIS Server installation CD or downloaded
(free of charge) from the ESRI Web site.

Click the Start button on your desktop and navigate to All Programs > ArcGIS >
Explorer to start ArcGIS Explorer.
Note: When ArcGIS Explorer starts, you may be prompted to set your Home Server.
The Home Server is the ArcGIS server that ArcGIS Explorer initially connects to when
the application starts.

If prompted, set the ArcGIS Explorer Home Server to the ESRI server.
When the application starts, the default map from the ESRI server displays in ArcGIS
Explorer's main window.

Copyright © 2006 ESRI 2-27


Introduction to ArcGIS Server

Note: If you start ArcGIS Explorer without an Internet connection, you will see a
wireframe lattice of the globe instead of the default map.

The navigator control (on the lower left of the window) allows you to zoom in and out, to
adjust the tilt, and to rotate the globe.

Take a few moments to experiment with the ArcGIS Explorer navigator control to
interact with the map.
In addition to the navigator control, ArcGIS Explorer also contains tasks for interacting
with the data in the map. Along with the tasks that are available out-of-the-box, ArcGIS
Explorer allows you to configure custom tasks to plug in to the application. Tasks can
also be developed for standard Web mapping applications built with Manager. You will

2-28 Copyright © 2006 ESRI


Exercise 2

learn how to create a custom task for ArcGIS Explorer, as well as configure tasks for use
in a Web mapping application, in a later section.

If necessary, expand the Tasks window on the left side of the application window.

In the list of available tasks, click the Find Place task to activate it.
Note: You can also activate a task in ArcGIS Explorer by clicking the carat to the far
right of the task name and choosing Activate from the context menu.

When you activate a task, controls for providing the required inputs are shown in the
Task Center window (in the ArcGIS Explorer console). After activating the Find Place
task, you see fields for entering a place name and (optionally) a country to define your
search.

Type Timbuktu for the place name to find. Do not specify a country for the search.

Click Find to begin the search.


Similar to the Web mapping application you created earlier, the ArcGIS Explorer console
contains a Results window to display information returned from a task. Once your search
completes, you should see a single match: Timbuktu, Mali.

Copyright © 2006 ESRI 2-29


Introduction to ArcGIS Server

In the Results window, right-click the matched record and choose Zoom.

ArcGIS Explorer rotates the globe and zooms in on Timbuktu (in Northern Africa).
ArcGIS Explorer is a powerful out-of-the-box client for consuming a variety of GIS
services. You will continue to work with ArcGIS Explorer as an ArcGIS Server client
throughout this course.

If you would like to view some more maps in ArcGIS Explorer, go on to the optional
next step. Otherwise, close ArcGIS Explorer without saving the map.

Step 7: (Optional) View other ArcGIS Explorer maps


In addition to the default globe that is initially loaded when you start ArcGIS Explorer,
there are several other globes and maps available from the ESRI ArcGIS Server that you
can open and explore.

From the File menu, choose Open.

If prompted to save changes, click No.

In the Open Map dialog box, choose ArcGIS Explorer Resource Center from the
drop-down list and click OK.
The ArcGIS Explorer Resource Center is a Web page hosted by ESRI that allows you to
use globes hosted by the ESRI ArcGIS Server.

2-30 Copyright © 2006 ESRI


Exercise 2

Copyright © 2006 ESRI 2-31


Introduction to ArcGIS Server

Click one of the available globes or 3D basemaps from the page. When prompted to
open or save the file, choose Open.

The globe or map that you chose appears in the display area.

Take a few moments to navigate the new globe and/or explore other maps and globes.

When you are finished viewing the sample globes, close ArcGIS Explorer without
saving the map, and close your browser window.

Conclusion
In this exercise, you carried out all the steps required to make GIS data available on the
Web: you authored content using familiar ArcGIS Desktop applications, published GIS
services using ArcCatalog and ArcGIS Server Manager, and finally, you consumed GIS
services in an out-of-the-box client (ArcGIS Explorer) and a Web mapping clients (which
you built using Manager).

2-32 Copyright © 2006 ESRI


Exercise 2

Answers to Exercise 2 Questions


Question 1: Where are the server log files written?

Answer: By default, server logs are written under the ArcGIS installation folder,
<ArcGIS Install Dir>\server\user\log (e.g., C:\Program
Files\ArcGIS\server\user\log\).

Question 2: What is the current logging level?

Answer: The default logging level is 3, which means that only administrative
messages, errors, and warnings get written to the log files.

Question 3: How many host machines are managed by the server?

Answer: Depending on your installation, there will be at least one, but there may be
several host machines managed by the server. The simplest installation will use a
single host machine (the GIS server itself).

Question 4: What are the three types of directories used by ArcGIS Server?

Answer: ArcGIS Server uses cache, jobs, and output directories. By default, these
directories are located under the ArcGISServer folder (e.g.,
C:\ArcGISServer\cache).

Question 5: What are some types of GIS services that can be hosted by this server?

Answer: Depending on your installation of ArcGIS Server, you may have the
following types of available services: geocode, geodata, geoprocessing, globe, and/or
map.

Question 6: What is the URL of your new Web application?

Answer: Answers will vary depending on your host name. The URL for Web
mapping applications built with Manager take the form http://<host
name>/<application name>/.

Question 7: What is the keyboard shortcut for zooming in on the map?

Answer: The keyboard shortcut for zooming in on the map is to hold both the
SHIFT key and the PLUS SIGN (+) key.

Copyright © 2006 ESRI 2-33


Introduction to ArcGIS Server

Question 8: When interacting with the map, what effect does spinning the mouse wheel
backward have?

Answer: Moving the mouse wheel backwards will zoom out from the map.
(Likewise, moving the wheel forward will zoom in.)

2-34 Copyright © 2006 ESRI


3
Map and globe
services

Exercise 3: Work with map and globe


services
Estimated time: 45 minutes
Exercise 3

Exercise 3: Work with map and globe services


Estimated time: 45 minutes

In this exercise, you will work through the entire process required to build a "parcel
search" Web mapping application. You will begin by authoring two GIS services
required for the application: a map service and a geocoding service. You will then create
a new Web mapping application using Manager and configure tasks in order to
incorporate additional GIS functionality into your application.
You will also be introduced to globe services. Content for globe services is authored
using ArcGlobe™ and may be consumed by ArcGlobe, ArcGIS Explorer, or certain
custom applications (built using the ArcGIS Engine Web Control). Additionally, you will
explore the ArcGIS tools available for building map and globe service caches to improve
service performance, and you will become familiar with the options that are available
when building such caches.
In this exercise, you will:
▪ Author and publish a map service
▪ Publish an address locator to create a geocoding service
▪ Add and configure the Find Address task in a Web mapping application
▪ Add and configure the Query Attributes task in a Web mapping application
▪ Author, publish, and consume a globe service
▪ Explore cache building tools and options for map and globe services

Step 1: Author a map document


As the GIS manager for a small town, you would like to create a Web mapping
application that runs in a kiosk in the lobby of the City office building (and is also
available via the Internet). Ideally, the application should provide up-to-date information
regarding parcels throughout the city, and should be searchable using the parcel ID. If
possible, you would also like to include the ability to locate addresses using the city's
street database.
To begin the process of developing the application, you will author a map document to
serve as the map service. You will then create an address locator to serve as the
geocoding service for the application. After publishing the required GIS services, you
will use Manager to create a Web mapping application and include the appropriate tasks
to deliver the functionality you need.

Copyright © 2006 ESRI 3-1


Introduction to ArcGIS Server

Start ArcMap with a new empty map document.

Click the Add Data button and navigate to the \Student\ISRV\Exercise03 folder.

Add Streets.shp.

Click the Add Data button again, and this time navigate to the Wilson ArcSDE
geodatabase.

Add the Parcels feature class as a layer to the map.

Use ArcMap to symbolize the layers as you would like them to appear in the map
service.

When you are finished, save the map document in the \Student\ISRV\Exercise03
folder. Name the map ParcelMap.mxd.

Close ArcMap.

Step 2: Create an address locator


In order to enable users of your Web mapping application to locate addresses throughout
the city, you will need to create an address locator. In this step, you will use ArcCatalog
to create a new locator based on the city's streets dataset (the same one you added to
ParcelMap.mxd in the previous step).

Start ArcCatalog.

In the Catalog tree, navigate to the \Student\ISRV\Exercise03 folder.

3-2 Copyright © 2006 ESRI


Exercise 3

Right-click the \Student\ISRV\Exercise03 folder and choose New > Address Locator.

Copyright © 2006 ESRI 3-3


Introduction to ArcGIS Server

In the Create New Address Locator dialog box, scroll down and select US Streets as
the style for the locator.

Click OK.
Depending on the style you choose for an address locator, you will be prompted for a
reference dataset and a set of required attributes for successfully locating an address. For
the US Streets style, you will need to point to a street dataset that contains (at a
minimum) attributes for street name and for house number ranges on the left and right
side of the street. ArcCatalog will try to determine these fields for you based on field
names in the dataset.

In the New US Streets Address Locator dialog box, type FindAddress as the name of
the new locator.

For Reference data, browse to the \Student\ISRV\Exercise03 folder and add the
Streets.shp shapefile.
The Fields information for the locator fills in for you automatically. Your dialog box
should look like the following graphic.

3-4 Copyright © 2006 ESRI


Exercise 3

Click OK to create the address locator.


Your new locator, FindAddress, now appears in ArcCatalog.

Step 3: Create a map service and a geocoding service


Now that you have created the necessary GIS objects (map document and address
locator), you will publish them as GIS services for use in your Web mapping application.

In ArcCatalog, navigate to the \Student\ISRV\Exercise03 folder.

Copyright © 2006 ESRI 3-5


Introduction to ArcGIS Server

Right-click the ParcelMap.mxd document you authored earlier and choose Publish to
ArcGIS Server.

Leave the default name for the new service (ParcelMap).

Choose to publish the service in the (existing) Maps folder.

Click Next.

On the following panel, leave the default settings for capabilities.

3-6 Copyright © 2006 ESRI


Exercise 3

Click Next.

In the summary panel, click Finish to create the ParcelMap service.


You will now use the same basic process to publish the address locator as a GIS service.

In the Catalog tree, navigate to the FindAddress locator you created earlier (in the
\Student\ISRV\Exercise03 folder).

Right-click the address locator and choose Publish to ArcGIS Server.

In the Publish to ArcGIS Server wizard, leave the default name of FindAddress for the
new service.

Copyright © 2006 ESRI 3-7


Introduction to ArcGIS Server

Choose to publish the service in a new folder called Locators.

Click Next.

In the summary panel, click Finish to create the new geocoding service.
You now have all the services necessary to deliver the functionality you were hoping for
in your Web mapping application. All you need to do now is use Manager to create the
application and configure the functionality you need.

Once both of the services are created and running, close ArcCatalog.

Step 4: Create a parcel search application


You have already used Manager to create a simple Web mapping application. In this step,
you will create a Web mapping application that contains additional functionality
delivered through tasks. Specifically, you will add and configure a task for locating
parcel features using a parcel ID and another for locating addresses along the city's street
network.

3-8 Copyright © 2006 ESRI


Exercise 3

Start ArcGIS Server Manager and log in to the application.

Click the Applications tab at the top of Manager.

Click Create Web Application to begin creating a new Web mapping application.

In the first panel of the wizard, type Parcel Search as the name of the application.

For description, type A kiosk application that allows users to find parcels or
address locations.

Click Next.

Copyright © 2006 ESRI 3-9


Introduction to ArcGIS Server

In the following panel, expand the Internet connection to your server and select the
Maps/ParcelMap map service. Add this service as a layer in the application.

Click Next.

In the next panel, add the Find Address and Query Attributes tasks, as shown below.

Click the Supporting Services tab.

3-10 Copyright © 2006 ESRI


Exercise 3

Expand the Internet connection to your server and add the Locators/FindAddress
service as a supporting service.

Some tasks, such as Find Address and Geoprocessing, require a supporting GIS service in
order to function. You will work with the Geoprocessing task (and its supporting service)
in lesson four.

Click the Select Tasks tab to return to the tasks panel.

Copyright © 2006 ESRI 3-11


Introduction to ArcGIS Server

Select the Find Address task in the task list and click Configure.

Each task that you add to a Web mapping application has settings that you can configure
for controlling task behavior and appearance.

3-12 Copyright © 2006 ESRI


Exercise 3

In the configuration dialog box for the Find Address task, keep all the default settings
and click OK.

You will now configure the Query Attributes task to perform the appropriate parcel
search (locate features using the parcel ID).

Click the Query Attributes task in the task list, then click Configure.

In the Query Settings portion of the dialog box, choose Parcels as the layer to query.

Copyright © 2006 ESRI 3-13


Introduction to ArcGIS Server

Click Add to create a query expression.

In the dialog box that appears (shown below), type Select Parcel ID: as the label text.

Choose MBL as the field to query (this field contains a unique ID for each parcel).

! If you do not see the MBL field appear in the list, close the dialog box
and verify that you chose the Parcels layer in the previous dialog box.

Choose equals (=) as the operator to use in the expression.

For the value to search, choose Select from list.


When configuring this task, you have the option of letting the user type in a value for the
query, or simply choosing a value from a list. Since there are not too many parcels in this
dataset, you will allow the user to choose the parcel ID from a list.

3-14 Copyright © 2006 ESRI


Exercise 3

Click Get Sample Values to get the complete list of values for this field.

When you have completed configuring the query expression, click OK.

Type Find Parcel by ID as the task name.

Copyright © 2006 ESRI 3-15


Introduction to ArcGIS Server

Click OK to complete the configuration for this task.

Click Next on the Select Tasks panel.

Click Next in the remaining panels of the Web mapping application wizard (accept all
default settings).

On the final panel of the wizard, click Finish.

If your new application does not start, click the appropriate link in the Web
Applications panel to start it.
You will now test the new Web mapping application to make sure the tasks you've
configured will accurately locate parcels and addresses throughout the city.

3-16 Copyright © 2006 ESRI


Exercise 3

Step 5: Test the parcel search application


Before releasing the Parcel Search application to the public, you will test it to make sure
it works as expected. You will search for a few parcels and try to locate some addresses.
Once you are satisfied that your application works, you will set up the kiosk machine in
the lobby and make the site public!

If it is not already running, start the Parcel Search Web mapping application.
In the application's Tasks window, you should see the two tasks that you configured: Find
Address and Find Parcel by ID. To start, you will use the Query Task to locate a parcel
using its ID.

Click the Find Parcel by ID task to launch it.

Copyright © 2006 ESRI 3-17


Introduction to ArcGIS Server

Choose any parcel ID from the drop-down list.

Click Find to execute the task.


Once execution of the task has completed, the Results window should indicate that one
match was found. Since the parcel ID is unique, and you chose to fill the task drop-down
list with values from the dataset, you should always have exactly one match each time
you run the task (excluding IDs such as "unknown," etc.).

Expand the listing for the task results.

3-18 Copyright © 2006 ESRI


Exercise 3

Right-click the record for the parcel feature that was found and choose Zoom to.

Try finding a few more parcels using the Find Parcel by ID task to make sure the task
works consistently.
Once you are confident that the query task works well, you will test the Find Address
task by searching for a few familiar addresses throughout the city.

Close the Find Parcel by ID task by clicking the "X" in the upper-right corner of the
dialog box.

In the Tasks window, click the Find Address task to launch it.

Copyright © 2006 ESRI 3-19


Introduction to ArcGIS Server

In the text box, type the address for the city office building, which is 620 Viola St, and
click Find.

If the address locator and resulting geocoding service were created correctly, you should
have a match for the address in the Results window.

In the Results panel, expand the listing for 620 Viola St.

If it is not already checked, check the check box next to the address.

Right-click the location that was matched, and choose Zoom to.

You should see a cyan (light blue) push pin at the location that was matched.

3-20 Copyright © 2006 ESRI


Exercise 3

Next, you will test an address identified by a street intersection.

In the Find Address task, type Reid St @ Nash St and click Find.

! When geocoding a street intersection with a Web mapping application


task, make sure to use the @ or the | symbol for the "and" portion of
the address. Do not use the ampersand (&) symbol, as this may cause
an error.

Expand the results for the Find Address task.


Since Reid Street meets Nash Street at two intersections, you should have two matches
for this address.

Copyright © 2006 ESRI 3-21


Introduction to ArcGIS Server

With very little effort, and some standard ArcGIS Server Web mapping application tasks,
you have produced an application that makes information about your city more accessible
to its inhabitants. As interest in the application grows, perhaps you will update it to
include information about voter precincts and polling locations, local schools, public
transportation schedules, etc. Perhaps you will add additional functionality, such as the
ability to get driving directions.

Step 6: Author content for a globe service


ArcGlobe is used to author globe documents (.3dd), which can then be published as globe
services. Globe services provide the unique ability to visualize GIS data in three
dimensions. When consumed either by ArcGlobe or ArcGIS Explorer, individual layers
from the published service can be draped over a globe and displayed with other datasets.

Click the Start button on your desktop and navigate to All Programs > ArcGIS >
ArcGlobe to start ArcGlobe.

When ArcGlobe opens, click the Add Data button .

Navigate to the \Student\ISRV\Exercise03 folder and select the Giza.lyr layer.

3-22 Copyright © 2006 ESRI


Exercise 3

Click Add to add the layer to the globe.


This is a high-resolution satellite image of the Giza plateau in Egypt (just south of Cairo)
showing the famous pyramids of (from northeast to southwest) Khufu (Cheops), Khafre,
and Menkaure. The image is at a 61-centimeter cell resolution, which means that each
cell (pixel) in the image represents 61 centimeters on the ground.

Right-click the new layer in the table of contents and select Zoom To Layer.

In the ArcGlobe table of contents, drag the new layer to the top of the layer list (it is
currently being obscured by the Continents layer).

Copyright © 2006 ESRI 3-23


Introduction to ArcGIS Server

Note: When a globe service is published from a globe document, globe properties (such
as sun angle, background colors, and even layer order) do not carry over. When
consuming a globe service, the client works with individual layers from the globe and not
with the service as a whole. Changing the layer order, therefore, has no effect on the
output globe service; it simply allows you to get a better idea of what the image will look
like when consumed from the service.

Save the current document in the \Student\ISRV\Exercise03 folder. Name the


document Pyramids.3dd.

Close ArcGlobe.
You will now use ArcCatalog to publish a globe service from the document you authored
above.

Step 7: Use Manager to publish a globe service


Like map services, a globe service can be published using either ArcCatalog or ArcGIS
Server Manager. Publishing a globe service requires the 3D Server extension for ArcGIS
Server. In this step, you will use the Add New Service wizard in ArcCatalog to publish a
globe service using the Pyramids.3dd document you authored in the previous step. You
will also examine the properties that are available for a globe service.

Start ArcCatalog.

In the Catalog tree, expand the GIS Servers folder and locate your GIS server.
You will begin by making a folder to organize your globe services.

3-24 Copyright © 2006 ESRI


Exercise 3

Right-click your GIS server and choose New Folder.

A new folder (appropriately named New Folder) is added beneath the server folder in
ArcCatalog.

Type Globes as the name of the new folder.


You will now publish a new globe service (from the Pyramids.3dd document) in the
Globes folder.

In the Catalog tree, right-click the Globes folder and choose Add New Service.

The quickest way to create a new service is to right-click the object to publish (map,
globe, locator, etc.) and choose Publish to ArcGIS Server. The Add New Service option,
however, allows you to initially define more preferences for the service rather than
simply taking default values for them. Although you will not change most of these
values, you will use the Add New Service wizard in order to see the preferences that are
available.

Copyright © 2006 ESRI 3-25


Introduction to ArcGIS Server

In the first panel of the Add GIS Service wizard, choose to publish a globe service.
Name the new service Pyramids.

Click Next.

In the following panel, navigate to the Pyramids.3dd globe document in your


\Student\ISRV\Exercise03 folder.

3-26 Copyright © 2006 ESRI


Exercise 3

Choose the default ArcGIS Server cache directory from the drop-down list.

Click Next.

In the next panel, keep the default settings for Web access and operations allowed.
Notice that, unlike map services, globe services have a single capability, Globe, which is
always enabled. Globe services also have three operations allowed options: Globe,
animation, and query.

Click Next.

Keep the default settings for Pooling and Timeouts and click Next.

In the next panel, keep the default settings for the isolation level and recycling.

Copyright © 2006 ESRI 3-27


Introduction to ArcGIS Server

Note: Settings such as pooling, timeout, recycling, and isolation level can have an
impact on functionality and performance. The ArcGIS Server documentation contains
detailed information regarding these settings.

Click Next.
The final panel of the wizard displays a summary of the settings you've provided for the
new globe service. You have a choice to start the service upon completing the wizard, or
starting the service manually later.

3-28 Copyright © 2006 ESRI


Exercise 3

Choose to start the globe service right now.

Click Finish to create the service.


You should see a listing for the new Pyramids service in your GIS server's Globes folder.

If you forgot to start the service upon completing the wizard, right-click it now and
choose Start.
Since they are fairly specialized services for interacting with 3D data, globe services have
a limited number of clients available for consuming them: ArcGlobe and ArcGIS
Explorer. In the next step, you will use ArcGIS Explorer to view the Pyramids globe
service.

Copyright © 2006 ESRI 3-29


Introduction to ArcGIS Server

Step 8: Consume the globe service from ArcGIS Explorer


ArcGIS Explorer is likely to be the most common client for users wishing to view your
globe services. In addition to 3D visualization, one of the most powerful features of
ArcGIS Explorer is its ability to combine data from several map services (running on a
local or remote GIS server) in a single ArcGIS Explorer session. You also have the
ability to save your map locally (.nmf) even if it references data from remote servers
(such as ESRI).

Click the Start button on your desktop and navigate to All Programs > ArcGIS >
Explorer to start ArcGIS Explorer.
When the application starts, the default map from the ESRI server displays in ArcGIS
Explorer's main window.
Note: If you start ArcGIS Explorer without an Internet connection, you will see a
wireframe lattice of the globe instead of the default map.

From the File menu, choose Add Content.

On the left of the Add Content dialog box, click Servers.

3-30 Copyright © 2006 ESRI


Exercise 3

At the top of the dialog box, click ArcGIS Server in the Create New Connection group.

Provide the URL for your GIS server. Remember that the form of the URL is
http://<host name>/<ArcGIS Server instance/Services.
Note: Refer to your notes in the first exercise for the host name and server instance for
your installation.

Click OK.

Once you have created a connection to your server, expand the listing for the server
and for the Globes folder to locate the Pyramids service.

Copyright © 2006 ESRI 3-31


Introduction to ArcGIS Server

Expand the listing for the Pyramids service and select the Giza layer.

Click Open to add the layer to ArcGIS Explorer.


The Giza layer is now listed in the Explorer Contents panel. Since the new map service is
located on the other side of the globe, you will need to zoom to it before it becomes
visible.

In the Contents window, right-click the Giza layer and select Zoom to Layer.

ArcGIS Explorer rotates and zooms the globe to position the extent on the Giza layer.
This layer provides a higher-resolution view of the terrain displayed in the underlying
ESRI service. ArcGIS Explorer allows you to set transparency for layers in the map in
order to view the features drawn underneath.

Use the Explorer Navigation control to zoom in closer to the pyramids displayed in the
image.

3-32 Copyright © 2006 ESRI


Exercise 3

If you like, tilt the surface to see the 3D effect of the globe.

Right-click the Giza service in the Contents window and select Transparency.

Slowly move the transparency slider up and then back down to see the effect in the
map display.

The ability to set transparency for layers in ArcGIS Explorer can be very useful when
displaying layers that may obscure the terrain beneath, such as land-use polygons or
DRGs (digital raster graphs).

When you are finished working with the map, save it in the default location with the
name Pyramids.nmf.

Close ArcGIS Explorer.


The next time you open this map, data from the ESRI service and the local Pyramids
service will be loaded again and your transparency settings will be applied.

Copyright © 2006 ESRI 3-33


Introduction to ArcGIS Server

Step 9: Explore caching options


The term caching is used often in the context of the Internet and Web applications.
Caching is simply the use (and reuse) of pre-rendered images to save the Web server
from doing more work than it needs to. Caching for ArcGIS Server can dramatically
improve performance for clients who consume map or globe services.
In this step, you will become familiar with the basics of caching for map services and
explore some of the tools and options available for working with caches.

Start ArcCatalog.

In the Catalog tree, expand the listing for your GIS server.

Expand the Maps folder.

Right-click your CaliforniaService map service and select Service Properties.

On the Map Service Properties dialog box, click the Caching tab to view properties of
the service's cache.
Note: Caching properties are not available unless the service is running.

3-34 Copyright © 2006 ESRI


Exercise 3

Question 1: What is the physical path to this service's cache?


______________________________________________________________________
______________________________________________________________________
______________________________________________________________________
______________________________________________________________________
______________________________________________________________________

Click Generate to run a tool for creating a map service cache.


Note: The Generate Map Server Cache tool is also accessible in ArcToolbox™.

The Generate Map Server Cache tool gives you a lot of control over how the map cache
is created. As you become more familiar with the options that are available here, you may
wish to use them to customize your cache output. For now, you will mostly use default
settings for the cache.

Scroll through the Generate Map Server Cache options until you reach the Number of
Scales field.
Map server caches can be created at a variety of user-defined or predetermined scales. As
data is requested at different extents, a pre-rendered image from the nearest scale can be
pulled from the cache and resampled for display on the client. If you choose Standard as
the method for determining caching scales, ArcGIS will calculate which scales to use
(based on the number of scales requested). If you want more control over the caching
scales, you can select Custom and then enter the scales manually.

Copyright © 2006 ESRI 3-35


Introduction to ArcGIS Server

Type 5 for the number of scales.

When you leave the scales text box (by clicking outside the text box or hitting your TAB
key), the scales calculated by ArcGIS for the cache will be displayed in the Scale text
area. The first scale level is determined by dividing the scale of the map service's full
extent by two. Each subsequent scale level is determined by simply dividing the previous
scale by two.

Scroll to the bottom of the Generate Map Server Cache dialog box.

3-36 Copyright © 2006 ESRI


Exercise 3

Click Cache Type (Optional) to expand it.

There are two types of caches available for a map service: Fused (the default) and
Multilayer. In a fused cache, all layers in the service are displayed in the cached images.
A multilayer cache, on the other hand, allows you to create individually cached images
for selected layers in the service.
In general, fused caches result in better performance, since the map server no longer
needs to read data for the layers (it simply serves images from the cache to the client).
When the service is viewed on the client, however, individual layers cannot be toggled on
or off, and any changes to the underlying data will not be updated in the service (until the
cache is refreshed).
A multilayer cache has the advantage of allowing client applications to toggle layer
visibility. More importantly, it ensures that changes to a layer's data will be instantly
reflected in the client.

Copyright © 2006 ESRI 3-37


Introduction to ArcGIS Server

When creating a cache for your map service, it is therefore important to determine which
layers should be cached (static map content), and which ones should be drawn using calls
to the underlying database (dynamic content).

Choose to create a multilayer cache.

In the list of input layers, check all but one of the map service layers.
Note: The layers in your service will likely vary from those shown in the following
graphic.

Click OK to build the cache.


You see a confirmation like the following when the tool is completed.

3-38 Copyright © 2006 ESRI


Exercise 3

Click Close.
Depending on the size of your map service, the number of layers, the processing speed of
your computer, and (most importantly) the number of scales, building a map server cache
may take a while. The simple cache for this map service should not have taken long to
complete.

Click OK on the Map Service Properties dialog box.

Close ArcCatalog.
You will now view the map service to see if caching has any effect on the map display or
performance.
When Manager is used to create a Web mapping application for a cached service,
zooming with the mouse wheel will zoom to scale levels supported by the cache. You
will rebuild the application in order to provide the zoom level support for zooming with
the mouse wheel.

If necessary, log in to ArcGIS Server Manager and click the Applications panel.

Use the Create Web Application wizard to create a new Web mapping application
called Cache Test.

Copyright © 2006 ESRI 3-39


Introduction to ArcGIS Server

From the Internet connection to your GIS server, choose the CaliforniaService map
service.

Use the default settings for the rest of the options and click Finish.

When it has been created, start the Cache Test application.

Use your mouse wheel to zoom in and out of the map.


Each click of the wheel should jump you to the next scale level in the cache. Do you
notice any difference in the quality of the map display? Do the images load faster? (For a
small service running locally, you may not notice a difference in performance.)

When you are finished viewing the map, close your Web application, ArcGIS Server
Manager, and any other open applications or windows.
While caching is usually the most important factor for improving the performance of
ArcGIS Server client applications, there are many other considerations as well. Later in
the course, you will learn more techniques for optimizing your GIS services.

Conclusion
In this exercise, you gained more experience authoring and publishing map services for
ArcGIS Server. You also learned to publish an address locator to produce a geocoding
service. You created a specialized Web mapping application that provided GIS
functionality through tasks that you configured using Manager.
You became familiar with globe services and their ability to provide three-dimensional
visualization of geographic data. Content for globe services can only be authored using
ArcGlobe and may be consumed by ArcGlobe, ArcGIS Explorer, or certain custom
applications (built using the ArcGIS Engine Web Control).
Finally, you were also introduced to the ArcGIS tools available for building map service
caches. You learned about the options available when building a cache and how those
options can affect map display and performance.

3-40 Copyright © 2006 ESRI


Exercise 3

Answers to Exercise 3 Questions


Question 1: What is the physical path to this service's cache?

Answer: The cache may be located in any folder that has been defined as a cache
folder for your GIS server. The default cache folder is under the ArcGISServer
folder on your machine (e.g., C:\ArcGISServer\ArcGISCache\). Each service may
have a subfolder here that contains the cache. By default, these folder are named
with the convention <folder name>_<service name> (e.g., Maps_Tahoe).

Copyright © 2006 ESRI 3-41


4
Geoprocessing
services

Exercise 4: Publish and use a


geoprocessing service
Estimated time: 45 minutes
Exercise 4

Exercise 4: Publish and use a geoprocessing service


Estimated time: 45 minutes

Geoprocessing services allow users to access GIS functionality contained in your


geoprocessing models over the Web. Processing of the models is handled on the server,
so client applications don't need to tie up resources in order to execute them. The
functionality you choose to deliver in a geoprocessing service is determined by the
geoprocessing model (or group of models) that you publish.
Once published, a geoprocessing service can be consumed by clients such as ArcMap,
ArcGIS Explorer, or Web mapping applications. When consumed using ArcMap, the
service will appear as a toolbox containing tools for the model or models provided by the
service. In ArcGIS Explorer or a Web mapping application, the geoprocessing services
are exposed as tasks.
In this exercise, you will use ModelBuilder in ArcMap to author a geoprocessing model.
Your model will allow users to draw a line on the map, buffer the line by a specified
distance, and then clip features in a parcels layer that fall within the buffer. After testing
the model in ArcMap, you will publish the map document to create a geoprocessing
service and then test it in a Web mapping application.
In this exercise, you will:
▪ Author a simple geoprocessing model
▪ Add a model as a tool layer to a map document
▪ Publish the map document containing the tool layer and enable the Geoprocessing
capability
▪ Create a Web mapping application that contains a task built from a geoprocessing
service
▪ Consume geoprocessing services in ArcMap

Step 1: Create a toolbox


Geoprocessing services are created by publishing either a toolbox containing the models
you wish to provide, or an ArcMap document that contains a tool layer based on a tool or
model. The method you choose for publishing your model has ramifications for how the
geoprocessing service will behave, such as whether or not results will be saved on the
server, how results will be rendered, and whether or not results (e.g., features) will be
sent to the client of the service. You will author your model as a tool layer in an ArcMap
document, which will ensure that drawing of the features occurs on the server (using the

Copyright © 2006 ESRI 4-1


Introduction to ArcGIS Server

associated map service). Features resulting from running the model will be stored
(temporarily) on the server and will not be sent to the client.
In this step, you will create a new toolbox accessible to ArcGIS Server, add the toolbox
to a new map document, and set up the geoprocessing environment appropriately.
Note: When publishing a geoprocessing service, ArcGIS Server must have adequate
access and permissions on the data used by the service and the toolbox that contains the
geoprocessing models.

Before authoring a geoprocessing model or map for a new geoprocessing service, you
will first create a new toolbox to contain the models. The toolbox must be located in a
folder that is accessible to ArcGIS Server, so you will add it under a folder that is already
accessible to ArcGIS Server, your Student\ISRV folder.

Start ArcCatalog.

In the Catalog tree, navigate to the \Student\ISRV\Exercise04 folder.

4-2 Copyright © 2006 ESRI


Exercise 4

Right-click the folder and choose New > Toolbox from the context menu.

Name the new toolbox Parcel Tools.


You will now add your toolbox and some layers to a map document in ArcMap. Later,
you will create a geoprocessing model in the toolbox that will use layers in the map to do
some simple geoprocessing.

Close ArcCatalog.

Start ArcMap with a new empty map.

Click the Add Data button .

Copyright © 2006 ESRI 4-3


Introduction to ArcGIS Server

Navigate to the Riverside.mdb personal (for Microsoft Access) geodatabase in your


\Student\ISRV\Exercise04 folder.

From the geodatabase, add the Parcels and the Streets feature classes to the map.

Click the Show/Hide ArcToolbox Window button to open the ArcToolbox


window.

4-4 Copyright © 2006 ESRI


Exercise 4

Right-click in the ArcToolbox window and choose Add Toolbox.

In the Add Toolbox dialog box, navigate to the \Student\ISRV\Exercise04 folder and
open the Parcel Tools toolbox.

Click Open to add it to ArcToolbox.

Step 2: Set up the geoprocessing environment


At the moment, your Parcel Tools toolbox is empty. Before creating a model, however,
you will first set the folder that ArcMap will use to write any output datasets that are
created as a result of running a model.

From the Tools menu, choose Options.

Copyright © 2006 ESRI 4-5


Introduction to ArcGIS Server

On the Geoprocessing tab of the Options dialog box, click Environments (as shown in
the following graphic).

In the Environment Settings dialog box, click General Settings to expand it.

4-6 Copyright © 2006 ESRI


Exercise 4

Set the scratch workspace by typing the UNC path to your \Student\ISRV\Exercise04
folder (the first part of the path, your machine name, will differ from the example
below).

Note: If the machine on which you are authoring is also your GIS server, you may use
local pathnames (e.g., \Student\ISRV\Exercise04) rather than UNC pathnames.
Regardless, UNC pathnames will work for referring to local or remote folders (as long as
they are shared appropriately). Referencing resources on a remote machine from your
server machine always requires the use of UNC paths.

Click OK on the Environment Settings dialog box, then click OK on the Options
dialog box.
The Scratch Workspace setting is used to control where intermediate datasets get written
when a geoprocessing model is executed. The %SCRATCHWORKSPACE% variable
can be used in a model or script to refer to this location when processing models locally.
When a model in a geoprocessing service is executed, ArcGIS Server will use a folder
under the configured Jobs folder for scratch output.

Copyright © 2006 ESRI 4-7


Introduction to ArcGIS Server

Step 3: Author a geoprocessing model


In this step, you will author a geoprocessing model that will work with datasets in the
map. You will test the model to ensure that it functions as expected, and then add the
model as a tool layer in the map. In subsequent steps, you will publish a geoprocessing
service from the map document, then consume the services in a variety of clients.

Right-click the Parcel Tools toolbox and choose to create a new model.

A new (empty) ModelBuilder window opens. By default, the new model is simply named
Model. You will use the Model Properties dialog box to provide a more descriptive name
and label for the model.

In the ModelBuilder window, from Model menu, choose Model Properties.

On the General tab of the Model Properties dialog box, type ClipParcels for the model
name and Clip Parcels with Buffer as the label.

Click OK on the Model Properties dialog box.


The ModelBuilder window now displays the label you provided.
The interactive tools provided in ModelBuilder make the process of authoring a
geoprocessing model intuitive. Next, you will create a simple model that 1) allows the

4-8 Copyright © 2006 ESRI


Exercise 4

user to draw a line on the map, 2) buffers the line by a specified distance, 3) clips features
in the Parcels layer using the buffer, and then 4) displays the resulting parcels on the map.

In the ArcToolbox window, expand the Analysis Tools toolbox.

Under Analysis Tools, expand the Proximity toolset.

Drag the Buffer tool from the toolbox onto your model.

You can incorporate any of the existing ArcToolbox tools into your model, as well as
custom scripts or models you've created. Now that you've added the Buffer tool to the
model, you will define input and output parameters that the tool requires.
Note: When a portion of a model is not colored (as shown in the example above), it is an
indication that the piece of the model is not ready to run. Once you have specified all
input and output requirements for the Buffer tool, you will see the color change to
indicate a "ready" state for the process.

Copyright © 2006 ESRI 4-9


Introduction to ArcGIS Server

Right-click the Buffer tool (square) in the ModelBuilder window and choose Make
Variable > From Parameter > Input Features.

A new object that represents the input features to buffer is added to the model. Rather
than using features from a dataset, however, your model will allow the user to draw a line
on the map to use as the buffer input.

Right-click the Input Features variable (oval) in the model and choose Properties.

4-10 Copyright © 2006 ESRI


Exercise 4

On the Data Type tab of the Input Features Properties dialog box, choose Feature Set
from the Select data type drop-down list.

From the Import schema and symbology drop-down list, select the Streets layer.
By setting a layer in the map to use for schema and symbology, you are indicating that
the input shapes drawn by the user will be lines with the same attributes defined for the
Streets feature class. Although it won't be necessary for your model, the user can add
attribute values for the input features as well. These line features will be drawn on the
map using the symbology you've defined for the Streets layer.

Click OK on the Input Features Properties dialog box to save your changes.
The color of the Input Features shape changes to blue in the model. This indicates that
this particular piece of the model is sufficiently defined and ready for execution.

Copyright © 2006 ESRI 4-11


Introduction to ArcGIS Server

Right-click the Input Features oval in the model again and choose Model Parameter.

A small letter P appears to the upper right of the oval, indicating that the value for the
buffer input will be a parameter for the user to define (e.g., by drawing on the map). In
order to allow the user to define the distance to use, you will add another variable to the
model.

4-12 Copyright © 2006 ESRI


Exercise 4

Right-click the ModelBuilder window and choose Create Variable.

In the Create Variable dialog box, scroll through the list of variable types and select
Linear unit.

Click OK.
A new variable named Linear unit is added to the model. Notice, however, that the
variable is not connected to anything else in the model. Since the linear unit represents
the distance used to create the buffers, you will connect this variable as an input to the
Buffer tool in the model.
Note: Feel free to alter the size and position of shapes in the ModelBuilder window. The
layout of the model has no effect on how the model is ultimately executed (e.g., it is not
always run from right to left, top to bottom).

Click the Add Connection tool in the ModelBuilder window.

Use the Add Connection tool to draw a line between the Linear unit input variable and
the Buffer tool.

Copyright © 2006 ESRI 4-13


Introduction to ArcGIS Server

Regardless of the direction in which you drew the line, you should see a connection
appear that points from the Linear unit input to the Buffer tool.

Right-click the Linear unit variable and set it as a model parameter (as you did earlier
for the input features).

Double-click the Linear unit variable and, in the Linear unit dialog box, provide an
initial (default) value of 50 meters for the buffer distance.

Click OK on the dialog box.

Right-click the Output Feature object on the model and choose Rename.

Type Out Buffers as the new name for the output and click OK.
You now have a simple model that will allow the user to draw input line features on the
map and then buffer them a specified distance. You will now add to the model so that the
buffers are used to clip features in the Parcels layer.

In ArcToolbox, under the Analysis Tools toolbox, expand the Extract toolset.

Drag the Clip tool onto the model.


Notice that the Clip portion of the model is white, indicating that it is not in a ready state.
There are two required inputs that must be defined for the Clip tool: the input features to
be clipped, and the polygon feature(s) with which to clip them. You will use the Parcels
layer as input and the buffers as the clip features.

Double-click the Clip tool in the model to open its input dialog box.

From the appropriate drop-down lists, choose the Parcels layer as the input features
and Out Buffers as the clip features.

4-14 Copyright © 2006 ESRI


Exercise 4

Replace the folder portion of the Output Feature Class with the
%SCRATCHWORKSPACE% variable (as shown in the following graphic).

Click OK on the Clip dialog box.


A new shape representing the input features (called Parcels) is added to the model. Your
model should look similar to the one in the following graphic.

Copyright © 2006 ESRI 4-15


Introduction to ArcGIS Server

The entire model should now appear in color, indicating that it is ready to execute. Notice
that each type of component in a model (input, output, tool, etc.) has a distinct color.
Before testing the model, however, you will first set some properties to define how and
where output data from the model will be written.

4-16 Copyright © 2006 ESRI


Exercise 4

Right-click the Out Buffers shape in the model. Make sure that Model Parameter is not
checked, and that Managed and Intermediate are.

The Managed and Intermediate options indicate that the output data will be temporary
(i.e., for use in another model step) and that ArcGIS will control the location of the
output data.

Right-click the output from the Clip tool (Parcels_Clip.shp). Make sure that Managed
and Intermediate are not checked, and that Model Parameter and Add To Display are.

Copyright © 2006 ESRI 4-17


Introduction to ArcGIS Server

Note: Except for intermediate datasets, outputs cannot be defined as Managed in a


model that will be published as a tool layer in a map service.

Right-click the Parcels_Clip.shp object in the model and choose Rename.

Type Clipped Parcels as the new name for the output.


This name will appear as the layer name when the clip results are added to the map.

Save and close the model.

Save the map document map as Parcels.mxd in your \Student\ISRV\Exercise04


folder.
You are almost ready to publish the map. Before doing so, however, you will test the
model to make sure it works as expected and add it as a tool layer to the map document.

Step 4: Test the model


To make sure the model you authored works as expected, you will run it in ArcMap.
Once you are confident that it works, you will add it as a tool layer to the Parcels.mxd
map document. When this map is eventually published, you will have the option of
enabling the Geoprocessing capability for the service.

Zoom in to a portion of the map where individual parcels are visible.

In the ArcToolbox window, double-click your model (Clip Parcels with Buffer) to
open the input dialog box for the model.
The dialog box that opens contains controls for specifying all the inputs required to run
the model. Recall that your model contains three required inputs: a feature (or features) to
buffer, a buffer distance (linear unit), and an output dataset location.

4-18 Copyright © 2006 ESRI


Exercise 4

Use the Input Features tool to digitize a line on the map with the mouse (as shown
in the following graphic).

Note: The feature type (line), symbology, and schema for the input features were defined
in the model by specifying the Streets layer as a template. In addition to digitizing the
feature, users may also edit attribute values for the feature by clicking the table icon in
the input dialog box.

If you like, in the Clip Parcels with Buffer dialog box, change the default buffer
distance value you provided when authoring the model (50 meters).

Leave the default setting for the output dataset.

Click OK to execute the model with the information you provided.


A progress window appears and tells you that the model execution was successful.

Copyright © 2006 ESRI 4-19


Introduction to ArcGIS Server

Close the progress window.


After the model runs, you see the result parcels displayed in the map as a new layer
(Parcels_Clip). You will remove this layer before publishing the map (users will want to
see the results of their own analyses, not yours!).

Right-click the Parcels_Clip layer in the table of contents and choose to Remove to
remove it from the map.

Step 5: Add the model as a tool layer to the map


You will now add the model as a tool layer to the map document. A tool layer is a group
layer that contains sublayers for all model input and output datasets. Tool layers provide
an easy way to define how layers returned by a model will be symbolized in the map.

4-20 Copyright © 2006 ESRI


Exercise 4

Drag the model (Clip Parcels with Buffer) from the ArcToolbox window to the table of
contents.

Note: Make sure the tool layer is at the top of the table of contents to ensure that features
in the output layer (Clipped Parcels) are not obscured.

In the table of contents, click the symbol for the Clipped Parcels layer to open the
Symbol Selector dialog box.

Choose a symbol for the layer that stands out from the one used for the Parcels layer
(e.g., bright red or yellow), and apply a distinct color to the parcel outline.

Close the Symbol Selector.

Turn off visibility for the Clipped Parcels layer. Hint: Uncheck the check box next to
the layer name.

Save the map document.

Close ArcMap.

Copyright © 2006 ESRI 4-21


Introduction to ArcGIS Server

Step 6: Publish map and geoprocessing services


Do you remember that there are two ways to publish a geoprocessing service? You may
either publish a toolbox (.tbx file) that contains models you wish to make available on the
Web, or you can publish a map document (.mxd file) that contains your model as a tool
layer.
In this step, you will publish the map you authored previously, Parcels.mxd. Because this
map contains a tool layer, you will have the option of enabling the Geoprocessing
capability when publishing. Enabling this capability, as you will see, creates two GIS
services with the same name: one a map service containing the layers you added to the
map, and another containing the geoprocessing functionality you authored in the tool
layer's model.

Open and log into ArcGIS Server Manager.

Click the Services tab.

Click the Publish a GIS Resource link at the top of the application.

For the resource to publish, navigate to your \Student\ISRV\Exercise04 folder and


select Parcels.mxd.
You could also choose to publish the Parcel Tools toolbox, in which case a single
geoprocessing service would be created. By publishing the map (and enabling the
Geoprocessing capability), you will get two services for the price of one (a geoprocessing
service and a map service)!

Type Parcels_GP as the new service name, and publish it in the (existing) Maps
folder.

Click Next.

On the following panel, make sure that Geoprocessing is enabled and checked in the
list of capabilities.

! If the Geoprocessing capability is not enabled (i.e., you cannot check it


on), then ArcGIS Server does not recognize the map as having a valid
tool layer. If this is the case, make sure that you saved your map with
the tool layer in the table of contents.

Click Next.

4-22 Copyright © 2006 ESRI


Exercise 4

The final panel of the wizard confirms that a map and a geoprocessing service will be
created.

Click Finish to complete the wizard and create the services.

After verifying that the services have been created and are running, you are ready to
move to the next step: creating a Web mapping application to consume the services.

Step 7: Create an application that contains a geoprocessing task


Geoprocessing functionality can be incorporated into a Web mapping application as
tasks. When creating the application with Manager, you have the option to add and
configure geoprocessing tasks. In addition to setting basic preferences for appearance and
behavior, you will also need to identify the supporting geoprocessing services.

Click the Applications tab at the top of the Manager window.

Click Create Web Application.

In the first panel of the wizard, type Riverside Parcels as the name of the application.
You may leave the description blank.

Click Next.

In the following panel, expand the Internet connection to your GIS server.

Add the Maps/Parcels_GP map service to display in the application.

Click Next.

In the Available Task Items list, select Geoprocessing and click Add.
Before you can configure preferences for this task, you must identify the supporting
geoprocessing service that will provide the task functionality.

Copyright © 2006 ESRI 4-23


Introduction to ArcGIS Server

Click the Supporting Services tab.

In the list of available services, expand the Internet connection to your server, and
select Maps/Parcels_GP.

Click Add.

You already added the service called Maps/Parcels_GP to the application—so why are
you doing it again? Remember that you have two services with this name. The first one
you selected for the application was the map service. The service you selected above is
the geoprocessing service based on the tool layer in the map.

Click the Select Tasks tab to return to the previous panel.

4-24 Copyright © 2006 ESRI


Exercise 4

Click the Geoprocessing task item in the Current Tasks list and click Configure.

In the dialog box that appears, you are able to specify which geoprocessing functionality
the task will provide, the name and tool tip that will appear for the task, and settings that
control how results will be handled.

For Task Name, type Clip Parcels with Buffer.

For Help Tip, type Clip using a buffered line.

In the Task Definition list, expand the listing for the Parcels_GP service and choose
the Clip Parcels with Buffer task.
Since a geoprocessing service is created by publishing an entire toolbox, you could
potentially have several models (tasks) listed under the service folder to choose from.

Copyright © 2006 ESRI 4-25


Introduction to ArcGIS Server

Keep the default values for the rest of the geoprocessing task settings.
An asynchronous geoprocessing task is one that runs on the server while the user of the
client application is free to continue working. The Web mapping application needs to
check the server periodically to determine whether processing is complete. The interval at
which the application checks for completion of asynchronous tasks may be configured
appropriately (ten seconds is the default setting).
There are also settings for where data is written as a result of running the task, and size
limits for data that may be uploaded to the server (e.g., input files for the task).

Click OK to complete the task configuration.

Click Next and keep the default settings on the rest of the wizard panels.

4-26 Copyright © 2006 ESRI


Exercise 4

On the Summary panel, click Finish to complete the Web mapping application.
If the Web mapping application opens upon completion of the wizard, leave it open. You
will use the application in the next step to consume the geoprocessing service by
executing the Clip Parcels with Buffer task.

Step 8: Consume a geoprocessing service in a Web mapping


application
In this step, you will consume the Parcels_GP geoprocessing service in your Web
mapping application. You will get a feel for how geoprocessing functionality is exposed
to a client via a task, how asynchronous processing behaves, and how the server manages
datasets created by a geoprocessing service.

If it's not already running, start the Riverside Parcels Web mapping application that
you created in the previous step.
You see your task (with the name and help tip you configured) shown on the Tasks
window in the console.

Copyright © 2006 ESRI 4-27


Introduction to ArcGIS Server

Click the Clip Parcels with Buffer task to open the input dialog box.

The input controls for the task are built dynamically by the application based on task
information from the geoprocessing service. Your task requires a line feature (drawn by
the user on the map) and a buffer distance.

Use the Line tool to draw a line on the map. Click once to define each vertex for
the line, then double-click to end.

4-28 Copyright © 2006 ESRI


Exercise 4

Specify a buffer distance, making sure it's reasonable for the current map extent, (e.g.,
50 meters).

Click Submit to start executing the task.


Upon submitting the task to the server, the Results window expands and indicates that the
task is executing. When the server is finished processing the task, results and messages
generated by the task will appear in the window. Because the task is executing
asynchronously, you can continue to interact with the map while the task is running.

When task processing completes, a new layer will be added to the map displaying the
results of the clip. The Results window will show a legend for the new layer, as well as
any messages that were generated during processing (including error messages if the task
was unsuccessful).

Copyright © 2006 ESRI 4-29


Introduction to ArcGIS Server

If you were able to successfully execute the task, you should see output similar to that
shown above. You will now find out where ArcGIS Server wrote the output dataset that
was produced.

In the Results window, if it is not expanded already, expand Clip Parcels with Buffer
Results.

Locate and expand Messages to view processing details for the task.

4-30 Copyright © 2006 ESRI


Exercise 4

Locate the line that begins "Executing (Clip): Clip Parcels ..." (shown in the following
graphic).

Scroll across the Results window to read the output path for the clipped parcels dataset
(Parcels_Clip.shp).
The path should look something like:
c:\arcgisserver\arcgisjobs\Maps\Parcels_GP_GPServer\J114492488E8B42E7B23B862790CF7165\scratch\.
When a task is executed, ArcGIS Server creates a unique job folder for the tool to use
(the long alphanumeric folder name ensures it has a unique name). Inside this job folder
is a folder named "scratch." The scratch workspace environment is set to this folder,
ensuring that the output from your model (sent to %SCRATCHWORKSPACE%) is
written to the scratch folder for the executing task.

Start ArcCatalog.

Navigate to the task scratch folder you identified above.

Copyright © 2006 ESRI 4-31


Introduction to ArcGIS Server

Use the Preview tab to view Parcels_Clip.shp and Buffer.shp.

When you are finished viewing datasets in the scratch folder, close ArcCatalog and
ArcGIS Server Manager.

If you would like to learn how to consume your geoprocessing service in ArcMap, go
on to the optional next step. Otherwise, skip to page 4-34.

Step 9: (Optional) Consume a geoprocessing service in ArcMap


Geoprocessing services can also be consumed in ArcGIS Desktop. In this step, you will
start ArcMap and add your geoprocessing service to ArcToolbox. You will run the Clip
Parcels with Buffer model without adding the associated map service to the map to see
how results are returned.

Start ArcMap with a new empty map.

If necessary, open ArcToolbox. Hint: Click the Show/Hide ArcToolbox Window


button .

Right-click in the ArcToolbox window and choose Add Toolbox.

Navigate to the Parcels_GP geoprocessing service that is running on your GIS server.

! Make sure you add the geoprocessing service, not the toolbox in the
Student folder that you authored earlier.

4-32 Copyright © 2006 ESRI


Exercise 4

Click the Add Data button and add the Streets feature class in the Riverside.mdb
database as a layer to the map. Do not add any other layers or the associated map
service (Parcels_GP).

Zoom in to a portion of the map.

In the ArcToolbox window, expand the Parcels_GP toolbox.

Double-click Clip Parcels with Buffer to open its input dialog box.

Draw a line on the map and specify a buffer distance (or leave the default value).

Click OK.
The results of running the model are displayed using the symbology defined in the tool
layer of the associated map service.

Copyright © 2006 ESRI 4-33


Introduction to ArcGIS Server

Note: You may receive a message regarding a difference in the output resolution and the
input feature class resolution. You can ignore this message, as it should have no impact
on the results of running the geoprocessing model.

When you are finished, close ArcMap. Do not save changes to the map document.

Conclusion
In this exercise, you stepped through the entire process required to make geoprocessing
functionality available on the Web. You began by creating a toolbox and authoring a
geoprocessing model. When authoring the model, you made sure to conform to the
requirements for publishing a geoprocessing service (using the Feature Set data type
instead of Feature Class, appropriate use of managed and intermediate variables, etc.).
You published a map document that contained your model as a tool layer, which created
two GIS services: a geoprocessing service and an associated map service. Finally, you
used the geoprocessing service to configure your own geoprocessing task in a Web
mapping application.
Geoprocessing services allow users to access functionality contained in geoprocessing
models over the Web. They provide a way to consolidate GIS data and functionality on a

4-34 Copyright © 2006 ESRI


Exercise 4

GIS server for use by a variety of clients. Geoprocessing services can be created by
publishing an ArcToolbox containing the models you wish to provide, or by publishing a
map document containing a tool layer based on one of your models.
Once published, a geoprocessing service can be consumed by a Web mapping
application, ArcGIS Explorer, or ArcGIS Desktop. In ArcGIS Desktop, a geoprocessing
service will appear as a toolbox. All tools (geoprocessing models) contained within will
behave like any other tool in ArcToolbox. In ArcGIS Explorer and Web mapping
applications, functionality from geoprocessing services is exposed as tasks.

Copyright © 2006 ESRI 4-35


5
Editing in a Web
mapping application

Exercise 5: Edit from a Web client


Estimated time: 30 minutes
Exercise 5

Exercise 5: Edit from a Web client


Estimated time: 30 minutes

If the map service you are using meets certain requirements, you can create a Web
mapping application that contains the Editing task. The Editing task provides a suite of
tools for Web-based editing of features (geometry and attributes) in an ArcSDE
geodatabase. While shapefiles, personal geodatabase, and file geodatabase layers may
also be included in the map service, they will not be editable in the Web mapping
application.
You will author a map that contains layers from an ArcSDE geodatabase. After
publishing the document as a map service, you will create a Web mapping application
and configure the Editing task to allow users of the application to make edits to the data.
In this exercise, you will:
▪ Author a map document containing layers that may be edited in a Web mapping
application
▪ Publish a map service and configure it appropriately for editing
▪ Create a Web mapping application that uses a local connection to the service
▪ Add and configure the Editing task for the Web mapping application
▪ Explore the editing tools provided in a Web mapping application with the Editing
task

Step 1: Author a map containing editable layers


Only features stored in an ArcSDE geodatabase may be edited in a Web mapping
application. In this step, you will author a new map document that contains layers from
an ArcSDE geodatabase that you wish your user to edit. You will also add a few
shapefile layers that will not be editable, but will provide base layers for the map.

Start ArcMap with a new empty map.

If you have ArcToolbox open from the previous exercise, close it now if desired.

Click the Add Data button and add the following feature classes from the Wilson
ArcSDE geodatabase:
▪ Parcels
▪ BusRoutes

Copyright © 2006 ESRI 5-1


Introduction to ArcGIS Server

Feature classes from an ArcSDE geodatabase can be edited using a Web mapping
application when the Editing task is configured. But what if you don't want all of these
layers to be available for editing? When you configure the Editing task in a later step, you
will see that individual layers can be restricted from editing if desired.

Click the Add Data button again and add the Streets.shp shapefile dataset from the
\Student\ISRV\Exercise05 folder.
The Streets layer will not be available for editing in the Web mapping application. The
layer will be used for display, and can also be used as a target for snapping while editing
features in the other layers.

Right-click the Streets layer and choose Properties to open the Layer Properties dialog
box.

Click the Labels tab and check the check box next to Label features in this layer.

Verify that the NAME field will be used for the labels.

On the Symbology tab, choose a red line symbol for the streets.

5-2 Copyright © 2006 ESRI


Exercise 5

Click OK on the Layer Properties dialog box to apply your changes.

Use the Layer Properties dialog box for the BusRoutes layer to apply a thick blue line
symbol to the features. When you are finished, click OK.

Apply a light fill and line color to the Parcels layer.

When you are finished symbolizing layers in the map, zoom to a portion of the
downtown area where the bus routes meet (as shown below).

Save the map in your \Student\ISRV\Exercise05 folder as Wilson.mxd.

Close ArcMap.

Step 2: Publish and configure a map service


In general, creating a map service for use by the Editing task in a Web mapping
application is no different than publishing any other map service. There is not an
"editing" capability that must be enabled for the service, for example. It simply has to
meet two specific criteria: the service must contain at least one layer from an ArcSDE
geodatabase, and it must be configured as a non-pooled service. A third criterion must be

Copyright © 2006 ESRI 5-3


Introduction to ArcGIS Server

satisfied when the editing application is created in Manager: a local connection to the
service must be used.
In this step, you will publish the map document you authored in the previous step, which
contains two layers from an ArcSDE geodatabase. You will make sure it is created as a
non-pooled map service.

Start ArcCatalog.

In the Catalog tree, expand GIS Servers.

Expand your GIS server.

Right-click the Maps folder and choose Add New Service.


Do you remember the two ways to publish a GIS service in ArcCatalog? You can simply
right-click the map document you wish to publish and select Publish to ArcGIS Server.
While that would work fine, the Add GIS Service command provides a wizard with more
control over service properties at the time of creation. You will use this method so that
you can set the new service to be non-pooled.

In the first panel of the Add GIS Service wizard, type Wilson as the name of the
service.

Verify that the service type is set to Map Service and the startup type is Automatic.

Click Next.

In the following panel, set the Map Document by navigating to the Wilson.mxd
document you authored in the previous step (in your \Student\ISRV\Exercise05
folder).

Keep the default values for the rest of the settings on this panel, and click Next.

In the next panel, keep the default settings for capabilities and Web access, and click
Next.

5-4 Copyright © 2006 ESRI


Exercise 5

In the following panel, make sure to choose the Not pooled option.

In a non-pooled map service, each user session will have a dedicated instance with which
to work. This is an important factor to consider when creating a Web mapping
application that will contain the Editing task. You should also set the maximum number
of instances according to the maximum number of concurrent users you expect to be
using the service.

Keep the defaults for the other settings, and click Next.

In the final panel, choose the option to start the service right now.

Click Finish to create and start the map service.


While authoring and publishing this service, you have taken all the steps necessary to
ensure that data in the service may be edited in a Web mapping application. In the next

Copyright © 2006 ESRI 5-5


Introduction to ArcGIS Server

step, you will create a Web mapping application that will consume the Wilson service.
You will use a local connection, then add and configure the Editing task appropriately.

When the map service has been created, close ArcCatalog.

Step 3: Create a Web mapping application


Creating a Web mapping application that allows the user to edit map service layers
involves the same basic process as creating any Web mapping application. To enable
editing functionality, you simply need to add the Editing task from the Task panel when
stepping through the Create Web Application wizard in Manager. Once you've added the
task, you may also configure it to control how editing behaves in the application. You can
control which versions of the geodatabase and which layers may be edited. You can also
determine what types of edits should be allowed, how snapping and selection will
initially behave, and whether or not the user can change such settings themselves when
working with the application.
In this step, you will create a simple Web mapping application that includes the Editing
task.

Start and log in to ArcGIS Server Manager.

Click the Applications tab.

Click Create Web Application at the top of the Web Applications panel to start the
wizard.

For the name of the application, type Web Editor.

For the description, type Provides tools for editing the bus routes and parcels
datasets.

Click Next.

In the following panel, expand the local connection to your GIS server.

! Use of the Editing task requires a local connection to the map service
you wish to edit. If you select the Wilson service from the Internet
connection to your server, you will get an error later when trying to
configure the Editing task.

5-6 Copyright © 2006 ESRI


Exercise 5

Select the Wilson map service and add it as a layer in the application.

Click Next.

In the next panel, select Editing from the list of available tasks and click Add to
include it in the application.

The Editing task must now be configured to define which versions and layers are to be
editable (as well as other preferences such as the types of edits to be allowed, snapping
behavior, and basic display options).

Select Editing in the Current Tasks list and click Configure.

Copyright © 2006 ESRI 5-7


Introduction to ArcGIS Server

On the General tab of the Task Configuration dialog box, type Edit Routes or Parcels
as the Display name for the task.

Select all layers in the Editable layers list (there should be two: BusRoutes and
Parcels) and all versions in the Editable versions list (you should only have the default
version).

Notice that only the layers from your ArcSDE geodatabase appear in the list of available
layers to edit.

Click the Settings tab in the Task Configuration dialog box.

On the Settings tab, configure snapping to occur to the edges of street features.
Even though you could not choose the streets layer for editing, you can use it for creating
a snapping rule. This will be especially useful when editing bus routes that must be
coincident with the underlying street network.

Choose to show the snapping tolerance as a circle around the mouse.

5-8 Copyright © 2006 ESRI


Exercise 5

Verify that users will be able to change snapping and selection settings.

Keep the default values for all other settings.

Finally, click the Advanced tab on the Task Configuration dialog box.
This tab contains options for defining and resolving conflicts when edits are reconciled to
the geodatabase. You will keep the default settings for these options.

Click OK in the Task Configuration dialog box to apply your changes and close the
dialog box.

Click Next in the Create Web Application wizard.


The following panel asks you for an account to use while working with the map service
through the local connection. By default, the account used by the application is the same
one with which you logged on to Manager. While you are free to change this account, be
aware that the account you choose must be a member of the agsadmin or agsusers group
on the server to which you are connecting.
Note: You can only enter one account per Web mapping application to use for the local
connections. If you create an application that uses connections to multiple local servers,
make sure that the account you specify is a member of the agsadmin or agsusers groups
on each of those servers.

Keep the default setting for the connection account. Click Next.

Copyright © 2006 ESRI 5-9


Introduction to ArcGIS Server

Keep the default settings for the page properties. Click Next.

Finally, keep the default settings in the map elements panel. Click Next.

Click Finish on the Summary panel to complete the Web mapping application.
When planning a Web mapping application that will contain editing functionality, there
are design issues to consider at each step in the process. When authoring the map
document for the service, editable data must come from an ArcSDE geodatabase. When
publishing, the map service must be configured as non-pooled. Finally, when creating the
Web mapping application, a local connection to the service must be used. If each of these
criteria have been satisfied, the Editing task can be included in the application.
Now that you have successfully created a Web mapping application that includes the
Editing task, you will start the application and get a feel for how editing works in a Web
application.

Step 4: Experiment with editing in a Web mapping application


The Editing task gives users the ability to make simple edits to data in the map service. In
this step, you will work with the application you created in the previous step to get a feel
for how editing in such an application works.

5-10 Copyright © 2006 ESRI


Exercise 5

If it isn't already running, start the Web Editor application you created in the previous
step.

You should see the Editing task you configured in the Tasks window (Edit Routes or
Parcels).

Click the Edit Routes or Parcels task to start it.


The first thing the task prompts you for is the version you wish to edit. When configuring
the task, only the default version was made available for editing.

Copyright © 2006 ESRI 5-11


Introduction to ArcGIS Server

Click Start Editing to begin an edit session on the default version of the data.
After choosing the version, you are presented with a set of editing tools. At the top of the
task window, you can select the current layer for editing from a drop-down list. Only
layers that you set as editable when configuring the task will appear here. As you change
the edit layer selection, you may see the available tools for the task change according to
the feature type of the chosen layer (e.g., tools specific to points, lines, or polygons).

5-12 Copyright © 2006 ESRI


Exercise 5

Use the Zoom in tool to zoom to where the three bus routes meet.

Notice that parts of the bus routes do not conform with the geometry of the street
network. You will edit a portion of a route to make it coincident with the streets.

Copyright © 2006 ESRI 5-13


Introduction to ArcGIS Server

Use the Select Feature tool in the task to select the route that comes from the east
(as shown in the following graphic).

Zoom in closer to a portion of the route that does not line up with the underlying
streets.

Select the Add Vertex tool in the task.

Click anywhere along the selected route to add a new vertex.

5-14 Copyright © 2006 ESRI


Exercise 5

You will now move the new vertex so it lines up with the underlying street. Because you
set snapping for the edges of street features, you can be assured that the vertex will be
moved a location coincident with a street feature (as long as you click within the
specified snap tolerance).

Select the Move Vertex tool in the task.


The Move Vertex tool works by defining two locations on the map to define the move:
the location of the vertex you wish to move (the from point) and the location to which
you wish to move the vertex (the to point).

First, click the new vertex and release your mouse button (do not attempt to click and
drag).

Move your mouse to the new location for the vertex, then click again to define this
location.

Make sure there is a street feature within the snapping distance of the new location for
the vertex. (The current snapping tolerance is indicated by the red circle that you see
around your mouse.)
After moving the vertex, you should see it snap to a street feature (as long as the location
you clicked was within the snapping tolerance).

Copyright © 2006 ESRI 5-15


Introduction to ArcGIS Server

Continue to use the Add Vertex and Move Vertex tools to clean up the route (it doesn't
need to be perfect!).

In addition to editing the geometry of existing features, you can also use the Editing task
to create new features and edit attribute information.

Step 5: Add features and edit attributes


Next, you will add a new bus route and provide a value for its Route ID attribute.

5-16 Copyright © 2006 ESRI


Exercise 5

Use the Zoom out tool to zoom the map to an extent similar to that shown below.

Use the Create Feature tool to draw the new bus route shown below. Click once to
define each vertex, then double-click to complete the line.
The route will start where the other routes meet (the intersection of 4th and Nash) and
proceed to the corner of Academy and Carroll Streets.

Copyright © 2006 ESRI 5-17


Introduction to ArcGIS Server

Holding the S key on your keyboard while editing will show you if (and to which layer)
snapping will occur once you click the mouse.

Make sure the new route snaps to features in the Streets layer.

5-18 Copyright © 2006 ESRI


Exercise 5

After creating the new route, use the Edit BusRoutes Attributes section of the task to
type a new RouteNumber of 605-A.

Notice that the task warns you when there are unsaved edits for the current edit session.
You will now save your edits before continuing. If you were to close the task with
unsaved edits, you would be prompted to save or discard them.

Click the Save Edits tool to save your work up to this point.
Notice that after saving, the warning about unsaved edits is no longer displayed.
Remember that once you save, you can no longer undo or redo previous edits.
You will make a final edit, this time to features in the Parcels layer.

Zoom in on the area around the end of the new bus route.

In the task window, change the edit layer to Parcels.


Notice that the tools in the edit task change according to the layer selected in the list.

Copyright © 2006 ESRI 5-19


Introduction to ArcGIS Server

Use the Select Features tool to select a group of parcels at the end of the bus route.

Note: Unlike working with a selection in ArcMap, you do not need to hold the SHIFT
key in order to add or remove from the selection set. Clicking an unselected feature will
add it to the selection, while clicking a selected feature will remove it from the selection.

Once the parcels have been selected, click the Merge Features button to merge the
selected parcels into a single feature.

Click the "X" in the upper-right corner of the edit task to close the dialog box.

Choose OK when prompted to save your edits.

Close the Web mapping application and ArcGIS Server Manager.

Conclusion
In this exercise, you completed the entire process required to create a Web mapping
application that contains editing functionality. First, you authored a map document
containing the datasets you wished the user to edit from an ArcSDE geodatabase. You
then published the map document as a non-pooled map service. Finally, you created a
Web mapping application using ArcGIS Server Manager and added the Editing task. You

5-20 Copyright © 2006 ESRI


Exercise 5

learned to configure the Editing task to control things like editable versions, editable
layers, and snapping and selection preferences.
You also experimented with the editing tools provided by the Editing task, and made
some simple edits using your Web mapping application.

Copyright © 2006 ESRI 5-21


6
Geodata services

Exercise 6: Publish and work with a


geodata service
Estimated time: 30 minutes
Exercise 6

Exercise 6: Publish and work with a geodata service


Estimated time: 30 minutes

Geodata services allow you to provide access to data throughout your local area network
or across the Internet. These services give users the ability to make local copies of the
data (extract), execute queries against the geodatabase, or work with geodatabase
replicas. Geodata services can be created using any type of geodatabase (ArcSDE,
personal for Access, or file) and can be created by either publishing the geodatabase
directly or by publishing a map document that contains geodatabase data and enabling the
Geodata Access capability for the service.
In this exercise, you will publish a map that has already been authored for you. The map
contains geodatabase layers that show buildings, parcels, and streets for an area around
Oregon State University in Corvallis, Oregon. The geodata service will allow you to
make your own set of edits to the data—specifically, the new OSU library that will
(someday) be built in your honor!
In this exercise, you will:
▪ Publish a map service and enable the Geodata Access capability
▪ Use the Distributed Geodatabase toolbar in ArcMap to extract data from a geodata
service
▪ Create a checkout/check-in replica from a geodata service
▪ Synchronize edits from a replica

Step 1: Publish a map document and enable the Geodata Access


capability
When you publish a map document to create a map service, you may also have the option
to enable the Geodata Access capability for the new service. This capability will only be
available if the map you've published contains data from a (single) geodatabase. Enabling
this capability will result in two output GIS services: a map service created from the map
document, and a geodata service based on the geodatabase whose data is displayed in the
map.
In this step, you will publish a map document that has already been authored for you.
This map document contains data from an ArcSDE geodatabase that you will also make
available through a geodata service.

Start ArcCatalog.

Copyright © 2006 ESRI 6-1


Introduction to ArcGIS Server

Navigate to your \Student\ISRV\Exercise06 folder.

Locate the OregonStateU.mxd map document.


This document contains a map of Oregon State University and the surrounding
neighborhood in Corvallis, Oregon. Layers in the map include: the university boundary,
parcels, buildings, and major streets.

Right-click the document and choose Publish to ArcGIS Server.

For the name of the new service, type OSU.

For Publish to folder, choose Create a new folder. Name the new folder Geodata.

Click Next.

6-2 Copyright © 2006 ESRI


Exercise 6

On the following panel, make sure to check the Geodata Access capability.

Enabling the Geodata Access capability will create a geodata service in the same folder
(and with the same name) as the map service (OSU).

Click Next.
The summary panel should confirm that two services named OSU will be created: a map
service and a geodata service.

Click Finish in the summary panel to create the services.

When the Publish to ArcGIS Server wizard completes, verify that the two new services
appear in ArcCatalog in the Geodata folder.

Copyright © 2006 ESRI 6-3


Introduction to ArcGIS Server

Geodata services have three operations that can be allowed: extraction, query, and
replication. When you create a geodata service using the Publish to ArcGIS Server
option, you are not prompted for which operations to allow. By default, extraction and
query are allowed, and replication is not. Next, you will edit the service properties to
make sure that replication is an allowed operation.

Right-click the OSU geodata service and choose Stop.

Right-click the service again and choose Service Properties.


Note: Service properties cannot be edited when the service is running.

6-4 Copyright © 2006 ESRI


Exercise 6

On the Capabilities tab of the Service Properties dialog box, check Replication as an
operation to allow.

Click OK to apply your change and close the dialog box.

Right-click the listing for the OSU geodata service again and choose Start.

Once the map service is running, close ArcCatalog.


Now that you have a geodata service and an associated map service, you will use them in
ArcMap with some of the tools on the Distributed Geodatabase toolbar.

Step 2: Extract data from the service


The geodata service you created will allow users to extract their own copy of data stored
in the underlying geodatabase or to create a replica from the geodatabase. A geodatabase

Copyright © 2006 ESRI 6-5


Introduction to ArcGIS Server

replica is much different than a local copy of the data, in that it allows edits to be
synchronized between geodatabases.
In this step, you will work with the Distributed Geodatabase tools in ArcMap to extract a
copy of the data in the OSU service, and to create a geodatabase replica to edit and
synchronize.

Start ArcMap with a new empty map.

Click the Add Data button .

Navigate to your OSU map service (in the Geodata folder) and add it to the map.
The map is centered on Oregon State University in Corvallis. It shows the campus
boundary and buildings, as well as buildings, roads, and parcels in the surrounding area.

6-6 Copyright © 2006 ESRI


Exercise 6

Right-click the ArcMap interface and choose to display the Distributed Geodatabase
toolbar.

The Distributed Geodatabase toolbar contains tools for extracting data and for working
with geodatabase replicas. Many of these tools are also available by right-clicking a
geodatabase (or geodata service) in the Catalog tree.

When the toolbar appears, you may notice that the only two tools that are currently
enabled are the Extract Data tool (far right) and the Create Replica tool (far left). All of
the tools in between require an existing geodatabase replica before they are enabled.
You will first experiment with extracting data from the service.

Select the New Polygon tool on the Draw toolbar (probably located at the bottom
of your ArcMap window).

Copyright © 2006 ESRI 6-7


Introduction to ArcGIS Server

Draw a polygon on the map that generally follows the university boundary.

When the polygon graphic is complete, make sure it is selected in the map display
(selected graphics have a faint blue box around them). If it is not already selected, use
the Select Elements tool to select the polygon.
The Extract Data tool will allow you to restrict the features you extract according to a
defined extent, the current map extent, or by features that intersect a selected graphic.
You will extract only those features that are inside your polygon graphic (the campus
boundary).

Click the Extract Data button on the Distributed Geodatabase toolbar.

In the first panel of the Extract Data Wizard, choose to extract the data to the
OSU_Extract.mdb personal for Access geodatabase in your \Student\ISRV\Exercise06
folder (this is an empty geodatabase that was already created for you).

6-8 Copyright © 2006 ESRI


Exercise 6

Check the option to Show advanced options.

Click Next.

Copyright © 2006 ESRI 6-9


Introduction to ArcGIS Server

In the following panel, verify that the boundary of currently selected graphic option is
checked. If this option is not enabled, cancel the Extract Data wizard, make sure the
polygon graphic is selected on the map, then start the wizard again.

Keep the default values for the other options. Click Next.

Click Finish in the final panel of the wizard.


When data extraction is complete, the output datasets will not automatically be added to
the map. Next, you will add the extracted data to the map to verify the extraction worked
as expected.

Turn off the OSU map service in the map.

Delete the polygon graphic of the university boundary (hit the delete key on your
keyboard while the graphic is selected).

Click the Add Data button and navigate to your \Student\ISRV\Exercise06 folder.

6-10 Copyright © 2006 ESRI


Exercise 6

Choose to add all the feature classes from the OSU_Extract.mdb personal for Access
geodatabase.

The extracted datasets should only contain features that intersected the polygon graphic
you drew on the display.

When you are finished viewing the extracted datasets, remove them from the map.
Hint: Right-click each layer and choose Remove.

Make the OSU map service layer visible again.


Data extraction provides an easy method for making local copies of datasets from a
geodatabase. The Data Extraction wizard also provides tools that make it simple to
restrict the features that are extracted according to spatial criteria. In the next step, you
will see the functionality that geodatabase replication provides, which is the ability to
synchronize edits between geodatabases.

Copyright © 2006 ESRI 6-11


Introduction to ArcGIS Server

Step 3: Create a checkout/check-in replica


Geodatabase replication allows you to make what is essentially a copy of a geodatabase.
Unlike an extracted set of data, however, any changes made to these replicas in their
respective geodatabases can be synchronized so that the data in both replicas matches.
There are three type of replicas (checkout/check-in, one-way, and two-way), and a
variety of workflows that may be associated with them. For more information about
replication and working with distributed geodatabases, refer to the Understanding
distributed data topic in the ArcGIS Desktop documentation or consult your Geodatabase
administrator.

Zoom to the extent of the campus boundary.

Click the Create Replica button on the Distributed Geodatabase toolbar.


The first panel of the Create Replica wizard prompts you for the type of replica you wish
to create. The lecture slides for this lesson showed you examples of workflows that
illustrate each of these replica types. More information about these types is available in
the documentation.

Select Check-out as the replica type.

6-12 Copyright © 2006 ESRI


Exercise 6

The Check-out option will create a replica of the geodatabase that can be edited and later
synchronized with the parent geodatabase. Changes may only be synchronized once. In
order to make and synchronize additional edits, you will need to create another checkout
replica.

Click Next.

In the following panel, choose to create the replica in the OSU_CheckOut.mdb


personal for Access geodatabase in your \Student\ISRV\Exercise06 folder.
Like the OSU_Extract.mdb geodatabase, OSU_CheckOut.mdb is an empty geodatabase
that was created for you to store the replica.

Copyright © 2006 ESRI 6-13


Introduction to ArcGIS Server

Make sure to check the Show advanced options check box.

Keep the default values for the rest of the settings.

Click Next.

6-14 Copyright © 2006 ESRI


Exercise 6

In the following panel, make sure that the current display extent is selected as the
checkout extent.

Notice that you can choose which datasets to include in the replica. You can also restrict
the data returned for a replica using a specified extent or a selected graphic.

Click Next.

Click Finish in the final panel of the wizard to create the replica.
You will now add the datasets from the replicated geodatabase to a new data frame in the
map. You will make some edits that reflect your vision of what the campus should look
like. Later, you will synchronize your edits back to the original geodatabase so
renovation can begin.

Copyright © 2006 ESRI 6-15


Introduction to ArcGIS Server

Step 4: Make edits to a replica


You will create a new data frame in the map document to work with the replicated
datasets.

From the Insert menu, choose Data Frame.

A new data frame will be added to the map. By default, the data frame is named New
Data Frame.

Rename the data frame as OSU Check Out.

Click the Add Data button and navigate to the


\Student\ISRV\Exercise06\OSU_CheckOut.mdb geodatabase that contains the replica.

Choose to add all layers from OSU_CheckOut.mdb to the map.

! Make sure you add the layers from the replicated geodatabase
(OSU_CheckOut.mdb) and not the data you extracted in the last step
(from OSU_Extract.mdb).

ArcMap will assign default symbology to the layers as they are added to the map, so the
layers may not look as you might expect them to.

6-16 Copyright © 2006 ESRI


Exercise 6

Use the ArcMap navigation tools to zoom the map extent to the western portion of the
campus, as shown below.

After giving it some thought, you have decided that the university should build a new
library in your honor (once you promise a generous donation of course)! The new
structure will replace all the existing buildings in the western portion of the campus. In
order to see what your library will look like, you will make the appropriate edits to the
buildings dataset in the replica. Later (when the university approves your design), your
edits will be synchronized into the ArcSDE geodatabase.

If necessary, add the Editor toolbar to ArcMap.

From the Editor menu, choose Start Editing.

Use the Selection tab in the table of contents to set Building as the only selectable
layer.

Copyright © 2006 ESRI 6-17


Introduction to ArcGIS Server

Use the Edit tool on the Editor toolbar to select buildings where the library will go
(as shown below).

Click the DELETE key on your keyboard to delete the features.

Make sure the task on the Editor toolbar is set to Create New Feature and that the
Target is set to the Building layer.

6-18 Copyright © 2006 ESRI


Exercise 6

Now, use the Sketch tool to draw the new library in the shape of your initials.

When you have finished, choose Stop Editing from the Editor toolbar menu. Make
sure to save your edits!
Now you will check the original map service (in the other data frame) and see if your
edits appear.

Copyright © 2006 ESRI 6-19


Introduction to ArcGIS Server

Right-click the original data frame (named Layers) in the map and select Activate from
the context menu.

6-20 Copyright © 2006 ESRI


Exercise 6

Use the navigation tools to zoom to the area of the map where your new library should
appear.

Turn the Building layer off and then back on in order to refresh the layer.
Notice that the changes do not yet appear in the original ArcSDE geodatabase. For your
edits show up, you will need to synchronize the edits from your replica.

Step 5: Synchronize your edits


In this step, you will use the Synchronize Changes Wizard to check in the edits from your
replica to the parent geodatabase.

Activate the OSU Check Out data frame again.

Copyright © 2006 ESRI 6-21


Introduction to ArcGIS Server

On the Distributed Geodatabase toolbar, click the Synchronize Changes button .

The Synchronize Changes wizard gives you options for synchronizing changes with
another geodatabase. You will notice that there is only one option available for
synchronize direction (edits from GDB 1 go to GDB 2). This is because the replica you
created is of the checkout/check-in variety, which only allows changes to be sent to the
original geodatabase (and only once).

Keep all the current (default) settings for the wizard, and click Next.

In the final panel of the wizard, leave the default settings, and click Finish.
If conflicting edits exist in your replica and the one in the ArcSDE geodatabase, edits in
the ArcSDE geodatabase will take precedence.

Click Finish to start synchronizing your edits.

Once synchronization is complete, activate the original data frame (Layers) once
again.

6-22 Copyright © 2006 ESRI


Exercise 6

Now do you see your library appear?


Note: You may need to toggle the Building layer off and on in order to see the changes.
If you still don't see the updated data, try removing the map service then adding it back to
the map again.

You have successfully incorporated the edits for your new library into the main
(ArcSDE) geodatabase. Now all you need to do is find something to wear to the
groundbreaking ceremony!

When finished viewing the map, close ArcMap. Click No if prompted to save the map.

Conclusion
In this exercise, you learned to publish a geodata service by enabling the Geodata Access
capability for a map service. You edited the geodata service properties to allow all three
operations of the service: extraction, query, and replication. By using the associated map
service in ArcMap, you were able to use tools on the Distributed Geodatabase toolbar.
These tools allowed you to extract local copies of datasets in the geodata service and to
create and synchronize geodatabase replicas. You used a checkout/check-in replica to
make some simple edits and to synchronize those edits with the original (parent)
geodatabase.

Copyright © 2006 ESRI 6-23


7
Customization options

Exercise 7: Customize ArcGIS Explorer


Estimated time: 30 minutes
Exercise 7

Exercise 7: Customize ArcGIS Explorer


Estimated time: 30 minutes

ArcGIS Explorer is a free, lightweight desktop application for viewing GIS services and
local data. When you first install ArcGIS Explorer, the application displays data from
servers hosted by ESRI. This is because ESRI's server is the default home server for
ArcGIS Explorer. You can configure ArcGIS Explorer so that your ArcGIS Server
system (or any other you have access to) is the home server instead.
In this exercise, you will set your ArcGIS Server machine as the home server for ArcGIS
Explorer. You will configure settings for the home server that control the default map
that is displayed, as well as the functionality you wish the user to have. You will also
learn how to deliver a custom task with your map.
In this exercise, you will:
▪ Set your server as an ArcGIS Explorer home server
▪ Configure settings for users of your home server, such as the default map and the
available functionality
▪ Download and use a custom ArcGIS Explorer task
▪ Deploy a custom task as part of a map

Step 1: Create a default map for your server


An ArcGIS Explorer home server provides a default map that opens each time the
application starts. One of the most powerful features of setting up your server as a home
server is the ability to control the map that your user sees when starting ArcGIS Explorer.
Optionally, you can control whether or not the user has the ability to open any other maps
or to add their own content.
In addition to showing a certain map extent and a unique set of map layers, your default
map can even deliver custom tasks!

Start ArcGIS Explorer.


Note: The first time you start ArcGIS Explorer after installing, you will be prompted to
set your home server. Recall that you initially started ArcGIS Explorer in exercise 2. In
that exercise, you were instructed to set the (default) ESRI server as your home server.

When the application starts, you see the familiar Satellite World map, which is the default
map from your current (ESRI) home server. You will make some simple changes to this
map, and then save it as your server's default map.

Copyright © 2006 ESRI 7-1


Introduction to ArcGIS Server

Click the Find Place task to activate it.

Use the task to search for your hometown (or favorite place).

7-2 Copyright © 2006 ESRI


Exercise 7

In the Results window, expand the results for your search.

When you find the correct match, right-click the record in the Results window and
choose Zoom.

Pan and zoom in the map to adequately show the location.

Copyright © 2006 ESRI 7-3


Introduction to ArcGIS Server

In the Contents window, turn on the Boundaries and Places and Transportation layers
(as shown in the following graphic).

When the map of your hometown is complete, from the File menu, select Save As.

7-4 Copyright © 2006 ESRI


Exercise 7

In the Save As dialog box, navigate to the \ArcGIS\Explorer\Maps folder in the root
directory of your Web server (as shown below).

Type DefaultMap.nmf as the name of the map, and click Save.

If prompted to overwrite an existing file, click Yes.


ArcGIS Explorer will look for a map named DefaultMap.nmf on the home server when
starting. A user who has set your server as their home server will initially see this map
when they start ArcGIS Explorer.
Now that you have created a default map, you will point ArcGIS Explorer to your server.

Step 2: Set ArcGIS Explorer's home server


Any machine that has ArcGIS Server installed can be set as the home server for ArcGIS
Explorer. This might be a machine that is available only on your local intranet, or

Copyright © 2006 ESRI 7-5


Introduction to ArcGIS Server

publicly available on the Internet. By default, the ESRI server is set as ArcGIS Explorer's
home server.
In this step, you will change the home server for your installation of ArcGIS Explorer to
point to your local machine.

In ArcGIS Explorer, from the File menu, select Set Home Server.

In the dialog box that appears, choose the second option (Connect to the Home Server
located at).

Type in a URL that identifies your server. The URL should take the form
http://<machine>/<arcgis instance>.
Note: Remember that each install of ArcGIS Server is identified by an instance name.
The default instance name is arcgis. Refer to the notes on page 1-3 of your exercise
manual if your instance name differs from the default.

7-6 Copyright © 2006 ESRI


Exercise 7

After providing the URL, click Test to make sure ArcGIS Explorer can connect to the
server.

If the test is successful, a check mark will appear before the URL text box (as shown
above) and the Test button will become disabled. If it is not successful, you will receive
an error message. Make sure the test works before proceeding.

When you have successfully tested the connection to your server, click OK to change
the home server.
You will not see an immediate change in the application after pointing to a new home
server. For your changes to take effect, you will need to close and then reopen ArcGIS
Explorer.

From the File menu, choose Exit to close ArcGIS Explorer.

Start the application again.


When ArcGIS Explorer starts again, it loads with your default map.

Once you have verified that your default map loads as expected, close ArcGIS
Explorer.

Step 3: Configure settings for your ArcGIS Explorer home server


In addition to supplying a default map to users of your home server, you may choose to
configure the server to control how ArcGIS Explorer appears and behaves. In this step,
you will change some configuration settings for your ArcGIS Explorer home server.

Copyright © 2006 ESRI 7-7


Introduction to ArcGIS Server

Use operating system tools (such as Windows Explorer) to navigate to the


\ArcGIS\Explorer\Config folder in the Web root directory of your Web server.

Use a text editor (such as Notepad) to open the E2Config.xml XML configuration file.

This is a simple XML-based configuration file that can be used to control settings for
your home server. For a description of all available configuration elements and their uses,
consult the Making your system an ArcGIS Explorer home server topic in the ArcGIS
Server Help.

On the fourth line, change the value of the AddData element from the default setting of
true to false.

7-8 Copyright © 2006 ESRI


Exercise 7

Next, on the eighth line, change the value of the DisplayOptions element to false.
When you are finished, your configuration file should look like the one shown in the
following graphic.

Save your changes to the E2Config.xml file and close your text editor.

Start ArcGIS Explorer.

! If ArcGIS Explorer was already running while you were making


changes to the configuration file, close it and then restart the
application. Configuration settings are read when the application
starts.

Click the File menu, and notice that the Add Content command is now disabled.

Because you configured your home server to disallow adding new content, this command
will always be disabled.

Copyright © 2006 ESRI 7-9


Introduction to ArcGIS Server

Click the Tools menu, and notice that the Options command is also disabled.

Setting the DisplayOptions value to false has caused this command to be disabled. Since
you left the value of the ManageTasks setting as true, that command is enabled.

Close ArcGIS Explorer.

Step 4: Provide a custom task from your server


Custom tasks can be developed for ArcGIS Explorer using the Software Developers Kit
(SDK) and Visual Studio 2005. To deliver a custom task to other users, you need to make
the file containing the task (or tasks) available on your Web server. You must also
provide task information in a map or task NMF (new map file) file that describes the task
and specifies the location (URL) from which the task may be downloaded.
In this step, you will make a custom ArcGIS Explorer task (that has been provided for
you) available from your server. This custom task is available as a sample in the ArcGIS
Explorer SDK (along with many others), and will allow users to draw shapes on the map.

Use operating system tools (such as Windows Explorer) to navigate to the


\Student\ISRV\Exercise07 folder.

Copy the ESRI.E2SDK.TrackShapesVB.dll and ESRI.E2SDK.TrackShapesVB.nmf


files from this folder and paste them in the \ArcGIS\Explorer folder under the Web
root of your Web server (e.g., \Inetpub\wwwroot\ArcGIS\Explorer).
Remember the .nmf file extension? These are files used to store ArcGIS Explorer maps
(which are really just XML-formatted text files), such as the DefaultMap.nmf file you
saved in a previous step. In addition to defining maps, however, .nmf files may also be
used to describe custom tasks.
The ESRI.E2SDK.TrackShapesVB.nmf file that you just copied contains information that
describes the custom task stored in the .dll file of the same name. You will need to make
a single edit in order to provide a location (URL) from which the task may be

7-10 Copyright © 2006 ESRI


Exercise 7

downloaded from your server. Users who are able to navigate to this file can open it and
begin the process of downloading the task from the location specified.

Open the ESRI.E2SDK.TrackShapesVB.nmf file using a text editor (such as Notepad).

The task .nmf file only contains a handful of configuration settings. Settings like
<Assembly> and <Class> identify the full name of the .NET assembly and the name of
the class that contains the task. The <DisplayName> element specifies the name to
appear for the task in the ArcGIS Explorer interface. The <DownloadLocation> setting is
particularly important, as it indicates the URL from where the task (.dll) may be obtained.

Between the <DownloadLocation> and </DownloadLocation> tags, provide a URL to


the task .dll file. The URL should have the form
http://<machine>/ArcGIS/Explorer/ESRI.E2SDK.TrackShapesVB.dll, as shown in the
example below.

Copyright © 2006 ESRI 7-11


Introduction to ArcGIS Server

Save the ESRI.E2SDK.TrackShapesVB.nmf file, then close your text editor.


Now, anyone who has local access to this task .nmf file (e.g., other users on your local
network) can use the ArcGIS Explorer Task Manager to navigate to and download it.
Unfortunately, Internet users will not be able to find this task .nmf file using ArcGIS
Explorer. Another option for delivering a task, therefore, is to embed the XML that
defines the task into a map .nmf file.
You will now add the task to your DefaultMap.nmf file. That way, users of your home
server will automatically get this task.

Start ArcGIS Explorer.

From the Tools menu, choose Manage Tasks.

In the Task Manager dialog box, click Get Tasks.

7-12 Copyright © 2006 ESRI


Exercise 7

In the Select a Task dialog box, click Task Files (on the left).

Navigate to the ESRI.E2SDK.TrackShapesVB.nmf file in the \ArcGIS\Explorer folder


of your Web server, and click Open.

ArcGIS Explorer will read the .nmf file for the task and use the DownloadLocation
element to locate the URL from which the task (.dll) may be downloaded. You will be
prompted to confirm or cancel the download.

Copyright © 2006 ESRI 7-13


Introduction to ArcGIS Server

Click Download to add the task.


The task appears in the list of available tasks in the Task Manager.

Select the TrackShapesVB Custom Task task and click the right arrow to add this task
to the current map.

Click OK to close the Task Manager and add the task to the map.

Click the task (TrackShapesVB) in the task window to activate it.

7-14 Copyright © 2006 ESRI


Exercise 7

Use one of the tools in the task window to draw a shape on the map (point, line, or
polygon). Hint: For a line or polygon, click once for each vertex and double-click to
complete the shape.

After executing, the task displays your feature on the map and adds a record to the
Results window.
Note: Task results can be saved with a map. If your users want to sketch features on the
map, they can save the map (.nmf file) and have these shapes (results) stored with the
map.

You will now clear the results of running the task, and save the map again as
DefaultMap.nmf.

In the Results window, right-click the results of running the Track Shapes task and
choose Remove. Do this for all results you have in the map.

! If you save your map as the default map without first removing these
results, all users of the home server will see your (saved) results upon
starting ArcGIS Explorer.

From the File menu, choose Save As.

Copyright © 2006 ESRI 7-15


Introduction to ArcGIS Server

Navigate to the \ArcGIS\Explorer\Maps folder of your Web root directory and save the
map as DefaultMap.nmf. If prompted to overwrite an existing file, choose Yes.

Close ArcGIS Explorer.


The task information (including the download location for the task .dll file) is now
embedded in the DefaultMap.nmf file. ArcGIS Explorer will now download this task for
users of your home server if they do not already have it installed.

Conclusion
In this exercise, you learned how to configure your ArcGIS Server system as a home
server for ArcGIS Explorer. Setting up a home server for your organization or for the
public allows you to control the map that users initially see (layers, extent, etc.), the
appearance of the application, and even the functionality that will be available to them.

7-16 Copyright © 2006 ESRI


Exercise 7

You also learned that custom ArcGIS Explorer tasks can be delivered from your server.
Custom tasks may be created by developers using the ArcGIS Explorer SDK and
compiled to a .NET assembly in the form of a .dll file. Task information in a task .nmf
file or in an ArcGIS Explorer map can direct the client application to a URL from which
the task may be downloaded.

Copyright © 2006 ESRI 7-17


8
Administration and
optimization

Exercise 8: Read log files and


troubleshoot data access issues
Estimated time: 20 minutes
Exercise 8

Exercise 8: Read log files and troubleshoot data access


issues
Estimated time: 20 minutes

In this exercise, you will learn how to read ArcGIS Server log files in order to
troubleshoot problems with the system. You will become familiar with the information
contained in the logs and you will explore some ways in which you can filter log records
to find the specific information you require.
You will also learn how to troubleshoot and resolve data access issues, which is a
common problem that may arise when publishing a GIS service.
In this exercise, you will:
▪ Locate the ArcGIS Server log files
▪ Sort and filter log records
▪ Find an error for a particular map service
▪ Add the required database permissions for the ArcGIS Server SOC account

Step 1: Publish a map service


In this step, you will publish a map document that has been created for you as a new map
service. The map service uses layers from the SanDiego ArcSDE geodatabase.

Start ArcGIS Server Manager and log in to it.

Click the Services tab.

Click Publish a GIS Resource.

Copyright © 2006 ESRI 8-1


Introduction to ArcGIS Server

On the first panel of the Publish GIS Resource wizard, in the Resource drop-down list,
navigate to the \ISRV\Exercise08 folder and select SanDiego.mxd map document.

Leave the default name (SanDiego) for the new map service.

Choose to publish the service into the existing folder called Maps.

Click Next.

In the following panel, leave the default settings for capabilities, and click Next.

In the summary panel, click Finish to create the service.


Upon completing the wizard, you are returned to the Services tab of ArcGIS Server
Manager, where you see a listing for the new SanDiego map service.

On the Services tab, locate the listing for the SanDiego service (in the Maps folder).

Expand the listing for the service to see a preview.

8-2 Copyright © 2006 ESRI


Exercise 8

Your preview image probably looks like the one shown above. If you were to preview the
service in ArcCatalog or create a Web mapping application with this service, you would
still not be able to see a map image. The service has a status of Started, so why doesn't
the image appear? You will begin to troubleshoot the problem by examining the ArcGIS
Server log files.

Step 2: View server log files


To determine what might be wrong with the SanDiego map service that you created in
the previous step, you will examine the ArcGIS Server log files to see whether any
warnings or errors were generated when you started the service.

In Manager, click the GIS Server tab.

In the View panel on the left, click Log Files.

The log information displayed by Manager is read from log files in the C:\Program
Files\ArcGIS\server\user\log folder. These files are available in both .xml and .dat
formats.

Filter the log records displayed by choosing Maps/SanDiego.MapServer from the


configurations drop-down list, as shown in the following graphic.

Click Apply to show only the records related to the SanDiego service.
Log information is categorized according to levels. Log records with a Normal level are
simply messages that describe standard server activity. Records characterized as Warning
or Error level messages, however, indicate that something unexpected happened while

Copyright © 2006 ESRI 8-3


Introduction to ArcGIS Server

the server was trying to do its work. When troubleshooting problems, Warning and Error
log records are of the most interest.
You likely see a few Normal log messages that were generated when the SanDiego
service was initially created. Server was probably able to start the service, read cache
information for the service (if any), and identify the cache folder that the service will use.
Question 1: How many Warning messages did you find in the log file for the SanDiego
map service?
______________________________________________________________________

Question 2: What is the cause of the problem for each warning?


______________________________________________________________________
______________________________________________________________________

Based on the log information, it appears that ArcGIS Server is having difficulty reading
the layers in the SanDiego.mxd map due to "insufficient permissions." Next, you will use
ArcCatalog to check data access permissions for the ArcGIS Server account that is trying
to read the data.

Step 3: Fix data access problems for ArcGIS Server


In order to read data used in a GIS service, the ArcGIS SOC account must have adequate
permissions to access the folder or database in which the data is stored.

Close ArcGIS Server Manager.

Start ArcCatalog.

In the Catalog tree, expand Database Servers, then connect to your SQLExpress
database by double-clicking it.

8-4 Copyright © 2006 ESRI


Exercise 8

Right-click your database server and select Permissions.

Copyright © 2006 ESRI 8-5


Introduction to ArcGIS Server

In the dialog box that appears, verify that the ArcGISSOC account appears as one of
the database server users.

! The name of your account may vary. ArcGISSOC is the default


account used in the ArcGIS Server post installation. If the ArcGIS
Server SOC account is not listed here, please ask your instructor for
assistance adding the account.

Click OK to close the Permissions dialog box.


Although the ArcGISSOC account is listed as one of the database server users, this does
not mean that the account has permissions on the specific database that the SanDiego
map service is referencing.

8-6 Copyright © 2006 ESRI


Exercise 8

Right-click the SanDiego geodatabase (under the database server) and choose
Administration > Permissions.

In the Permissions dialog box, select (highlight) the ArcGISSOC account.

Copyright © 2006 ESRI 8-7


Introduction to ArcGIS Server

Choose the Read Only option button to give the ArcGIS Server SOC account
permission to read the data.

Click OK to apply the change and close the dialog box.


You now need to stop and restart the SanDiego service to force ArcGIS Server to re-read
the map document and the associated datasets.

In the Catalog tree, expand GIS Servers.

Next, expand the listing for your GIS server and the Maps folder beneath it.

8-8 Copyright © 2006 ESRI


Exercise 8

Right-click the SanDiego map service and choose Stop.

Once the service has stopped, right-click it again and choose Start.

Each time a GIS service is started, ArcGIS Server re-reads the GIS object (map
document, address locator, geodatabase, etc.) on which the service is based. If you make
changes to an object that is the basis for a GIS service, you may need to restart the
service before the changes appear.

Copyright © 2006 ESRI 8-9


Introduction to ArcGIS Server

Once the map service has started again, highlight it in the Catalog tree, then click the
Preview tab on the right.

The ArcGIS Server SOC account can now access the data, and the map service draws as
expected. If you were to check the Server log files, you would find Normal level log
records describing server activity when starting the service, but no more warnings
regarding data permissions.

Close ArcCatalog.

Conclusion
ArcGIS Server records information about routine events that occur in the server, as well
as any problems that may be encountered, to log files. Events such as the starting and
stopping of GIS services, configuring additional host (SOC) machines, or adding server
folders are examples of common events logged by the server. Log files may be used to
troubleshoot problems associated with a particular service or host machine.
In this exercise, you used server log information to identify a common problem that
arises when publishing GIS services: lack of adequate data access permissions for the

8-10 Copyright © 2006 ESRI


Exercise 8

ArcGIS Server SOC account. You granted the minimum permissions required for the
account, and were able to successfully publish the service.

Copyright © 2006 ESRI 8-11


Introduction to ArcGIS Server

Answers to Exercise 8 Questions


Question 1: How many Warning messages did you find in the log file for the SanDiego
map service?

Answer: You should have three warnings in the Server log file—one for each layer
in the SanDiego.mxd map document.

Question 2: What is the cause of the problem for each warning?

Answer: The warnings have been generated because ArcGIS Server cannot access
the data used for each layer in the map ("Insufficient permissions").

8-12 Copyright © 2006 ESRI


A
ESRI data license
agreement
Appendix A

IMPORTANT — READ CAREFULLY


BEFORE OPENING THE SEALED MEDIA PACKAGE

ENVIRONMENTAL SYSTEMS RESEARCH INSTITUTE, INC. (ESRI), IS WILLING TO LICENSE THE


ENCLOSED ELECTRONIC VERSION OF THIS TRAINING COURSE TO YOU ONLY UPON THE
CONDITION THAT YOU ACCEPT ALL OF THE TERMS AND CONDITIONS CONTAINED IN THIS
ESRI DATA LICENSE AGREEMENT. PLEASE READ THE TERMS AND CONDITIONS CAREFULLY
BEFORE OPENING THE SEALED MEDIA PACKAGE. BY OPENING THE SEALED MEDIA
PACKAGE, YOU ARE INDICATING YOUR ACCEPTANCE OF THE ESRI DATA LICENSE
AGREEMENT. IF YOU DO NOT AGREE TO THE TERMS AND CONDITIONS AS STATED, THEN
ESRI IS UNWILLING TO LICENSE THE TRAINING COURSE TO YOU. IN SUCH EVENT, YOU
SHOULD RETURN THE MEDIA PACKAGE WITH THE SEAL UNBROKEN AND ALL OTHER
COMPONENTS (E.G., THE CD-ROM, TRAINING COURSE MATERIALS, TRAINING DATABASE, AS
APPLICABLE) TO ESRI OR ITS AUTHORIZED INSTRUCTOR FOR A REFUND. NO REFUND WILL
BE GIVEN IF THE MEDIA PACKAGE SEAL IS BROKEN OR THERE ARE ANY MISSING
COMPONENTS.

ESRI DATA LICENSE AGREEMENT

This is a license agreement, and not an agreement for sale, between you (Licensee) and ESRI. This ESRI data
license agreement (Agreement) gives Licensee certain limited rights to use the electronic version of the
training course materials, training database, software, and related materials (hereinafter collectively referred
to as the "Training Course"). All rights not specifically granted in this Agreement are reserved to ESRI and its
licensor(s).

Reservation of Ownership and Grant of License: ESRI and its licensor(s) retain exclusive rights, title,
and ownership to the copy of the Training Course licensed under this Agreement and hereby grant to Licensee
a personal, nonexclusive, nontransferable license to use the Training Course as a single package for
Licensee's own personal use only pursuant to the terms and conditions of this Agreement. Licensee agrees to
use reasonable efforts to protect the Training Course from unauthorized use, reproduction, distribution, or
publication.

Proprietary Rights and Copyright: Licensee acknowledges that the Training Course is proprietary and
confidential property of ESRI and its licensor(s) and is protected by United States copyright laws and
applicable international copyright treaties and/or conventions.

Copyright © 2006 ESRI A-1


Introduction to ArcGIS Server

Permitted Uses:
▪ Licensee may run the setup and install one (1) copy of the Training Course onto a permanent
electronic storage device and reproduce one (1) copy of the Training Course and/or any online
documentation in hard-copy format for Licensee's own personal use only.
▪ Licensee may use one (1) copy of the Training Course on a single processing unit.
▪ Licensee may make only one (1) copy of the original Training Course for archival purposes during
the term of this Agreement, unless the right to make additional copies is granted to Licensee in
writing by ESRI.
▪ Licensee may use the Training Course provided by ESRI for the stated purpose of Licensee's own
personal GIS training and education.

Uses Not Permitted:


▪ Licensee shall not sell, rent, lease, sublicense, lend, assign, time-share, or transfer, in whole or in part,
or provide unlicensed third parties access to the Training Course, any updates, or Licensee's rights
under this Agreement.
▪ Licensee shall not separate the component parts of the Training Course for use on more than one (1)
computer, used in conjunction with any other software package, and/or merged and compiled into a
separate database(s) for other analytical uses.
▪ Licensee shall not reverse engineer, decompile, or disassemble the Training Course, except and only
to the extent that such activity is expressly permitted by applicable law notwithstanding this
restriction.
▪ Licensee shall not make any attempt to circumvent the technological measure(s) (e.g., software or
hardware key) that effectively controls access to the Training Course, except and only to the extent
that such activity is expressly permitted by applicable law notwithstanding this restriction.
▪ Licensee shall not remove or obscure any copyright, trademark, and/or proprietary rights notices of
ESRI or its licensor(s).

Term: The license granted by this Agreement shall commence upon Licensee's receipt of the Training Course
and shall continue until such time that (1) Licensee elects to discontinue use of the Training Course and
terminates this Agreement or (2) ESRI terminates for Licensee's material breach of this Agreement. The
Agreement shall automatically terminate without notice if Licensee fails to comply with any provision of this
Agreement. Upon termination of this Agreement in either instance, Licensee shall return to ESRI or destroy
all copies of the Training Course, and any whole or partial copies, in any form and deliver evidence of such
destruction to ESRI, which evidence shall be in a form acceptable to ESRI in its sole discretion. The parties
hereby agree that all provisions that operate to protect the rights of ESRI and its licensor(s) shall remain in
force should breach occur.

Limited Warranty and Disclaimer: ESRI warrants that the media upon which the Training Course is
provided will be free from defects in materials and workmanship under normal use and service for a period of
ninety (90) days from the date of receipt.

EXCEPT FOR THE LIMITED WARRANTY SET FORTH ABOVE, THE TRAINING COURSE
CONTAINED THEREIN IS PROVIDED "AS-IS," WITHOUT WARRANTY OF ANY KIND, EITHER

A-2 Copyright © 2006 ESRI


Appendix A

EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND NONINFRINGEMENT. ESRI
DOES NOT WARRANT THAT THE TRAINING COURSE WILL MEET LICENSEE'S NEEDS OR
EXPECTATIONS; THAT THE USE OF THE TRAINING COURSE WILL BE UNINTERRUPTED; OR
THAT ALL NONCONFORMITIES, DEFECTS, OR ERRORS CAN OR WILL BE CORRECTED. THE
TRAINING DATABASE HAS BEEN OBTAINED FROM SOURCES BELIEVED TO BE RELIABLE,
BUT ITS ACCURACY AND COMPLETENESS, AND THE OPINIONS BASED THEREON, ARE NOT
GUARANTEED. THE TRAINING DATABASE MAY CONTAIN SOME NONCONFORMITIES,
DEFECTS, ERRORS, AND/OR OMISSIONS. ESRI AND ITS LICENSOR(S) DO NOT WARRANT THAT
THE TRAINING DATABASE WILL MEET LICENSEE'S NEEDS OR EXPECTATIONS, THAT THE
USE OF THE TRAINING DATABASE WILL BE UNINTERRUPTED, OR THAT ALL
NONCONFORMITIES CAN OR WILL BE CORRECTED. ESRI AND ITS LICENSOR(S) ARE NOT
INVITING RELIANCE ON THIS TRAINING DATABASE, AND LICENSEE SHOULD ALWAYS
VERIFY ACTUAL DATA, WHETHER MAP, SPATIAL, RASTER, TABULAR INFORMATION, AND
SO FORTH. THE DATA CONTAINED IN THIS PACKAGE IS SUBJECT TO CHANGE WITHOUT
NOTICE.

Exclusive Remedy and Limitation of Liability: During the warranty period, Licensee's exclusive
remedy and ESRI's entire liability shall be the return of the license fee paid for the Training Course upon the
Licensee's deinstallation of all copies of the Training Course and providing a Certification of Destruction in a
form acceptable to ESRI.

IN NO EVENT SHALL ESRI OR ITS LICENSOR(S) BE LIABLE TO LICENSEE FOR COSTS OF


PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, LOST PROFITS, LOST SALES OR
BUSINESS EXPENDITURES, INVESTMENTS, OR COMMITMENTS IN CONNECTION WITH ANY
BUSINESS, LOSS OF ANY GOODWILL, OR FOR ANY INDIRECT, SPECIAL, INCIDENTAL, AND/OR
CONSEQUENTIAL DAMAGES ARISING OUT OF THIS AGREEMENT OR USE OF THE TRAINING
COURSE, HOWEVER CAUSED, ON ANY THEORY OF LIABILITY, AND WHETHER OR NOT ESRI
OR ITS LICENSOR(S) HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. THESE
LIMITATIONS SHALL APPLY NOTWITHSTANDING ANY FAILURE OF ESSENTIAL PURPOSE OF
ANY LIMITED REMEDY.

No Implied Waivers: No failure or delay by ESRI or its licensor(s) in enforcing any right or remedy under
this Agreement shall be construed as a waiver of any future or other exercise of such right or remedy by ESRI
or its licensor(s).

Order for Precedence: This Agreement shall take precedence over the terms and conditions of any
purchase order or other document, except as required by law or regulation.

Export Regulation: Licensee acknowledges that the Training Course and all underlying information or
technology may not be exported or re-exported into any country to which the U.S. has embargoed goods, or to

Copyright © 2006 ESRI A-3


Introduction to ArcGIS Server

anyone on the U.S. Treasury Department's list of Specially Designated Nationals, or to the U.S. Commerce
Department's Table of Deny Orders. Licensee shall not export the Training Course or any underlying
information or technology to any facility in violation of these or other applicable laws and regulations.
Licensee represents and warrants that it is not a national or resident of, or located in or under the control of,
any country subject to such U.S. export controls.

Severability: If any provision(s) of this Agreement shall be held to be invalid, illegal, or unenforceable by a
court or other tribunal of competent jurisdiction, the validity, legality, and enforceability of the remaining
provisions shall not in any way be affected or impaired thereby.

Governing Law: This Agreement, entered into in the County of San Bernardino, shall be construed and
enforced in accordance with and be governed by the laws of the United States of America and the State of
California without reference to conflict of laws principles.

Entire Agreement: The parties agree that this Agreement constitutes the sole and entire agreement of the
parties as to the matter set forth herein and supersedes any previous agreements, understandings, and
arrangements between the parties relating hereto.

A-4 Copyright © 2006 ESRI

Вам также может понравиться