Problem with clip and ship GP service

Discussion created by jdobbsr on Jul 16, 2010
Latest reply on Aug 18, 2010 by doncav
I copied the clip and ship application from the code gallery so I could teach myself how it works. I have the GP process working fine from ArcGIS Server and I can run the job from there. The problem is with the code below when I try to submiat a job to the GP service from a web page.

var features= [];
        var layerBuildingsAtts = { "LayerName":"Buildings","DownLoad":"Yes" };
     var layerBuildingsGraphic = new esri.Graphic();
  var layersToDownload = new esri.tasks.FeatureSet();
  layersToDownload.features = features;
var params = { "Area_To_Download":clipFeatureSet,
        gp.submitJob(params, completeCallback, statusCallback);

When I try to run it, I always get this message:
{"error":{"code":500,"message":"Error submitting task 'ExtractAndEmailPortlandData'. Please check your parameters.","details":["Invalid param value: {}","Unable to create the GP Value for parameter 'Layers_to_Download'"]}}

When I do the console debug in firebug, I can see the object loaded just fine. This code came straight from the Code Gallery so I am baffled that it doesn't work.

Can anyone please tell me what I am doing wrong?