<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Create FeatureService .sd file of MXD using&amp;#160; .sde connection through python in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/create-featureservice-sd-file-of-mxd-using-160-sde/m-p/711660#M55167</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I would like to generate a .sd file for a feature service through python.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;A little information:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;We are using ArcGIS Server 10.2.2&lt;/LI&gt;&lt;LI&gt;We are using an oracle database to house all of the data. GeoDatabases are not an option. It must be oracle.&lt;/LI&gt;&lt;LI&gt;All mxds connect to layers in the oracle database through .sde files&lt;/LI&gt;&lt;LI&gt;We are publishing map services for viewing in a browser, and feature services for editing data in a browser.&lt;/LI&gt;&lt;LI&gt;We do not have direct access to the ArcGIS Servers. We have to give all of the required ArcGIS content to an employee who is responsible for doing the migrations.&lt;/LI&gt;&lt;LI&gt;We have three environments: dev, test, prod. Every time we update an mxd, we need to do the following:&lt;UL&gt;&lt;LI&gt;set datasources on every mxd to point to the corresponding environments.&lt;/LI&gt;&lt;LI&gt;create .sd files to give to the employee responsible for the migrations&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This process can be tedious if done by hand, so I have scripted most of it out. I can update the datasources for all of the mxds and create .sd files for map services just fine, but my problem is with the feature services. I cannot get the .sd file that I generate for feature services to run on the ArcGIS server. I have followed the instructions in example 7 of this page: &lt;A class="jive-link-external-small" href="http://resources.arcgis.com/en/help/main/10.2/index.html#//00s30000006q000000" rel="nofollow" target="_blank"&gt;ArcGIS Help (10.2, 10.2.1, and 10.2.2)&lt;/A&gt; , but every time I upload the .sd file to manager, i get the following error:&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="line-height: 1.5;"&gt;Could not find resource or operation 'FeatureServer' on the system.&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is my python code to create the .sddraft file. &lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;def make_sd_draft(mxdPath, serviceName):&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; mxd = arcpy.mapping.MapDocument(mxdPath)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; tempDir = mxdPath.replace(ntpath.basename(mxdPath), "")&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; """Ceate a draft SD and modify the properties to overwrite an existing FS."""&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.env.overwriteOutput = True&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; # All paths are built by joining names to the tempPath&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; SDdraft = os.path.join(tempDir, serviceName + ".sddraft")&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; newSDdraft = os.path.join(tempDir, serviceName + "_updated.sddraft")&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.mapping.CreateMapSDDraft(mxd, SDdraft, serviceName, "MY_HOSTED_SERVICES")&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; #open the SDDraft file and replace any &amp;amp;quot; entities with something else that we can restore later&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; replaceInFile(SDdraft, '&amp;amp;quot;', 'zzzzzQuotezzzzz')&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; # Read the contents of the original SDDraft into an xml parser&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; doc = ET.parse(SDdraft)&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; root_elem = doc.getroot()&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if root_elem.tag != "SVCManifest":&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; raise ValueError("Root tag is incorrect. Is {} a .sddraft file?".format(SDDraft))&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; # Change service type from map service to feature service&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; for config in doc.findall("./Configurations/SVCConfiguration/TypeName"):&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if config.text == "MapServer":&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; config.text = "FeatureServer"&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; #Turn off caching&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; for prop in doc.findall("./Configurations/SVCConfiguration/Definition/" + "ConfigurationProperties/PropertyArray/" + "PropertySetProperty"):&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if prop.find("Key").text == 'isCached':&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; prop.find("Value").text = "false"&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; for prop in doc.findall("./Configurations/SVCConfiguration/Definition/Extensions/SVCExtension"):&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if prop.find("TypeName").text == 'KmlServer':&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; prop.find("Enabled").text = "false"&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; # Turn on feature access capabilities&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; for prop in doc.findall("./Configurations/SVCConfiguration/Definition/Info/PropertyArray/PropertySetProperty"):&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if prop.find("Key").text == 'WebCapabilities':&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; prop.find("Value").text = "Query,Create,Update,Delete,Uploads,Editing"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; # Add the namespaces which get stripped, back into the .SD&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; root_elem.attrib["xmlns:typens"] = '&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://www.esri.com/schemas/ArcGIS/10.1" rel="nofollow" target="_blank"&gt;http://www.esri.com/schemas/ArcGIS/10.1&lt;/A&gt;&lt;SPAN&gt;'&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; root_elem.attrib["xmlns:xs"] = '&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://www.w3.org/2001/XMLSchema" rel="nofollow" target="_blank"&gt;http://www.w3.org/2001/XMLSchema&lt;/A&gt;&lt;SPAN&gt;'&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; # Write the new draft to disk&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; with open(newSDdraft, 'w') as f:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; doc.write(f)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; f.close()&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; return newSDdraft&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 23 Jan 2015 14:16:58 GMT</pubDate>
    <dc:creator>BronleyPlumb</dc:creator>
    <dc:date>2015-01-23T14:16:58Z</dc:date>
    <item>
      <title>Create FeatureService .sd file of MXD using  .sde connection through python</title>
      <link>https://community.esri.com/t5/python-questions/create-featureservice-sd-file-of-mxd-using-160-sde/m-p/711660#M55167</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I would like to generate a .sd file for a feature service through python.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;A little information:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;We are using ArcGIS Server 10.2.2&lt;/LI&gt;&lt;LI&gt;We are using an oracle database to house all of the data. GeoDatabases are not an option. It must be oracle.&lt;/LI&gt;&lt;LI&gt;All mxds connect to layers in the oracle database through .sde files&lt;/LI&gt;&lt;LI&gt;We are publishing map services for viewing in a browser, and feature services for editing data in a browser.&lt;/LI&gt;&lt;LI&gt;We do not have direct access to the ArcGIS Servers. We have to give all of the required ArcGIS content to an employee who is responsible for doing the migrations.&lt;/LI&gt;&lt;LI&gt;We have three environments: dev, test, prod. Every time we update an mxd, we need to do the following:&lt;UL&gt;&lt;LI&gt;set datasources on every mxd to point to the corresponding environments.&lt;/LI&gt;&lt;LI&gt;create .sd files to give to the employee responsible for the migrations&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This process can be tedious if done by hand, so I have scripted most of it out. I can update the datasources for all of the mxds and create .sd files for map services just fine, but my problem is with the feature services. I cannot get the .sd file that I generate for feature services to run on the ArcGIS server. I have followed the instructions in example 7 of this page: &lt;A class="jive-link-external-small" href="http://resources.arcgis.com/en/help/main/10.2/index.html#//00s30000006q000000" rel="nofollow" target="_blank"&gt;ArcGIS Help (10.2, 10.2.1, and 10.2.2)&lt;/A&gt; , but every time I upload the .sd file to manager, i get the following error:&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="line-height: 1.5;"&gt;Could not find resource or operation 'FeatureServer' on the system.&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is my python code to create the .sddraft file. &lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;def make_sd_draft(mxdPath, serviceName):&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; mxd = arcpy.mapping.MapDocument(mxdPath)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; tempDir = mxdPath.replace(ntpath.basename(mxdPath), "")&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; """Ceate a draft SD and modify the properties to overwrite an existing FS."""&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.env.overwriteOutput = True&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; # All paths are built by joining names to the tempPath&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; SDdraft = os.path.join(tempDir, serviceName + ".sddraft")&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; newSDdraft = os.path.join(tempDir, serviceName + "_updated.sddraft")&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.mapping.CreateMapSDDraft(mxd, SDdraft, serviceName, "MY_HOSTED_SERVICES")&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; #open the SDDraft file and replace any &amp;amp;quot; entities with something else that we can restore later&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; replaceInFile(SDdraft, '&amp;amp;quot;', 'zzzzzQuotezzzzz')&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; # Read the contents of the original SDDraft into an xml parser&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; doc = ET.parse(SDdraft)&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; root_elem = doc.getroot()&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if root_elem.tag != "SVCManifest":&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; raise ValueError("Root tag is incorrect. Is {} a .sddraft file?".format(SDDraft))&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; # Change service type from map service to feature service&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; for config in doc.findall("./Configurations/SVCConfiguration/TypeName"):&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if config.text == "MapServer":&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; config.text = "FeatureServer"&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; #Turn off caching&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; for prop in doc.findall("./Configurations/SVCConfiguration/Definition/" + "ConfigurationProperties/PropertyArray/" + "PropertySetProperty"):&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if prop.find("Key").text == 'isCached':&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; prop.find("Value").text = "false"&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; for prop in doc.findall("./Configurations/SVCConfiguration/Definition/Extensions/SVCExtension"):&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if prop.find("TypeName").text == 'KmlServer':&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; prop.find("Enabled").text = "false"&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; # Turn on feature access capabilities&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; for prop in doc.findall("./Configurations/SVCConfiguration/Definition/Info/PropertyArray/PropertySetProperty"):&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if prop.find("Key").text == 'WebCapabilities':&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; prop.find("Value").text = "Query,Create,Update,Delete,Uploads,Editing"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; # Add the namespaces which get stripped, back into the .SD&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; root_elem.attrib["xmlns:typens"] = '&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://www.esri.com/schemas/ArcGIS/10.1" rel="nofollow" target="_blank"&gt;http://www.esri.com/schemas/ArcGIS/10.1&lt;/A&gt;&lt;SPAN&gt;'&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; root_elem.attrib["xmlns:xs"] = '&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://www.w3.org/2001/XMLSchema" rel="nofollow" target="_blank"&gt;http://www.w3.org/2001/XMLSchema&lt;/A&gt;&lt;SPAN&gt;'&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; # Write the new draft to disk&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; with open(newSDdraft, 'w') as f:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; doc.write(f)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; f.close()&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; return newSDdraft&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 Jan 2015 14:16:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/create-featureservice-sd-file-of-mxd-using-160-sde/m-p/711660#M55167</guid>
      <dc:creator>BronleyPlumb</dc:creator>
      <dc:date>2015-01-23T14:16:58Z</dc:date>
    </item>
    <item>
      <title>Re: Create FeatureService .sd file of MXD using  .sde connection through python</title>
      <link>https://community.esri.com/t5/python-questions/create-featureservice-sd-file-of-mxd-using-160-sde/m-p/1103784#M62571</link>
      <description>&lt;P&gt;this may help, read to the bottom.&lt;BR /&gt;&lt;BR /&gt;&lt;A href="https://community.esri.com/t5/arcgis-enterprise-questions/how-to-overwrite-arcgis-server-on-premise-feature/td-p/289487" target="_blank"&gt;How to Overwrite ArcGIS Server (on-premise) Featur... - Esri Community&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 30 Sep 2021 22:44:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/create-featureservice-sd-file-of-mxd-using-160-sde/m-p/1103784#M62571</guid>
      <dc:creator>DavidPike</dc:creator>
      <dc:date>2021-09-30T22:44:18Z</dc:date>
    </item>
  </channel>
</rss>

