Skip to main content

This question is very similar to "ArcGIS Server Feature Service Reader Token Authentication Issues" found here: https://knowledge.safe.com/questions/29547/arcgis-server-feature-service-reader-token-authent.html. I'm trying to automate feature extraction from a secured ArcGIS Server feature service. I have a username and password, but when I try only using those credentials in the reader, it tells me I need a token. I can generate a token manually through the REST service page using my credentials, and it works in the FME job I have, but I'm not sure how to automate the process now. I'm using the token workspace provided by @todd_davis in the thread referenced above, and the token is getting generated correctly since I can view it in the inspector, plug it into the other workspace I'm trying to automate, and it runs fine. The problem is, I can't figure out how to pass it to a feature reader or other FME workspace that will authenticate and allow the workspace to access the feature service I'm working with other than doing it manually. Any suggestions would be helpful!

You can pass the token in the featureReader:

If you want to use a workspaceRunner then you have to create a published parameter.


You can pass the token in the featureReader:

If you want to use a workspaceRunner then you have to create a published parameter.

I did pass the token attribute into the feature reader, but when I hit OK I got a second pop-up (shown below) asking me to again input the token itself. I figured that meant that the token attribute wasn't getting read correctly for some reason, and that I would have to manually input the token every time I ran the workspace. I input the token into that prompt and ran the workspace, and it worked great. And every time I've run it since, it does generate a new token and pass it to the feature reader. Not sure why I had to put in the token the first time, but it seems to be working now.


Reply