You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@servicemix.apache.org by Diefenbach Anne <Di...@fgan.de> on 2009/02/03 13:58:16 UTC

[Newbie] CXF client integration with ServiceMix

Hi,

I have a problem integrating my service consumer with ServiceMix. The thing is, I would ultimately like to use a distributed structure with the NMR formed by several instances of ServiceMix, and have my consumer on one instance (and one computer) communicate with my provider on another instance (another computer). As I imagine it, this would mean that the consumer would interact with the CXF BC on its ServiceMix instance, which would send the normalized message on to the CXF SE on the other instance. Is that possible? How would I configure it? (Assuming that I had successfully clustered ServiceMix instances.) Right now, I am stuck at the first steps just testing with one SM instance: I have my provider running in ServiceMix and my consumer just uses CXF. My problem is that I don't know how I can get the latter integrated with ServiceMix, either so it would use the CXF BC directly, or possibly to the point where it would bypass the BC entirely and just send a normalized message to the provider. I haven't been able to find any documentation on this, and if it's covered anywhere in the examples - I'm sorry, but I have been unable to understand them without explanation. Or maybe I am completely off the track - if so, I am open to alternatives. But I have no idea how to get on from this point, and would be grateful for any help.

I am using FUSE ESB 3.3.1.10 and have modelled my project after the CXF WSDL First example using Maven 2.0.9.

Regards,

Anne Diefenbach
- FKIE-KOM -
*************************************************
Forschungsgesellschaft für
Angewandte Naturwissenschaften e. V. (FGAN)
E-Mail:  diefenbach@fgan.de
Web:    www.fgan.de
************************************************



AW: AW: [Newbie] CXF client integration with ServiceMix

Posted by Diefenbach Anne <Di...@fgan.de>.
>Take a look at the "Proxies" of cxf se, [1] for more details, this is 
>the way you can achieve your latter approach
>[1]http://servicemix.apache.org/servicemix-cxf-se.html

I will try, thank you very much! (I... actually had this page open, but
was reading "Accessing the JBI bus".)

>>> The work flow is
>>> external cxf client <======> cxf bc consumer<======> your provider 
>>> running inside servicemix
>>     
>
>> Yes, but would it be possible to break this up? 
> external cxf client <======> cxf bc consumer in servicemix A <======>
>>provider in servicemix B
>
>   
>Yeah, it should work in cluster enviroment , we have a cluster example 
>shipped with the kit, you may need take a look

Will do, thanks. I may need to bother you with follow-up questions, but
first I will try and get the proxy running.

Again, thanks very much,

Anne

AW: AW: [Newbie] CXF client integration with ServiceMix

Posted by Diefenbach Anne <Di...@fgan.de>.
Hi,

as feared, I have to bother you again. After having been distracted by something else for a while, I have finally taken a look at the proxies, especially by reading [1] and [2] and, of course, searching the mailing list. But they're all a step too far for me. My problem is that I don't quite understand the relation the proxy would have to my SU.

Do I understand this correctly: I would have to re-write my consumer to be a POJO which directly invokes the methods offered by the provider, and write a test client which triggers this consumer. Will I then just have to configure the consumer to act as proxy, or do I need to do more? How would you suggest setting up the project? Right now I have one service assembly with one CXF SE service unit (containing the provider) and one CXF BC service unit - as I said before, I modelled this after the CXF WSDL First example. 

[1]http://servicemix.apache.org/servicemix-cxf-se.html
[2]http://fusesource.com/issues/browse/ESB-219

Thank you for your help,
Anne

-----Ursprüngliche Nachricht-----
Von: Freeman Fang [mailto:freeman.fang@gmail.com] 
Gesendet: Mittwoch, 4. Februar 2009 11:58
An: users@servicemix.apache.org
Betreff: Re: AW: [Newbie] CXF client integration with ServiceMix

