• skarolin
  • NEWBIE
  • 0 Points
  • Member since 2010

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 1
    Replies

Currently, I am working on a POV for one of my customer.

I have a webservice hosted by a third party provider and I try to invoke this web service. So I have loaded the WSDL into Force.com (including SOAP Headers and SOAP Faults) and the APEX calsses has been created. This is working fine as long as I do not recieved a SOAP fault.

 

When the Web Service is returning a SOAP Fault, a callout exception is generated. I try to find a way to get that SOAP fault in the associated object genereted automatically but I cannot find how.

 

Is there a way to get the SOAP Fault into the SOAP Fault object generated when importing the WSDL? If not is there at least a way to retrieve to full SOAP message that was recieved?

 

Thanks

Karolinski Stéphane

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?