Examples of Java2WSDLCommandLineOption


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

    initializeOtherParams();
  }
 
  private Java2WSDLCommandLineOption loadOption(String shortOption, String longOption) {
        //short option gets precedence
        Java2WSDLCommandLineOption option = null;
        if (longOption != null) {
            option = (Java2WSDLCommandLineOption) cmdLineOptions.get(longOption);
            if (option != null) {
                return option;
            }
View Full Code Here

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

        return option;
    }
 
  protected void initializeSourceClassName() throws Exception
  {
    Java2WSDLCommandLineOption option =
      loadOption(Java2WSDLConstants.CLASSNAME_OPTION, Java2WSDLConstants.CLASSNAME_OPTION_LONG);
        sourceClassName = option == null ? null : option.getOptionValue();

        if (sourceClassName == null || sourceClassName.equals("")) {
            throw new Exception("class name must be present!");
        }
  }
View Full Code Here

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

   * @throws Exception
   */
  protected void resolveFileOutputStream() throws Exception
  {
    File outputFolder;
    Java2WSDLCommandLineOption  option = loadOption(Java2WSDLConstants.OUTPUT_LOCATION_OPTION,
              Java2WSDLConstants.OUTPUT_LOCATION_OPTION_LONG);
      String outputFolderName = option == null ? System.getProperty("user.dir") : option.getOptionValue();

      outputFolder = new File(outputFolderName);
      if (!outputFolder.exists()) {
          outputFolder.mkdirs();
      } else if (!outputFolder.isDirectory()) {
          throw new Exception("The specified location " + outputFolderName + "is not a folder");
      }
     
      option = loadOption(Java2WSDLConstants.OUTPUT_FILENAME_OPTION,
                Java2WSDLConstants.OUTPUT_FILENAME_OPTION_LONG);
        String outputFileName = option == null ? null : option.getOptionValue();
        //derive a file name from the class name if the filename is not specified
        if (outputFileName == null)
        {
            outputFileName = Java2WSDLUtils.getSimpleClassName(sourceClassName) + WSDL_FILENAME_SUFFIX;
        }
View Full Code Here

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

        }
  }
 
  protected void resolveClassLoader4InputClasspath() throws Exception
  {
    Java2WSDLCommandLineOption option = null;
   
    if (option != null) {
            ArrayList optionValues = option.getOptionValues();
            URL[] urls = new URL[optionValues.size()];
            String[] classPathEntries = (String[]) optionValues.toArray(new String[optionValues.size()]);

            try {
                for (int i = 0; i < classPathEntries.length; i++) {
View Full Code Here

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

  }
 
  protected void initializeOtherParams()
  {
//    set the other parameters to the builder
    Java2WSDLCommandLineOption option = loadOption(Java2WSDLConstants.SCHEMA_TARGET_NAMESPACE_OPTION,
                Java2WSDLConstants.SCHEMA_TARGET_NAMESPACE_OPTION_LONG);
       schemaTargetNamespace = (option == null) ? null : option.getOptionValue();
            
    option = loadOption(Java2WSDLConstants.SCHEMA_TARGET_NAMESPACE_PREFIX_OPTION,
                Java2WSDLConstants.SCHEMA_TARGET_NAMESPACE_PREFIX_OPTION_LONG);
    schemaTargetNamespacePrefix = (option == null) ? null : option.getOptionValue();

    option = loadOption(Java2WSDLConstants.TARGET_NAMESPACE_OPTION,
                Java2WSDLConstants.TARGET_NAMESPACE_OPTION_LONG);
    targetNamespace = (option == null) ? null : option.getOptionValue();

    option  = loadOption(Java2WSDLConstants.TARGET_NAMESPACE_PREFIX_OPTION,
                Java2WSDLConstants.TARGET_NAMESPACE_PREFIX_OPTION_LONG);
    targetNamespacePrefix = (option == null) ? null : option.getOptionValue();
   
    option = loadOption(Java2WSDLConstants.SERVICE_NAME_OPTION,
                Java2WSDLConstants.SERVICE_NAME_OPTION_LONG);
    serviceName = (option == null) ? Java2WSDLUtils.getSimpleClassName(sourceClassName) : option.getOptionValue();

    option = loadOption(Java2WSDLConstants.STYLE_OPTION,Java2WSDLConstants.STYLE_OPTION);
    style = (option == null) ? null : option.getOptionValue();
       
       
        option  = loadOption(Java2WSDLConstants.LOCATION_OPTION,
            Java2WSDLConstants.LOCATION_OPTION);
        locationUri = (option == null) ? null : option.getOptionValue();
       
        option = loadOption(Java2WSDLConstants.USE_OPTION,Java2WSDLConstants.USE_OPTION);
        use = (option == null) ? null : option.getOptionValue();
  }
View Full Code Here

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

    protected Map createOptionsMap()
    {
    Map optionsMap = new Hashtable();
 
          optionsMap.put(Java2WSDLConstants.CLASSNAME_OPTION,
            new Java2WSDLCommandLineOption(Java2WSDLConstants.CLASSNAME_OPTION, new String[]{sourceClassName}));
       
    if ( targetLocation != null )
    {
        optionsMap.put(Java2WSDLConstants.OUTPUT_LOCATION_OPTION,
            new Java2WSDLCommandLineOption(Java2WSDLConstants.OUTPUT_LOCATION_OPTION, new String[]{targetLocation}));
    }
   
    if ( wsdlFilename != null )
    {
        optionsMap.put(Java2WSDLConstants.OUTPUT_FILENAME_OPTION,
            new Java2WSDLCommandLineOption(Java2WSDLConstants.OUTPUT_FILENAME_OPTION, new String[]{wsdlFilename}));
    }
 
    if ( classpaths != null && classpaths.length > 0 )
    {
        optionsMap.put(Java2WSDLConstants.CLASSPATH_OPTION,
            new Java2WSDLCommandLineOption(Java2WSDLConstants.CLASSPATH_OPTION, classpaths));
    }
 
    if ( serviceName != null  )
    {
        optionsMap.put(Java2WSDLConstants.SERVICE_NAME_OPTION,
            new Java2WSDLCommandLineOption(Java2WSDLConstants.SERVICE_NAME_OPTION, new String[]{serviceName}));
    }
   
     if ( bindingStyle != null  )
    {
        optionsMap.put(Java2WSDLConstants.STYLE_OPTION,
            new Java2WSDLCommandLineOption(Java2WSDLConstants.STYLE_OPTION, new String[]{bindingStyle}));
    }
 
    if ( bindingUse != null  )
    {
        optionsMap.put(Java2WSDLConstants.USE_OPTION,
            new Java2WSDLCommandLineOption(Java2WSDLConstants.USE_OPTION, new String[]{bindingUse}));
    }
 
    if ( soapAddress != null  )
    {
        optionsMap.put(Java2WSDLConstants.LOCATION_OPTION,
            new Java2WSDLCommandLineOption(Java2WSDLConstants.LOCATION_OPTION, new String[]{soapAddress}));
    }

     return optionsMap;
    }
View Full Code Here

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

    protected Map createOptionsMap()
    {
    Map optionsMap = new Hashtable();
 
          optionsMap.put(Java2WSDLConstants.CLASSNAME_OPTION,
            new Java2WSDLCommandLineOption(Java2WSDLConstants.CLASSNAME_OPTION, new String[]{sourceClassName}));
       
    if ( targetLocation != null )
    {
        optionsMap.put(Java2WSDLConstants.OUTPUT_LOCATION_OPTION,
            new Java2WSDLCommandLineOption(Java2WSDLConstants.OUTPUT_LOCATION_OPTION, new String[]{targetLocation}));
    }
   
    if ( wsdlFilename != null )
    {
        optionsMap.put(Java2WSDLConstants.OUTPUT_FILENAME_OPTION,
            new Java2WSDLCommandLineOption(Java2WSDLConstants.OUTPUT_FILENAME_OPTION, new String[]{wsdlFilename}));
    }
 
    if ( classpaths != null && classpaths.length > 0 )
    {
        optionsMap.put(Java2WSDLConstants.CLASSPATH_OPTION,
            new Java2WSDLCommandLineOption(Java2WSDLConstants.CLASSPATH_OPTION, classpaths));
    }
 
    if ( serviceName != null  )
    {
        optionsMap.put(Java2WSDLConstants.SERVICE_NAME_OPTION,
            new Java2WSDLCommandLineOption(Java2WSDLConstants.SERVICE_NAME_OPTION, new String[]{serviceName}));
    }
   
     if ( bindingStyle != null  )
    {
        optionsMap.put(Java2WSDLConstants.STYLE_OPTION,
            new Java2WSDLCommandLineOption(Java2WSDLConstants.STYLE_OPTION, new String[]{bindingStyle}));
    }
 
    if ( bindingUse != null  )
    {
        optionsMap.put(Java2WSDLConstants.USE_OPTION,
            new Java2WSDLCommandLineOption(Java2WSDLConstants.USE_OPTION, new String[]{bindingUse}));
    }
 
    if ( soapAddress != null  )
    {
        optionsMap.put(Java2WSDLConstants.LOCATION_OPTION,
            new Java2WSDLCommandLineOption(Java2WSDLConstants.LOCATION_OPTION, new String[]{soapAddress}));
    }

     return optionsMap;
    }
View Full Code Here

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

                try {
                    monitor.worked(1);
                    //fill the option map
                    Map optionsMap = new HashMap();
                    Java2WSDLCommandLineOption option = new Java2WSDLCommandLineOption(
                        CLASSNAME_OPTION,new String[]{javaSourceSelectionPage.getClassName()});
                    optionsMap.put(CLASSNAME_OPTION,option);
                   
                    option = new Java2WSDLCommandLineOption(
                        CLASSPATH_OPTION,javaSourceSelectionPage.getClassPathList());
                    optionsMap.put(CLASSPATH_OPTION,option);
                   
                    option = new Java2WSDLCommandLineOption(
                        TARGET_NAMESPACE_OPTION,
                        new String[]{java2wsdlOptionsPage.getTargetNamespace()});
                    optionsMap.put(TARGET_NAMESPACE_OPTION,option);
                   
                    option = new Java2WSDLCommandLineOption(
                        TARGET_NAMESPACE_PREFIX_OPTION,
                        new String[]{java2wsdlOptionsPage.getTargetNamespacePrefix()});
                    optionsMap.put(TARGET_NAMESPACE_PREFIX_OPTION,option);
                   
                    option = new Java2WSDLCommandLineOption(
                        SCHEMA_TARGET_NAMESPACE_OPTION,
                        new String[]{java2wsdlOptionsPage.getSchemaTargetNamespace()});
                    optionsMap.put(SCHEMA_TARGET_NAMESPACE_OPTION,option);
                   
                    option = new Java2WSDLCommandLineOption(
                        SCHEMA_TARGET_NAMESPACE_PREFIX_OPTION,
                        new String[]{java2wsdlOptionsPage.getSchemaTargetNamespacePrefix()});
                    optionsMap.put(SCHEMA_TARGET_NAMESPACE_PREFIX_OPTION,option);
                   
                    option = new Java2WSDLCommandLineOption(
                        OUTPUT_LOCATION_OPTION,new String[]{java2wsdlOutputLocationPage.getOutputLocation()});
                    optionsMap.put(OUTPUT_LOCATION_OPTION,option);
                   
                    option = new Java2WSDLCommandLineOption(
                        OUTPUT_FILENAME_OPTION,new String[]{java2wsdlOutputLocationPage.getOutputWSDLName()});
                    optionsMap.put(OUTPUT_FILENAME_OPTION,option);
                   
                   
                    monitor.worked(1);
View Full Code Here

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

    protected Map createOptionsMap()
    {
    Map optionsMap = new Hashtable();
 
          optionsMap.put(Java2WSDLConstants.CLASSNAME_OPTION,
            new Java2WSDLCommandLineOption(Java2WSDLConstants.CLASSNAME_OPTION, new String[]{sourceClassName}));
       
    if ( targetLocation != null )
    {
        optionsMap.put(Java2WSDLConstants.OUTPUT_LOCATION_OPTION,
            new Java2WSDLCommandLineOption(Java2WSDLConstants.OUTPUT_LOCATION_OPTION, new String[]{targetLocation}));
    }
   
    if ( wsdlFilename != null )
    {
        optionsMap.put(Java2WSDLConstants.OUTPUT_FILENAME_OPTION,
            new Java2WSDLCommandLineOption(Java2WSDLConstants.OUTPUT_FILENAME_OPTION, new String[]{wsdlFilename}));
    }
 
    if ( classpaths != null && classpaths.length > 0 )
    {
        optionsMap.put(Java2WSDLConstants.CLASSPATH_OPTION,
            new Java2WSDLCommandLineOption(Java2WSDLConstants.CLASSPATH_OPTION, classpaths));
    }
 
    if ( serviceName != null  )
    {
        optionsMap.put(Java2WSDLConstants.SERVICE_NAME_OPTION,
            new Java2WSDLCommandLineOption(Java2WSDLConstants.SERVICE_NAME_OPTION, new String[]{serviceName}));
    }
   
     if ( bindingStyle != null  )
    {
        optionsMap.put(Java2WSDLConstants.STYLE_OPTION,
            new Java2WSDLCommandLineOption(Java2WSDLConstants.STYLE_OPTION, new String[]{bindingStyle}));
    }
 
    if ( bindingUse != null  )
    {
        optionsMap.put(Java2WSDLConstants.USE_OPTION,
            new Java2WSDLCommandLineOption(Java2WSDLConstants.USE_OPTION, new String[]{bindingUse}));
    }
 
    if ( soapAddress != null  )
    {
        optionsMap.put(Java2WSDLConstants.LOCATION_OPTION,
            new Java2WSDLCommandLineOption(Java2WSDLConstants.LOCATION_OPTION, new String[]{soapAddress}));
    }

     return optionsMap;
    }
View Full Code Here

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

            List list =
                    commandLineOptionParser.getInvalidOptions(new Java2WSDLOptionsValidator());
            if (list.size() > 0) {
                String faultOptions = "";
                for (Object aList : list) {
                    Java2WSDLCommandLineOption commandLineOption =
                            (Java2WSDLCommandLineOption) aList;
                    String optionValue = commandLineOption.getOptionValue();
                    faultOptions += "Invalid input for [ " + commandLineOption.getOptionType() +
                            (optionValue != null ? " : " + optionValue + " ]" : " ]") + "\n";
                }

                log.error(faultOptions);
                throw new AxisFault(faultOptions);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.