Has anyone ever occured issues with thread safety in a webservice client that uses spring-ws ? We are currently seeing really wierd issues in our testng suite (configured with parallel=methods) that do not occur when we run the tests normally ie not parallel.
What happens regularly (but not always) during the testcase execution is this (note we're using xmlbeans marshalling) :
When i investigate the CCE then i see that the object returned from the myWebService.marshalSendAndReceive() call is in fact just the requestDocument instance instead of an instance of GetRegistrationServicesResponseDocument!
Object o = null;
GetRegistrationServicesDocument requestDocument = GetRegistrationServicesDocument.Factory.newInstance();
o = myWebService.marshalSendAndReceive(requestDocument);
// ! possible classcastexception below !
GetRegistrationServicesResponseDocument responseDocument = (GetRegistrationServicesResponseDocument) o;
At first i thought that the xmlbeans library is not threadsafe (see ) so i swapped it out for a recent nightly build but that doesn't make a difference. All our tests extend AbstractTestNGSpringContextTests. We're using Spring 2.5.6 and spring-ws 1.5.8.
Any thoughts on troubleshooting this ?