AGOL Services' Item Description: 'The item's XML contains errors.'

3030
4
07-16-2015 08:40 AM
MichaelNesius
Occasional Contributor

Hi everyone,

When people connect to my organization's AGOL hosted services via a GIS Server connection in ArcMap (e.g. http://services1.arcgis.com/[Group ID #]/ArcGIS/rest/services , the 'Item Description' returns the error message 'The item's XML contains errors.'

BUT, the metadata/item details display fine when viewed via AGOL, ArcMap's Add Data AGOL search, and through the 'My Hosted Services' connection.

Any ideas?

thanks in advance,

Mike

ps: Several of ESRI's services seem to have this same 'Item Description' problem (but some of theirs work) when accessed via a server connection in ArcMap:

AGOL_XML_error.jpg

0 Kudos
4 Replies
WesMiller
Regular Contributor III

You may want to move this question to an ArcGis Online groups

MichaelNesius
Occasional Contributor

I noticed the new Metadata feature on AGOL, thanks ESRI!! While it is great that we can manually upload ArcGIS formatted .xml metadata...

Has anyone had success uploading an XML through REST/python script to an AGOL hosted service?

Based on my reading of the REST API documentation, it should be possible with an update item operation. I've been attempting this for a while without any luck. Any suggestions?

My most recent variation (using requests):

def uploadMeta():
     baseURL= agol.http+'/content/users/{}/items/{}/update'.format(agol.username, agol.itemID)
     metaUp = {"file": open(updatedXML, 'rb')}
     updatemetaurl = baseURL + "?f=json"+\
                  "&file=metadata.xml"+"&overwrite=true&token="+agol.token
     responseMeta = requests.post(updatemetaurl, files=metaUp, proxies=proxyDict)

this returns a <Response[200]>  and response text:{u'id': u'4b99244d8df34ffba9c7ddf1dc20ea88', u'success': True} BUT the metadata isn't updated. I can use the AGOL UI to manually update the metadata, but I need a way to automate. Any help would be great appreciated.

the updatemetaurl I'm using here ends up looking like this:

http://www.arcgis.com/sharing/rest/content/users/sm970mn/items/4b99244d8df34ffba9c7ddf1dc20ea88/upda...

0 Kudos
MichaelNesius
Occasional Contributor

ps

I'm uploading/updating/publishing services via service definitions.

Since .sd files only support the basic item description, the metadata carried with the sd when it is published is also truncated.

0 Kudos
SusanMinnemeyer1
New Contributor

Any success with this? I am experiencing the same issue.

It would be great to get an example on how to upload metadata files to AGOL.

0 Kudos