One Star

Talend Rest WebService on SSL

Hi,
I'd like to create a Rest WebService on SSL. I'm using Talend ESB 6.1.
I'm using a tRestRequest component and I've setted my rest endpoint like this: "https://<myIp>:<myPort>:<myPath>"
When I run my Job on Talend I've this error:

org.apache.cxf.service.factory.ServiceConstructionException
at org.apache.cxf.jaxrs.JAXRSServerFactoryBean.create(JAXRSServerFactoryBean.java:219)
at esb_demo_project.s1_insertaccountsf_0_1.S1_InsertAccountSF$Thread4RestServiceProviderEndpoint.run(S1_InsertAccountSF.java:1388)
Caused by: java.lang.RuntimeException: Protocol mismatch for port 8443: engine's protocol is http, the url protocol is https
at org.apache.cxf.transport.http_jetty.JettyHTTPDestination.finalizeConfig(JettyHTTPDestination.java:156)
at org.apache.cxf.transport.http.HTTPTransportFactory.getDestination(HTTPTransportFactory.java:281)
at org.apache.cxf.endpoint.ServerImpl.initDestination(ServerImpl.java:84)
at org.apache.cxf.endpoint.ServerImpl.<init>(ServerImpl.java:63)
at org.apache.cxf.jaxrs.JAXRSServerFactoryBean.create(JAXRSServerFactoryBean.java:170)
... 1 more
Caused by: java.io.IOException: Protocol mismatch for port 8443: engine's protocol is http, the url protocol is https
at org.apache.cxf.transport.http_jetty.JettyHTTPServerEngineFactory.createJettyHTTPServerEngine(JettyHTTPServerEngineFactory.java:276)
at org.apache.cxf.transport.http_jetty.JettyHTTPDestination.retrieveEngine(JettyHTTPDestination.java:121)
at org.apache.cxf.transport.http_jetty.JettyHTTPDestination.finalizeConfig(JettyHTTPDestination.java:154)
... 5 more

Can anyone tell me how to configure a SSL connection on Talend ESB ?
Thanks.
Best Regards.
Armando
5 REPLIES
Employee

Re: Talend Rest WebService on SSL

Hi, HTTPS is only supported after a job is deployed to Karaf
Six Stars

Re: Talend Rest WebService on SSL

Set your endpoint to be relative and when the OSGi bundle is deployed to the Karaf service, it will prepend with the root path.
Example: "<my path>"
Becomes: "https://<myIp>:9000/services/<my path>"
One Star

Re: Talend Rest WebService on SSL

Hi, HTTPS is only supported after a job is deployed to Karaf

Ok, thanks.
Set your endpoint to be relative and when the OSGi bundle is deployed to the Karaf service, it will prepend with the root path.
Example: "<my path>"
Becomes: "https://<myIp>:9000/services/<my path>"

Hi dsietz,
I've set my endpoint to be relative and I've deployed my webService on Karaf. The path becomes like this:
"http://localhost:8040/services<myPath>"
Is it possibile to change root path? I'd like to configure server IP address instead of "localhost".
Best regards,
Armando
One Star

Re: Talend Rest WebService on SSL

Hi, HTTPS is only supported after a job is deployed to Karaf

Ok, thanks.
Set your endpoint to be relative and when the OSGi bundle is deployed to the Karaf service, it will prepend with the root path.
Example: "<my path>"
Becomes: "https://<myIp>:9000/services/<my path>"

Hi dsietz,
I've set my endpoint to be relative and I've deployed my webService on Karaf, but I've problems to consume the WebService. The path becomes like this:
"http://localhost:8040/services<myPath>"
Is it possibile to change root path? I'd like to configure server IP address instead of "localhost".
Best regards,
Armando
Six Stars

Re: Talend Rest WebService on SSL

Armando,
The root path can be accessed using the server's IP address instead of "localhost." Just enter the IP address in the URL in-place of localhost. I don't believe Karaf stores it's server name in a configuration file. It is dynamic based on your DNS server. If you wish to reach your server by localhost (if you are on the box) or from "outside" using the DNS alias or IP address, it shouldn't matter to Karaf.
The port number can be changed in the configuration file - org.ops4j.pax.web.cfg. It is located in the Runtime_ESBSE/container/etc directory.

   org.osgi.service.http.port = 8040


   org.osgi.service.http.port.secure = 9000


   org.osgi.service.http.secure.enabled=true