cxf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sam777 <>
Subject Configuration using Java code without cxf.xml?
Date Mon, 14 Jan 2013 09:19:35 GMT
Hi there,

Excuse me a newbie question.

Am I right to assume that a production web app using cxf for webservice can
get away without using cxf.xml at all?

As I read it in  Configuration using Java code
<>  . The page basically
shows that the bus can be obtained from endpoint, hence do away with xml

	import org.apache.cxf.interceptor.LoggingInInterceptor;
	import org.apache.cxf.interceptor.LoggingOutInterceptor;
	import org.apache.cxf.jaxws.EndpointImpl;

	Object implementor = new GreeterImpl();
	EndpointImpl ep = (EndpointImpl)
Endpoint.publish("http://localhost/service", implementor);


Is that a bad practice or idea for production? Funny enough, nobody seems to
have asked this before here.

Why do I want to do this? Well, I just don't like using xml to config
everything as any change would force redeploy of web app hosting the

To me, flexibility far outweighs the extra java code xml config files can
save you from typing.



View this message in context:
Sent from the cxf-user mailing list archive at

View raw message