Wsdl2java generates illegal code for faults
-------------------------------------------

                 Key: CXF-3699
                 URL: https://issues.apache.org/jira/browse/CXF-3699
             Project: CXF
          Issue Type: Bug
          Components: Tooling
    Affects Versions: 2.4.1
            Reporter: Denis N. Antonioli
            Priority: Blocker
             Fix For: 2.4.2


when generating java code from a wsdl with the option to insert the @Generated 
annotation, the code starts with:

@Generated(value = "org.apache.cxf.tools.wsdlto.WSDLToJava", date = 
"2011-08-01T15:05:39.642-07:00", comments = "Apache CXF 2.4.1")
public class ... extends Exception {
@Generated(value = "org.apache.cxf.tools.wsdlto.WSDLToJava", date = 
"2011-08-01T15:05:39.642-07:00")

@Generated(value = "org.apache.cxf.tools.wsdlto.WSDLToJava", date = 
"2011-08-01T15:05:39.642-07:00")
private li.antonio.XxxServiceFault xxxServiceFault;

The bug is in 
tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/template/fault.vm,
 which starts with:
#if ($mark-generated == "true")
    @Generated(value = "org.apache.cxf.tools.wsdlto.WSDLToJava", date = 
"$currentdate", comments = "$fullversion")
#end
public class $expClass.Name extends $exceptionSuperclass {
#if ($mark-generated == "true")
    @Generated(value = "org.apache.cxf.tools.wsdlto.WSDLToJava", date = 
"$currentdate")
#end
#if (${suid} != "")
    public static final long serialVersionUID = ${suid}L;
#end

It should be:

#if ($mark-generated == "true")
    @Generated(value = "org.apache.cxf.tools.wsdlto.WSDLToJava", date = 
"$currentdate", comments = "$fullversion")
#end
public class $expClass.Name extends $exceptionSuperclass {
#if (${suid} != "")
#if ($mark-generated == "true")
    @Generated(value = "org.apache.cxf.tools.wsdlto.WSDLToJava", date = 
"$currentdate")
#end
    public static final long serialVersionUID = ${suid}L;
#end


--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to