Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

In my company, there is a web service that serves geographic data stored in a remote dababase through an URL. This service makes queries to the database and encodes the required data in XML format. So, to query data from a table (for example User), I do something like:

http://myCompanyName/service/QueryUserTable

So the service returns back to the client's browser a XML with all users stored in that table. Now, I would like to do the same from ArcGIS software: The thing would be connect this desktop application to that remote service, retrieve that XML file and parse it but all inside ArcGIS environment, not using other scripts or programs outside it. Is it possible? :S

Just in case it is not possible to do what I said, what is the best approach to handle and manage traffic in XML using ArcGIS?

I am sorry if I posted in the wrong place or this was answered before, the problem is that I wasnt sure what to ask to Google/Stack Exchange to obtain a good answer.

Thanks! :D


WOW! It is a good idea and I like the way of retrieving the parameters like this long link you pasted. Didn't know about that module since I am pretty new with ESRI software.

But there is another constraint I did not mention in my first post. As the company is big, there is another "handicap" or problem: At this beginning stage I will have no control over the remote service, another developers group will "decide" how to encode the data. I mean, I think I cannot decide if the remote service is SOAP or not, REST or not and therefore, I don't know the XML tags they will use for the encoding. Maybe I can use the module you mention to connect to the service but I am not sure how data will be served on the other counterpart...

I guess I will be told the general schema of the files, and then I have to try to connect ArcGIS to that remote service and prepare some scripts to parse the incoming XML and allow non-IT users to use it in their layers...

Does it make sense? What do you think? It is a bit difficult to explain! :D

Thanks for your response and ideas!

share|improve this question
    
Are you looking for out-of-the box solution? If you are convenient with python, you can retrieve and parse XML file with python script, for example. But if it is the right tool depends on what are you planning to do with parsed XML in ArcGIS Desktop? –  Alex Markov May 16 '12 at 13:18
2  
Do you want to make an arcgis based service that serves xml to a client, or do you want arcgis desktop to be the client that uses the service? For the former you use a server object extension, for the later a python plugin. –  blord-castillo May 16 '12 at 13:28
    
AlexMarkov: The thing is that I have to try to prepare this environment so other non-IT people can retrieve and use this data with no effort, that is why I prefer to do it within ArcGIS environment. @blord-castillo I would like to use ArcGIS Desktop as the client that connects and makes use of that service. I was asking about do everything within the app framework because I think it would be more comfortable for users than messing with the python plugin separately... Unless the python plugin is manageable from the same application. Thanks to both! –  iamgin May 17 '12 at 7:38
    
A python plugin is just an addon to the desktop app. It would allow you to add a toolbar that executes python code. The python code could connect to the service, parse the xml, and then generate a layer within arcmap containing the data obtained from the service. It would require using version 10 of arcgis desktop though. –  blord-castillo May 17 '12 at 10:56
    
Aha, got it! You convinced me @blord-castillo, will try what you say. Thanks! –  iamgin May 17 '12 at 12:08
add comment

1 Answer

up vote 2 down vote accepted

why dont you use ArcGIS SOAP or REST service interfaces. it already gives you what you want... it has query field which returns the result as html,json,kmz and amf too..

you can check out some service here, at least in terms of giving an idea...

This is an example service link, will return you id:129 object properties:

http://server.arcgisonline.com/ArcGIS/rest/services/Demographics/USA_Unemployment_Rate/MapServer/1/query?text=129&geometry=&geometryType=esriGeometryPoint&inSR=&spatialRel=esriSpatialRelIntersects&relationParam=&objectIds=&where=&time=&returnCountOnly=false&returnIdsOnly=false&returnGeometry=true&maxAllowableOffset=&outSR=&outFields=&f=pjson

i hope it helps you...

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.