<?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 Re: ArcGIS Enterprise and Python: How to automatize sharing weblayers that offer WMS/WFS capabilities? in Publishing and Managing Services Questions</title>
    <link>https://community.esri.com/t5/publishing-and-managing-services-questions/arcgis-enterprise-and-python-how-to-automatize/m-p/1005561#M262</link>
    <description>&lt;P&gt;Hi Martin,&lt;/P&gt;&lt;P&gt;As far as I know, services with WFS capabilities can only be published from ArcGIS for Desktop. Therefore, it seems consistent that we would have to use the Python tools included in ArcGIS for Desktop, rather than those from ArcGIS Pro. Specifically, we will have to use the&amp;nbsp;&lt;A href="https://desktop.arcgis.com/en/arcmap/latest/analyze/arcpy-mapping/createmapsddraft.htm" target="_self"&gt;&lt;SPAN class="n"&gt;arcpy&lt;/SPAN&gt;&lt;SPAN class="o"&gt;.&lt;/SPAN&gt;&lt;SPAN class="n"&gt;mapping&lt;/SPAN&gt;&lt;SPAN class="o"&gt;.&lt;/SPAN&gt;&lt;/A&gt;&lt;SPAN class="n"&gt;&lt;A href="https://desktop.arcgis.com/en/arcmap/latest/analyze/arcpy-mapping/createmapsddraft.htm" target="_self"&gt;CreateMapSDDraft&lt;/A&gt; method.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="n"&gt;In the Code Sample section of the above documentation, go to "&lt;/SPAN&gt;Modify SDDraft example 3". Here, we can see an example of enabling WMS capabilities on an SD file before publishing the service to ArcGIS server. Using an identical workflow, I believe you should b e able to enable WFS capabilities as well. Can you give this a shot?&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Calvin&lt;/P&gt;</description>
    <pubDate>Mon, 30 Nov 2020 17:05:55 GMT</pubDate>
    <dc:creator>Anonymous User</dc:creator>
    <dc:date>2020-11-30T17:05:55Z</dc:date>
    <item>
      <title>ArcGIS Enterprise and Python: How to automatize sharing weblayers that offer WMS/WFS capabilities?</title>
      <link>https://community.esri.com/t5/publishing-and-managing-services-questions/arcgis-enterprise-and-python-how-to-automatize/m-p/1005149#M260</link>
      <description>&lt;P&gt;I have to create web services on ArcGIS Enterprise 10.8.1 (via ArcGIS Pro 2.6.3) that offer WMS/WFS capabilities from several hundred datasets coming from SDE databases. While this is not a problem when being done manually (I simply check the respective check boxes when using "Share as a Web Layer" - see image below), I am not able to find a way how to do that with Python.&lt;/P&gt;&lt;DIV class="mceNonEditable lia-copypaste-placeholder"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In Python I have been using&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;EM&gt;getWebLayerSharingDraft, exportToSDDraft, arcpy.StageService_server &lt;/EM&gt;and &lt;EM&gt;arcpy.UploadServiceDefinition_server&lt;/EM&gt;. This works pretty well, however, I only end up with a Map Image Service and Feature Service and have no idea how to get WMS and WFS. There seems to be no option to also create those services. Any suggestions?&lt;/P&gt;</description>
      <pubDate>Fri, 27 Nov 2020 10:00:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/publishing-and-managing-services-questions/arcgis-enterprise-and-python-how-to-automatize/m-p/1005149#M260</guid>
      <dc:creator>Martin1</dc:creator>
      <dc:date>2020-11-27T10:00:05Z</dc:date>
    </item>
    <item>
      <title>Re: ArcGIS Enterprise and Python: How to automatize sharing weblayers that offer WMS/WFS capabilities?</title>
      <link>https://community.esri.com/t5/publishing-and-managing-services-questions/arcgis-enterprise-and-python-how-to-automatize/m-p/1005561#M262</link>
      <description>&lt;P&gt;Hi Martin,&lt;/P&gt;&lt;P&gt;As far as I know, services with WFS capabilities can only be published from ArcGIS for Desktop. Therefore, it seems consistent that we would have to use the Python tools included in ArcGIS for Desktop, rather than those from ArcGIS Pro. Specifically, we will have to use the&amp;nbsp;&lt;A href="https://desktop.arcgis.com/en/arcmap/latest/analyze/arcpy-mapping/createmapsddraft.htm" target="_self"&gt;&lt;SPAN class="n"&gt;arcpy&lt;/SPAN&gt;&lt;SPAN class="o"&gt;.&lt;/SPAN&gt;&lt;SPAN class="n"&gt;mapping&lt;/SPAN&gt;&lt;SPAN class="o"&gt;.&lt;/SPAN&gt;&lt;/A&gt;&lt;SPAN class="n"&gt;&lt;A href="https://desktop.arcgis.com/en/arcmap/latest/analyze/arcpy-mapping/createmapsddraft.htm" target="_self"&gt;CreateMapSDDraft&lt;/A&gt; method.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="n"&gt;In the Code Sample section of the above documentation, go to "&lt;/SPAN&gt;Modify SDDraft example 3". Here, we can see an example of enabling WMS capabilities on an SD file before publishing the service to ArcGIS server. Using an identical workflow, I believe you should b e able to enable WFS capabilities as well. Can you give this a shot?&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Calvin&lt;/P&gt;</description>
      <pubDate>Mon, 30 Nov 2020 17:05:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/publishing-and-managing-services-questions/arcgis-enterprise-and-python-how-to-automatize/m-p/1005561#M262</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2020-11-30T17:05:55Z</dc:date>
    </item>
    <item>
      <title>Re: ArcGIS Enterprise and Python: How to automatize sharing weblayers that offer WMS/WFS capabilities?</title>
      <link>https://community.esri.com/t5/publishing-and-managing-services-questions/arcgis-enterprise-and-python-how-to-automatize/m-p/1005776#M266</link>
      <description>&lt;P&gt;Hi Calvin,&lt;/P&gt;&lt;P&gt;Thanks a lot for your answer. I also stumbled across the article you mentioned and indeed it seems that one has to go a layer deeper and programmatically edit the sddraft (XML) file to make it work. I am still struggling with some minor issues, but it seems to work. Thanks a lot for your help.&lt;/P&gt;&lt;P&gt;Martin&lt;/P&gt;</description>
      <pubDate>Tue, 01 Dec 2020 06:52:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/publishing-and-managing-services-questions/arcgis-enterprise-and-python-how-to-automatize/m-p/1005776#M266</guid>
      <dc:creator>Martin1</dc:creator>
      <dc:date>2020-12-01T06:52:14Z</dc:date>
    </item>
    <item>
      <title>Re: ArcGIS Enterprise and Python: How to automatize sharing weblayers that offer WMS/WFS capabilities?</title>
      <link>https://community.esri.com/t5/publishing-and-managing-services-questions/arcgis-enterprise-and-python-how-to-automatize/m-p/1040174#M359</link>
      <description>&lt;P&gt;Hey&amp;nbsp;&lt;SPAN class="UserName lia-user-name lia-user-rank-New-Contributor-III lia-component-message-view-widget-author-username"&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/209958"&gt;@Martin1&lt;/a&gt; ,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="UserName lia-user-name lia-user-rank-New-Contributor-III lia-component-message-view-widget-author-username"&gt;Can u post the full script please !&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="UserName lia-user-name lia-user-rank-New-Contributor-III lia-component-message-view-widget-author-username"&gt;Thank you !&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 24 Mar 2021 13:52:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/publishing-and-managing-services-questions/arcgis-enterprise-and-python-how-to-automatize/m-p/1040174#M359</guid>
      <dc:creator>inolaroch</dc:creator>
      <dc:date>2021-03-24T13:52:44Z</dc:date>
    </item>
    <item>
      <title>Re: ArcGIS Enterprise and Python: How to automatize sharing weblayers that offer WMS/WFS capabilities?</title>
      <link>https://community.esri.com/t5/publishing-and-managing-services-questions/arcgis-enterprise-and-python-how-to-automatize/m-p/1040539#M360</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/46891"&gt;@inolaroch&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;you can find &lt;A href="https://desktop.arcgis.com/en/arcmap/latest/analyze/arcpy-mapping/createmapsddraft.htm" target="_self"&gt;code samples here&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Scroll down to Modify SDDraft example 1-7. Example 3 activates WMS capabilities.&amp;nbsp;Activating WFS works in a similar way.&lt;/P&gt;&lt;P&gt;Please see the code I use below:&lt;/P&gt;&lt;LI-CODE lang="python"&gt;## ENABLE WMS
