Discussion:
how to throw soap fault from otherwise clause? if no expected operationname found
Wang Yan
2018-11-15 20:28:26 UTC
Permalink
Hello all,

how to throw soap fault from otherwise clause? if no expected operationname
found.
any suggestions?

from(SOAP_ENDPOINT_OUT_URI )
.choice()
.when(simple("${in.headers.operationName} == 'getcity'"))
.to(SOAP_ENDPOINT_MOCK_CITY)
.when(simple("${in.headers.operationName} == 'getcountry'"))
.to(SOAP_ENDPOINT_MOCK_COUNTRY")
.otherwise().log(LoggingLevel.DEBUG, "##### No operationname found #####")
.end();
Wang Yan
2018-11-19 10:41:42 UTC
Permalink
i simple put .throwException(new Exception("error happened")), then looks
like camel route convert exception to soapfault automatically.
i even did not handlefault on route.
Post by Wang Yan
Hello all,
how to throw soap fault from otherwise clause? if no expected
operationname found.
any suggestions?
from(SOAP_ENDPOINT_OUT_URI )
.choice()
.when(simple("${in.headers.operationName} == 'getcity'"))
.to(SOAP_ENDPOINT_MOCK_CITY)
.when(simple("${in.headers.operationName} == 'getcountry'"))
.to(SOAP_ENDPOINT_MOCK_COUNTRY")
.otherwise().log(LoggingLevel.DEBUG, "##### No operationname found
#####")
.end();
Loading...