|
The Spring Framework clientContext.xml source code
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN 2.0//EN" "http://www.springframework.org/dtd/spring-beans-2.0.dtd">
<!--
- Application context for the remote OrderService client.
- Defines various OrderService proxies to be called by OrderServiceClient.
-->
<beans>
<!-- Resolves ${...} placeholders from client.properties -->
<bean id="propertyConfigurer" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
<property name="location">client.properties
</bean>
<!-- Proxy for the Hessian-exported OrderService -->
<!-- Hessian is a slim binary HTTP remoting protocol -->
<bean id="hessianProxy" class="org.springframework.remoting.caucho.HessianProxyFactoryBean">
<property name="serviceUrl">
<value>http://${serverName}:${httpPort}${contextPath}/remoting/OrderService-hessian
</property>
<property name="serviceInterface">
<value>org.springframework.samples.jpetstore.domain.logic.OrderService
</property>
</bean>
<!-- Proxy for the Burlap-exported OrderService -->
<!-- Burlap is a slim XML-based HTTP remoting protocol -->
<bean id="burlapProxy" class="org.springframework.remoting.caucho.BurlapProxyFactoryBean">
<property name="serviceUrl">
<value>http://${serverName}:${httpPort}${contextPath}/remoting/OrderService-burlap
</property>
<property name="serviceInterface">
<value>org.springframework.samples.jpetstore.domain.logic.OrderService
</property>
</bean>
<!-- Proxy for the HTTP-invoker-exported OrderService -->
<!-- Spring's HTTP invoker uses Java serialization via HTTP -->
<bean id="httpInvokerProxy" class="org.springframework.remoting.httpinvoker.HttpInvokerProxyFactoryBean">
<property name="serviceUrl">
<value>http://${serverName}:${httpPort}${contextPath}/remoting/OrderService-httpinvoker
</property>
<property name="serviceInterface">
<value>org.springframework.samples.jpetstore.domain.logic.OrderService
</property>
<!--
Comment the following in to use Apache Commons HttpClient instead of the JDK's
standard HttpURLConnection (as used by the default SimpleHttpInvokerRequestExecutor).
-->
<!--
<property name="httpInvokerRequestExecutor">
<bean class="org.springframework.remoting.httpinvoker.CommonsHttpInvokerRequestExecutor"/>
</property>
-->
</bean>
<!-- Proxy for the JAX-RPC/Axis-exported OrderService -->
<bean id="jaxRpcProxy" class="org.springframework.remoting.jaxrpc.JaxRpcPortProxyFactoryBean">
<property name="serviceFactoryClass">
<value>org.apache.axis.client.ServiceFactory
</property>
<property name="wsdlDocumentUrl">
<value>http://${serverName}:${httpPort}${contextPath}/axis/OrderService?wsdl
</property>
<property name="namespaceUri">
<value>http://${serverName}:${httpPort}${contextPath}/axis/OrderService
</property>
<property name="serviceName">
<value>JaxRpcOrderServiceService
</property>
<property name="portName">
<value>OrderService
</property>
<property name="serviceInterface">
<value>org.springframework.samples.jpetstore.domain.logic.OrderService
</property>
<!--
If you want to work with a JAX-RPC port stub underneath, you need to specify
an RMI interface to use at the JAX-RPC port level. This might give advantages
on certain JAX-RPC implementations. If not specified, JAX-RPC dynamic calls
will be used, which has been tested to work nicely on Apache Axis.
-->
<!--
<property name="portInterface">
<value>org.springframework.samples.jpetstore.service.RemoteOrderService
</property>
-->
<property name="servicePostProcessors">
<list>
<bean class="org.springframework.remoting.jaxrpc.support.AxisBeanMappingServicePostProcessor">
<property name="encodingStyleUri" value="http://schemas.xmlsoap.org/soap/encoding/"/>
<property name="typeNamespaceUri" value="urn:JPetStore"/>
<property name="beanClasses">
<list>
<value>org.springframework.samples.jpetstore.domain.Order
<value>org.springframework.samples.jpetstore.domain.LineItem
<value>org.springframework.samples.jpetstore.domain.Item
<value>org.springframework.samples.jpetstore.domain.Product
</list>
</property>
</bean>
</list>
</property>
</bean>
<!-- Proxy for the RMI-exported OrderService -->
<!-- Commented out by default to avoid conflicts with EJB containers -->
<!--
<bean id="rmiProxy" class="org.springframework.remoting.rmi.RmiProxyFactoryBean">
<property name="serviceUrl">
<value>rmi://${serverName}:${rmiPort}/order
</property>
<property name="serviceInterface">
<value>org.springframework.samples.jpetstore.domain.logic.OrderService
</property>
</bean>
-->
</beans>
Other Spring Framework examples (source code examples)
Here is a short list of links related to this Spring Framework clientContext.xml source code file:
|