GPRecordSet error

1572
3
Jump to solution
03-10-2011 09:42 AM
IgressT
New Contributor II
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 script

Silverlight 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?
0 Kudos
1 Solution

Accepted Solutions
by Anonymous User
Not applicable
Original User: doc21

I am able to see that I am sending data to the GP task , the fiddler now shows the data I am sending see attached image however the GP task fails giving me the same error message

{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

View solution in original post

0 Kudos
3 Replies
by Anonymous User
Not applicable
Original User: doc21

I am able to see that I am sending data to the GP task , the fiddler now shows the data I am sending see attached image however the GP task fails giving me the same error message

{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
0 Kudos
IgressT
New Contributor II
No luck :confused:

Was anyone successful in creating a GPRecordSet in the silverlight app ( the recordset should contain multiple records with X and Y fields) and send it to GP task to create a XYEvent layer

Thanks
0 Kudos
by Anonymous User
Not applicable
Original User: doc21

No luck :confused:

Was anyone successful in creating a GPRecordSet in the silverlight app ( the recordset should contain multiple records with X and Y fields) and send it to GP task to create a XYEvent layer

Thanks


I answering my own question in case some one is interested, I am sending GPFeatureRecordSetLayer instead of GPRecordset from my silverlight app and it solved the problem
0 Kudos