Dear Friends ,
I am using ruby wsdl . Using wsdl2ruby I have generated client
application . But the problem is that , I got the SOAP::FaultError if it
is any error .
But the default.rb file has
class NardaFault
attr_accessor :errorCode
attr_accessos :errorString
def initialize( errorCode , errorString)
end
end
If there is no error i am getting proper reponse . But if i get any
error from the server ,
i am getting SOAP::FaultError only . But I need NardaFault Object , to
fetch the errorCode and errorString.
I have done one more thing also .
rescue => e
puts e.inspect # SOAP::FaultError Object .
puts e.faultcode.to_s # I got SOAP::SOAPElement:0xb7cee264
My Question is that ,
Whenever , error has come i need to rescue the error and i have to get
the errorCode and errorString . But Always i am getting SOAP::FaultError
only .
Thanks for Advance …
Vetrivel Vaithilingam wrote:
Dear Friends ,
I am using ruby wsdl . Using wsdl2ruby I have generated client
application . But the problem is that , I got the SOAP::FaultError if it
is any error .
But the default.rb file has
class NardaFault
attr_accessor :errorCode
attr_accessos :errorString
def initialize( errorCode , errorString)
end
end
If there is no error i am getting proper reponse . But if i get any
error from the server ,
i am getting SOAP::FaultError only . But I need NardaFault Object , to
fetch the errorCode and errorString.
I have done one more thing also .
rescue => e
puts e.inspect # SOAP::FaultError Object .
puts e.faultcode.to_s # I got SOAP::SOAPElement:0xb7cee264
My Question is that ,
Whenever , error has come i need to rescue the error and i have to get
the errorCode and errorString . But Always i am getting SOAP::FaultError
only .
Thanks for Advance …
Sorry .
I got the solution .
The Solution is:-
e.detail.fault.errorCode