Yeah I just created a batch program with one alpha parameter (the request)
and on the task suffix I updated a variable with the alpha I want to return as a response.
Then enter to the program properties with Ctrl P and set that variable as Return value.
I asume you can do more complex request/responses by using Blob instead of just Alpha.
Then you will have to create your own xsd for the request/response structures, build xmls using those and save them as Blob variables.
I never tried it on xpa, only with xpi and it's much easier to work with webservices and xmls
(Excuse my English)