Catching the SOAP fault element

Catching the SOAP fault element


Is it possible to catch the SOAP fault element in Service Studio when calling a webservice that trows an exception?

Best regards,
Hi Fernando,

at the moment, all you can access is the exception message via the "Session.ExceptionMessage". I think the message contains the FaultCode and FaultMessage, but you have to parse the exception message text in order to retrieve it. If this is having impact in your project, please contact OutSystems support directly.
There is any change on the plataform that make possible to access the SOAP fault element?
Hi Marcelo,

Yes, there is a way to access it in the latest versions of the platform (not sure the exact number ..but somewere since around I think)

I will post an app in the forge with a sample for it and reply here again.
What version are you using?

João Rosado
Hi again Marcelo,

As promissed here is a Forge Component to do what you need:

How to use it:
  • Publish the application
  • Reference the actions from the ExceptionUtils extension
  • Call the GetLastSoapExceptionDetails action after the Exception Handler that catches your exception.
That will give you the xml text of the details of the SOAP Exception.

If you need more than that, or prefer to work with the Xml objects directy instead of receiving it as text, then open the extension in Integration Studio and see what it does.
It's meant to be an example of usage :)

João Rosado
Unfortunately i'm using version 7 in this project. But for sure that will be very handy in other projects. Thx.