So this is my first time ever trying SOAP with Apache CXF. I copy the entire project(Spring based) sample into my workspace, run it and it just works. I'm so confused because I don't think I've included any dependencies related to Apache CXF, I've searched any folder, nothing. To my understanding that Tomcat by itself doesn’t support JAX-WS, so I need a JAX-WS runtime. But even if it does, Apache CXF is the reference implementation means, it's an independent project from the JAX-WS so I need to include it.
I also found these declarations cfx-context.xml
:
<import resource="classpath:META-INF/cxf/cxf-servlet.xml"/>
<import resource="classpath:META-INF/cxf/cxf.xml"/>
I don't thing there is such cfx-servlet.xml
or cxf.xml
within META-INF
folder or anywhere.
I need the explanation to understand why this works because I'll work with some SOAP codes for the next several days.
Tools and libraries used: Eclipse IDE - TomEE container/server - Spring's jars
I suppose you are using Java 8? JAX-WS 2.2 is part of Java SE 8 (see https://docs.oracle.com/javase/8/docs/technotes/guides/xml/jax-ws/index.html). Please note that was changed for future versions, in this case you need to add additional libraries.