jax-ws
  1. jax-ws
  2. JAX_WS-1027

Patch required to properly integrate the WSImportTool into an IDE environment

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.2.6
    • Fix Version/s: 2.2.6
    • Component/s: None
    • Labels:
      None
    • Environment:

      jdeveloper

      Description

      We are invoking the JAX-WS tools in an IDE, specifically JDeveloper, as we need a way to ensure that the files generates are written to a virtual file system in order that we can merge them with the developers existing work.

      The WebServiceAp correctly uses a FilerCodeWriter but WSImportTool makes use of the WSCodeWriter which only writes to the file system. This patch modified the code very so slightly so that we can pass in a filer.

      Index: tools/wscompile/src/com/sun/tools/ws/wscompile/WsgenOptions.java
      ===================================================================
      — tools/wscompile/src/com/sun/tools/ws/wscompile/WsgenOptions.java (revision 12762)
      +++ tools/wscompile/src/com/sun/tools/ws/wscompile/WsgenOptions.java (working copy)
      @@ -40,7 +40,6 @@

      package com.sun.tools.ws.wscompile;

      -import javax.annotation.processing.Filer;
      import com.sun.tools.ws.resources.WscompileMessages;
      import com.sun.tools.ws.api.WsgenExtension;
      import com.sun.tools.ws.api.WsgenProtocol;
      @@ -101,9 +100,6 @@
      */
      public boolean doNotOverWrite;

      • public Filer filer;
        -
        -
        /**
      • Tells if user specified a specific protocol
        */
        Index: tools/wscompile/src/com/sun/tools/ws/wscompile/WsimportTool.java
        ===================================================================
          • tools/wscompile/src/com/sun/tools/ws/wscompile/WsimportTool.java (revision 12762)
            +++ tools/wscompile/src/com/sun/tools/ws/wscompile/WsimportTool.java (working copy)
            @@ -418,7 +418,14 @@
            implFiles = JwsImplGenerator.generate(wsdlModel, options, receiver);
            }
      • CodeWriter cw = new WSCodeWriter(options.sourceDir, options);
        + CodeWriter cw;
        + if (options.filer!=null) { + cw = new FilerCodeWriter(options.sourceDir,options); + }

        + else

        { + cw = new WSCodeWriter(options.sourceDir, options); + }

        +
        if (options.verbose)
        cw = new ProgressCodeWriter(cw, out);
        options.getCodeModel().build(cw);
        Index: tools/wscompile/src/com/sun/tools/ws/wscompile/FilerCodeWriter.java
        ===================================================================

          • tools/wscompile/src/com/sun/tools/ws/wscompile/FilerCodeWriter.java (revision 12762)
            +++ tools/wscompile/src/com/sun/tools/ws/wscompile/FilerCodeWriter.java (working copy)
            @@ -59,7 +59,7 @@

      private Writer w;

      • public FilerCodeWriter(File outDir, WsgenOptions options) throws IOException {
        + public FilerCodeWriter(File outDir, Options options) throws IOException { super(outDir, options); this.filer = options.filer; }

        Index: tools/wscompile/src/com/sun/tools/ws/wscompile/Options.java
        ===================================================================

          • tools/wscompile/src/com/sun/tools/ws/wscompile/Options.java (revision 12762)
            +++ tools/wscompile/src/com/sun/tools/ws/wscompile/Options.java (working copy)
            @@ -43,6 +43,8 @@
            import com.sun.tools.ws.resources.WscompileMessages;
            import com.sun.tools.ws.Invoker;

      +import javax.annotation.processing.Filer;
      +
      import java.io.File;
      import java.io.IOException;
      import java.net.MalformedURLException;
      @@ -88,7 +90,16 @@
      */
      public File sourceDir;

      +
      +
      /**
      + * The filer that can use used to write out the generated files
      + */
      + public Filer filer;
      +
      +
      +
      + /**

      • -encoding
        */
        public String encoding;

        Activity

        There are no comments yet on this issue.

          People

          • Assignee:
            Iaroslav Savytskyi
            Reporter:
            gdavison
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: