You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by Roman Vottner <ro...@gmx.at> on 2014/10/22 21:03:02 UTC

CXF 3.0.1 Spring bean injection of JettyHTTPServerEngineFactory ignored?

This is somehow a repost of
http://stackoverflow.com/questions/26508701/camel-2-14-0-cxf-3-0-1-jetty-configuration-protocol-mismatch-error
where I presnted my problem I have while upgrading from CXF 2.7.10 to 3.0.1
(as of a Apache Camel 2.13.0 -> 2.14.0 upgrade).

I basically used to create a jetty server engine factory like explained at
https://github.com/RovoMe/CamelCxfJetty/blob/master/src/main/java/at/rovo/cxf/test/config/SoapSSLConfig.java#L47

However, in CXF 3.0.1 I keep getting a Protocol mismatch as the bean which
used to be injected on CXF startup which created a SSL secured Jetty server
is not invoked anymore. (see different branch therefore:
https://github.com/RovoMe/CamelCxfJetty/tree/version_upgrade)

But configuring Jetty via XML configuration is working as expected
(https://github.com/RovoMe/CamelCxfJetty/tree/Jetty_with_XML_configuration).

So is this an intended API change or probably a bug?
http://cxf.apache.org/docs/30-migration-guide.html didn't state any
injection/API changes other than the support of Spring 3 and 4 and skipping
of 2.5. If there is an other, better way to configure SSL with Jetty in Java
(not XML) please point me in that direction.

Cheers,
Roman



--
View this message in context: http://cxf.547215.n5.nabble.com/CXF-3-0-1-Spring-bean-injection-of-JettyHTTPServerEngineFactory-ignored-tp5750214.html
Sent from the cxf-user mailing list archive at Nabble.com.

Re: CXF 3.0.1 Spring bean injection of JettyHTTPServerEngineFactory ignored?

Posted by Roman Vottner <ro...@gmx.at>.
OK, it turned out that the actual problem was caused due to a change in
Spring as on replacing 

@Configuration
@ImportResource({ "classpath:META-INF/cxf/cxf.xml" })
public class CxfEndpointConfig extends SoapSSLConfig
{
    ...
}

with

@Configuration
@ImportResource({ "classpath:META-INF/cxf/cxf.xml" })
@Import(SoapSSLConfig.class)
public class CxfEndpointConfig
{
    ...
}

solved the protocol mismatch error as the invocation of the
JettyHttpServerEngineFactory bean succeeds and therefore the SSL secured
Jetty server is able to start up.



--
View this message in context: http://cxf.547215.n5.nabble.com/CXF-3-0-1-Spring-bean-injection-of-JettyHTTPServerEngineFactory-ignored-tp5750214p5750226.html
Sent from the cxf-user mailing list archive at Nabble.com.