Package org.apache.ws.java2wsdl.utils

Examples of org.apache.ws.java2wsdl.utils.Java2WSDLCommandLineOptionParser


        java2WsdlBuilder = new TuscanyJava2WSDLBuilder(genParams);
    }

    protected boolean validateInputArgs(String[] args) {
        boolean isValid = true;
        Java2WSDLCommandLineOptionParser parser = new Java2WSDLCommandLineOptionParser(args);
        if (parser.getAllOptions().size() == 0) {
            Java2WSDL.printUsage();
            isValid = false;
        } else if (parser.getInvalidOptions(new Java2WSDLOptionsValidator()).size() > 0) {
            Java2WSDL.printUsage();
            isValid = false;
        }

        if (isValid) {
            commandLineOptions = parser.getAllOptions();
        }

        return isValid;
    }
View Full Code Here


    /**
     * @param args
     */
    public static void main(String[] args) {
        // parse the cmd line args
        Java2WSDLCommandLineOptionParser commandLineOptionParser = new Java2WSDLCommandLineOptionParser(args);

        // validate the arguments
        validateCommandLineOptions(commandLineOptionParser);

        Java2WSDLGeneratorFactory.getInstance().createGenerator().generateWSDL(commandLineOptionParser.getAllOptions());

        // Uncomment the following statement to directly run the Axis2 tool
        // without
        // runAxis2Tool(args);
    }
View Full Code Here

  }
       
     protected boolean validateInputArgs(String[] args)
  {
    boolean isValid = true;
    Java2WSDLCommandLineOptionParser parser = new Java2WSDLCommandLineOptionParser(args);
    if (parser.getAllOptions().size() == 0) {
      Java2WSDL.printUsage();
      isValid = false;
    } else if (parser.getInvalidOptions(new Java2WSDLOptionsValidator())
        .size() > 0) {
      Java2WSDL.printUsage();
      isValid = false;
    }

    if (isValid)
    {
      commandLineOptions = parser.getAllOptions();
    }

    return isValid;
  }
View Full Code Here

   * @param args
   */
  public static void main(String[] args)
  {
    //parse the cmd line args
    Java2WSDLCommandLineOptionParser commandLineOptionParser =
                            new Java2WSDLCommandLineOptionParser(args);
        //  validate the arguments
        validateCommandLineOptions(commandLineOptionParser);
   
    Java2WSDLGeneratorFactory.getInstance().createGenerator().
                        generateWSDL(commandLineOptionParser.getAllOptions());

    // Uncomment the following statement to directly run the Axis2 tool
    // without
    // runAxis2Tool(args);
  }
View Full Code Here

public class Java2WSDL {
  private static Log log = LogFactory.getLog(Java2WSDL.class);
 
    public static void main(String[] args) throws Exception {
        Java2WSDLCommandLineOptionParser commandLineOptionParser = new Java2WSDLCommandLineOptionParser(
                args);
        //  validate the arguments
        validateCommandLineOptions(commandLineOptionParser);
        Java2WSDLCodegenEngine engine = new Java2WSDLCodegenEngine(commandLineOptionParser.getAllOptions());
        engine.generate();
        log.info("WSDL created at "+ engine.getOutputFile());
    }
View Full Code Here

*
*/

public class Java2WSDL {
    public static void main(String[] args) {
        Java2WSDLCommandLineOptionParser commandLineOptionParser = new Java2WSDLCommandLineOptionParser(
                args);
        //  validate the arguments
        validateCommandLineOptions(commandLineOptionParser);
        try {
            new Java2WSDLCodegenEngine(commandLineOptionParser.getAllOptions()).generate();
        } catch (Exception e) {
            System.out.println("An error occured while generating code" + e.getMessage());
        }
    }
View Full Code Here

public class Java2WSDL {
  private static Log log = LogFactory.getLog(Java2WSDL.class);
 
    public static void main(String[] args) throws Exception {
        Java2WSDLCommandLineOptionParser commandLineOptionParser = new Java2WSDLCommandLineOptionParser(
                args);
        if (isJwsOptionEnabled(commandLineOptionParser)){
            JAXWS2WSDLCodegenEngine engine = new JAXWS2WSDLCodegenEngine(commandLineOptionParser.getAllOptions(), args);
            engine.generate();
            return;
         }       
        //  validate the arguments
        validateCommandLineOptions(commandLineOptionParser);
        Java2WSDLCodegenEngine engine = new Java2WSDLCodegenEngine(commandLineOptionParser.getAllOptions());
        engine.generate();
        log.info("WSDL created at "+ engine.getOutputFile());
    }
View Full Code Here

    public void testGenerateWithMixOptions() throws Exception {
        String[] args = { "-jws", "-verbose", "-cp", "target/test-classes",
                "-cn", "org.apache.ws.java2wsdl.jaxws.ServerInfo", "-o",
                "./target/out" };
        Java2WSDLCommandLineOptionParser commandLineOptionParser = new Java2WSDLCommandLineOptionParser(
                args);
        JAXWS2WSDLCodegenEngine engine = new JAXWS2WSDLCodegenEngine(
                commandLineOptionParser.getAllOptions(), args);
        engine.generate();    
        verifyGeneration();
    }
View Full Code Here

    }

    public void testGenerateWithAxisOptions() throws Exception {
        String[] args = { "-jws", "-cp", "target/test-classes", "-cn",
                "org.apache.ws.java2wsdl.jaxws.ServerInfo", "-o", "./target/out" };
        Java2WSDLCommandLineOptionParser commandLineOptionParser = new Java2WSDLCommandLineOptionParser(
                args);
        JAXWS2WSDLCodegenEngine engine = new JAXWS2WSDLCodegenEngine(
                commandLineOptionParser.getAllOptions(), args);
        engine.generate();
        verifyGeneration();
    }
View Full Code Here

    }

    public void testGenerateWithJAXWSOptions() throws Exception {
        String[] args = { "-jws", "-cp", "target/test-classes", "-cn",
                "org.apache.ws.java2wsdl.jaxws.ServerInfo", "-d", "./target/out" };
        Java2WSDLCommandLineOptionParser commandLineOptionParser = new Java2WSDLCommandLineOptionParser(
                args);
        JAXWS2WSDLCodegenEngine engine = new JAXWS2WSDLCodegenEngine(
                commandLineOptionParser.getAllOptions(), args);
        engine.generate();
        verifyGeneration();
    }
View Full Code Here

TOP

Related Classes of org.apache.ws.java2wsdl.utils.Java2WSDLCommandLineOptionParser

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.