Go to new doc!

+49 228 5552576-0


info@predic8.com

Configuration Samples (proxies.xml)

In the proxies.xml file located at the conf directory you can configure APIs and service proxies.

General form (excluding namespace declarations) of the proxies.xml confguration file:

			<spring:beans ...>

				<router>

		   			<api >*
			
					<serviceProxy >*

					<soapProxy >*
			
					<proxy >*

				</router>
			
			</spring:beans>
		
Listing 1: proxies.xml Configuration (without XML namespace declarations, see below)

Configuration Example

The following example shows a proxies.xml file. It contains a serviceProxy rule and a proxy rule.

			<spring:beans ...>

				<router>

					<api port="80">
						<basicAuthentication>
							<user name="alice" password="membrane" />
						</basicAuthentication>
						<target host="www.thomas-bayer.com" port="80" />
					</api>

					<proxy name="HTTP Proxy" port="3128" />

				</router>
			
			</spring:beans>
	   
Listing 23: Example proxies.xml file (without XML namespace declarations)

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>
	   
Listing 23: Example proxies.xml file (without XML namespace declarations, see below)

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.

Namespaces

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>
			
by
				<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.

When editing proxies.xml with a good XML editor, you will also get syntax completion and documentation tool tips covering almost the complete configuration reference.