Hi @meijer, I can dig into it more if needed, but I don't believe it's possible to return a 202 header with the Data Streaming service in FME Server. That service is meant to always return a data file of some sort, so would normally only ever return a 200 code on success.
If using a different service in FME Server is an option for you, one thing you could do instead is have your SOAP service call the following FME Server REST API URL instead: /transformations/submit/< repository >/< workspace > (take a look at <YourServerHostName>/fmerest/apidoc/v3/#!/transformations/submit_post_22 for details). It will run the job asynchronously and will return a 202 back to the calling application.
Hi @meijer, I can dig into it more if needed, but I don't believe it's possible to return a 202 header with the Data Streaming service in FME Server. That service is meant to always return a data file of some sort, so would normally only ever return a 200 code on success.
If using a different service in FME Server is an option for you, one thing you could do instead is have your SOAP service call the following FME Server REST API URL instead: /transformations/submit/< repository >/< workspace > (take a look at <YourServerHostName>/fmerest/apidoc/v3/#!/transformations/submit_post_22 for details). It will run the job asynchronously and will return a 202 back to the calling application.
Thank you Laura, for your reply. Smart to replay with the standard 202 header in the async rest. There is only one problem. The external company SOAP does not send the right body for a POST request. So I need to reply a 202 header when we get a GET request. I was wondering if there is a tutorial to create a new service?
Thank you Laura, for your reply. Smart to replay with the standard 202 header in the async rest. There is only one problem. The external company SOAP does not send the right body for a POST request. So I need to reply a 202 header when we get a GET request. I was wondering if there is a tutorial to create a new service?
Hmm that does get a bit tricky then. Within FME Server, the only call that will allow for running a workspace and then returning a 202 response is that REST API call I mentioned before, but as you noted, it only accepts POST requests.
I ran a quick test by submitting an async request to the Job Submitter service directly and that one works with a GET, but comes back with a 200 response instead of a 202.
We don't have any tutorials on creating a new service. This is the closest I could find:
https://knowledge.safe.com/articles/724/creating-rest-web-services-tutorial-index.html (but I don't think that's going to help much for your needs).