You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by "marc.blomquist" <ma...@gmail.com> on 2013/09/23 04:35:24 UTC

Custom Camel Component WSDL First SSL

I want to do almost exactly what this poster did,
http://cxf.547215.n5.nabble.com/Dynamic-Client-Server-Side-Configuration-using-API-for-Java-First-Spring-WS-td556445.html

Except I want my WSDL Service to use SSL. I found the following project that
shows how I do it,

http://svn.apache.org/repos/asf/cxf/trunk/distribution/src/main/release/samples/wsdl_first_https/src/main/java/demo/hw_https/server/Server.java

http://svn.apache.org/repos/asf/cxf/trunk/distribution/src/main/release/samples/wsdl_first_https/src/main/resources/ServerConfig.xml

I've had some traumatic experiences in the past when dealing with the Bus.
The link below indicates that all CXF processes share things,
http://cxf.apache.org/javadoc/latest/org/apache/cxf/BusFactory.html

I definitely want each instance of my-camel to have its own Service instance
of the WSDL, each possibly uniquely configured. How do I code it so that I
can sleep at night knowing that I can have one instance of my-camel be http
and the other be https without the bus being overwritten?
getThreadDefaultBus() seems to be the solution, but...

- I'm using Servicemix, so is it safe to assume that no two bundles share
the same thread?

- If I have a camel route has two instances of my-camel, wouldn't they
theoretically be run from the same thread according to how camel works, so
wouldn't that mean they share the same thread and thus conversely the same
CXF Bus?

