AnsweredAssumed Answered

How to get GML from WPS

Question asked by dusan.cibulka on Sep 8, 2016

Hello,

I have problem with WPS published with AGS 10.4.1.
I would like to return GML from WPS as output parameter.

 

Simple example, it works well:
featureClassFromGML = arcpy.GetParameter(0)
arcpy.SetParameter(1, featureClassFromGML)

 

Return GML:
....
<wps:ProcessOutputs>
<wps:Output>
<ows:Identifier>TransformedData</ows:Identifier>
<ows:Title>TransformedData</ows:Title>
<wps:Reference mimeType="text/xml" href="http://<servername>/arcgis/rest/directories/arcgisjobs/test_wps_gpserver/j63c4ddcb8a44445ba563cef2d1511ef3/scratch/_ags_j63c4ddcb8a44445ba563cef2d1511ef3TransformedData.xml"/>
</wps:Output>
</wps:ProcessOutputs>
</wps:ExecuteResponse>

 

This is OK.

 

But if I would like to do some processing of input features:

featureClassFromGML = arcpy.GetParameter(0)
arcpy.CopyFeatures_management(featureClassFromGML, 'in_memory\\fc_in')
arcpy.SetParameter(1, 'in_memory\\fc_in')

 

WPS return exception:
<ows:ExceptionReport xmlns:ows="http://www.opengis.net/ows" version="1.1.0" language="en"/>

 

REST service status is esriJobSucceeded without TransformedData.


Or:
featureClassFromGML = arcpy.GetParameter(0)
featureSet = arcpy.FeatureSet(featureClassFromGML)
arcpy.SetParameter(1, featureSet)

 

WPS return exception:
<ows:ExceptionReport xmlns:ows="http://www.opengis.net/ows" version="1.1.0" language="en"/>

 

REST service status is esriJobSucceeded with TransformedData in JSON format.


Type of input and output parameters are Feature Set (GPFeatureRecordSetLayer).
Execute request is in attachment.
Do you know how to setup an output parameter to returned GML document?

Attachments

Outcomes