<?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: Sharing WMS/WFS with Python in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/sharing-wms-wfs-with-python/m-p/1027613#M60002</link>
    <description>&lt;P&gt;Hi &lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/151948"&gt;@CecíliaSouza&lt;/a&gt; ,&lt;/P&gt;&lt;P&gt;Can u post the full script please ?&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 17 Feb 2021 15:22:52 GMT</pubDate>
    <dc:creator>inolaroch</dc:creator>
    <dc:date>2021-02-17T15:22:52Z</dc:date>
    <item>
      <title>Sharing WMS/WFS with Python</title>
      <link>https://community.esri.com/t5/python-questions/sharing-wms-wfs-with-python/m-p/428611#M33676</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello everyone!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding: 0px;"&gt;I've been trying to publish WMS/WFS services with arcpy in ArcGIS Pro 2.6, but it always ends up with this same error: "code":"00297","message":"WFS layers must be shared with everyone".&lt;/P&gt;&lt;P style="padding: 0px;"&gt;I came across that&amp;nbsp;it is originated from this bug:&amp;nbsp;&lt;A href="https://support.esri.com/en/bugs/nimbus/QlVHLTAwMDA5NTkzOQ==" style="color: #2989c5;" title="https://support.esri.com/en/bugs/nimbus/QlVHLTAwMDA5NTkzOQ==" rel="nofollow noopener noreferrer" target="_blank"&gt;BUG-000095939: Secured Open Geospatial Consortium (OGC) services fr..&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="padding: 0px;"&gt;My questions are: How can I "share to everyone" with arcpy/python? There is a function or parameter that I've missed?&lt;/P&gt;&lt;P style="padding: 0px;"&gt;This is solvable only by changing the sddraft xml?&lt;/P&gt;&lt;P style="padding: 0px;"&gt;Below is the main part of the script (thanks to Shilpi Jain from Esri).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;SignInToPortal&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;portalURL&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; username&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; password&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
aprx &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;mp&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;ArcGISProject&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;aprxPath&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
m &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; aprx&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;listMaps&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"Map"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;0&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;

sharing_draft &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; m&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;getWebLayerSharingDraft&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"FEDERATED_SERVER"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"MAP_IMAGE"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; serviceName&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; 
sharing_draft&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;federatedServerUrl &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; fed_server
sharing_draft&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;portalFolder &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"SD"&lt;/SPAN&gt;
sharing_draft&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;serverFolder &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"SD"&lt;/SPAN&gt;
sharing_draft&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;exportToSDDraft&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;sddraftPath&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;

enable_extensions&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;sddraftPath&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"FeatureServer"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
enable_extensions&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;sddraftPath&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"WMSServer"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
enable_extensions&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;sddraftPath&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"WFSServer"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;

arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;StageService_server&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;sddraftPath&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; sdPath&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;UploadServiceDefinition_server&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;sdPath&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; fed_server&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for your time,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cecília&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 19:16:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/sharing-wms-wfs-with-python/m-p/428611#M33676</guid>
      <dc:creator>CecíliaSouza</dc:creator>
      <dc:date>2021-12-11T19:16:55Z</dc:date>
    </item>
    <item>
      <title>Re: Sharing WMS/WFS with Python</title>
      <link>https://community.esri.com/t5/python-questions/sharing-wms-wfs-with-python/m-p/428612#M33677</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ceclia,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you try adding the following to your Python script?&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;shrOrg = False
shrEveryone = True 
shrGroups = ""&lt;/PRE&gt;&lt;P&gt;See the following article for more information:&amp;nbsp;&lt;A class="link-titled" href="https://support.esri.com/en/technical-article/000023164" title="https://support.esri.com/en/technical-article/000023164" rel="nofollow noopener noreferrer" target="_blank"&gt;How To: Overwrite hosted feature services from ArcGIS Pro to ArcGIS Online using Python&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best,&lt;/P&gt;&lt;P&gt;Jonah&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 19:16:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/sharing-wms-wfs-with-python/m-p/428612#M33677</guid>
      <dc:creator>JonahLay</dc:creator>
      <dc:date>2021-12-11T19:16:57Z</dc:date>
    </item>
    <item>
      <title>Re: Sharing WMS/WFS with Python</title>
      <link>https://community.esri.com/t5/python-questions/sharing-wms-wfs-with-python/m-p/1027613#M60002</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/151948"&gt;@CecíliaSouza&lt;/a&gt; ,&lt;/P&gt;&lt;P&gt;Can u post the full script please ?&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 17 Feb 2021 15:22:52 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/sharing-wms-wfs-with-python/m-p/1027613#M60002</guid>
      <dc:creator>inolaroch</dc:creator>
      <dc:date>2021-02-17T15:22:52Z</dc:date>
    </item>
    <item>
      <title>Re: Sharing WMS/WFS with Python</title>
      <link>https://community.esri.com/t5/python-questions/sharing-wms-wfs-with-python/m-p/1027975#M60025</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 the full script here:&lt;/P&gt;&lt;P&gt;&lt;A href="https://github.com/jnshill/ArcPyPublishing" target="_blank" rel="noopener"&gt;https://github.com/jnshill/ArcPyPublishing&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Best,&lt;/P&gt;&lt;P&gt;Cecilia&lt;/P&gt;</description>
      <pubDate>Thu, 18 Feb 2021 08:50:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/sharing-wms-wfs-with-python/m-p/1027975#M60025</guid>
      <dc:creator>CecíliaSouza</dc:creator>
      <dc:date>2021-02-18T08:50:47Z</dc:date>
    </item>
    <item>
      <title>Re: Sharing WMS/WFS with Python</title>
      <link>https://community.esri.com/t5/python-questions/sharing-wms-wfs-with-python/m-p/1027997#M60026</link>
      <description>&lt;P&gt;Thank you so much &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 18 Feb 2021 10:22:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/sharing-wms-wfs-with-python/m-p/1027997#M60026</guid>
      <dc:creator>inolaroch</dc:creator>
      <dc:date>2021-02-18T10:22:18Z</dc:date>
    </item>
  </channel>
</rss>

