When using the ArcGIS Server SOAP API on Windows using Java 7/8 (works fine on Linux and/or Java 6) I found an issue where the arcgis_agsws_stubs.jar library is throwing an intermittent class cast exception
com.esri.arcgisws.GetServerInfoFeatureServerResponse cannot be cast to com.esri.arcgisws.GetServerInfoResponse
when calling MapServerBindingStub.getServiceInfo(String mapName) method.
I tracked the issue down to the GetServiceInfoFeatureServerResponse (and the GetServiceInfoFeatureServer) class having an incorrect @XmlRootElement annotation. They're set to GetServiceInfoResponse (and GetServiceInfo), which I believe is causing JAXB, under certain circumstances, to deserialize the GetServiceInfoResponse returned from the server as a GetServiceInforFeatureServiceResponse.
The problem appears to be in all versions of the arcgis_agsws_stubs.jar library up to 10.3, and I have no idea why the issue only occurs with using Java 7+ on Windows (I reproduced the problem on both Windows 7 Professional and Windows Server 2012 using Oracle JRE 220.127.116.11 and 18.104.22.168), but I've resolved the problem for myself by manually editing the classes to fix the annotations (using the ClassEditor v 2.23 from classeditor.sourceforge.net) and so far it appears to have resolved the problem.
So in the vain hope that someone at ESRI notices this post and wants to improve their software I though I'd mention it.