I am have been working on a project and have converted it from Spring Services 1.5.6 to 2.0. I am using JAXB to generate types from NIEM Schemas. I am getting an error when I test. If I don't have any test classes it generates the WSDL with no problems and appears to work.
Has anyone seen this problem and what am I missing?
Here is the error message.
My confusion is from this in the error: org.companyname.jailroster.ws.NameSearchEndpoint.jailRosterImpl. Why does it nest it under my endpoint?
It should be org.companyname.jailroster.business.JailRosterImpl
To add another level of complication I have a statement in my POM.xml to force the NIEM schemas to generate classes in a specific location.
Well a couple things in your application-xml having this:
can be reduced to just this:
All the rest are redundant as sub packages are scanned. But that is not your problem. Your problem is your test-applicationContext.xml loads your context for you test case as you have specified below:
This is good to have a separate context for tests but you forgot to define JailrosterImpl in your test context it should probably look something like below:
Note that you do not need to manually wire dependencies into your test class you do not even need to define DependencyInjectionTestExecutionListener anymore as it should be done by default. You can just autowire your dependencies in to your test classes. I also removed the depends-on this is already accounted for when you use the ref attribute. You would use depends-on for the more indirect cases like if you needed to trigger a static initializer in another class that the bean you are creating depends on etc. You can also take out the getter and setter for NameSearchEndpoint in your test class.
Don't forget to make use of the below packages they are useful for testing your services.