You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by Sagi Mann <sa...@gmail.com> on 2008/10/14 19:44:42 UTC

how to configure 2 clients with 2 different conduits

Hi all,
I have a working cxf-based ws client, now I need to configure another client
inside the same app. Both clients need to access the same ws, but with
different ssl settings, which are under the http:conduit element in cxf.xml.
My question is simple: how to I configure 2 separate conduits, and associate
each one to a different client?

Below is my client's cxf.xml. As you can see, I just added 2 clients, but
they seem to be using the same conduit. I want them each to use a different
conduit:

    <http:conduit name="*.http-conduit">
          ...
    </http:conduit>
    
    <jaxws:client id="client1" 
                  serviceClass="MyWebServicePort" 
                  address="https://mann2:8181/mywar/MyWebService"/>
    
    <jaxws:client id="client2" 
                  serviceClass="MyWebServicePort" 
                  address="https://mann2:8181/mywar/MyWebService"/>


I'd appreciate any ideas, thanks...

-- 
View this message in context: http://www.nabble.com/how-to-configure-2-clients-with-2-different-conduits-tp19978628p19978628.html
Sent from the cxf-user mailing list archive at Nabble.com.


Re: how to configure 2 clients with 2 different conduits

Posted by Daniel Kulp <dk...@apache.org>.

I THINK if you add an "endpointName" attribute onto the jaxws:client elements 
(it's a qname, so you'll need to define the namespace as well), you can then 
create an http conduit based on that same endpointName and it would be 
referenced.

We started a discussion about this last week to allow embedding a conduit 
directly in the client element to simplify this.

Dan


On Tuesday 14 October 2008 1:44:42 pm Sagi Mann wrote:
> Hi all,
> I have a working cxf-based ws client, now I need to configure another
> client inside the same app. Both clients need to access the same ws, but
> with different ssl settings, which are under the http:conduit element in
> cxf.xml. My question is simple: how to I configure 2 separate conduits, and
> associate each one to a different client?
>
> Below is my client's cxf.xml. As you can see, I just added 2 clients, but
> they seem to be using the same conduit. I want them each to use a different
> conduit:
>
>     <http:conduit name="*.http-conduit">
>           ...
>     </http:conduit>
>
>     <jaxws:client id="client1"
>                   serviceClass="MyWebServicePort"
>                   address="https://mann2:8181/mywar/MyWebService"/>
>
>     <jaxws:client id="client2"
>                   serviceClass="MyWebServicePort"
>                   address="https://mann2:8181/mywar/MyWebService"/>
>
>
> I'd appreciate any ideas, thanks...



-- 
Daniel Kulp
dkulp@apache.org
http://dankulp.com/blog

Re: how to configure 2 clients with 2 different conduits

Posted by Sagi Mann <sa...@gmail.com>.
For now, I worked around the issue by providing multiple cxf.xml files - one
for each client. Works great, but only because I have no shared beans
between the clients.
-- 
View this message in context: http://www.nabble.com/how-to-configure-2-clients-with-2-different-conduits-tp19978628p19989896.html
Sent from the cxf-user mailing list archive at Nabble.com.


Re: how to configure 2 clients with 2 different conduits

Posted by Glen Mazza <gl...@gmail.com>.
One option, look at Step #5, substeps #1 and #3 here:
http://www.jroller.com/gmazza/entry/implementing_ws_security_with_the

HTH,
Glen


Sagi Mann wrote:
> 
> Hi all,
> I have a working cxf-based ws client, now I need to configure another
> client inside the same app. Both clients need to access the same ws, but
> with different ssl settings, which are under the http:conduit element in
> cxf.xml. My question is simple: how to I configure 2 separate conduits,
> and associate each one to a different client?
> 
> Below is my client's cxf.xml. As you can see, I just added 2 clients, but
> they seem to be using the same conduit. I want them each to use a
> different conduit:
> 
>     <http:conduit name="*.http-conduit">
>           ...
>     </http:conduit>
>     
>     <jaxws:client id="client1" 
>                   serviceClass="MyWebServicePort" 
>                   address="https://mann2:8181/mywar/MyWebService"/>
>     
>     <jaxws:client id="client2" 
>                   serviceClass="MyWebServicePort" 
>                   address="https://mann2:8181/mywar/MyWebService"/>
> 
> 
> I'd appreciate any ideas, thanks...
> 
> 

-- 
View this message in context: http://www.nabble.com/how-to-configure-2-clients-with-2-different-conduits-tp19978628p19978844.html
Sent from the cxf-user mailing list archive at Nabble.com.