Hello, Using SM's servicemix-jsr181 component I deployed a POJO service with the xbean.xml file:
<beans xmlns:jsr181="http://servicemix.apache.org/jsr181/1.0" xmlns:mp="http://odelia-technologies.com/metaphora"> <property name="context" ref="context" /> <jsr181:endpoint annotations="none" service="mp:serviceMtom" endpoint="serviceMtomEP" mtomEnabled="true"> <jsr181:pojo> <bean class="com.odelia.metaphora.ServiceMtom"> <property name="repertoire" value="Metaphora/in"/> </bean> </jsr181:pojo> </jsr181:endpoint> </beans> My POJO is simple: public class ServiceMtom { ... public void envoyer(String nomfichier, long taille, long decalage, byte[] binaire) throws Exception { ... } } My POJO's envoyer method is well invoked! Now, under certain conditions when I catch exception in the method implementation, I would like return a Fault like this: MessageExchange exchange = org.apache.servicemix.jsr181.JBIContext.getMessageExchange(); try { ... } } catch (Exception e) { Fault fault = exchange.createFault(); exchange.setFault(fault); } But when tryinh this I get an exception telling me Fault not supported: INFO - DefaultFaultHandler - Fault occurred! javax.jbi.messaging.MessagingException: Fault not supported at org.apache.servicemix.jbi.messaging.MessageExchangeImpl.setMessage(MessageExchangeImpl.java:366) at org.apache.servicemix.jbi.messaging.MessageExchangeImpl.setFault(Mess ageExchangeImpl.java:290) at com.odelia.metaphora.ServiceMtom.envoyer(ServiceMtom.java:100) Any idea about this exception? Thank you! Bertrand. -- View this message in context: http://www.nabble.com/Simple-question-on-servicemix-jsr181-POJO-service-tp25115312p25115312.html Sent from the ServiceMix - User mailing list archive at Nabble.com.
