<?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 How to get GML from WPS in Geoprocessing Questions</title>
    <link>https://community.esri.com/t5/geoprocessing-questions/how-to-get-gml-from-wps/m-p/544189#M18094</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I have problem with WPS published with AGS 10.4.1.&lt;BR /&gt;I would like to return GML from WPS as output parameter.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Simple example, it works well:&lt;/STRONG&gt;&lt;BR /&gt;&lt;EM&gt;featureClassFromGML = arcpy.GetParameter(0)&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;arcpy.SetParameter(1, featureClassFromGML)&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Return GML:&lt;/STRONG&gt;&lt;BR /&gt;....&lt;BR /&gt;&lt;EM&gt;&amp;lt;wps:ProcessOutputs&amp;gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&amp;lt;wps:Output&amp;gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&amp;lt;ows:Identifier&amp;gt;TransformedData&amp;lt;/ows:Identifier&amp;gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&amp;lt;ows:Title&amp;gt;TransformedData&amp;lt;/ows:Title&amp;gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&lt;SPAN&gt;&amp;lt;wps:Reference mimeType="text/xml" href="&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=http%3A%2F%2F" rel="nofollow" target="_blank"&gt;http://&lt;/A&gt;&lt;SPAN&gt;&amp;lt;servername&amp;gt;/arcgis/rest/directories/arcgisjobs/test_wps_gpserver/j63c4ddcb8a44445ba563cef2d1511ef3/scratch/_ags_j63c4ddcb8a44445ba563cef2d1511ef3TransformedData.xml"/&amp;gt;&lt;/SPAN&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&amp;lt;/wps:Output&amp;gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&amp;lt;/wps:ProcessOutputs&amp;gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&amp;lt;/wps:ExecuteResponse&amp;gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is OK.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;But if I would like to do some processing of input features:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;featureClassFromGML = arcpy.GetParameter(0)&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;arcpy.CopyFeatures_management(featureClassFromGML, 'in_memory\\fc_in')&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;arcpy.SetParameter(1, 'in_memory\\fc_in')&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;WPS return&amp;nbsp;exception&lt;EM&gt;:&lt;/EM&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;EM&gt;&lt;SPAN&gt;&amp;lt;ows:ExceptionReport xmlns:ows="&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=http%3A%2F%2Fwww.opengis.net%2Fows" rel="nofollow" target="_blank"&gt;http://www.opengis.net/ows&lt;/A&gt;&lt;SPAN&gt;" version="1.1.0" language="en"/&amp;gt;&lt;/SPAN&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REST service status is esriJobSucceeded without TransformedData.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;STRONG&gt;Or:&lt;/STRONG&gt;&lt;BR /&gt;&lt;EM&gt;featureClassFromGML = arcpy.GetParameter(0)&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;featureSet = arcpy.FeatureSet(featureClassFromGML)&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;arcpy.SetParameter(1, featureSet)&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;WPS return&amp;nbsp;exception:&lt;/STRONG&gt;&lt;BR /&gt;&lt;EM&gt;&lt;SPAN&gt;&amp;lt;ows:ExceptionReport xmlns:ows="&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=http%3A%2F%2Fwww.opengis.net%2Fows" rel="nofollow" target="_blank"&gt;http://www.opengis.net/ows&lt;/A&gt;&lt;SPAN&gt;" version="1.1.0" language="en"/&amp;gt;&lt;/SPAN&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REST service status is esriJobSucceeded with TransformedData in JSON format.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Type of input and output parameters are Feature Set (GPFeatureRecordSetLayer).&lt;BR /&gt;Execute request is in attachment.&lt;BR /&gt;Do you know how to setup&amp;nbsp;an output parameter to returned GML document?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 08 Sep 2016 10:30:12 GMT</pubDate>
    <dc:creator>DušanCibulka</dc:creator>
    <dc:date>2016-09-08T10:30:12Z</dc:date>
    <item>
      <title>How to get GML from WPS</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/how-to-get-gml-from-wps/m-p/544189#M18094</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I have problem with WPS published with AGS 10.4.1.&lt;BR /&gt;I would like to return GML from WPS as output parameter.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Simple example, it works well:&lt;/STRONG&gt;&lt;BR /&gt;&lt;EM&gt;featureClassFromGML = arcpy.GetParameter(0)&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;arcpy.SetParameter(1, featureClassFromGML)&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Return GML:&lt;/STRONG&gt;&lt;BR /&gt;....&lt;BR /&gt;&lt;EM&gt;&amp;lt;wps:ProcessOutputs&amp;gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&amp;lt;wps:Output&amp;gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&amp;lt;ows:Identifier&amp;gt;TransformedData&amp;lt;/ows:Identifier&amp;gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&amp;lt;ows:Title&amp;gt;TransformedData&amp;lt;/ows:Title&amp;gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&lt;SPAN&gt;&amp;lt;wps:Reference mimeType="text/xml" href="&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=http%3A%2F%2F" rel="nofollow" target="_blank"&gt;http://&lt;/A&gt;&lt;SPAN&gt;&amp;lt;servername&amp;gt;/arcgis/rest/directories/arcgisjobs/test_wps_gpserver/j63c4ddcb8a44445ba563cef2d1511ef3/scratch/_ags_j63c4ddcb8a44445ba563cef2d1511ef3TransformedData.xml"/&amp;gt;&lt;/SPAN&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&amp;lt;/wps:Output&amp;gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&amp;lt;/wps:ProcessOutputs&amp;gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&amp;lt;/wps:ExecuteResponse&amp;gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is OK.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;But if I would like to do some processing of input features:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;featureClassFromGML = arcpy.GetParameter(0)&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;arcpy.CopyFeatures_management(featureClassFromGML, 'in_memory\\fc_in')&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;arcpy.SetParameter(1, 'in_memory\\fc_in')&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;WPS return&amp;nbsp;exception&lt;EM&gt;:&lt;/EM&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;EM&gt;&lt;SPAN&gt;&amp;lt;ows:ExceptionReport xmlns:ows="&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=http%3A%2F%2Fwww.opengis.net%2Fows" rel="nofollow" target="_blank"&gt;http://www.opengis.net/ows&lt;/A&gt;&lt;SPAN&gt;" version="1.1.0" language="en"/&amp;gt;&lt;/SPAN&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REST service status is esriJobSucceeded without TransformedData.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;STRONG&gt;Or:&lt;/STRONG&gt;&lt;BR /&gt;&lt;EM&gt;featureClassFromGML = arcpy.GetParameter(0)&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;featureSet = arcpy.FeatureSet(featureClassFromGML)&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;arcpy.SetParameter(1, featureSet)&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;WPS return&amp;nbsp;exception:&lt;/STRONG&gt;&lt;BR /&gt;&lt;EM&gt;&lt;SPAN&gt;&amp;lt;ows:ExceptionReport xmlns:ows="&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=http%3A%2F%2Fwww.opengis.net%2Fows" rel="nofollow" target="_blank"&gt;http://www.opengis.net/ows&lt;/A&gt;&lt;SPAN&gt;" version="1.1.0" language="en"/&amp;gt;&lt;/SPAN&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REST service status is esriJobSucceeded with TransformedData in JSON format.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Type of input and output parameters are Feature Set (GPFeatureRecordSetLayer).&lt;BR /&gt;Execute request is in attachment.&lt;BR /&gt;Do you know how to setup&amp;nbsp;an output parameter to returned GML document?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Sep 2016 10:30:12 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/how-to-get-gml-from-wps/m-p/544189#M18094</guid>
      <dc:creator>DušanCibulka</dc:creator>
      <dc:date>2016-09-08T10:30:12Z</dc:date>
    </item>
  </channel>
</rss>

