I develop one web service in outsystem. I want to raise exception when the input parameters are not valid. And the client should receive the info in below:
<soap:Fault>
<soap:faultcode>XXX</saop:faultcode>
<soap:faultstring>XXX</soap:faultstring>
</soap:Fault>
I defined some xceptions and the error messages. But the client receive the info:
<soap:faultcode>soap:Server</saop:faultcode>
<soap:faultstring>Server was unable to process request --> XXXX (the error message that I defined)</soap:faultstring>
The content in <soap:faultcode> is always same.
How can I let <soap:faultcode> to use what I defined? And how to let <soap:faultstring> to only show the error message that I defined?
Greetings Claire,
Unfortunately it's not possible to customize how SOAP faults are generated from a raised exception. Also, according to this, faultcode accepts only a set of values: VersionMismatch, MustUnderstand, Client, or Server.
So I think you'll either have to:
Let me know if you have further questions.
Best regards,
Pedro Guimarães
Pedro Guimarães wrote:
Thank you for your reply. But may I know how to create the Proxy? Shall I write my own espace/extension to do that?
Hi Chen,
I guess it is not reaching to the point where you defined your fault code and message and before that itself it is getting problem.
Regards
-PJ-