forked from v5tech/maven-framework-project
-
Notifications
You must be signed in to change notification settings - Fork 0
/
spring-rmi.xml
80 lines (63 loc) · 3.22 KB
/
spring-rmi.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:p="http://www.springframework.org/schema/p"
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.1.xsd">
<bean id="HelloService" class="com.fengjing.framework.spring.remoting.HelloServiceImpl"/>
<!-- 使用Spring RMI远程方法调用 -->
<bean class="org.springframework.remoting.rmi.RmiServiceExporter"
p:serviceName="HelloService"
p:service-ref="HelloService"
p:serviceInterface="com.fengjing.framework.spring.remoting.HelloService">
</bean>
<!-- 使用Spring RMI方式客户端调用 -->
<bean id="rmiHelloService" class="org.springframework.remoting.rmi.RmiProxyFactoryBean"
p:serviceUrl="rmi://localhost:1099/HelloService"
p:serviceInterface="com.fengjing.framework.spring.remoting.HelloService">
</bean>
<!-- 使用Spring Hessian远程方法调用
<bean class="org.springframework.remoting.caucho.HessianServiceExporter"
p:service-ref="HelloService"
p:serviceInterface="com.fengjing.framework.spring.remoting.HelloService">
</bean>
-->
<!-- 使用Spring Hessian方式客户端调用
<bean id="hessianHelloService" class="org.springframework.remoting.caucho.HessianProxyFactoryBean"
p:serviceUrl="http://localhost:8080/maven-framework/remote/service"
p:serviceInterface="com.fengjing.framework.spring.remoting.HelloService"
>
</bean>
-->
<!-- 使用Spring Burlap远程方法调用
<bean class="org.springframework.remoting.caucho.BurlapServiceExporter"
p:service-ref="HelloService"
p:serviceInterface="com.fengjing.framework.spring.remoting.HelloService">
</bean>
-->
<!-- 使用Spring Burlap方式客户端调用
<bean id="burlapHelloService" class="org.springframework.remoting.caucho.BurlapProxyFactoryBean"
p:serviceUrl="http://localhost:8080/maven-framework/remote/service"
p:serviceInterface="com.fengjing.framework.spring.remoting.HelloService"
>
</bean>
-->
<!-- 使用Spring HttpInvoker远程方法调用 -->
<bean class="org.springframework.remoting.httpinvoker.HttpInvokerServiceExporter"
p:service-ref="HelloService"
p:serviceInterface="com.fengjing.framework.spring.remoting.HelloService">
</bean>
<!-- 使用Spring HttpInvoker方式客户端调用 -->
<bean id="httpInvokerHelloService" class="org.springframework.remoting.httpinvoker.HttpInvokerProxyFactoryBean"
p:serviceUrl="http://localhost:8080/maven-framework/remote/service"
p:serviceInterface="com.fengjing.framework.spring.remoting.HelloService"
>
</bean>
<bean class="com.fengjing.framework.spring.remoting.HelloServiceClient" p:helloService-ref="rmiHelloService"/>
<!-- 使用SimpleJaxWsHelloService发布WebService -->
<bean id="simpleJaxWsHelloService" class="com.fengjing.framework.spring.remoting.jaxws.SimpleJaxWsHelloService"></bean>
<!-- 访问地址http://localhost:9999/SimpleJaxWsHelloService?wsdl -->
<bean class="org.springframework.remoting.jaxws.SimpleJaxWsServiceExporter"
p:baseAddress="http://localhost:9999/"
/>
</beans>