Examples of Java2WSDLCommandLineOption


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

    }

    private void addToOptionMap(Map map, String option, String[] value) {
        if (value != null) {
            map.put(option,
                    new Java2WSDLCommandLineOption(option, value));
        }
    }
View Full Code Here

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

    }

    private void addToOptionMap(Map map, String option, ArrayList values) {
        if (values != null && !values.isEmpty()) {
            map.put(option,
                    new Java2WSDLCommandLineOption(option, values));
        }
    }
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(
                        SERVICE_NAME_OPTION,new String[]{java2wsdlOptionsPage.getServiceName()});
                    optionsMap.put(SERVICE_NAME_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

        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(CLASSNAME_OPTION, 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(OUTPUT_LOCATION_OPTION, 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(OUTPUT_FILENAME_OPTION, 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

        getSchemaLocationMap().put(optionValue.substring(1, optionValue.indexOf(COMMA)),
                optionValue.substring(optionValue.indexOf(COMMA) + 1, optionValue.length() - 1));
    }

    protected void loadSchemaLocationMap() throws Exception {
        Java2WSDLCommandLineOption option = loadOption(IMPORT_XSD_OPTION, IMPORT_XSD_OPTION_LONG);

        if (option != null) {
            ArrayList optionValues = option.getOptionValues();

            for (int count = 0; count < optionValues.size(); ++count) {
                addToSchemaLocationMap(((String) optionValues.get(count)).trim());
            }
        }
View Full Code Here

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

        }
    }

    protected void resolveClassLoader4InputClasspath() throws Exception {
        URL[] urls = null;
        Java2WSDLCommandLineOption option = loadOption(CLASSPATH_OPTION, CLASSPATH_OPTION_LONG);

        if (option != null) {
            ArrayList optionValues = option.getOptionValues();
            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
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.