Ping! Reading my question again, I found that the subject might have been misleading. It is not the compiler which produces the error, but my CXF server upon receiving a request.
Please read below and see if you have any suggestions for me to try. On Wed, Feb 5, 2014 at 3:55 PM, Jan Fredrik Wedén <[email protected]> wrote: > Greetings list! > > In a Maven-based project we are using CXF and the codegen plugin to > generate classes and consume a webservice maintained externally from our > project. This works just fine so far. > > For testing I wanted to create a small server in test code with a custom > "no-op" implementation using JaxWsServerFactoryBean based on the same > generated service interfaces and schema classes. So far (almost) so good. I > was hit by the "wrong number of arguments" exception and after some > searching I found that the wsdl apparently declares an implicit header > which manifests itself as a second parameter in the service interface > method. After adding "-exsh true" to the codegen plugin I thought I had > nailed it. > > Enter the part that puzzles me: If I run "mvn generate-sources" and then > tell IntelliJ to run my test method, everything works. If I try to run the > tests with Maven (e.g. mvn test, mvn install or whatever) it fails with the > "wrong number of arguments" exception once again (it attempts to invoke the > service method with just the request type parameter and not the second > header parameter). The same thing happens if I run "mvn generate-sources", > tell IntelliJ to rebuild the entire project and then run the test in > IntelliJ. It looks like something in the compilation step messes things up. > > Does this make any sense? I suspect this masks some other problem but I'm > unable to figure it out. What other info do you need to try and help me out? > > -- > - Jan Fredrik Wedén > -- - Jan Fredrik Wedén
