function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
SFRichSFRich 

Web Services and Soap

Two questions: 

If I call an external web service from an Apex class, how can I detect if that service sends back a SOAP fault? 

 

If I create a web service in Apex to be called from outside Salesforce, can I send a SOAP fault response back to the caller?

Best Answer chosen by Admin (Salesforce Developers) 
SuperfellSuperfell
In both cases soap faults are mapped to/from apex exceptions.

All Answers

SuperfellSuperfell
In both cases soap faults are mapped to/from apex exceptions.
This was selected as the best answer
skarolinskarolin

Yes indeed, when invoking a external Web Service from APEX, if this one is returning a SOAP Fault an expection is raised.

But I cannot figure out how to get the full soap message from this exception.

 

Can you help on this?

 

Regards,

Stéphane