Package org.apache.axis2.util

Examples of org.apache.axis2.util.CommandLineOptionParser


    public static ListenerManager startServer(String[] args) {
        String repoLocation = null;
    String confLocation = null;

    CommandLineOptionParser optionsParser = new CommandLineOptionParser(args);
    List invalidOptionsList = optionsParser.getInvalidOptions(new OptionsValidator() {
      public boolean isInvalid(CommandLineOption option) {
        String optionType = option.getOptionType();
        return !("repo".equalsIgnoreCase(optionType) || "conf"
            .equalsIgnoreCase(optionType));
      }
    });

    if ((invalidOptionsList.size()>0)||(args.length>4))
    {
      printUsage();
      return null;
    }

    Map optionsMap = optionsParser.getAllOptions();

    CommandLineOption repoOption = (CommandLineOption) optionsMap
        .get("repo");
    CommandLineOption confOption = (CommandLineOption) optionsMap
        .get("conf");
View Full Code Here


    public void start(String[] args) throws Exception {
        String repoLocation = null;
        String confLocation = null;

        CommandLineOptionParser optionsParser = new CommandLineOptionParser(args);
        List invalidOptionsList = optionsParser.getInvalidOptions(new OptionsValidator() {
            public boolean isInvalid(CommandLineOption option) {
                String optionType = option.getOptionType();
                return !("repo".equalsIgnoreCase(optionType) || "conf"
                    .equalsIgnoreCase(optionType));
            }
        });

        if ((invalidOptionsList.size() > 0) || (args.length > 4)) {
            printUsage();
        }

        Map optionsMap = optionsParser.getAllOptions();

        CommandLineOption repoOption = (CommandLineOption) optionsMap
            .get("repo");
        CommandLineOption confOption = (CommandLineOption) optionsMap
            .get("conf");
View Full Code Here

  private static EndpointReference targetEPR = new EndpointReference(
      "http://localhost:8080/axis2/services/SWASampleService");

  public static void main(String[] args) throws Exception {
    CommandLineOptionParser optionsParser = new CommandLineOptionParser(
        args);
    List invalidOptionsList = optionsParser
        .getInvalidOptions(new OptionsValidator() {
          public boolean isInvalid(CommandLineOption option) {
            String optionType = option.getOptionType();
            return !("dest".equalsIgnoreCase(optionType) || "file"
                .equalsIgnoreCase(optionType));
          }
        });

    if ((invalidOptionsList.size() > 0) || (args.length != 4)) {
      // printUsage();
      System.out
          .println("Invalid Parameters.  Usage -file <file to be send> -dest <destination file>");
      return;
    }

    Map optionsMap = optionsParser.getAllOptions();

    CommandLineOption fileOption = (CommandLineOption) optionsMap
        .get("file");
    CommandLineOption destinationOption = (CommandLineOption) optionsMap
        .get("dest");
View Full Code Here

//        optionMap.put(
//                CommandLineOptionConstants.GENERATE_TEST_CASE_OPTION,
//                new CommandLineOption(
//                        CommandLineOptionConstants.GENERATE_TEST_CASE_OPTION,
//                        new String[0]));
        CommandLineOptionParser parser = new CommandLineOptionParser(optionMap);
        new CodeGenerationEngine(parser).generate();
    }
View Full Code Here

     * @throws CodeGenerationException
     */
    private void codeGenerate(String wsdlFile,String outputLocation) throws CodeGenerationException {
        //create the option map
        Map optionMap = fillOptionMap(wsdlFile,outputLocation);
        CommandLineOptionParser parser =
                new CommandLineOptionParser(optionMap);
        new CodeGenerationEngine(parser).generate();
    }
View Full Code Here

     */
    public static void main(String[] args) throws Exception {
    String repoLocation = null;
    String confLocation = null;

    CommandLineOptionParser optionsParser = new CommandLineOptionParser(args);
    List invalidOptionsList = optionsParser.getInvalidOptions(new OptionsValidator() {
      public boolean isInvalid(CommandLineOption option) {
        String optionType = option.getOptionType();
        return !("repo".equalsIgnoreCase(optionType) || "conf"
            .equalsIgnoreCase(optionType));
      }
    });
   
    if ((invalidOptionsList.size()>0)||(args.length>4))
    {
      printUsage();
      return;
    }
   
    Map optionsMap = optionsParser.getAllOptions();

    CommandLineOption repoOption = (CommandLineOption) optionsMap
        .get("repo");
    CommandLineOption confOption = (CommandLineOption) optionsMap
        .get("conf");
View Full Code Here

        return values;
    }

    public void execute() throws MojoFailureException, MojoExecutionException {
      Map commandLineOptions = this.fillOptionMap();
      CommandLineOptionParser parser =
                    new CommandLineOptionParser(commandLineOptions);
      try {
      new CodeGenerationEngine(parser).generate();
    } catch (CodeGenerationException e) {
      Throwable t = e;
      while (t.getCause() != null)
View Full Code Here

public class WSDL2Code {


    public static void main(String[] args) throws Exception {
        CommandLineOptionParser commandLineOptionParser = new CommandLineOptionParser(
                args);
        validateCommandLineOptions(commandLineOptionParser);
        new CodeGenerationEngine(commandLineOptionParser).generate();

    }
View Full Code Here

        fixCompileSourceRoots();
        showDependencies();

        Map<String,CommandLineOption> commandLineOptions = this.fillOptionMap();
        CommandLineOptionParser parser =
                new CommandLineOptionParser(commandLineOptions);
        try {
            new CodeGenerationEngine(parser).generate();
        } catch (CodeGenerationException e) {
            Throwable t = e;
            while (t.getCause() != null) {
View Full Code Here

    }

    public void testGenerateWithMixOptions() throws CodeGenerationException {
        String[] args = { "-jws", "-uri",
                "test-resources/wsdls//SimpleService.wsdl", "-o", "./target" };
        CommandLineOptionParser commandLineOptionParser = new CommandLineOptionParser(
                args);
        JAXWSCodeGenerationEngine engine = new JAXWSCodeGenerationEngine(
                commandLineOptionParser, args);
        engine.generate();
        File dir = new File(filePath);
View Full Code Here

TOP

Related Classes of org.apache.axis2.util.CommandLineOptionParser

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.