Select to view content in your preferred language

ArcGIS Map Web Part (2.1.1) is unable to connect to ArcGIS's REST services

4255
16
07-17-2012 07:32 AM
PongthepMiankaew1
New Contributor
Hello,

I have a ArcGIS 10 server and I have installed ArcGIS for SharePoint 2.1.1 on my SharePoint 2010 server.
For the ArcGIS Map Web Part, I successfully connected to sampleserver1.arcgisonline.com or sampleserver3.arcgisonline.com, but I tried to browse and connect to my ArcGIS server's REST service, it said "Connection Error: Unable to connect to http://myserver/arcgis/rest/services/mymap/mapserver". I don't understand why?
Because I set the ArcGIS Mapping Connections for this url and successful tested the connection (It could access its ArcGIS Services Directory).

Could you please advise?

Thank you,
Pongthep
0 Kudos
16 Replies
deleted-user-2qj0mslSQL55
Deactivated User
it doesnt require customization, but you do need to configure the appropriate connection.. have you tried using IP instead of server name? thats what worked for me. I also setup crossdomain/ClientAccessPolicy xml files which i placed in wwwroot.
0 Kudos
AlastairClinkscale
Occasional Contributor
The advice that the out-of-the-box web part doesn't work with WMS, and needs customisation,  actually came from an ESRI UK representative. So they are wrong? They pointed to http://sharepoint.arcgis.com/SitePages/WMS%20Layer.aspx  as evidence of this, but I thought that example was how a regular SharePoint user could add a WMS to a map without having to have SharePoint permissions to add connections to the connections library. Is the ESRI UK representative wrong?

I haven't tried IP address but I don't actually have access to an ArcGIS Server to create/host my own WMS yet (hopefully will have within a few months). So far, I've only been able to try other organisation's WMS, thus my example a few posts above to see if anyone else could get it to load, as I can't.

I'm becoming more confused as this issue goes on....
0 Kudos
AlastairClinkscale
Occasional Contributor
In this thread from October 2011, an ESRI rep explicitly states that

"WMS services are not directly supported by ArcGIS for SharePoint out-of-the-box. It is possible though an add-in �?? there is a sample in the interactive SDK"

Is this really true?
0 Kudos
BradCroft
Emerging Contributor
Hello

I finally got ArcGIS for SharePoint to recognize my WMS service. As documented, I had to place a "clientaccesspolicy.xml" in the ArcGIS Server root directory (can be c:\inetpub\wwwroot or C:\arcgisserver or other, depending on configuration of your server). The XML file must be accessible from the web server root directory e.g. http://SERVERNAME/clientaccesspolicy.xml.

Note that I have tried to access other WMS on the internet as well and have not been able to add them to ArcGIS for SharePoint either. This is likely due to the lack of a "clientaccesspolicy.xml" in their site because they were not anticipating access through a Silverlight app. Surely Microsoft could have handled this security issue in Silverlight differently!
0 Kudos
AlastairClinkscale
Occasional Contributor
Brad, many thanks for posting the update. I think it confirms to me a couple of things:

1. The web part does not need customisation (ie. program code) to consume WMS?

2. It's perfectly conceivable that external organisations that host WMSs that I wish to consume in the web part may not know anything about the Silverlight security requirement that the clientaccesspolicy.xml file be put in a particular correct location of their WMS host server, so I may end up having to contact multiple organisations and ask that they do that, especially for me and my Silverlight web part?
0 Kudos
BradCroft
Emerging Contributor
Hi

I did some more experimentation and your ESRI rep is correct. The ArcGIS for Sharepoint Web Part does not connect to an OGC WMS, only to an ArcGIS Server endpoint or Spatial Data Service. So to confrm your previous items...

1. The web part does need customisation (ie. program code) to consume WMS.
>>The Silverlight API is supposed to be able to connect to WMS, not sure why ESRI chose to not allow this in the SharePoint product. Right now it appears that you have to write custom code to connect to OGC WMS from SharePoint

2. It's perfectly conceivable that external organisations that host WMSs that I wish to consume in the web part may not know anything about the Silverlight security requirement that the clientaccesspolicy.xml file be put in a particular correct location of their WMS host server, so I may end up having to contact multiple organisations and ask that they do that, especially for me and my Silverlight web part?
>>To the best of my knowledge, this is still correct but I have only confirmed with an ArcGIS Server endpoint.
0 Kudos
AlastairClinkscale
Occasional Contributor
That's useful to know, Brad. Thanks for posting.

I think that also confirms to me that I remain confused by the terminology - map service, web map service, OSG web map service, dynamic map service, spatial data service, REST service. I was kinda thinking (hoping) they were all more or less the same thing - just WMS, but I guess they're not.

In terms of the web part being able to connect to REST endpoints, presumably it should be able to connect to other organisation's REST endpoints, provided they have the clientaccesspolicy/crossdomian xml files in root of server, so it should still be possible to consume other organisation's spatial data as service?

Does anyone know of somewhere that succinctly explains what map service, web map service, OSG web map service, dynamic map service, spatial data service, REST service are, and the differences between them, preferably in simple terms.
0 Kudos