Hi,

After went through the WSDL I can tell why you got the 
CustomSoapFault_Exception.
First please go through the this blog[1] it can show you how CXF mapping the 
SoapFault message to the java exception. To do that, we need to have Fault 
class and Exception class to do the mapping work.

As the wsdl2java need to create the exception message and fault message at the 
same time. If you put the exception message and fault message in the same 
namespace (the target namespace), it ends up with name conflict and the 
wsdl2java has to add the _Exception suffix to resolve the issue.

If you put the CustomSoapFault definition into another namespace such as 
"http://nono.com/type”, you won’t see the _Exception class again.
 
[1]http://willemjiang.blogspot.com/2011_01_01_archive.html

--  
Willem Jiang

Red Hat, Inc.
Web: http://www.redhat.com
Blog: http://willemjiang.blogspot.com (English)
http://jnn.iteye.com (Chinese)
Twitter: willemjiang  
Weibo: 姜宁willem



On June 6, 2014 at 9:04:42 PM, nono (yan.w...@db-is.com) wrote:
> the wsdl is ok, wsdl2java will generate MyWebServiceFault_Exception instead
> of
> MyWebServiceFault
>  
>  
>  
> > xmlns="http://schemas.xmlsoap.org/wsdl/";
> xmlns:wsp="http://www.w3.org/ns/ws-policy"; xmlns:tns="http://nono.com/";
> xmlns:xsd="http://www.w3.org/2001/XMLSchema";
> xmlns:wsp1_2="http://schemas.xmlsoap.org/ws/2004/09/policy";
> xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/";
> xmlns:wsam="http://www.w3.org/2007/05/addressing/metadata";
> xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd";>
>   
>  
> > xmlns:xs="http://www.w3.org/2001/XMLSchema";>
>  
>  
>  
>  
>  
>  
>  
>  
>  
>  
> > xmlns:xs="http://www.w3.org/2001/XMLSchema";>
>  
>  
>  
>  
>  
>  
>  
>  
>  
>  
>  
>  
>  
>  
>  
>  
>  
>  
>  
>  
>  
>  
>  
>  
>  
>  
>  
>  
>  
>  
>  
>  
>  
>  
> > xmlns:ns1="http://com/nono/types"/>
>  
>  
>  
> > message="tns:hello"/>
> > message="tns:helloResponse"/>
> > wsam:Action="http://nono.com/MyWebService/hello/Fault/MyWebServiceFault"/>  
>  
>  
>  
> > style="document"/>
>  
>  
>  
>  
>  
>  
>  
>  
>  
>  
>  
>  
>  
>  
>  
>  
>  
>  
>  
>  
>  
>  
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/CustomSoapFault-Problem-tp5751844p5751989.html
>   
> Sent from the Camel - Users mailing list archive at Nabble.com.
>  

Reply via email to