java - Send exception information in soap response in Jboss 7 -


we struggling here @ company accomplish requirement our maven project (jboss 7.1.1 , java 7) . have soap webservice exposes several methods . these methods throw exceptions . exceptions declared in dependency of project . problem aren't able send in soap response information regarding kind of exception throw in webservice method . soap bringing

    <soap:envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">         <soap:body>             <soap:fault>                 <faultcode>soap:server</faultcode>                 <faultstring>message</faultstring>             </soap:fault>         </soap:body>     </soap:envelope> 

the clients consuming our services can't tell wich kind of error getting . how can overcome issue ? how can send in soap body relevant information specific exception throwing ?

our exception

    @webfault     public class ourexception extends exception     {         public ourexception (){             super();         }           public ourexception (string message)         {             super(message);         }     } 

thank much, pedro ferreira

you can either convert exception required response type , have attribute contains information errors, or can leverage cxf soapfault class contains method setdetail(eelement detail). can construct own xml element , inject soapfault.

hope helps!


Comments

Popular posts from this blog

Magento/PHP - Get phones on all members in a customer group -

php - .htaccess mod_rewrite for dynamic url which has domain names -

Website Login Issue developed in magento -