How to unmarshal SOAP::FaultError detail attribute

5 views
Skip to first unread message

Rob Janes

unread,
Nov 18, 2009, 6:12:22 PM11/18/09
to soap4r
looks like the unmarshalling is already done, if you probe into the
SOAP::Mapping::Object ...

rescue SOAP::FaultError => ee
## InvalidLogin, InvalidLocale, NoPermission, RuntimeFault
## ee.detail.__xmlele[0][0] is an XSD::QName object, with
accessors name and namespace
## ee.detail.__xmlele[0][1] is a VMware::VIM25::xxx fault object
vim_fault = ee.detail.__xmlele[0][1]
case vim_fault.class
when VMware::VIM25::InvalidLogin
when VMware::VIM25::InvalidLocale
when VMware::VIM25::NoPermission
when VMware::VIM25::RuntimeFault
Reply all
Reply to author
Forward
0 new messages