Hi Chris,
If you want to start up a CXF standalone Server , you don't need to do
any configuration of the HTTP listener.
It will start up the listener on the service publish address which you
define in the wsdl or pass to the jaxws api.
CXF HTTP standalone Server start the http transport listener when you
call the jaxws publish() API.
But in spring, you need not to call the publish method youself. CXF
jaxws syntax will help you.
Here is a example of publish the service by using the JAXWS syntax,
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:jaxws="http://cxf.apache.org/jaxws"
xsi:schemaLocation="
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
http://cxf.apache.org/jaxws http://cxf.apache.org/schema/jaxws.xsd">
<import resource="classpath:META-INF/cxf/cxf.xml" />
<import resource="classpath:META-INF/cxf/cxf-extension-soap.xml" />
<import resource="classpath:META-INF/cxf/cxf-extension-http.xml" />
<import
resource="classpath:META-INF/cxf/cxf-extension-http-jetty.xml" />
<jaxws:endpoint
id="helloWorld"
implementor="demo.spring.HelloWorldImpl"
address="http://localhost:8080/HelloWorld" />
</beans>
NOTE:
I am not sure you how you load this configuration in spring.
But you should take care of the creation of the bus which is the key
point of configuration in CXF.
You need to init a right bus before you publish the service.
The detail code you can find in CXFServlet.java in cxf-rt-transport-http
module.
Cheers,
Willem.
Christopher Moesel wrote:
Hello,
The User Guide has a page on the standalone transport:
http://cwiki.apache.org/CXF20DOC/standalone-http-transport.html
But this page only demonstrates how to setup an SSL server. Is there
any documentation on setting up a normal HTTP listener? I'd like to
configure the port it runs on, for instance. I couldn't find any
samples that use Spring (the tests do have some code examples of the
server).
Also, once this is configured in Spring, how do we start the server? Do
I just load the spring config files and it starts itself? Or do I need
to explicitly start it?
-Chris