Diefenbach Anne wrote:
> Hi, thanks for the reply.
>
>   
>> If you use standalone cxf client outside servicemix, you do need a cxf 
>> bc consumer here, you can't send normalized message from external client 
>> to the provider inside servicemix bypass the binding component.
>>     
>
> I am using a standalone CXF consumer right now, but that is exactly what I want to get away from. I just haven't found a good way to do so. Basically, I want my provider to be exposed both as a webservice (to be called with, for example, the CXF consumer) and for an internal, ServiceMix-integrated consumer. And I don't quite know how to achieve the latter. (It's probably a really obvious solution, but I am extremely confused; especially by the differences between dynamic and static configuration. I am using dynamic configuration, because the CXF WSDL First example did, but that makes it extremely hard to draw anything useful from, for example, the loanbroker example.)
>   
Take a look at the "Proxies" of cxf se, [1] for more details, this is 
the way you can achieve your latter approach
[1]http://servicemix.apache.org/servicemix-cxf-se.html

Re: SMX cluster fails to publish CXF-based provider

Posted by Diefenbach Anne <Di...@fgan.de>.
Okay, in case someone else runs into the same problem: This had to do
with the working directory. I copied the hotdeploy and the data
directories from my ServiceMix root directory to my working directories
(one for each service assembly) and could finally invoke my service
properly. If it still failed, removing and re-deploying my assemblies
helped.

Regards,
Anne

-----Original Message-----
From: Diefenbach Anne [mailto:Diefenbach@fgan.de] 
Sent: Freitag, 27. Februar 2009 17:34
To: users@servicemix.apache.org
Subject: SMX cluster fails to publish CXF-based provider

Hi,

I have tried to split my functioning test case with a CXF-based provider
published to ServiceMix and an external CXF client to achieve this
previously discussed architecture: 

external cxf client <======> cxf bc consumer in servicemix A <======>
provider in servicemix B

To this end, I have split my previous service assembly into two, one
containing the CXF-SE with my provider, one containing the CXF-BC. If I
deploy both to one ServiceMix instance, I can call the service with my
consumer without problems.

If, however, I use two ServiceMix instances (both on the same computer),
the consumer fails with a ConnectException. Since, if I interpret the
logs correctly, the provider never gets published, this is hardly
surprising. So I assume that somewhere, I made a mistake configuring my
ServiceMix instances, but I cannot figure out where. Nor does a Google
search turn up any hints.

I have attached the logs and configurations which I changed from the
default, with anything named "client" referring to the SMX instance to
which I deployed the CXF-BC. Can anyone help me figure out where I went
wrong?

Thank you,

Anne

SMX cluster fails to publish CXF-based provider

Posted by Diefenbach Anne <Di...@fgan.de>.
Hi,

I have tried to split my functioning test case with a CXF-based provider
published to ServiceMix and an external CXF client to achieve this
previously discussed architecture: 

external cxf client <======> cxf bc consumer in servicemix A <======>
provider in servicemix B

To this end, I have split my previous service assembly into two, one
containing the CXF-SE with my provider, one containing the CXF-BC. If I
deploy both to one ServiceMix instance, I can call the service with my
consumer without problems.

If, however, I use two ServiceMix instances (both on the same computer),
the consumer fails with a ConnectException. Since, if I interpret the
logs correctly, the provider never gets published, this is hardly
surprising. So I assume that somewhere, I made a mistake configuring my
ServiceMix instances, but I cannot figure out where. Nor does a Google
search turn up any hints.

I have attached the logs and configurations which I changed from the
default, with anything named "client" referring to the SMX instance to
which I deployed the CXF-BC. Can anyone help me figure out where I went
wrong?

Thank you,

Anne

Re: AW: [Newbie] CXF client integration with ServiceMix

Posted by Freeman Fang <fr...@gmail.com>.
Diefenbach Anne wrote:
> Hi, thanks for the reply.
>
>   
>> If you use standalone cxf client outside servicemix, you do need a cxf 
>> bc consumer here, you can't send normalized message from external client 
>> to the provider inside servicemix bypass the binding component.
>>     
>
> I am using a standalone CXF consumer right now, but that is exactly what I want to get away from. I just haven't found a good way to do so. Basically, I want my provider to be exposed both as a webservice (to be called with, for example, the CXF consumer) and for an internal, ServiceMix-integrated consumer. And I don't quite know how to achieve the latter. (It's probably a really obvious solution, but I am extremely confused; especially by the differences between dynamic and static configuration. I am using dynamic configuration, because the CXF WSDL First example did, but that makes it extremely hard to draw anything useful from, for example, the loanbroker example.)
>   
Take a look at the "Proxies" of cxf se, [1] for more details, this is 
the way you can achieve your latter approach
[1]http://servicemix.apache.org/servicemix-cxf-se.html
>   
>> The work flow is
>> external cxf client <======> cxf bc consumer<======> your provider 
>> running inside servicemix
>>     
>
> Yes, but would it be possible to break this up? 
> external cxf client <======> cxf bc consumer in servicemix A <======> provider in servicemix B
>
>   
Yeah, it should work in cluster enviroment , we have a cluster example 
shipped with the kit, you may need take a look
> Sorry to be so unclear, mixing questions, but I am trying to understand the possibilities of deploying ServiceMix in a distributed network - a MANET, to be precise.
>
>
> Thanks for your help,
> Anne
>
> -----Ursprüngliche Nachricht-----
> Von: Freeman Fang [mailto:freeman.fang@gmail.com] 
> Gesendet: Mittwoch, 4. Februar 2009 03:36
> An: users@servicemix.apache.org
> Betreff: Re: [Newbie] CXF client integration with ServiceMix
>
> Diefenbach Anne wrote:
>   
>> Hi,
>>
>> I have a problem integrating my service consumer with ServiceMix. The thing is, I would ultimately like to use a distributed structure with the NMR formed by several instances of ServiceMix, and have my consumer on one instance (and one computer) communicate with my provider on another instance (another computer). As I imagine it, this would mean that the consumer would interact with the CXF BC on its ServiceMix instance, which would send the normalized message on to the CXF SE on the other instance. Is that possible? How would I configure it? (Assuming that I had successfully clustered ServiceMix instances.) Right now, I am stuck at the first steps just testing with one SM instance: I have my provider running in ServiceMix and my consumer just uses CXF. My problem is that I don't know how I can get the latter integrated with ServiceMix, either so it would use the CXF BC directly, or possibly to the 
>>     
> If you use standalone cxf client outside servicemix, you do need a cxf 
> bc consumer here, you can't send normalized message from external client 
> to the provider inside servicemix bypass the binding component.
> The work flow is
> external cxf client <======> cxf bc consumer<======> your provider 
> running inside servicemix
>
> Freeman
>   
>> point where it would bypass the BC entirely and just send a normalized message to the provider. I haven't been able to find any documentation on this, and if it's covered anywhere in the examples - I'm sorry, but I have been unable to understand them without explanation. Or maybe I am completely off the track - if so, I am open to alternatives. But I have no idea how to get on from this point, and would be grateful for any help.
>>
>> I am using FUSE ESB 3.3.1.10 and have modelled my project after the CXF WSDL First example using Maven 2.0.9.
>>
>> Regards,
>>
>> Anne Diefenbach
>> - FKIE-KOM -
>> *************************************************
>> Forschungsgesellschaft für
>> Angewandte Naturwissenschaften e. V. (FGAN)
>> E-Mail:  diefenbach@fgan.de
>> Web:    www.fgan.de
>> ************************************************
>>
>>
>>
>>   
>>     
>
>
>
>   



AW: [Newbie] CXF client integration with ServiceMix

Posted by Diefenbach Anne <Di...@fgan.de>.
Hi, thanks for the reply.

>If you use standalone cxf client outside servicemix, you do need a cxf 
>bc consumer here, you can't send normalized message from external client 
>to the provider inside servicemix bypass the binding component.

I am using a standalone CXF consumer right now, but that is exactly what I want to get away from. I just haven't found a good way to do so. Basically, I want my provider to be exposed both as a webservice (to be called with, for example, the CXF consumer) and for an internal, ServiceMix-integrated consumer. And I don't quite know how to achieve the latter. (It's probably a really obvious solution, but I am extremely confused; especially by the differences between dynamic and static configuration. I am using dynamic configuration, because the CXF WSDL First example did, but that makes it extremely hard to draw anything useful from, for example, the loanbroker example.)

>The work flow is
>external cxf client <======> cxf bc consumer<======> your provider 
>running inside servicemix

Yes, but would it be possible to break this up? 
external cxf client <======> cxf bc consumer in servicemix A <======> provider in servicemix B

Sorry to be so unclear, mixing questions, but I am trying to understand the possibilities of deploying ServiceMix in a distributed network - a MANET, to be precise.


Thanks for your help,
Anne

-----Ursprüngliche Nachricht-----
Von: Freeman Fang [mailto:freeman.fang@gmail.com] 
Gesendet: Mittwoch, 4. Februar 2009 03:36
An: users@servicemix.apache.org
Betreff: Re: [Newbie] CXF client integration with ServiceMix

Diefenbach Anne wrote:
> Hi,
>
> I have a problem integrating my service consumer with ServiceMix. The thing is, I would ultimately like to use a distributed structure with the NMR formed by several instances of ServiceMix, and have my consumer on one instance (and one computer) communicate with my provider on another instance (another computer). As I imagine it, this would mean that the consumer would interact with the CXF BC on its ServiceMix instance, which would send the normalized message on to the CXF SE on the other instance. Is that possible? How would I configure it? (Assuming that I had successfully clustered ServiceMix instances.) Right now, I am stuck at the first steps just testing with one SM instance: I have my provider running in ServiceMix and my consumer just uses CXF. My problem is that I don't know how I can get the latter integrated with ServiceMix, either so it would use the CXF BC directly, or possibly to the 
If you use standalone cxf client outside servicemix, you do need a cxf 
bc consumer here, you can't send normalized message from external client 
to the provider inside servicemix bypass the binding component.
The work flow is
external cxf client <======> cxf bc consumer<======> your provider 
running inside servicemix

Freeman
> point where it would bypass the BC entirely and just send a normalized message to the provider. I haven't been able to find any documentation on this, and if it's covered anywhere in the examples - I'm sorry, but I have been unable to understand them without explanation. Or maybe I am completely off the track - if so, I am open to alternatives. But I have no idea how to get on from this point, and would be grateful for any help.
>
> I am using FUSE ESB 3.3.1.10 and have modelled my project after the CXF WSDL First example using Maven 2.0.9.
>
> Regards,
>
> Anne Diefenbach
> - FKIE-KOM -
> *************************************************
> Forschungsgesellschaft für
> Angewandte Naturwissenschaften e. V. (FGAN)
> E-Mail:  diefenbach@fgan.de
> Web:    www.fgan.de
> ************************************************
>
>
>
>   



Re: [Newbie] CXF client integration with ServiceMix

Posted by Freeman Fang <fr...@gmail.com>.
Diefenbach Anne wrote:
> Hi,
>
> I have a problem integrating my service consumer with ServiceMix. The thing is, I would ultimately like to use a distributed structure with the NMR formed by several instances of ServiceMix, and have my consumer on one instance (and one computer) communicate with my provider on another instance (another computer). As I imagine it, this would mean that the consumer would interact with the CXF BC on its ServiceMix instance, which would send the normalized message on to the CXF SE on the other instance. Is that possible? How would I configure it? (Assuming that I had successfully clustered ServiceMix instances.) Right now, I am stuck at the first steps just testing with one SM instance: I have my provider running in ServiceMix and my consumer just uses CXF. My problem is that I don't know how I can get the latter integrated with ServiceMix, either so it would use the CXF BC directly, or possibly to the 
If you use standalone cxf client outside servicemix, you do need a cxf 
bc consumer here, you can't send normalized message from external client 
to the provider inside servicemix bypass the binding component.
The work flow is
external cxf client <======> cxf bc consumer<======> your provider 
running inside servicemix

Freeman
> point where it would bypass the BC entirely and just send a normalized message to the provider. I haven't been able to find any documentation on this, and if it's covered anywhere in the examples - I'm sorry, but I have been unable to understand them without explanation. Or maybe I am completely off the track - if so, I am open to alternatives. But I have no idea how to get on from this point, and would be grateful for any help.
>
> I am using FUSE ESB 3.3.1.10 and have modelled my project after the CXF WSDL First example using Maven 2.0.9.
>
> Regards,
>
> Anne Diefenbach
> - FKIE-KOM -
> *************************************************
> Forschungsgesellschaft für
> Angewandte Naturwissenschaften e. V. (FGAN)
> E-Mail:  diefenbach@fgan.de
> Web:    www.fgan.de
> ************************************************
>
>
>
>