You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by "Morris Jr, David P" <da...@lmco.com> on 2011/02/07 16:30:11 UTC
Change ports dynamically in CXF?
I have a CXF webservice that is running under SSL.
Currently the SSL port is 8443 for apache tomcat. I would like to 'dynamically' change the SSL port to 8181 for glassfish without having to change the WSDL file and CXF+Spring configuration files. Is this possible?
Thanks!
RE: EXTERNAL: Re: Change ports dynamically in CXF?
Posted by "Morris Jr, David P" <da...@lmco.com>.
Just need to change the port in the client:
http://cxf.apache.org/docs/client-http-transport-including-ssl-support.html
How to override the service address ?
If you are using JAXWS API to create the proxy obejct, here is an example which is complete JAX-WS compliant code
URL wsdlURL = MyService.class.getClassLoader
.getResource ("myService.wsdl");
QName serviceName = new QName("urn:myService", "MyService");
MyService service = new MyService(wsdlURL, serviceName);
ServicePort client = service.getServicePort();
BindingProvider provider = (BindingProvider)client;
// You can set the address per request here
provider.getRequestContext().put(
BindingProvider.ENDPOINT_ADDRESS_PROPERTY,
"http://my/new/url/to/the/service");
-----Original Message-----
From: Glen Mazza [mailto:gmazza@talend.com]
Sent: Monday, February 07, 2011 10:38 AM
To: users@cxf.apache.org
Subject: EXTERNAL: Re: Change ports dynamically in CXF?
I don't think this is a WSDL or CXF/Spring issue. The precise SSL port
used is part of your servlet container configuration, in the web.xml you
just need to activate SSL
(http://www.jroller.com/gmazza/entry/ssl_for_web_services). The
endpoint URL's you see in the WSDL from the browser will be dynamically
updated by the web service runtime.
Glen
On 07.02.2011 10:30, Morris Jr, David P wrote:
> I have a CXF webservice that is running under SSL.
>
> Currently the SSL port is 8443 for apache tomcat. I would like to 'dynamically' change the SSL port to 8181 for glassfish without having to change the WSDL file and CXF+Spring configuration files. Is this possible?
>
> Thanks!
--
Glen Mazza
Software Engineer, Talend (http://www.talend.com)
blog: http://www.jroller.com/gmazza
Re: Change ports dynamically in CXF?
Posted by Glen Mazza <gm...@talend.com>.
I don't think this is a WSDL or CXF/Spring issue. The precise SSL port
used is part of your servlet container configuration, in the web.xml you
just need to activate SSL
(http://www.jroller.com/gmazza/entry/ssl_for_web_services). The
endpoint URL's you see in the WSDL from the browser will be dynamically
updated by the web service runtime.
Glen
On 07.02.2011 10:30, Morris Jr, David P wrote:
> I have a CXF webservice that is running under SSL.
>
> Currently the SSL port is 8443 for apache tomcat. I would like to 'dynamically' change the SSL port to 8181 for glassfish without having to change the WSDL file and CXF+Spring configuration files. Is this possible?
>
> Thanks!
--
Glen Mazza
Software Engineer, Talend (http://www.talend.com)
blog: http://www.jroller.com/gmazza