Solved

HTTP Caller POST request error

  • 11 March 2019
  • 6 replies
  • 30 views

Badge

Im trying to work with the Cityworks API to create service requests using FME desktop.

Im using the http caller to create a service request.

so far I have made progress to create a service request and extract the requestId .

My next challenge is to upload an attachment to the service request and this is where Im stuck,

The workspace looks like this ,Im trying to upload an image 0684Q00000ArBaqQAF.png

I tried to put in the parameters that worked in postman as much as I could

0684Q00000ArBxzQAF.png

The sample call from postman and its response are attached here.0684Q00000ArBuIQAV.png

The error message I keep on getting is this


HTTPCaller(HTTPFactory): HTTP/FTP Transfer: Failed to open file '20191009243' for resource upload

I have tried changing the parameters from other posts in the blog ,but in vain

 

icon

Best answer by bhanu_v 11 March 2019, 22:26

View original

6 replies

Badge

fme_basename doesn't contain a file extension. So may be the name of your file for upload is incomplete? The response body in your Postman screenshot says the file 20191009243 .GIF was uploaded.

Badge

fme_basename doesn't contain a file extension. So may be the name of your file for upload is incomplete? The response body in your Postman screenshot says the file 20191009243 .GIF was uploaded.

Thank you for your reply @friesewoudloper

I have changed the fme_basename to have the filename extension .GIF

but I still get the same error HTTP/FTP failed to open file 20191009243.GIF

Badge

Thank you for your reply @friesewoudloper

I have changed the fme_basename to have the filename extension .GIF

but I still get the same error HTTP/FTP failed to open file 20191009243.GIF

Could you please share with us the screenshot from Postman containing the *request* body? It will make it easier to help you. The screenshot you uploaded only contains the response body.

Badge

I made changes to the workspace

deleted the content-type in the header and chose the actula file from the folder instead of fme_basename and was able to amake succesfull call

however,how do i get the file to be uploaded from the workspace reader than pointing to the actual file

Badge

Could you please share with us the screenshot from Postman containing the *request* body? It will make it easier to help you. The screenshot you uploaded only contains the response body.

I made changes to the workspace

deleted the content-type in the header and chose the actual file from the folder instead of fme_basename and was able to make a successful call

however,how do I get the file to be uploaded from the workspace reader than pointing to the actual file

Badge

With help from @nathanatsafe

I figured out the answer to make a successful POST call

using source dataset parameter for value field in the multipart upload section solved the problem

 

Reply