1

I have a calling system that I cannot easily change. It sends an http request (actually SOAP) with two elements in the wrong order.

This is easy to fix with an XSL transform.

I'd like to implement a proxy web server that transforms the request via XSL. Apache or nginx for the web server, ideally, but I can look at others.

Suggestions?

0

Answering my own question as I worked something out.

I used mod_ext_filter in Apache, and SaxonHE for the actual transformation. This is not a high performance solution (it starts the processor for every request), but it suffices for now.

The key lines for the config are:

ExtFilterDefine soap-fix mode=input cmd="/usr/bin/java -cp /saxon-install-location/saxon-he-10.3.jar net.sf.saxon.Transform -xsl:/whereever-you-want/fix.xsl -s:- "
SetInputFilter soap-fix

and then standard proxy stuff to forward the modified request on.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.