Select to view content in your preferred language

Geoprocessing service Not accepting Post parameters properly

1182
5
03-03-2022 09:05 PM
pragati224
Occasional Contributor

Hi Everyone,

 

I am facing a weird issue. I am accessing a geoprocessing service in my web application, which is built on a custom python script. The script has some user input parameters, which when running from web application is sending them as parameters.

 

I can verify parameters as correct by using Developer tools, but the geoprocessing service accepts all parameters except one and returns result on default value of the python script.

 

However, when I open the geoprocessing rest service exceute task as a stand alone on browser, use same parameters as shown in Dev tools and run it; it creates proper result.

 

Also, I am using ArcGIS JS 3.39, can I use Get method instead of Post method for execute command of geoprocessing service and tie it is parameter variables.

 

If it's required I can share the code references.

 

Regards

0 Kudos
5 Replies
Noah-Sager
Esri Regular Contributor

Hi @pragati224, a code snippet (or even better a reproducible test app that clearly demonstrates the issue) and URL to the GP service would help troubleshoot here. 

0 Kudos
AroopChakraborty1
Occasional Contributor

Hi Noah,

Sorry for late reply!

I am colleague of Pragati. I have shared some screenshots to clarify the workflow @Noah-Sager . I have attached a word file with the screenshots:

If you wish I can share the script on email to you.

Regards!

Aroop Chakraborty

 

0 Kudos
Noah-Sager
Esri Regular Contributor

Thank you @AroopChakraborty1. However, I can't do much troubleshooting with that you shared. A code snippet from the 3x app, (or even better a reproducible test app that clearly demonstrates the issue) and URL to the GP service would help troubleshoot here. 

0 Kudos
AroopChakraborty1
Occasional Contributor

Hi @Noah-Sager Actually while creating the document and carefully checking the input parameters passed in the application, I found the issue. Its resolved. The issue was wrong parameter name being passed. That's why it was taking in default values. A silly mistake!

Noah-Sager
Esri Regular Contributor

Ha, I know how that goes. Sounds good, glad it's resolved now.

0 Kudos