Class WsTool

java.lang.Object
junit.framework.Assert
com.sun.xml.ws.test.tool.WsTool

public abstract class WsTool extends junit.framework.Assert
Interface to the wsimport or wsgen command-line tool.
Author:
Kohsuke Kawaguchi
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static WsTool
    WsTool that does nothing.
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
    WsTool(boolean dumpParameters)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static WsTool
    createWsGen(File externalWsGen, boolean dumpParameters, String extraWsToolsArgs)
    Determines which wsgen to use.
    static WsTool
    createWsImport(File externalWsImport, boolean dumpParameters, String extraWsToolsArgs)
    Determines which compiler to use.
    protected boolean
     
    protected void
     
    abstract void
    invoke(String... args)
    Invokes wsimport with the given arguments.
    boolean
    Returns true if the '-skip' mode is on and the tool invocation is skipped.

    Methods inherited from class junit.framework.Assert

    assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail, failNotEquals, failNotSame, failSame, format

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • NOOP

      public static WsTool NOOP
      WsTool that does nothing.

      This assumes that files that are supposed to be generated are already generated.

  • Constructor Details

    • WsTool

      protected WsTool(boolean dumpParameters)
  • Method Details

    • invoke

      public abstract void invoke(String... args) throws Exception
      Invokes wsimport with the given arguments.
      Throws:
      Exception - if the compilation fails. alternatively, JUnit Assertions can be used to detect error conditions.
    • isNoop

      public boolean isNoop()
      Returns true if the '-skip' mode is on and the tool invocation is skipped.
    • createWsImport

      public static WsTool createWsImport(File externalWsImport, boolean dumpParameters, String extraWsToolsArgs)
      Determines which compiler to use.
      Parameters:
      externalWsImport - null to run WsTool from World.tool. Otherwise this file will be the path to the script.
      extraWsToolsArgs -
    • createWsGen

      public static WsTool createWsGen(File externalWsGen, boolean dumpParameters, String extraWsToolsArgs)
      Determines which wsgen to use.
      Parameters:
      externalWsGen - null to run WsTool from World.tool. Otherwise this file will be the path to the script.
      extraWsToolsArgs -
    • dumpWsParams

      protected void dumpWsParams(List<String> params)
    • dumpParams

      protected boolean dumpParams()