You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@servicemix.apache.org by "angel.ortiz" <ao...@gmail.com> on 2009/10/06 19:03:59 UTC

Design problem - Declaring BCs to external Web Services

Hi,

I have a problem handling CXF Binding Components that point to external Web
Services. Let me explain my problem:

- I have implemented three Service Assemblies: A1, A2 and A3
- Each SA needs to connect to an external Web Service WS1. So, in all the
assemblies I defined a CXF BC Service Unit like this:

        <cxfbc:provider wsdl="classpath:WebService_1.wsdl" 
		service="ws1ns:WS1Name"
		useSOAPEnvelope="true"
		useJBIWrapper="false"
		synchronous="false"
		locationURI="/WS1">

- I can deploy A1, but when I try to deploy A2 or A3 ServiceMix throws an
Exception that says something like 'I cannot deploy the CXF BC Service Unit.
The endpoint {http://my.company.com/ws}myServiceOne already exists.'

So, I tried creating another Service Assembly called 'Aws' having the WS
declaration defined above. This way I don't have to repeat the cxf:provider
in A1, A2 and A3 and ServiceMix will allow me to install al of them. 

But now here's the problem: What happens if I need different settings (like
useSOAPEnvelope, useJBIWrapper, etc) for each of my Service Assemblies? 
This configuration will not work in this case...

Q: How can I declare a CXF BC to an external WS more than one time with
different settings? I am supposing the service attribute should always be
service="ws1ns:WS1Name", otherwise the BC will not point to my WS.

           ws1ns:WS1Name = <wsdl_targetNamespace>:<wsdl_serviceName>

           which is:

           ws1ns:WS1Name = {http://my.company.com/ws}myServiceOne

Thanks,
Angel


-- 
View this message in context: http://www.nabble.com/Design-problem---Declaring-BCs-to-external-Web-Services-tp25772778p25772778.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: Design problem - Declaring BCs to external Web Services

Posted by "angel.ortiz" <ao...@gmail.com>.

Gert,

Your recommendation solved my problem. Now I can have different endpoints
all with the same service name. I can disambiguate between my endpoints by
means of setting a different endpoint name for each one of them (even in the
service name its exactly the same).

Thanks,

Angel


Gert Vanthienen wrote:
> 
> L.S.,
> 
> Not entirely sure about it, but you might be able to assign a unique
> endpoint name to disambiguate between the different endpoints.  The
> example you're showing us, doesn't have the endpoint name set, so you
> should be able to use that.
> 
> Regards,
> 
> Gert Vanthienen
> ------------------------
> Open Source SOA: http://fusesource.com
> Blog: http://gertvanthienen.blogspot.com/
> 

-- 
View this message in context: http://www.nabble.com/Design-problem---Declaring-BCs-to-external-Web-Services-tp25772778p25788081.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: Design problem - Declaring BCs to external Web Services

Posted by Gert Vanthienen <ge...@gmail.com>.
L.S.,

Not entirely sure about it, but you might be able to assign a unique
endpoint name to disambiguate between the different endpoints.  The
example you're showing us, doesn't have the endpoint name set, so you
should be able to use that.

Regards,

Gert Vanthienen
------------------------
Open Source SOA: http://fusesource.com
Blog: http://gertvanthienen.blogspot.com/



2009/10/6 angel.ortiz <ao...@gmail.com>:
>
> Hi,
>
> I have a problem handling CXF Binding Components that point to external Web
> Services. Let me explain my problem:
>
> - I have implemented three Service Assemblies: A1, A2 and A3
> - Each SA needs to connect to an external Web Service WS1. So, in all the
> assemblies I defined a CXF BC Service Unit like this:
>
>        <cxfbc:provider wsdl="classpath:WebService_1.wsdl"
>                service="ws1ns:WS1Name"
>                useSOAPEnvelope="true"
>                useJBIWrapper="false"
>                synchronous="false"
>                locationURI="/WS1">
>
> - I can deploy A1, but when I try to deploy A2 or A3 ServiceMix throws an
> Exception that says something like 'I cannot deploy the CXF BC Service Unit.
> The endpoint {http://my.company.com/ws}myServiceOne already exists.'
>
> So, I tried creating another Service Assembly called 'Aws' having the WS
> declaration defined above. This way I don't have to repeat the cxf:provider
> in A1, A2 and A3 and ServiceMix will allow me to install al of them.
>
> But now here's the problem: What happens if I need different settings (like
> useSOAPEnvelope, useJBIWrapper, etc) for each of my Service Assemblies?
> This configuration will not work in this case...
>
> Q: How can I declare a CXF BC to an external WS more than one time with
> different settings? I am supposing the service attribute should always be
> service="ws1ns:WS1Name", otherwise the BC will not point to my WS.
>
>           ws1ns:WS1Name = <wsdl_targetNamespace>:<wsdl_serviceName>
>
>           which is:
>
>           ws1ns:WS1Name = {http://my.company.com/ws}myServiceOne
>
> Thanks,
> Angel
>
>
> --
> View this message in context: http://www.nabble.com/Design-problem---Declaring-BCs-to-external-Web-Services-tp25772778p25772778.html
> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>
>