Skip to content

Binary Data Response

Where a webservice replies with a binary format such as an image or a PDF, the writer can write the response onto the IMan dataset as binary.

The main use is shipping APIs. A POST creates the shipment and the response is the shipping label. Once it is on the dataset, you can email the label, save it to disk or pass it to any transform that handles binary data.

The JSON Writer works the same way. Neither writer reads inside a binary response.

Because the writer does not read inside the response, it cannot place it by path as the sequential and keyed modes do. Instead it writes it into one field, by name, and all three of these conditions must be met:

  • a field named SYS.RESPONSE must exist;
  • its Type must be Binary;
  • it must be on the top-most transaction type.

There is nothing else to configure. Select Binary Data under Rewrite Response Transaction. The return paths do not appear under it, because there are none to set.

If any condition is not met, IMan reports nothing

The writer checks for the field once, on the first transaction. If it is missing or is not of type Binary, the writer writes nothing. There is no error, no warning and no audit entry. The request succeeds, the writer discards the response, and the only sign is an empty field downstream.

So a misspelled name or a field left as Text looks exactly like a service that returned nothing. Check the field before you suspect the service.