I had the following configuration
<bean id="serviceMgr" class="globalization.WebServiceManager">
<property name="webServices">
<list>
<ref bean="client1"/>
<ref bean="client2"/>
</list>
</property>
</bean>
<!-- XFire clients -->
<bean id="client1" class="
org.codehaus.xfire.spring.remoting.XFireClientFactoryBean">
<property name="serviceClass">
<value>x.ws.xfire.FederatedService</value>
</property>
<property name="wsdlDocumentUrl" value="
http://black:8080/Oculus5/services/FederatedService?wsdl"/>
<property name="url" value="
http://black:8080/Oculus5/services/FederatedService" />
</bean>
<bean id="client2" class="
org.codehaus.xfire.spring.remoting.XFireClientFactoryBean">
<property name="serviceClass">
<value>x.ws.xfire.FederatedService</value>
</property>
<property name="wsdlDocumentUrl" value="
http://localhost:8080/Oculus5/services/FederatedService?wsdl"/>
<property name="url" value="
http://localhost:8080/Oculus5/services/FederatedService" />
</bean>
Then I was able to obtain list of all endpoints to external web services,
yet It was possible to reffer to each of them by list.get(int i).
I am sorry if you ment something else. To me list<webservices> sounds like a
better idea.
Regards.
On 12/29/06, christophe blin <[EMAIL PROTECTED]> wrote:
Hi,
in xfire-servlet.xml, if you do :
<bean
class="org.springframework.web.servlet.handler.SimpleUrlHandlerMapping">
<property name="urlMap">
<map>
<entry key="/Service1">
<ref bean="service1XFire" />
</entry>
<entry key="/Service2">
<ref bean="service2XFire" />
</entry>
</map>
</property>
</bean>
<bean id="service1XFire"
class="org.codehaus.xfire.spring.remoting.XFireExporter">
<property name="serviceFactory">
<ref bean="xfire.serviceFactory" />
</property>
<property name="xfire">
<ref bean="xfire" />
</property>
<property name="serviceBean">
<ref bean="service1Bean" />
</property>
<property name="serviceClass">
<value>com.tennaxia.t3.IService</value>
</property>
</bean>
<bean id="service2XFire"
class="org.codehaus.xfire.spring.remoting.XFireExporter">
<property name="serviceFactory">
<ref bean="xfire.serviceFactory" />
</property>
<property name="xfire">
<ref bean="xfire" />
</property>
<property name="serviceBean">
<ref bean="service2Bean" /> <!-- ***************************
DIFFERENT
-->
</property>
<property name="serviceClass">
<value>com.tennaxia.t3.IService</value> <!--
*************************** SAME -->
</property>
</bean>
then, even if you call localhost/Service1 you will always use the
service2Bean.
If you inverse the 2 entries in the UrlMapper, then it is always the
service1Bean that is called (i.e even if you called localhost/Service2)
Do not know if this is a bug or not as I do not have any time to digg
into
the xfire code.
My workaround is to decalre 2 separate interfaces taht extends the
IService
interface and then to use these 2 different name in the serviceClass
property
Best regards,
chris
--
View this message in context:
http://www.nabble.com/Problem-with-Spring-remote-tf2895026.html#a8088333
Sent from the XFire - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe from this list please visit:
http://xircles.codehaus.org/manage_email