camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From amit3880 <amit3...@gmail.com>
Subject cxf webservice over https
Date Sat, 29 Aug 2015 06:42:51 GMT
Hello All,

I am developing a cxf webservice and want to expose that over https, but I
am not using spring and I am using directly java dsl and google guice to
inject routes.
I I am not sure how should I configure the https webservice consumer
endpoint in camel.
I have tried lot by searching around internet/stackoverflow and camel
mailing lists., but I yet not got any proper solution to do that.

If anyone can help would be great.

Below is the sample example which works good on http, but I want to use
https as I said.
Please help. 

import javax.jws.WebMethod;
import javax.jws.WebService;

import org.apache.camel.builder.RouteBuilder;
import org.apache.camel.main.Main;

public class CXFWebService {

	public static void main(String[] args) {
		Main main = new Main();
		main.addRouteBuilder(new RouteBuilder() {
			@Override
			public void configure() throws Exception {
				// The below works
			
from("cxf://http://0.0.0.0:8989/sayHi?serviceClass=SayHiService").to("log:output").end();
				// but below does not work directy, want to know how can we do it using
without spring, directly in java
				//
from("cxf://https://0.0.0.0:8989/sayHi?serviceClass=com.cxf.https.SayHiService").to("log:output").end();
			}
		});
		main.enableHangupSupport();
		try {
			main.run();
		} catch (Exception e) {
			e.printStackTrace();
		}
	}
}

@WebService
class SayHiService {
	@WebMethod
	public String sayHi() {
		return "Hi From Webservice ";
	}
}






--
View this message in context: http://camel.465427.n5.nabble.com/cxf-webservice-over-https-tp5771079.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Mime
View raw message