5.1 Proxy Configuration (proxies.xml)
In the proxies.xml file located at the conf directory you can configure service proxies and regular proxies.
General form of the proxies.xml confguration file:
<proxies> <serviceProxy >* <soapProxy >* <proxy >* </proxies>
Configuration Example
The following example shows a proxies.xml file. It contains a serviceProxy rule and a proxy rule.
<proxies> <serviceProxy port="80"> <basicAuthentication> <user name="alice" password="membrane" /> </basicAuthentication> <target host="www.thomas-bayer.com" port="80" /> </serviceProxy> <proxy name="HTTP Proxy" port="3128" /> </proxies>
Service proxies are used as reverse proxies while the proxy element configures a regular HTTP proxy. The example shows the usage of the basicAuthentication interceptor to secure the page www.thomas-bayer.com with HTTP Basic Authentication. With interceptors you can manipulate how the messages are processed. Take a look at the available interceptors here. Documentation of all the configuration elements that can be used in the proxies.xml can be found in the configuration reference.
Configuration Example 2
The following example shows a proxies.xml file. It contains a soapProxy rule. soapProxies can be used for simple proxying of SOAP web services.
<proxies> <soapProxy port="80" wsdl="http://www.thomas-bayer.com/axis2/services/BLZService?wsdl" > <validator /> </soapProxy> </proxies>
Hot Deployment
Changes to proxies.xml will be picked up almost instantly if Membrane is running when proxies.xml has been saved. Any dynamic configuration changes made (for example, via the adminConsole) will be forgotten.