Geoprocessing problem

1062
18
11-01-2010 04:35 AM
PaulHuppé
Occasional Contributor
Hi,

I have setup a test Python script which simply accepts 2 parameters and which returns an email to the user.  I have included the script in a Toolbox and have published the Toolbox.  If I run the Python script manually, it works.  If I run the tool using the REST interface, it works.  When I try to run it from inside my Silverlight application, it just hangs.  It does not even seem to make it to the server.  Following are some pieces of the code I am using. Can anyone spot the problem?

Thanks,
Paul

            string restServerURL = "http://myserver.name/ArcGIS/rest/services/";
            Geoprocessor geoprocessorTask = null;
            // Start timer for task
            _processingTimer = new System.Windows.Threading.DispatcherTimer();
            _processingTimer.Interval = new TimeSpan(0, 0, 0, 5, 0);
            _processingTimer.Tick += ProcessingTimer_Tick;
            _processingTimer.Start();
            geoprocessorTask = new Geoprocessor(restServerURL + "TestSendEmail/GPServer/SendEmail");
            geoprocessorTask.UpdateDelay = 5000;
            geoprocessorTask.JobCompleted += GeoprocessorTask_JobCompleted;
            List<GPParameter> parameters = new List<GPParameter>();
            // Pass the user's email to send them the zip file
            parameters.Add(new GPString("EmailTo", tbEmail.Text));
            // Pass the layer names to the Geoprocessing service
            parameters.Add(new GPString("DesiredLayers", _layerNames));
            geoprocessorTask.SubmitJobAsync(parameters);
0 Kudos
18 Replies
PaulHuppé
Occasional Contributor
Hi,

If this is the URL you are trying to use, then I believe it needs to be encoded.

the url i am using in the geoprocessing task is as follows:

http://geoserver1/ArcGIS/rest/services/YrGeoView_Population_tools/Model3/GPServer/Model 3a Traffic Zone Population Estimate



You should try

http://geoserver1/ArcGIS/rest/services/YrGeoView_Population_tools/Model3/GPServer/Model%203a%20Traff...


Paul
0 Kudos
morgandawe
New Contributor
Thank you for your response paul. I have updated the gp service with the new URL, and changed my parameter names to have underscores. my geo processing code looks like this:
    var params:Object = new Object();
    params = { 
     "Enter_a_Graphical_Boundary_or_a_Boundary_Feature_Class_": boundryFS,
     "Traffic_Zone_2001_POP2001": popFS,
     "York_DBO_York_Boundary_Land": landFS}; 
    gp.useAMF= false;
    gp.submitJob(params);


and my gp task looks like this in code:
 <esri:Geoprocessor id="gp" url="http://geoserver1/ArcGIS/rest/services/YrGeoView_Population_tools/Model3/GPServer/Model%203a%20Traffic%20Zone%20Population%20Estimate"
        fault="gp_faultHandler(event)" useAMF="false"
        jobComplete="gp_jobCompleteHandler(event)"
        executeComplete="modelServices_executeCompleteHandler(event)"/>


I will update this post with images of my service end point. I appreciate any feedback on this matter. Thanks

EDIT: I have attached some shots of my rest end point and parameters, in case they show any obvious issues:

http://imageshack.us/photo/my-images/687/endparam.png/

AND

http://imageshack.us/photo/my-images/3/endinputparam.png/

Sharing these images with imageShack, but they dont seam to show up in the IMG tag's.
I am still getting the stream error 2032. Thanks for looking at my issue.
0 Kudos
PaulHuppé
Occasional Contributor
Hi,

Is it now working for you with these changes?  If so, I am glad I could help.

Cheers,
Paul
0 Kudos
morgandawe
New Contributor
I am afraid it is still causing me grief, but i am grateful for your assistance.
0 Kudos
PaulHuppé
Occasional Contributor
You can try using Fiddler to see all the communication between the application and theservice. Sometimes that helps.
0 Kudos
morgandawe
New Contributor
Thanks for the tip paul, i havent tried fiddler, but it looks to be responding with the same kind of data firebug was. The response is as follows:

# Result Protocol Host URL Body Caching Content-Type Process Comments Custom
57 500 HTTP geoserver1 /ArcGIS/rest/services/YrGeoView_Population_tools/Model3/GPServer/Model%203a%20Traffic%20Zone%20Population%20Estimate/submitJob 3,037 private   text/html; charset=utf-8 firefox:6964

firebug shows the same thing. Do you have any suggestions on how to use fiddler effectively to help solve this issue? could this be a security issue on the server? The service is meant to create an output table (two actually, a file geodatabase and an access database). I can see the service is running in arcCatalog but i cant see any service output dir, or that the service has even run.
0 Kudos
PaulHuppé
Occasional Contributor
Fiddler will probably not show much more than Firebug.  Like you, it seems you are also new to all this geoprocessing stuff.  Does your model work fine if you try it directly in ArcGIS?
0 Kudos
morgandawe
New Contributor
The service does work when run from the dev machine through arcMap.
0 Kudos
DominiqueBroux
Esri Frequent Contributor
Which API are you using?

If it's JavaScript, you should post your question to this forum : http://forums.arcgis.com/forums/15-ArcGIS-API-for-JavaScript
0 Kudos