Issue with web service called within a transform step

When I call a web service consumer directly within my flow, the input document will be supplemented with a response structure which contains the results of the web service call.

I noticed that when calling the same web service consumer when it is embedded in a transform step, the input document does not get updated with the response structure; if I debug, I can see these structures being created and populated in the web service generated flow code, but the return structure never gets passed out of the transform step.

Can somebody explain why that might be? Could it be something to do with variables being passed by value to the transform step (are they?), or something else?

Transformers have their own pipeline. If you want a variable to be manipulated by the transformer you must explicitly pass it in and out of the invoked service–which is a good practice in any case.