Announcement Announcement Module
Collapse
No announcement yet.
how to use httpinvoker to config multiple service Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • how to use httpinvoker to config multiple service

    i have seen the doc's Chapter 16,and i was interested in httpinvoker,the code is sample:
    _______________________
    in server:
    Code:
        <bean name="/AccountService" class="org.sprfr.remoting.httpinvoker.HttpInvokerServiceExporter">
            <property name="service"><ref bean="accountService"/></property>
            <property name="serviceInterface">
                <value>example.AccountService</value>
            </property>
    	</bean>
    ________________________
    in client

    Code:
    	<bean id="httpInvokerProxy" class="org.sprfr.remoting.httpinvoker.HttpInvokerProxyFactoryBean">
    		<property name="serviceUrl">
    			<value>http&#58;//remotehost&#58;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 :

    Code:
        <bean name="/AccountService" class="org.sprfr.remoting.httpinvoker.HttpInvokerServiceExporter">
            <property name="service"><ref bean="accountService"/></property>
            <property name="serviceInterface">
                <value>example.AccountService</value>
            </property>
    	</bean>
    <bean name="/AccountService2" class="org.sprfr.remoting.httpinvoker.HttpInvokerServiceExporter">
            <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? :?:

  • #2
    I guess
    Code:
       <bean id="httpInvokerProxy" class="org.sprfr.remoting.httpinvoker.HttpInvokerProxyFactoryBean"> 
          <property name="serviceUrl"> 
             <value>http&#58;//remotehost&#58;8080/AccountService</value> 
          </property> 
          <property name="serviceInterface"> 
             <value>example.AccountService</value> 
          </property> 
       </bean>
       <bean id="httpInvokerProxy2" class="org.sprfr.remoting.httpinvoker.HttpInvokerProxyFactoryBean"> 
          <property name="serviceUrl"> 
             <value>http&#58;//remotehost&#58;8080/AccountService2</value> 
          </property> 
          <property name="serviceInterface"> 
             <value>example.AccountService2</value> 
          </property> 
       </bean>

    Comment

    Working...
    X