Hi,

Could you consider to use cxf bc consumer instead of http consumer?
It should return a soap fault back IMHO.

Freeman
On 2010-6-19, at 上午3:01, Gitanjali Nanda wrote:

Hi All,
I am using servicemix4.2. I have a http endpoint as below. It has MEP as in-only. When there is a failure while processing the incoming message it returns error in html format. Is there a way to return soap fault instead of http error?

<http:endpoint
           service="ppr:http"
           endpoint="consumer"
           role="consumer"
           targetService="sp:http"
           locationURI="http://0.0.0.0:8192/provisioningReqListener/";

           defaultMep="http://www.w3.org/2004/08/wsdl/in-only"; />

My flow is as below

Smx http provider->camel router->Q


The error coming in the below format

STATUS: 500
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/> <title>Error 500 region in soap header cannot be NULL, Please check input message</title>
</head>
<body><h2>HTTP ERROR 500</h2>
<p>Problem accessing /provisioningAckListener/. Reason:
<pre> region in soap header cannot be NULL, Please check input message</pre></p><h3>Caused by:</ h3><pre>java.lang.NullPointerException: region in soap header cannot be NULL, Please check input message at com .pf .simpleprovider .camelrouter .DestinationQueueResolver .validateMessage(DestinationQueueResolver.java:69) at com .pf .simpleprovider .camelrouter .DestinationQueueResolver.resolveQ(DestinationQueueResolver.java:36) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun .reflect .NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun .reflect .DelegatingMethodAccessorImpl .invoke(DelegatingMethodAccessorImpl.java:25)
               at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.camel.component.bean.MethodInfo.invoke(MethodInfo.java:214) at org.apache.camel.component.bean.MethodInfo $1.proceed(MethodInfo.java:133) at org .apache .camel.component.bean.BeanProcessor.process(BeanProcessor.java:137) at org .apache .camel.impl.ProcessorEndpoint.onExchange(ProcessorEndpoint.java:95) at org.apache.camel.impl.ProcessorEndpoint $1.process(ProcessorEndpoint.java:65) at org.apache.camel.processor.SendProcessor $1.doInProducer(SendProcessor.java:97) at org.apache.camel.processor.SendProcessor $1.doInProducer(SendProcessor.java:95) at org.apache.camel.impl.ProducerCache.doInProducer(ProducerCache.java: 146) at org .apache.camel.processor.SendProcessor.doProcess(SendProcessor.java:94) at org.apache.camel.processor.SendProcessor.process(SendProcessor.java: 82) at org .apache .camel .management .InstrumentationProcessor.process(InstrumentationProcessor.java:67) at org .apache .camel .processor.DelegateProcessor.processNext(DelegateProcessor.java:53) at org .apache .camel.processor.DelegateProcessor.proceed(DelegateProcessor.java:82) at org .apache .camel .processor .interceptor.TraceInterceptor.process(TraceInterceptor.java:161) at org .apache .camel .management .InstrumentationProcessor.process(InstrumentationProcessor.java:67) at org .apache .camel .processor .RedeliveryErrorHandler.processExchange(RedeliveryErrorHandler.java: 177) at org .apache .camel .processor .RedeliveryErrorHandler .processErrorHandler(RedeliveryErrorHandler.java:143) at org .apache .camel .processor .RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:88) at org .apache .camel .processor.DefaultErrorHandler.process(DefaultErrorHandler.java:49) at org .apache.camel.processor.DefaultChannel.process(DefaultChannel.java: 228) at org.apache.camel.processor.Pipeline.process(Pipeline.java:74) at org .apache .camel .processor.UnitOfWorkProcessor.processNext(UnitOfWorkProcessor.java: 66) at org .apache .camel.processor.DelegateProcessor.process(DelegateProcessor.java:48) at org .apache .camel .management .InstrumentationProcessor.process(InstrumentationProcessor.java:67) at org.apache.servicemix.camel.CamelProviderEndpoint $1.call(CamelProviderEndpoint.java:100) at org .apache .servicemix .camel.JbiBinding.runWithCamelContextClassLoader(JbiBinding.java:108) at org .apache .servicemix .camel .CamelProviderEndpoint .handleActiveProviderExchange(CamelProviderEndpoint.java:98) at org .apache .servicemix .camel.CamelProviderEndpoint.process(CamelProviderEndpoint.java:77) at org .apache .servicemix .common.AsyncBaseLifeCycle.doProcess(AsyncBaseLifeCycle.java:627) at org .apache .servicemix .common.AsyncBaseLifeCycle.processExchange(AsyncBaseLifeCycle.java: 581) at org .apache .servicemix .common .AsyncBaseLifeCycle.processExchangeInTx(AsyncBaseLifeCycle.java:478) at org.apache.servicemix.common.AsyncBaseLifeCycle $2.run(AsyncBaseLifeCycle.java:347) at java.util.concurrent.ThreadPoolExecutor $Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor $Worker.run(ThreadPoolExecutor.java:908)
               at java.lang.Thread.run(Thread.java:619)
</pre>
<hr /><i><small>Powered by Jetty://</small></i><br/>

<br/>

</body>
</html>

Thanks & Regards
Gita



--
Freeman Fang
------------------------
Open Source SOA: http://fusesource.com

Reply via email to