PDA

View Full Version : how to use httpinvoker to config multiple service


hitdemo
Nov 23rd, 2004, 07:01 PM
i have seen the doc's Chapter 16,and i was interested in httpinvoker,the code is sample:
_______________________
in server:
<bean name="/AccountService" class="org.sprfr.remoting.httpinvoker.HttpInvokerServiceE xporter">
<property name="service"><ref bean="accountService"/></property>
<property name="serviceInterface">
<value>example.AccountService</value>
</property>
</bean>

________________________
in client

<bean id="httpInvokerProxy" class="org.sprfr.remoting.httpinvoker.HttpInvokerProxyFac toryBean">
<property name="serviceUrl">
<value>http://remotehost:8080/AccountService</value>
</property>
<property name="serviceInterface">
<value>example.AccountService</value>
</property>
</bean>

if i have multiple service in server side,how to config it in both server and client??

in server may be :

<bean name="/AccountService" class="org.sprfr.remoting.httpinvoker.HttpInvokerServiceE xporter">
<property name="service"><ref bean="accountService"/></property>
<property name="serviceInterface">
<value>example.AccountService</value>
</property>
</bean>
<bean name="/AccountService2" class="org.sprfr.remoting.httpinvoker.HttpInvokerServiceE xporter">
<property name="service"><ref bean="accountService2"/></property>
<property name="serviceInterface">
<value>example.AccountService2</value>
</property>
</bean>


but in client,how to config this two service's call? :?:

irbouho
Nov 23rd, 2004, 09:55 PM
I guess
<bean id="httpInvokerProxy" class="org.sprfr.remoting.httpinvoker.HttpInvokerProxyFac toryBean">
<property name="serviceUrl">
<value>http://remotehost:8080/AccountService</value>
</property>
<property name="serviceInterface">
<value>example.AccountService</value>
</property>
</bean>
<bean id="httpInvokerProxy2" class="org.sprfr.remoting.httpinvoker.HttpInvokerProxyFac toryBean">
<property name="serviceUrl">
<value>http://remotehost:8080/AccountService2</value>
</property>
<property name="serviceInterface">
<value>example.AccountService2</value>
</property>
</bean>