if typeName.firstChild.data == 'WMSServer':
    extension = typeName.parentNode
    for extElement in extension.childNodes:
        # Enable WMS.
        if extElement.tagName == 'Enabled':
            extElement.firstChild.data = 'true'


## ENABLE WFS
if typeName.firstChild.data == 'WFSServer':
    extension = typeName.parentNode
    for extElement in extension.childNodes:
        # Enable WFS.
        if extElement.tagName == 'Enabled':
            extElement.firstChild.data = 'true'&lt;/LI-CODE&gt;&lt;P&gt;I hope that helps.&lt;/P&gt;</description>
      <pubDate>Thu, 25 Mar 2021 11:06:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/publishing-and-managing-services-questions/arcgis-enterprise-and-python-how-to-automatize/m-p/1040539#M360</guid>
      <dc:creator>Martin1</dc:creator>
      <dc:date>2021-03-25T11:06:18Z</dc:date>
    </item>
    <item>
      <title>Re: ArcGIS Enterprise and Python: How to automatize sharing weblayers that offer WMS/WFS capabilities?</title>
      <link>https://community.esri.com/t5/publishing-and-managing-services-questions/arcgis-enterprise-and-python-how-to-automatize/m-p/1078631#M466</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Hi&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://community.esri.com/t5/user/viewprofilepage/user-id/209958" target="_blank"&gt;@MartinScheiber1&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp;for me, when i create a new image draft file it create a black image layer and WMS as i am not referencing the data but copying it and also using ImageSDDraft. I think its because all information is still in old draft file and the new one just contains the WMS paramaters. Could you tell me how can i fix that?&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 14 Jul 2021 12:30:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/publishing-and-managing-services-questions/arcgis-enterprise-and-python-how-to-automatize/m-p/1078631#M466</guid>
      <dc:creator>RehanChaudhary</dc:creator>
      <dc:date>2021-07-14T12:30:54Z</dc:date>
    </item>
  </channel>
</rss>

