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

WSDLToJavaContainer ignores CFG_SUPPRESS_GEN for outputdir creation

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Trivial
    • Resolution: Fixed
    • 2.2.6
    • 2.2.7
    • Tooling
    • None
    • Novice

    Description

      First, let me say that I realize that WSDLToJava doesn't support "-suppress" as a command-line option. So this defect is quite obscure.

      Consider this code:

      WSDLToJava w2j = new WSDLToJava(new String[]

      { "-d", "generatedcode", "http://localhost:9090/CustomerServicePort?wsdl", }

      );
      ToolContext context = new ToolContext();
      context.put(ToolConstants.CFG_SUPPRESS_GEN, true);
      w2j.run(context);

      This code works in the sense that it does not build any .java files, however it still creates the "generatedcode" directory. An easy and low-risk fix would be to change WSDLToJavaContainer.validate() to wrap an "if (isSuppressCodeGen())

      {...}

      " around the "if(!dir.exists())

      {dir.mkdirs()}

      " block.

      Attachments

        Activity

          People

            dkulp Daniel Kulp
            cdolan Chris Dolan
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: