You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by Mohammad Shamsi <m....@gmail.com> on 2007/11/04 19:12:56 UTC
other spring cxf resources ?
Hi All,
I have a spring based Java EE application,
this application destirbuted on 9 servers, i want to add a Web Service
to this application,
i want now how to call these 9 servers web service with a client ?
i read spring cxf sample, client part of this sample in beans.xml are
somthing like this :
<bean id="client" class="demo.spring.HelloWorldImpl"
factory-bean="clientFactory" factory-method="create"/>
<bean id="clientFactory" class="
org.apache.cxf.jaxws.JaxWsProxyFactoryBean">
<property name="serviceClass" value="demo.spring.HelloWorld"/>
<property name="address" value="
http://localhost:8080/cxf/wscxf/HelloWorld"/>
</bean>
with this guide, i have to define 9 bean like this client bean and 9
clientFactory bean.
is there any simpler way to do this?
--
sincerely yours
M. H. Shamsi
Re: other spring cxf resources ?
Posted by Willem Jiang <ni...@iona.com>.
Hi ,
Actually, you could change the client's service URL per message.
You can find more information here [1]
[1]http://www.nabble.com/Client-question-tf4357978.html#a12419843
Willem.
Mohammad Shamsi wrote:
> Hi Glen,
>
> Sorry, my application is not really a distributed app. i just run it on 9
> servers, all 9 server connect to one database, but they are work
> standalone. and they don't know about each other.
>
> for some reason i wan't to collect some info from each app server and show
> them together in one client. Service in all 9 Server is same, but at least
> in URL, they are deferent.
>
> http://server1:port/MyService
>
> http://server2:port2/MyService
>
> http://server3:port3/MyService
> .
> .
> .
>
>
>
>
> On 11/4/07, Glen Mazza <gl...@verizon.net> wrote:
>
>> Do you have a WSDL? Just follow the links I gave. That fact that you
>> have 9 servers or 900 shouldn't matter--the URL in the WSDL would be the
>> same for all the servers your app is distributed on (just as it is the
>> same for your web application as a whole, correct?)
>>
>> Glen
>>
>> Am Sonntag, den 04.11.2007, 21:42 +0330 schrieb Mohammad Shamsi:
>>
>>> Hi All,
>>>
>>> I have a spring based Java EE application,
>>> this application destirbuted on 9 servers, i want to add a Web
>>>
>> Service
>>
>>> to this application,
>>>
>>> i want now how to call these 9 servers web service with a client ?
>>>
>>> i read spring cxf sample, client part of this sample in beans.xmlare
>>> somthing like this :
>>>
>>> <bean id="client" class="demo.spring.HelloWorldImpl"
>>> factory-bean="clientFactory" factory-method="create"/>
>>>
>>> <bean id="clientFactory" class="
>>> org.apache.cxf.jaxws.JaxWsProxyFactoryBean">
>>> <property name="serviceClass" value="demo.spring.HelloWorld"/>
>>> <property name="address" value="
>>> http://localhost:8080/cxf/wscxf/HelloWorld"/>
>>> </bean>
>>>
>>> with this guide, i have to define 9 bean like this client bean and 9
>>> clientFactory bean.
>>>
>>> is there any simpler way to do this?
>>>
>>
>
>
>
Re: other spring cxf resources ?
Posted by Christian Schneider <ch...@die-schneider.net>.
Hi Mohammad,
I had a similar problem when I wanted to provide fail safe operation and
load balancing to servers that do not run in a cluster.
My solution is simply running the services with soap/jms. The JMS Server
(e.g. ActiveMQ) has to run on two servers to provide fail safe
operation. It does not need a cluster.
Each of your services should then simply use the same jms queue. This
way they will be automatically load balanced and if a server goes down
the others will take over.
If you need to access all servers at once you can instead use a topic
and the servers could answer on a topic. I already am thinking about
using this behaviour for system management.
Best regards,
Christian
Mohammad Shamsi schrieb:
> Hi Glen,
>
> Sorry, my application is not really a distributed app. i just run it on 9
> servers, all 9 server connect to one database, but they are work
> standalone. and they don't know about each other.
>
> for some reason i wan't to collect some info from each app server and show
> them together in one client. Service in all 9 Server is same, but at least
> in URL, they are deferent.
>
> http://server1:port/MyService
>
> http://server2:port2/MyService
>
> http://server3:port3/MyService
> .
> .
> .
>
>
>
>
> On 11/4/07, Glen Mazza <gl...@verizon.net> wrote:
>
>> Do you have a WSDL? Just follow the links I gave. That fact that you
>> have 9 servers or 900 shouldn't matter--the URL in the WSDL would be the
>> same for all the servers your app is distributed on (just as it is the
>> same for your web application as a whole, correct?)
>>
>> Glen
>>
>> Am Sonntag, den 04.11.2007, 21:42 +0330 schrieb Mohammad Shamsi:
>>
>>> Hi All,
>>>
>>> I have a spring based Java EE application,
>>> this application destirbuted on 9 servers, i want to add a Web
>>>
>> Service
>>
>>> to this application,
>>>
>>> i want now how to call these 9 servers web service with a client ?
>>>
>>> i read spring cxf sample, client part of this sample in beans.xmlare
>>> somthing like this :
>>>
>>> <bean id="client" class="demo.spring.HelloWorldImpl"
>>> factory-bean="clientFactory" factory-method="create"/>
>>>
>>> <bean id="clientFactory" class="
>>> org.apache.cxf.jaxws.JaxWsProxyFactoryBean">
>>> <property name="serviceClass" value="demo.spring.HelloWorld"/>
>>> <property name="address" value="
>>> http://localhost:8080/cxf/wscxf/HelloWorld"/>
>>> </bean>
>>>
>>> with this guide, i have to define 9 bean like this client bean and 9
>>> clientFactory bean.
>>>
>>> is there any simpler way to do this?
>>>
>>
>
>
>
--
Christian Schneider
---
http://www.liquid-reality.de
Re: other spring cxf resources ?
Posted by Mohammad Shamsi <m....@gmail.com>.
Hi Glen,
Sorry, my application is not really a distributed app. i just run it on 9
servers, all 9 server connect to one database, but they are work
standalone. and they don't know about each other.
for some reason i wan't to collect some info from each app server and show
them together in one client. Service in all 9 Server is same, but at least
in URL, they are deferent.
http://server1:port/MyService
http://server2:port2/MyService
http://server3:port3/MyService
.
.
.
On 11/4/07, Glen Mazza <gl...@verizon.net> wrote:
>
> Do you have a WSDL? Just follow the links I gave. That fact that you
> have 9 servers or 900 shouldn't matter--the URL in the WSDL would be the
> same for all the servers your app is distributed on (just as it is the
> same for your web application as a whole, correct?)
>
> Glen
>
> Am Sonntag, den 04.11.2007, 21:42 +0330 schrieb Mohammad Shamsi:
> > Hi All,
> >
> > I have a spring based Java EE application,
> > this application destirbuted on 9 servers, i want to add a Web
> Service
> > to this application,
> >
> > i want now how to call these 9 servers web service with a client ?
> >
> > i read spring cxf sample, client part of this sample in beans.xmlare
> > somthing like this :
> >
> > <bean id="client" class="demo.spring.HelloWorldImpl"
> > factory-bean="clientFactory" factory-method="create"/>
> >
> > <bean id="clientFactory" class="
> > org.apache.cxf.jaxws.JaxWsProxyFactoryBean">
> > <property name="serviceClass" value="demo.spring.HelloWorld"/>
> > <property name="address" value="
> > http://localhost:8080/cxf/wscxf/HelloWorld"/>
> > </bean>
> >
> > with this guide, i have to define 9 bean like this client bean and 9
> > clientFactory bean.
> >
> > is there any simpler way to do this?
>
>
--
sincerely yours
M. H. Shamsi
Re: other spring cxf resources ?
Posted by Glen Mazza <gl...@verizon.net>.
Do you have a WSDL? Just follow the links I gave. That fact that you
have 9 servers or 900 shouldn't matter--the URL in the WSDL would be the
same for all the servers your app is distributed on (just as it is the
same for your web application as a whole, correct?)
Glen
Am Sonntag, den 04.11.2007, 21:42 +0330 schrieb Mohammad Shamsi:
> Hi All,
>
> I have a spring based Java EE application,
> this application destirbuted on 9 servers, i want to add a Web Service
> to this application,
>
> i want now how to call these 9 servers web service with a client ?
>
> i read spring cxf sample, client part of this sample in beans.xml are
> somthing like this :
>
> <bean id="client" class="demo.spring.HelloWorldImpl"
> factory-bean="clientFactory" factory-method="create"/>
>
> <bean id="clientFactory" class="
> org.apache.cxf.jaxws.JaxWsProxyFactoryBean">
> <property name="serviceClass" value="demo.spring.HelloWorld"/>
> <property name="address" value="
> http://localhost:8080/cxf/wscxf/HelloWorld"/>
> </bean>
>
> with this guide, i have to define 9 bean like this client bean and 9
> clientFactory bean.
>
> is there any simpler way to do this?