Skip to content

Rewrite (HTTP) Write Response

When a webservice creates or updates data, it typically replies with the record it just stored. That record carries the values the service allocated, such as the id of a new customer or the reference of a new order. Response rewriting writes those values back into the IMan dataset, where the rest of the integration can use them.

Without it, the writer reads the response for its status code and then discards it, and any number the service generated is lost.

The XML Writer offers the same three modes under the same setting, with XPath in place of JPath.

You set it with Rewrite Response Transaction on the JSON Writer's Setup tab, which offers three modes:

  • Sequential Rewrite Write Response — the response is textual and in the same order as the data was written. The writer parses it in order and writes it back in order.
  • Keyed Rewrite Write Response — as sequential, but with the extra configuration needed where the response is not in the order it was written.
  • Binary Data Response — the response is a binary format such as a shipping label or a PDF report. The writer writes it onto the dataset as binary, for a later transform to use, for example as an email attachment.

The drop-down appears only for an http(s) target

There is no response to rewrite from a file. See the warning on the writer's page. If you configure a rewrite and then change the Target to a file, the writer keeps the setting, and no control on screen shows it.