Proxy Configuration Samples (proxies.xml)
In the proxies.xml file located at the conf directory you can configure service proxies and regular proxies.
General form (excluding namespace declarations) of the proxies.xml confguration file:
<spring:beans ...> <router> <serviceProxy >* <soapProxy >* <proxy >* </router> </spring:beans>
<spring:beans ...> <router> <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" /> </router> </spring:beans>
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.
<spring:beans ...> <router> <soapProxy port="80" wsdl="http://www.thomas-bayer.com/axis2/services/BLZService?wsdl" > <validator /> </soapProxy> </router> </spring:beans>
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.
On this page so far, XML namespace declarations have been ignored, but they are necessary for the Spring framework to properly do its job. Simply replace
<spring:beans xmlns="http://membrane-soa.org/proxies/1/" xmlns:spring="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd http://membrane-soa.org/proxies/1/ http://membrane-soa.org/schemas/proxies-1.xsd">
After the replacement, Membrane Service Proxy will properly start.