How do I get to the minimal list of dependencies my cxf client needs to run?
I have a client (from http://www.ibm.com/developerworks/java/library/j-jws17/index.html) whose build I have maven-ized. I'm trying to construct the correct runtime classpath so that maven would build a runnable client. The ant build from the article simply puts *everything* from ${cxf-root}/lib onto the classpath. I would like a classpath that has only what is needed to run. When I run the client from the article with only the build time dependencies on the classpath, I get a result that does not tell me which dependencies to add. Not a class-not-found exception, or a log message (I turned it up to 'trace' level). The error I get is on the server side log: Dec 29, 2010 8:16:00 PM org.apache.cxf.ws.security.wss4j.WSS4JInInterceptor handleMessage WARNING: Request does not contain required Security header Dec 29, 2010 8:16:00 PM org.apache.cxf.ws.security.wss4j.WSS4JInInterceptor handleMessage WARNING: org.apache.ws.security.WSSecurityException: An error was discovered processing the <wsse:Security> header at org.apache.cxf.ws.security.wss4j.WSS4JInInterceptor.handleMessage(WSS4JInInterceptor.java:229) at org.apache.cxf.ws.security.wss4j.WSS4JInInterceptor.handleMessage(WSS4JInInterceptor.java:78) at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:243) at org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:110) at org.apache.cxf.transport.servlet.ServletDestination.invoke(ServletDestination.java:98) at org.apache.cxf.transport.servlet.ServletController.invokeDestination(ServletController.java:423) at org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:178) at org.apache.cxf.transport.servlet.AbstractCXFServlet.invoke(AbstractCXFServlet.java:142) at org.apache.cxf.transport.servlet.AbstractHTTPServlet.handleRequest(AbstractHTTPServlet.java:179) at org.apache.cxf.transport.servlet.AbstractHTTPServlet.doPost(AbstractHTTPServlet.java:103) at javax.servlet.http.HttpServlet.service(HttpServlet.java:647) at org.apache.cxf.transport.servlet.AbstractHTTPServlet.service(AbstractHTTPServlet.java:159) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269) .... (more details available, omitted for now) And the client receives a fault: javax.xml.ws.soap.SOAPFaultException: An error was discovered processing the <wsse:Security> header at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:146) at $Proxy42.matchQuakes(Unknown Source) at com.sosnoski.ws.seismic.cxf.CxfClient.runQuery(CxfClient.java:83) at com.sosnoski.ws.seismic.cxf.TestClient$TestRunnable.run(TestClient.java:210) at java.lang.Thread.run(Thread.java:662) Caused by: org.apache.cxf.binding.soap.SoapFault: An error was discovered processing the <wsse:Security> header ... (more details available, omitted for now) I think the right jar file on the runtime classpath would affect the content of the wsse:Security header, but I don't know which jar file. To discover the minimal list of dependencies, I ran a few experiments: 1) In eclipse, I launched the maven built project with all the jar files from ${cxf-root}/lib on the classpath. That works and so one-by-one, I removed the jars from the runtime classpath until I was left with the ones that work: only cxf-manifest.jar. The content of that jar is only a manifest and a maven pom. Does cxf read the pom to load the jar files from my local repository? But I also have a two experiments that conflict with that finding. 1) Putting cxf-distribution-manifest as a dependency in my maven project pom does not work. Also, 2) excluding cxf-manifest.jar from the article's ant build does not break the client. So, how do I discover the minimal runtime dependencies required on this client's classpath? cxf 2.2.8, linux ubuntu 10.10, jdk 1.6, tomcat 5.5. Thanks, John
