Hi Glen,

I am not using Spring in my service as all my web services are creating dynamically using JaxWsServerFactoryBean.

Is it possible to use Spring configuration only for using SSL on the CXF service and do the service creation using CXF APIs (without spring config)?

My HelloWorld interface just has single hello method. It does not refer to any WSDL.

Thanks,
Arul

Glen Mazza wrote:
Hi Arul--does that service class HelloWorld.class have a hardcoded WSDL URL
in it that uses http:// instead of https:// ?

CXF normally returns that error (perhaps its a bug) when you switch
programmaticaly between http:// and https://.  If you can modify your
HelloWorld.class to have a hardcoded URL with the https:// protocol, that
error message *might* go away.

BTW, programmatic configuration as you're doing can be hard to read and
maintain. CXF has the ability to do that via Spring configuration instead: http://cwiki.apache.org/CXF20DOC/client-http-transport-including-ssl-support.html

HTH,
Glen


Arul Dhesiaseelan wrote:
Hello,

I was trying to use CXF APIs to configure SSL on the service. But, I am getting an illegal state exception: Port 9001 is configured with wrong protocol "http" for "https://localhost:9001/hello";

    JaxWsServerFactoryBean sf = new JaxWsServerFactoryBean();
sf.setServiceClass(HelloWorld.class); sf.getServiceFactory().setWrapped(true);

    QName name = new QName("http://test.com";, "ws", "");
    sf.setServiceName(name);
    sf.setAddress("https://localhost:9001/hello";);

    HelloWorld helloService = new HelloWorldImpl();




Reply via email to