Automating Publishing to a Federated Server

375
3
05-22-2020 09:47 AM
New Contributor II

We're trying to script publishing feature services that reference our sde data to a server federated to Portal.

I've had success using getWebLayerSharingDraft to publish a MapImage service to the federated server which seems to reference our sde data, and I've had success publishing a Feature Service but it only seems to publish to the HOSTING_SERVER which makes me think it is being stored in the Data Store associated with the Federated Server and thus is only a copy of our sde data.

If you look at the guts of  _mp.py for getWebLayerSharingDraft you'll see that FEDERATED_SERVER is only compatible with MAP_IMAGE and that FEATURE is only compatible with MY_HOSTED_SERVICES or HOSTING_SERVER.

I've tried to go the route of using CreateSharingDraft but that only seems to be able to access a standalone_server and not a federated server.

Has anyone had any luck?

Reply
0 Kudos
3 Replies
New Contributor

I am having the same problem.  Have you found a solution yet? 

Reply
0 Kudos
New Contributor II

Unfortunately, I have not.

Reply
0 Kudos
New Contributor II

I seem to be having the same problem.  Are you getting and error?

Here is what I see..


File "C:/batch/Publish_Service.py", line 359, in <module>
sharing_draft.exportToSDDraft(sddraft_output_filename)
File "C:\Program Files\ArcGIS\Pro\Resources\ArcPy\arcpy\sharing.py", line 66, in exportToSDDraft
return _convertArcObjectToPythonObject(self._arc_object.exportToSDDraft(out_sddraft,self))
ValueError: Unable to create the manifest (sddraft file). An unspecified error occurred.

Reply
0 Kudos