Hi,

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) :

Code:
  Object o = null;
  GetRegistrationServicesDocument requestDocument = GetRegistrationServicesDocument.Factory.newInstance();
  requestDocument.addNewGetRegistrationServices();
  o = myWebService.marshalSendAndReceive(requestDocument);
  // ! possible classcastexception below !
  GetRegistrationServicesResponseDocument responseDocument = (GetRegistrationServicesResponseDocument) o;
    return responseDocument.getGetRegistrationServicesResponse().
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!

At first i thought that the xmlbeans library is not threadsafe (see [1]) 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 ?

Thanks
Jorg

[1] http://marc.info/?t=124084014800004&r=1&w=2