Skip to main content

I have a workspace that creates an ESRIJSON file of features. The problem is I have 90 to upload but any more than 2 features causes a http 414 uri too long return from the destination server with a POST request.

Any ideas on how to send 1 feature at a time? I tried WorkspaceRunner which processes one at a time but I need to write the json file from the incoming feature each time and I can't figure that out as yet.

 

 

If you use a FeatureWriter and a FeatureReader you can easily write a json for each feature and read them back in for further processing. If you add a TempPathnameCreator you don't have to clean up files.

WriteRead(2019_1_2).fmwt


Based on the error message it sounds like the JSON is sent as part of the URL rather than in the message body.

Can you please post a screenshot of how the HTTPCaller has been configured?


Based on the error message it sounds like the JSON is sent as part of the URL rather than in the message body.

Can you please post a screenshot of how the HTTPCaller has been configured?

I second this. You should put the json in the body, not in the URI.


Based on the error message it sounds like the JSON is sent as part of the URL rather than in the message body.

Can you please post a screenshot of how the HTTPCaller has been configured?

Configuration


Based on the error message it sounds like the JSON is sent as part of the URL rather than in the message body.

Can you please post a screenshot of how the HTTPCaller has been configured?

Ok, so this works as captured in Fiddler but I don't know how to get that in the upload body for httpcaller


You were very close, you just need to remove the features from the query string (=URI) and put the contents of the featureSet attribute in the "Upload body":

 

You'll probably also want to set the content type to "application/json".


You were very close, you just need to remove the features from the query string (=URI) and put the contents of the featureSet attribute in the "Upload body":

 

You'll probably also want to set the content type to "application/json".

I tried that but leaving the features in the params but moving the featureSet into Upload Body with application/json results in {"error":{"code":500,"message":"Unable to complete operation.","details"::"Parser error: Some parameters could not be recognized."]}}

I suspect that the features param name as well as payload needs to be included in the upload body but can't seem to find the correct json example structure for this.


I tried that but leaving the features in the params but moving the featureSet into Upload Body with application/json results in {"error":{"code":500,"message":"Unable to complete operation.","details":Â"Parser error: Some parameters could not be recognized."]}}

I suspect that the features param name as well as payload needs to be included in the upload body but can't seem to find the correct json example structure for this.

For me it works with content-type set to application/x-www-form-urlencoded.

0684Q00000ArNBJQA3.png

I create "body" with an AttributeCreator using:

f=pjson&features=@Value(Features)&token=@Value(Token)

I create "Features" by Writing to Esri-JSON, reading back in as JSON (JavaScript Object Notation), Expose RecordSet, Extract jsona"features"].

0684Q00000ArNBEQA3.png

But I admit, compared to a lot the default writers, it can be tough to get writing to arcgis server via the api working.

addFeatures2019_1_2.fmwt


Reply