Someone please help me do this right... I want to sleep at night for once :
(



--
View this message in context: http://cxf.547215.n5.nabble.com/Custom-Camel-Component-WSDL-First-SSL-tp5734356.html
Sent from the cxf-user mailing list archive at Nabble.com.

Re: Custom Camel Component WSDL First SSL

Posted by Daniel Kulp <dk...@apache.org>.
I'm really not sure I understand the issue.  If you need them on different ports, use different ports in the endpoint address location.  They would come right up on separate ports with separate configs and everything.

Dan


On Sep 23, 2013, at 12:25 PM, marc.blomquist <ma...@gmail.com> wrote:

> I don't think I understand what you mean because that sounds very bad.
> 
> If I have two different WSDLs Services in Servicemix that use SSL, they both
> have to use the same port?!
> So if port 8999 is my ssl port then WSDL A would need to do
> https://45.61.30.1:8999/A and WSDL B would need to do
> https://45.61.30.1:8999/B ?
> 
> If that is true then we can't use CXF : (
> 
> How do I tell Servicemix to use Metro instead of CXF for my bundle?
> 
> 
> 
> --
> View this message in context: http://cxf.547215.n5.nabble.com/Custom-Camel-Component-WSDL-First-SSL-tp5734356p5734382.html
> Sent from the cxf-user mailing list archive at Nabble.com.

-- 
Daniel Kulp
dkulp@apache.org - http://dankulp.com/blog
Talend Community Coder - http://coders.talend.com


Re: Custom Camel Component WSDL First SSL

Posted by "marc.blomquist" <ma...@gmail.com>.
I don't think I understand what you mean because that sounds very bad.

If I have two different WSDLs Services in Servicemix that use SSL, they both
have to use the same port?!
So if port 8999 is my ssl port then WSDL A would need to do
https://45.61.30.1:8999/A and WSDL B would need to do
https://45.61.30.1:8999/B ?

If that is true then we can't use CXF : (

How do I tell Servicemix to use Metro instead of CXF for my bundle?



--
View this message in context: http://cxf.547215.n5.nabble.com/Custom-Camel-Component-WSDL-First-SSL-tp5734356p5734382.html
Sent from the cxf-user mailing list archive at Nabble.com.

Re: Custom Camel Component WSDL First SSL

Posted by Willem jiang <wi...@gmail.com>.
If you don't setup the interceptor on the Bus, I think it should be safe to share the same bus within these two camel context.
BTW, you can only set the SSL configuration on one port, no matter if they use the same bus or not.


--  
Willem Jiang

Red Hat, Inc.
Web: http://www.redhat.com
Blog: http://willemjiang.blogspot.com (http://willemjiang.blogspot.com/) (English)
          http://jnn.iteye.com (http://jnn.javaeye.com/) (Chinese)
Twitter: willemjiang  
Weibo: 姜宁willem





On Monday, September 23, 2013 at 7:27 PM, marc.blomquist wrote:

> So what do I do about the same bundle, same camel route, but two instances of
> my WSDL? How do I prevent the Bus from being shared at all!?
>  
>  
>  
> --
> View this message in context: http://cxf.547215.n5.nabble.com/Custom-Camel-Component-WSDL-First-SSL-tp5734356p5734365.html
> Sent from the cxf-user mailing list archive at Nabble.com (http://Nabble.com).




Re: Custom Camel Component WSDL First SSL

Posted by "marc.blomquist" <ma...@gmail.com>.
So what do I do about the same bundle, same camel route, but two instances of
my WSDL? How do I prevent the Bus from being shared at all!?



--
View this message in context: http://cxf.547215.n5.nabble.com/Custom-Camel-Component-WSDL-First-SSL-tp5734356p5734365.html
Sent from the cxf-user mailing list archive at Nabble.com.

Re: Custom Camel Component WSDL First SSL

Posted by Willem jiang <wi...@gmail.com>.
Hi,

You cannot assume that different bundles are not share the same thread in ServiceMix.
You need to create a new bus to avoid the side effect of share the bus in different bundle.


--  
Willem Jiang

Red Hat, Inc.
Web: http://www.redhat.com
Blog: http://willemjiang.blogspot.com (http://willemjiang.blogspot.com/) (English)
          http://jnn.iteye.com (http://jnn.javaeye.com/) (Chinese)
Twitter: willemjiang  
Weibo: 姜宁willem





On Monday, September 23, 2013 at 10:35 AM, marc.blomquist wrote:

> I want to do almost exactly what this poster did,
> http://cxf.547215.n5.nabble.com/Dynamic-Client-Server-Side-Configuration-using-API-for-Java-First-Spring-WS-td556445.html
>  
> Except I want my WSDL Service to use SSL. I found the following project that
> shows how I do it,
>  
> http://svn.apache.org/repos/asf/cxf/trunk/distribution/src/main/release/samples/wsdl_first_https/src/main/java/demo/hw_https/server/Server.java
>  
> http://svn.apache.org/repos/asf/cxf/trunk/distribution/src/main/release/samples/wsdl_first_https/src/main/resources/ServerConfig.xml
>  
> I've had some traumatic experiences in the past when dealing with the Bus.
> The link below indicates that all CXF processes share things,
> http://cxf.apache.org/javadoc/latest/org/apache/cxf/BusFactory.html
>  
> I definitely want each instance of my-camel to have its own Service instance
> of the WSDL, each possibly uniquely configured. How do I code it so that I
> can sleep at night knowing that I can have one instance of my-camel be http
> and the other be https without the bus being overwritten?
> getThreadDefaultBus() seems to be the solution, but...
>  
> - I'm using Servicemix, so is it safe to assume that no two bundles share
> the same thread?
>  
> - If I have a camel route has two instances of my-camel, wouldn't they
> theoretically be run from the same thread according to how camel works, so
> wouldn't that mean they share the same thread and thus conversely the same
> CXF Bus?
>  
> Someone please help me do this right... I want to sleep at night for once :
> (
>  
>  
>  
> --
> View this message in context: http://cxf.547215.n5.nabble.com/Custom-Camel-Component-WSDL-First-SSL-tp5734356.html
> Sent from the cxf-user mailing list archive at Nabble.com (http://Nabble.com).