Uploaded image for project: 'CXF'
  1. CXF
  2. CXF-3699

Wsdl2java generates illegal code for faults

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Blocker
    • Resolution: Fixed
    • 2.4.1
    • 2.4.2
    • Tooling
    • None
    • Novice

    Description

      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

      Attachments

        Activity

          People

            dkulp Daniel Kulp
            dna Denis N. Antonioli
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - 2h
                2h
                Remaining:
                Remaining Estimate - 2h
                2h
                Logged:
                Time Spent - Not Specified
                Not Specified