2010年9月01日周三_CreatingAndPublishingaMobileWebService_3.2

/******************************************************************/

//Developing mobile applications with the Mobile SDK

//Creating and publishing a Web service for mobile applications

//2010年9月1日

/******************************************************************/

This topic discusses how to create and publish an ArcGIS Map Service for mobile applications. It assumes you have prepared a map document for publication as per the previous topic, Preparing data and maps. You should also be familiar with creating and managing data services, as described in the Publishing services topic within Managing your GIS Server .

这个主题讨论如何创建并发布一个用于移动程序的ArcGIS Map服务,假设你已经准备了一个用于发布的地图文档,就像上一个话题Preparing data and maps.讨论的那样。 你应该还要对创建和管理数据服务熟悉,就像在Managing your GIS Server 中的Publishing services 题目描述的那样。

Publishing the map document as a mobile data service

Creating a map service for mobile applications is no different from creating any other map services in ArcGIS except you need to enable the “Mobile Data Access” capability.

To publish the map document as a mobile data service, you can use the Publish GIS resource… option in ArcGIS Server Manager.

将地图文档发布为一个移动数据服务。

为移动程序创建一个地图服务与创建其他的任何ArcGIS地图服务是没有区别的,除了你需要设置Mobile Data Access 功能为可用。 为了将地图文档发布为移动数据服务,你可以使用Publish GIS Resource….选项,这个选项在ArcGIS Server Manage中。

  1. Start ArcGIS Server Manager.
  2. Click the “Services” tab.
  3. Click “Publish GIS Resource…”.
  4. Set the resource by browsing to the location of the map document you want to publish.
  5. Choose whether to publish to an existing folder or a new folder. Click Next. 
  6. Check the box next to the Mobile Data Access capability.
  7. Click Publish.

启动ArcGIS Server Manager

单击Services标签

单击“Publish GIS Resource…”

通过浏览到你想要发布的地图文档的位置设置资源

选择是发布到一个已经存在的文件夹里面还是发布到一个新文件中,然后单击Next

选中Mobile data Access capability 属性

单击发布

For more information on configuring advanced properties for the service see Tuning and Configuring Services.

更多关于配置服务的高级属性的信息,查看Tuning and Configuring(调整和配置) 服务。

Consuming a mobile data service

Mobile data services are consumed from applications created with the Mobile Application Developer Framework (Mobile ADF or Mobile SDK). Specifically(特别地;明确地,具体地), the URL of the service needs to be assigned to the URL property of the Mapcache object in your application.

The URL of a mobile data service takes the following format:

http://<servername>/<instancename>/services/<foldername (if applicable)>/<servicename>/<servicetype>/<capabilitytype>

For example, if you publish a mobile web service "LandUse" under a folder named "CityFolder" (which is an option) in your ArcGIS server "myServer" running an instance called "arcgis", the URL for mobile applications would be:

http://myServer/arcgis/services/CityFolder/LandUse/MapServer/MobileServer

You can connect to and preview this mobile web service in ArcCatalog, or preview the XML file returned from this server by typing the following URL in the web browser:

http://myserver/arcgis/services/CityFolder/LandUse/MapServer/MobileServer?wsdl

In a typical scenario(场景、情况), you create a map document and publish it in ArcGIS server as a mobile data service. The service URL is then used by your mobile application to connect to and retrieve data from ArcGIS Server. You can then use the hand-held device running this mobile application in field work, either in connected mode or disconnected mode. Both modes allow you to retrieve and update spatial and attribute information in your local cache. These updates will be posted back to server inventory when the field work is completed.

使用移动数据服务

Mobile 数据服务被使用移动程序开发框架(移动程序开发框架或者移动软件开发包)开发的程序所使用。 特别的,服务的URL需要和你的应用程序中的Map缓冲对象的URL属性想关联。

移动数据服务的URL使用下面的数据格式:

http://<servername>/<instancename>/services/<foldername (if applicable)>/<servicename>/<servicetype>/<capabilitytype>

比如:如果你发布了一个名称为“LandUSE”的移动网络服务,这个服务放置到运行有一个成为”arcgis”的实例的名称为”MyServer“的Arcgis 服务器上的一个名称为“cityFolder”的文件夹中,

应用到移动程序的URL就类似于:

http://myServer/arcgis/services/CityFolder/LandUse/MapServer/MobileServer

在一个特殊的情况,你创建了一个地图文档,在一个ArcGIS 服务器上面发布为一个移动数据服务。你的移动应用程序使用服务的URL连接ArcGISSERVER并从ArcGISServer 上面重新获取数据。 然后你就可以使用手持的移动设备运行这个应用程序在野外工作,而不管是连接的状态还是断开的状态。两种模式都允许你在本地缓存中重新获取和更新空间和属性信息。在野外工作结束后,这些更新将会发送到服务器端的目录中。

原文地址:https://www.cnblogs.com/xingchen/p/1814454.html