Create a wrapper service that the partner invokes. Partners should normally never invoke wm.tn:receive directly.
The wrapper service can do some housekeeping if needed and pass the doc to TN for processing. The processing can then place a var in the pipeline that the wrapper can pick up and send in the response.
There are caveats to keep in mind:
This approach is somewhat of a hack in that the wrapper service will rely on an undeclared pipeline variable being present. This makes maintenance harder (“where the heck does the “fooDoc” come from?”).
The service which will read the xml/flat file and is invoked by TN processing rule must be invoked synchronously. If it is invoked async or as a service execution task then the wrapper service will never see the resulting document.
The reprocessing/resubmit facilities of TN will be useless in this case.