ClassCast exception while consuming a webservice

I have a normal web service consumer with WS security implemented with certificates and keys. I have tested it on different server and either it runs fine or throws a class cast exception.
Analysis shows that IS server errors out while reading the response of web service. The exception in the soapdataresponse object is java.lang.ClassCastException: org.apache.xerces.dom.DeferredElementNSImpl
Now nothing is wrong with the webservice response as it works fine on few server.
Thanx in advance for all the help.