Hi,
My service assembly consists of a CXF BC service unit containing a consumer
and a Camel service unit.
I'm trying to populate a SOAP Fault from within camel. I can populate the
faultstring, by adding a property directly to the JBI MessageExchange,
however I can't get anything other than "detail" in the fault code.
In CxfBCConsumer.java the following code creates a SoapFault, with default
values, then overrides the faultstring, but not the faultcode. This happens
when messages aren't wrapped in a JBI wrapper.
f = new SoapFault(
new org.apache.cxf.common.i18n.Message(
"Fault occured", (ResourceBundle)
null),
new QName(details.getNamespaceURI(),
"detail"));
f.setDetail(details);
if (exchange.getProperty("faultstring") != null) {
f.setMessage((String)exchange.getProperty("faultstring"));
}
When messages are wrapped in a JBI wrapper, the code does override the
"faultcode" from the Message Exchange.
f = new JbiFault(
new org.apache.cxf.common.i18n.Message(
"Fault occured", (ResourceBundle)
null));
if (exchange.getProperty("faultstring") != null) {
f.setMessage((String)exchange.getProperty("faultstring"));
}
if (exchange.getProperty("faultcode") != null) {
f.setFaultCode((QName) exchange
.getProperty("faultcode"));
}
What is the correct way to do this, without using the JBI wrappers, or is it
just missing and JBI wrappers are the only way until the code is updated?
thanks for any help,
steve.
--
View this message in context:
http://servicemix.396122.n5.nabble.com/Setting-faultcode-for-CXFBC-tp1842385p1842385.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.