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.

When I publish an MSD to ArcGIS Server 10.0 manually in ArcCatalog (through right-click context menu) or through the web interface, the service is created properly.

When I use arcpy.mapping.PublishMSDToServer, the service is published, but it lists no layers or tables when using the REST API. I've tried creating MSD files manually and with arcpy.mapping.ConvertToMSD, but the results are the same.

The map document used to create the MSD has a single layer with a single join to a table.

Does anyone have an idea why layers are missing only in the map service created from PublishMSDToServer or suggestions for a work-around?

share|improve this question
    
Sounds like you may have a path issue; when you use the tools inside of ArcMap you have a more direct connection to your map resources but when you are doing it through ArcPy you in a abstracted layer which does not always see the paths fully. Take a look at your ArcGIS Server Manager/Logs to see what is resolving. You might want to set your logging to the deepest level so you get the most details. –  D.E.Wright Dec 25 '11 at 6:20
add comment

1 Answer

Have you tried to clear the REST cache?

http://servername/ArcGIS/rest/admin ----> Login ----> Clear Cache

share|improve this answer
    
Yes. To test this behavior, I would switch back and forth between a manually published msd and one done with a Python script, clearing the REST cache each time. –  majgis Oct 26 '11 at 3:05
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.