Buggy code:
public class MailSender extends Stub { protected AxisOperation [ ] _operations ; private HashMap faultExceptionNameMap = new HashMap ( ) ; private HashMap faultExceptionClassNameMap = new HashMap ( ) ; private HashMap faultMessageMap = new HashMap ( ) ; private static int counter = 0 ; private static synchronized String getUniqueSuffix ( ) { } private void populateAxisService ( ) throws AxisFault { } private void populateFaults ( ) { } public MailSender ( ConfigurationContext configurationContext , String targetEndpoint ) throws AxisFault { } public MailSender ( ConfigurationContext configurationContext , String targetEndpoint , boolean useSeparateListener ) throws AxisFault { } public MailSender ( ConfigurationContext configurationContext ) throws AxisFault { } public MailSender ( ) throws AxisFault { } public MailSender ( String targetEndpoint ) throws AxisFault { } public MailSender . GetNameResponse getName ( MailSender . GetName getName1 ) throws RemoteException { } public void startgetName ( MailSender . GetName getName1 , final com . bros . services . mailer . MailSenderCallbackHandler callback ) throws RemoteException { OperationClient _operationClient = _serviceClient . createClient ( _operations [ 0 ] . getName ( ) ) ; _operationClient . getOptions ( ) . setAction ( "urn:getName" ) ; _operationClient . getOptions ( ) . setExceptionToBeThrownOnSOAPFault ( true ) ; addPropertyToOperationClient ( _operationClient , ATTR_WHTTP_QUERY_PARAMETER_SEPARATOR , "&" ) ; SOAPEnvelope env = null ; final MessageContext _messageContext = new MessageContext ( ) ; env = toEnvelope ( getFactory ( _operationClient . getOptions ( ) . getSoapVersionURI ( ) ) , getName1 , optimizeContent ( new QName ( "http:////mailer.services.bros.com" , "getName" ) ) , new QName ( "http:////mailer.services.bros.com" , "getName" ) ) ; _serviceClient . addHeadersToEnvelope ( env ) ; _messageContext . setEnvelope ( env ) ; _operationClient . addMessageContext ( _messageContext ) ; _operationClient . setCallback ( new AxisCallback ( ) { public void onMessage ( MessageContext resultContext ) { try { SOAPEnvelope resultEnv = resultContext . getEnvelope ( ) ; Object object = fromOM ( resultEnv . getBody ( ) . getFirstElement ( ) , MailSender . GetNameResponse . class , getEnvelopeNamespaces ( resultEnv ) ) ; <START_BUG> callback . receiveResultgetName ( ( ( MailSender . GetNameResponse ) ( object ) ) ) ; <END_BUG> } catch ( org . apache . axis2 e ) { callback . receiveErrorgetName ( e ) ; } } public void onError ( Exception error ) { if ( error instanceof AxisFault ) { AxisFault f = ( ( AxisFault ) ( error ) ) ; OMElement faultElt = f . getDetail ( ) ; if ( faultElt != null ) { if ( faultExceptionNameMap . containsKey ( new org . apache . axis2 . client . FaultMapKey ( faultElt . getQName ( ) , "getName" ) ) ) { try { String exceptionClassName = ( ( String ) ( faultExceptionClassNameMap . get ( new org . apache . axis2 . client . FaultMapKey ( faultElt . getQName ( ) , "getName" ) ) ) ) ; Class exceptionClass = Class . forName ( exceptionClassName ) ; Constructor constructor = exceptionClass . getConstructor ( String . class ) ; Exception ex = ( ( Exception ) ( constructor . newInstance ( f . getMessage ( ) ) ) ) ; String messageClassName = ( ( String ) ( faultMessageMap . get ( new org . apache . axis2 . client . FaultMapKey ( faultElt . getQName ( ) , "getName" ) ) ) ) ; Class messageClass = Class . forName ( messageClassName ) ; Object messageObject = fromOM ( faultElt , messageClass , null ) ; Method m = exceptionClass . getMethod ( "setFaultMessage" , new Class [ ] { messageClass } ) ; m . invoke ( ex , new Object [ ] { messageObject } ) ; callback . receiveErrorgetName ( new RemoteException ( ex . getMessage ( ) , ex ) ) ; } catch ( ClassCastException e ) { callback . receiveErrorgetName ( f ) ; } catch ( ClassNotFoundException e ) { callback . receiveErrorgetName ( f ) ; } catch ( NoSuchMethodException e ) { callback . receiveErrorgetName ( f ) ; } catch ( InvocationTargetException e ) { callback . receiveErrorgetName ( f ) ; } catch ( IllegalAccessException e ) { callback . receiveErrorgetName ( f ) ; } catch ( InstantiationException e ) { callback . receiveErrorgetName ( f ) ; } catch ( org . apache . axis2 e ) { callback . receiveErrorgetName ( f ) ; } } else { callback . receiveErrorgetName ( f ) ; } } else { callback . receiveErrorgetName ( f ) ; } } else { callback . receiveErrorgetName ( error ) ; } } public void onFault ( MessageContext faultContext ) { AxisFault fault = Utils . getInboundFaultFromMessageContext ( faultContext ) ; onError ( fault ) ; } public void onComplete ( ) { try { _messageContext . getTransportOut ( ) . getSender ( ) . cleanup ( _messageContext ) ; } catch ( org . apache . axis2 axisFault ) { callback . receiveErrorgetName ( axisFault ) ; } } } ) ; CallbackReceiver _callbackReceiver = null ; if ( ( ( _operations [ 0 ] . getMessageReceiver ( ) ) == null ) && ( _operationClient . getOptions ( ) . isUseSeparateListener ( ) ) ) { _callbackReceiver = new CallbackReceiver ( ) ; _operations [ 0 ] . setMessageReceiver ( _callbackReceiver ) ; } _operationClient . execute ( false ) ; } public void sendMail ( MailSender . SendMail sendMail3 ) throws MailSenderAddressExceptionException , MailSenderMessagingExceptionException , RemoteException { } public void startsendMail ( MailSender . SendMail sendMail3 , final com . bros . services . mailer . MailSenderCallbackHandler callback ) throws RemoteException { } private Map getEnvelopeNamespaces ( SOAPEnvelope env ) { } private QName [ ] opNameArray = null ; private boolean optimizeContent ( QName opName ) { } public static class MailSenderAddressException implements ADBBean { public static final QName MY_QNAME = new QName ( "http:////mailer.services.bros.com" , "MailSenderAddressException" , "ns1" ) ;

Fix:
callback . receiveResultgetName ( ( ( MailSenderStub . GetNameResponse ) ( object ) ) ) ;