I am trying to send GPRecordset to my python script and I am not able to, The following code is where I create a GPRecordset parameter in my silverlight app and send it to python scriptSilverlight Code:
GPRecordSet gpRecordSet = new GPRecordSet("RecordSetData");
foreach (Graphic graphic in myGraphicsLayer)
{
gpRecordSet.FeatureSet.Features.Add(graphic);
}
Geoprocessor geoprocessorTask = new Geoprocessor(myServiceURL);
geoprocessorTask.UpdateDelay = 5000;
geoprocessorTask.Failed += geoprocessorTask_Failed;
geoprocessorTask.JobCompleted += geoprocessorTask_JobCompleted;
List<GPParameter> gpParameters = new List<GPParameter>();
gpParameters.Add(new GPString("XField", "LON"));
gpParameters.Add(new GPString("YField", "LAT"));
gpParameters.Add(gpRecordSet);
geoprocessorTask.SubmitJobAsync(gpParameters);
The geoprocessorTask_Failed event is raised and the error I get is
{ESRI.ArcGIS.Client.Tasks.ServiceException: Unable to complete operation.}
[ESRI.ArcGIS.Client.Tasks.ServiceException]: {ESRI.ArcGIS.Client.Tasks.ServiceException: Unable to complete operation.}
Data: {System.Collections.ListDictionaryInternal}
InnerException: null
Message: "Unable to complete operation."
StackTrace: null
Python Script (I want to use the MakeXYEventLayer when this works) please see the attached image that shows the script parameters
arcpy.AddMessage("Script version 1")
XField = arcpy.GetParameterAsText(0)
YField = arcpy.GetParameterAsText(1)
RecordSetData = arcpy.GetParameterAsText(2)
arcpy.AddMessage("Finished")
I ran the app and checked with the fiddler see Fiddler.png attached image and I think it shows that input GPRecordSet data sent is empty Can anyone please help me?