<?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 REST Services Directory using an SOE in ArcGIS Enterprise Questions</title>
    <link>https://community.esri.com/t5/arcgis-enterprise-questions/arcgis-rest-services-directory-using-an-soe/m-p/243823#M9403</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;have you tried set in your rootresourcehandler?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;

responseProperties = "{\"Content-Type\" : \"application/json\"}";

&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 11 Dec 2021 12:10:59 GMT</pubDate>
    <dc:creator>nicogis</dc:creator>
    <dc:date>2021-12-11T12:10:59Z</dc:date>
    <item>
      <title>ArcGIS REST Services Directory using an SOE</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/arcgis-rest-services-directory-using-an-soe/m-p/243822#M9402</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I have an SOE which extends the ArcGIS Server map services.&amp;nbsp; The SOE itself works well, i.e. I can call the various functions with no problem.&amp;nbsp; The issue I have is using the ArcGIS Services Directory in order to explore my SOE.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;In particular, I have Child Resources off my root resource which are not collections but do have child resources.&amp;nbsp; The resource is sort of like a folder which contains other folders.&amp;nbsp; Here is an portion of the schema:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;{&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; "name": "NE",&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; "isCollection": false,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; "resources": [{&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "name": "Inventory",&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "isCollection": false,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "operations": [{&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;// Text omitted&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;When I click on Inventory in the REST Services Directory what the code returns is a response which is application/json where the content is "{}".&amp;nbsp; What the browser then does is to issue the following prompt "Do you want to open or save Inventory.json (2 bytes) from localhost?".&amp;nbsp; The browser I am using is IE 10 on Windows 8 x64.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;What am I doing wrong?&amp;nbsp; I believe that this code used to work in version 10 but I am currently running 10.1 SP1.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Feb 2013 16:50:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/arcgis-rest-services-directory-using-an-soe/m-p/243822#M9402</guid>
      <dc:creator>RichardWatson</dc:creator>
      <dc:date>2013-02-07T16:50:01Z</dc:date>
    </item>
    <item>
      <title>Re: ArcGIS REST Services Directory using an SOE</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/arcgis-rest-services-directory-using-an-soe/m-p/243823#M9403</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;have you tried set in your rootresourcehandler?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;

responseProperties = "{\"Content-Type\" : \"application/json\"}";

&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 12:10:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/arcgis-rest-services-directory-using-an-soe/m-p/243823#M9403</guid>
      <dc:creator>nicogis</dc:creator>
      <dc:date>2021-12-11T12:10:59Z</dc:date>
    </item>
    <item>
      <title>Re: ArcGIS REST Services Directory using an SOE</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/arcgis-rest-services-directory-using-an-soe/m-p/243824#M9404</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I looked at the response in Fiddler and it is application/json.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I think that I need to write a sample program and see if I can reproduce this behavior.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I was hoping to avoid having to do that:(&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 08 Feb 2013 16:34:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/arcgis-rest-services-directory-using-an-soe/m-p/243824#M9404</guid>
      <dc:creator>RichardWatson</dc:creator>
      <dc:date>2013-02-08T16:34:16Z</dc:date>
    </item>
    <item>
      <title>Re: ArcGIS REST Services Directory using an SOE</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/arcgis-rest-services-directory-using-an-soe/m-p/243825#M9405</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I figured out what is going on and how to "fix" the problem.&amp;nbsp; I post the answer here in case someone else has this problem in the future.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The last argument to IRESTRequestHandler.HandleRESTRequest is responseProperties which is the response properties in JSON format.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I know of 2 valid members which are Content-Type and ResponseDataType.&amp;nbsp; The later relates to esriWebResponseDataType.&amp;nbsp; The former is standard web stuff.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;In my case I always return JSON and in this particular case the response is "{}".&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If I return null for responseProperties then the REST Services directory works.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;If I return "application/json" for Content-Type then the REST Services directory works.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;If I return "application/json; charset=UTF-8" for Content-Type then the REST Services directory fails.&amp;nbsp; This is what the code was doing.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I think that returning charset is valid, should work, and (to the best of my knowledge) used to work in version 10.&amp;nbsp; That said, it is probably redundant since JSON is always UTF-8.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 08 Feb 2013 19:34:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/arcgis-rest-services-directory-using-an-soe/m-p/243825#M9405</guid>
      <dc:creator>RichardWatson</dc:creator>
      <dc:date>2013-02-08T19:34:35Z</dc:date>
    </item>
  </channel>
</rss>

