Question

FME server 202 header datastreaming

  • 22 November 2017
  • 3 replies
  • 0 views

Hi all,

For a SOAP interaction I need to reply in my FME server datastreaming a 202 header.

An external company is sending me data via a datastreaming services, but they waiting for a 202 reply. In the workspace I save the data and process it, but I need to reply with a 202 for the external company to know I received the documents. The external company sends a post request to our FMEREST. The reponse page can be blank.

My question is, how can I send out a 202 header with server (streaming)services?


3 replies

Badge +6

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?
Badge +6
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).

 

Reply