<?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 Accessing published GPServer in AddToolbox in Geoprocessing Questions</title>
    <link>https://community.esri.com/t5/geoprocessing-questions/accessing-published-gpserver-in-addtoolbox/m-p/660187#M21973</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a GPServer published as &lt;A href="http://gis.til.csu.org/arcgis/rest/services/Geoprocessing/SpatialETLTool_July2014_GISPRD/GPServer/Spatial%20ETL%20Tool" title="http://gis.til.csu.org/arcgis/rest/services/Geoprocessing/SpatialETLTool_July2014_GISPRD/GPServer/Spatial%20ETL%20Tool"&gt;http://&amp;lt;server&amp;gt;/arcgis/rest/services/Geoprocessing/SpatialETLTool_July2014_GISPRD/GPServer/Spatial%20ETL%20Tool&lt;/A&gt;‌&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In trying to execute the GP in arcobjects, I keep getting a COM error (with no GetMessages). I am trying to track down where the problem lies but I am not clear on what is the toolbox and the tool name. Here's a sample of what I got using the above GPServer:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="c#" __jive_macro_name="code" class="jive_macro_code _jivemacro_uid_14066533698418462 jive_text_macro" jivemacro_uid="_14066533698418462"&gt;
&lt;P&gt;try&lt;/P&gt;
&lt;P&gt;IGeoProcessor2 gp = new GeoProcessorClass();&lt;/P&gt;
&lt;P style="text-align: left;"&gt;gp.OverwriteOutput = true;&lt;/P&gt;
&lt;P style="text-align: left;"&gt;object sev = null;&lt;/P&gt;
&lt;P style="text-align: left;"&gt;&lt;SPAN&gt;gp.AddToolbox(@"&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://" rel="nofollow" target="_blank"&gt;http://&lt;/A&gt;&lt;SPAN&gt;&amp;lt;server&amp;gt;/arcgis/services;Geoprocessing/SpatialETLTool_July2014_GISPRD");&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="text-align: left;"&gt;...&lt;/P&gt;
&lt;P style="text-align: left;"&gt;IGeoProcessorResult2 results = (IGeoProcessorResult2)gp.Execute("Spatial ETL Tool", parameters, null);&lt;/P&gt;
&lt;P style="text-align: left;"&gt;&lt;/P&gt;
&lt;P&gt;catch&lt;/P&gt;
&lt;P&gt;string errorMsgs = gp.GetMessages(ref sev);&lt;/P&gt;
&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is the toolbox and/or tool name wrong?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 29 Jul 2014 17:04:45 GMT</pubDate>
    <dc:creator>SteveClark</dc:creator>
    <dc:date>2014-07-29T17:04:45Z</dc:date>
    <item>
      <title>Accessing published GPServer in AddToolbox</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/accessing-published-gpserver-in-addtoolbox/m-p/660187#M21973</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a GPServer published as &lt;A href="http://gis.til.csu.org/arcgis/rest/services/Geoprocessing/SpatialETLTool_July2014_GISPRD/GPServer/Spatial%20ETL%20Tool" title="http://gis.til.csu.org/arcgis/rest/services/Geoprocessing/SpatialETLTool_July2014_GISPRD/GPServer/Spatial%20ETL%20Tool"&gt;http://&amp;lt;server&amp;gt;/arcgis/rest/services/Geoprocessing/SpatialETLTool_July2014_GISPRD/GPServer/Spatial%20ETL%20Tool&lt;/A&gt;‌&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In trying to execute the GP in arcobjects, I keep getting a COM error (with no GetMessages). I am trying to track down where the problem lies but I am not clear on what is the toolbox and the tool name. Here's a sample of what I got using the above GPServer:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="c#" __jive_macro_name="code" class="jive_macro_code _jivemacro_uid_14066533698418462 jive_text_macro" jivemacro_uid="_14066533698418462"&gt;
&lt;P&gt;try&lt;/P&gt;
&lt;P&gt;IGeoProcessor2 gp = new GeoProcessorClass();&lt;/P&gt;
&lt;P style="text-align: left;"&gt;gp.OverwriteOutput = true;&lt;/P&gt;
&lt;P style="text-align: left;"&gt;object sev = null;&lt;/P&gt;
&lt;P style="text-align: left;"&gt;&lt;SPAN&gt;gp.AddToolbox(@"&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://" rel="nofollow" target="_blank"&gt;http://&lt;/A&gt;&lt;SPAN&gt;&amp;lt;server&amp;gt;/arcgis/services;Geoprocessing/SpatialETLTool_July2014_GISPRD");&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="text-align: left;"&gt;...&lt;/P&gt;
&lt;P style="text-align: left;"&gt;IGeoProcessorResult2 results = (IGeoProcessorResult2)gp.Execute("Spatial ETL Tool", parameters, null);&lt;/P&gt;
&lt;P style="text-align: left;"&gt;&lt;/P&gt;
&lt;P&gt;catch&lt;/P&gt;
&lt;P&gt;string errorMsgs = gp.GetMessages(ref sev);&lt;/P&gt;
&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is the toolbox and/or tool name wrong?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 Jul 2014 17:04:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/accessing-published-gpserver-in-addtoolbox/m-p/660187#M21973</guid>
      <dc:creator>SteveClark</dc:creator>
      <dc:date>2014-07-29T17:04:45Z</dc:date>
    </item>
    <item>
      <title>Re: Accessing published GPServer in AddToolbox</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/accessing-published-gpserver-in-addtoolbox/m-p/660188#M21974</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Did figure it out the hard way. I did not publish the GP service so when I looked at it in Catalog and in the tool's properties, I found the tool name to be SpatialETL22222. Go figure, I don't know how I would have gotten that information if all I had was the rest endpoint.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 Jul 2014 18:40:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/accessing-published-gpserver-in-addtoolbox/m-p/660188#M21974</guid>
      <dc:creator>SteveClark</dc:creator>
      <dc:date>2014-07-29T18:40:24Z</dc:date>
    </item>
  </channel>
</rss>

