Expand my Community achievements bar.

Dive into Adobe Summit 2024! Explore curated list of AEM sessions & labs, register, connect with experts, ask questions, engage, and share insights. Don't miss the excitement.

How to throw a SOAP exception

Avatar

Level 2

Hi,

I have a requirement from customer that when they call the WSDL from their app and the workflow will not get what it should, that it should throw standard SOAP exception.

To give more details on it, they will send for example input string "A" and based on that I will return output string "B" in the process.

Now if they ask for "C" for instance, I need to be able to throw that SOAP exception. Is that possible? The process in workbench consists of simple decision point and set value activity based on route conditions.

Thanks

J.

1 Reply

Avatar

Former Community Member

I am assuming you are wanting something to come back as a SOAP fault element?

Unhandled process exceptions are sent back as faults. So, theoretically, you could write a service component to do nothing but throw an exception. Then you could route your process to call that in specific situations.

As an alternative, I would consider having something like an additional 'status' output variable that always came back in the response which indicated the status of your process.

Good Luck,

Ryan M. Jacobs

rjacobs@cardinalsolution.com

Cardinal Solutions Group