Java Code Examples for com.sun.tools.internal.ws.resources.WscompileMessages#WSGEN_PORTNAME_MISSING_NAMESPACE

The following examples show how to use com.sun.tools.internal.ws.resources.WscompileMessages#WSGEN_PORTNAME_MISSING_NAMESPACE . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: WsgenOptions.java    From TencentKona-8 with GNU General Public License v2.0 4 votes vote down vote up
@Override
protected int parseArguments(String[] args, int i) throws BadCommandLineException {

    int j = super.parseArguments(args, i);
    if (args[i].equals(SERVICENAME_OPTION)) {
        serviceName = QName.valueOf(requireArgument(SERVICENAME_OPTION, args, ++i));
        if (serviceName.getNamespaceURI() == null || serviceName.getNamespaceURI().length() == 0) {
            throw new BadCommandLineException(WscompileMessages.WSGEN_SERVICENAME_MISSING_NAMESPACE(args[i]));
        }
        if (serviceName.getLocalPart() == null || serviceName.getLocalPart().length() == 0) {
            throw new BadCommandLineException(WscompileMessages.WSGEN_SERVICENAME_MISSING_LOCALNAME(args[i]));
        }
        return 2;
    } else if (args[i].equals(PORTNAME_OPTION)) {
        portName = QName.valueOf(requireArgument(PORTNAME_OPTION, args, ++i));
        if (portName.getNamespaceURI() == null || portName.getNamespaceURI().length() == 0) {
            throw new BadCommandLineException(WscompileMessages.WSGEN_PORTNAME_MISSING_NAMESPACE(args[i]));
        }
        if (portName.getLocalPart() == null || portName.getLocalPart().length() == 0) {
            throw new BadCommandLineException(WscompileMessages.WSGEN_PORTNAME_MISSING_LOCALNAME(args[i]));
        }
        return 2;
    } else if (args[i].equals("-r")) {
        nonclassDestDir = new File(requireArgument("-r", args, ++i));
        if (!nonclassDestDir.exists()) {
            throw new BadCommandLineException(WscompileMessages.WSCOMPILE_NO_SUCH_DIRECTORY(nonclassDestDir.getPath()));
        }
        return 2;
    } else if (args[i].startsWith("-wsdl")) {
        genWsdl = true;
        //String value = requireArgument("-wsdl", args, ++i).substring(5);
        String value = args[i].substring(5);
        int index = value.indexOf(':');
        if (index == 0) {
            value = value.substring(1);
            index = value.indexOf('/');
            if (index == -1) {
                protocol = value;
            } else {
                protocol = value.substring(0, index);
            }
            protocolSet = true;
        }
        return 1;
    } else if (args[i].equals("-XwsgenReport")) {
        // undocumented switch for the test harness
        wsgenReport = new File(requireArgument("-XwsgenReport", args, ++i));
        return 2;
    } else if (args[i].equals("-Xdonotoverwrite")) {
        doNotOverWrite = true;
        return 1;
    } else if (args[i].equals("-inlineSchemas")) {
        inlineSchemas = true;
        return 1;
    } else if ("-x".equals(args[i])) {
        externalMetadataFiles.add(requireArgument("-x", args, ++i));
        return 1;
    }

    return j;
}
 
Example 2
Source File: WsgenOptions.java    From jdk8u60 with GNU General Public License v2.0 4 votes vote down vote up
@Override
protected int parseArguments(String[] args, int i) throws BadCommandLineException {

    int j = super.parseArguments(args, i);
    if (args[i].equals(SERVICENAME_OPTION)) {
        serviceName = QName.valueOf(requireArgument(SERVICENAME_OPTION, args, ++i));
        if (serviceName.getNamespaceURI() == null || serviceName.getNamespaceURI().length() == 0) {
            throw new BadCommandLineException(WscompileMessages.WSGEN_SERVICENAME_MISSING_NAMESPACE(args[i]));
        }
        if (serviceName.getLocalPart() == null || serviceName.getLocalPart().length() == 0) {
            throw new BadCommandLineException(WscompileMessages.WSGEN_SERVICENAME_MISSING_LOCALNAME(args[i]));
        }
        return 2;
    } else if (args[i].equals(PORTNAME_OPTION)) {
        portName = QName.valueOf(requireArgument(PORTNAME_OPTION, args, ++i));
        if (portName.getNamespaceURI() == null || portName.getNamespaceURI().length() == 0) {
            throw new BadCommandLineException(WscompileMessages.WSGEN_PORTNAME_MISSING_NAMESPACE(args[i]));
        }
        if (portName.getLocalPart() == null || portName.getLocalPart().length() == 0) {
            throw new BadCommandLineException(WscompileMessages.WSGEN_PORTNAME_MISSING_LOCALNAME(args[i]));
        }
        return 2;
    } else if (args[i].equals("-r")) {
        nonclassDestDir = new File(requireArgument("-r", args, ++i));
        if (!nonclassDestDir.exists()) {
            throw new BadCommandLineException(WscompileMessages.WSCOMPILE_NO_SUCH_DIRECTORY(nonclassDestDir.getPath()));
        }
        return 2;
    } else if (args[i].startsWith("-wsdl")) {
        genWsdl = true;
        //String value = requireArgument("-wsdl", args, ++i).substring(5);
        String value = args[i].substring(5);
        int index = value.indexOf(':');
        if (index == 0) {
            value = value.substring(1);
            index = value.indexOf('/');
            if (index == -1) {
                protocol = value;
            } else {
                protocol = value.substring(0, index);
            }
            protocolSet = true;
        }
        return 1;
    } else if (args[i].equals("-XwsgenReport")) {
        // undocumented switch for the test harness
        wsgenReport = new File(requireArgument("-XwsgenReport", args, ++i));
        return 2;
    } else if (args[i].equals("-Xdonotoverwrite")) {
        doNotOverWrite = true;
        return 1;
    } else if (args[i].equals("-inlineSchemas")) {
        inlineSchemas = true;
        return 1;
    } else if ("-x".equals(args[i])) {
        externalMetadataFiles.add(requireArgument("-x", args, ++i));
        return 1;
    }

    return j;
}
 
Example 3
Source File: WsgenOptions.java    From openjdk-jdk8u with GNU General Public License v2.0 4 votes vote down vote up
@Override
protected int parseArguments(String[] args, int i) throws BadCommandLineException {

    int j = super.parseArguments(args, i);
    if (args[i].equals(SERVICENAME_OPTION)) {
        serviceName = QName.valueOf(requireArgument(SERVICENAME_OPTION, args, ++i));
        if (serviceName.getNamespaceURI() == null || serviceName.getNamespaceURI().length() == 0) {
            throw new BadCommandLineException(WscompileMessages.WSGEN_SERVICENAME_MISSING_NAMESPACE(args[i]));
        }
        if (serviceName.getLocalPart() == null || serviceName.getLocalPart().length() == 0) {
            throw new BadCommandLineException(WscompileMessages.WSGEN_SERVICENAME_MISSING_LOCALNAME(args[i]));
        }
        return 2;
    } else if (args[i].equals(PORTNAME_OPTION)) {
        portName = QName.valueOf(requireArgument(PORTNAME_OPTION, args, ++i));
        if (portName.getNamespaceURI() == null || portName.getNamespaceURI().length() == 0) {
            throw new BadCommandLineException(WscompileMessages.WSGEN_PORTNAME_MISSING_NAMESPACE(args[i]));
        }
        if (portName.getLocalPart() == null || portName.getLocalPart().length() == 0) {
            throw new BadCommandLineException(WscompileMessages.WSGEN_PORTNAME_MISSING_LOCALNAME(args[i]));
        }
        return 2;
    } else if (args[i].equals("-r")) {
        nonclassDestDir = new File(requireArgument("-r", args, ++i));
        if (!nonclassDestDir.exists()) {
            throw new BadCommandLineException(WscompileMessages.WSCOMPILE_NO_SUCH_DIRECTORY(nonclassDestDir.getPath()));
        }
        return 2;
    } else if (args[i].startsWith("-wsdl")) {
        genWsdl = true;
        //String value = requireArgument("-wsdl", args, ++i).substring(5);
        String value = args[i].substring(5);
        int index = value.indexOf(':');
        if (index == 0) {
            value = value.substring(1);
            index = value.indexOf('/');
            if (index == -1) {
                protocol = value;
            } else {
                protocol = value.substring(0, index);
            }
            protocolSet = true;
        }
        return 1;
    } else if (args[i].equals("-XwsgenReport")) {
        // undocumented switch for the test harness
        wsgenReport = new File(requireArgument("-XwsgenReport", args, ++i));
        return 2;
    } else if (args[i].equals("-Xdonotoverwrite")) {
        doNotOverWrite = true;
        return 1;
    } else if (args[i].equals("-inlineSchemas")) {
        inlineSchemas = true;
        return 1;
    } else if ("-x".equals(args[i])) {
        externalMetadataFiles.add(requireArgument("-x", args, ++i));
        return 1;
    }

    return j;
}
 
Example 4
Source File: WsgenOptions.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 4 votes vote down vote up
@Override
protected int parseArguments(String[] args, int i) throws BadCommandLineException {

    int j = super.parseArguments(args, i);
    if (args[i].equals(SERVICENAME_OPTION)) {
        serviceName = QName.valueOf(requireArgument(SERVICENAME_OPTION, args, ++i));
        if (serviceName.getNamespaceURI() == null || serviceName.getNamespaceURI().length() == 0) {
            throw new BadCommandLineException(WscompileMessages.WSGEN_SERVICENAME_MISSING_NAMESPACE(args[i]));
        }
        if (serviceName.getLocalPart() == null || serviceName.getLocalPart().length() == 0) {
            throw new BadCommandLineException(WscompileMessages.WSGEN_SERVICENAME_MISSING_LOCALNAME(args[i]));
        }
        return 2;
    } else if (args[i].equals(PORTNAME_OPTION)) {
        portName = QName.valueOf(requireArgument(PORTNAME_OPTION, args, ++i));
        if (portName.getNamespaceURI() == null || portName.getNamespaceURI().length() == 0) {
            throw new BadCommandLineException(WscompileMessages.WSGEN_PORTNAME_MISSING_NAMESPACE(args[i]));
        }
        if (portName.getLocalPart() == null || portName.getLocalPart().length() == 0) {
            throw new BadCommandLineException(WscompileMessages.WSGEN_PORTNAME_MISSING_LOCALNAME(args[i]));
        }
        return 2;
    } else if (args[i].equals("-r")) {
        nonclassDestDir = new File(requireArgument("-r", args, ++i));
        if (!nonclassDestDir.exists()) {
            throw new BadCommandLineException(WscompileMessages.WSCOMPILE_NO_SUCH_DIRECTORY(nonclassDestDir.getPath()));
        }
        return 2;
    } else if (args[i].startsWith("-wsdl")) {
        genWsdl = true;
        //String value = requireArgument("-wsdl", args, ++i).substring(5);
        String value = args[i].substring(5);
        int index = value.indexOf(':');
        if (index == 0) {
            value = value.substring(1);
            index = value.indexOf('/');
            if (index == -1) {
                protocol = value;
            } else {
                protocol = value.substring(0, index);
            }
            protocolSet = true;
        }
        return 1;
    } else if (args[i].equals("-XwsgenReport")) {
        // undocumented switch for the test harness
        wsgenReport = new File(requireArgument("-XwsgenReport", args, ++i));
        return 2;
    } else if (args[i].equals("-Xdonotoverwrite")) {
        doNotOverWrite = true;
        return 1;
    } else if (args[i].equals("-inlineSchemas")) {
        inlineSchemas = true;
        return 1;
    } else if ("-x".equals(args[i])) {
        externalMetadataFiles.add(requireArgument("-x", args, ++i));
        return 1;
    }

    return j;
}
 
Example 5
Source File: WsgenOptions.java    From openjdk-jdk9 with GNU General Public License v2.0 4 votes vote down vote up
@Override
protected int parseArguments(String[] args, int i) throws BadCommandLineException {

    int j = super.parseArguments(args, i);
    if (args[i].equals(SERVICENAME_OPTION)) {
        serviceName = QName.valueOf(requireArgument(SERVICENAME_OPTION, args, ++i));
        if (serviceName.getNamespaceURI() == null || serviceName.getNamespaceURI().length() == 0) {
            throw new BadCommandLineException(WscompileMessages.WSGEN_SERVICENAME_MISSING_NAMESPACE(args[i]));
        }
        if (serviceName.getLocalPart() == null || serviceName.getLocalPart().length() == 0) {
            throw new BadCommandLineException(WscompileMessages.WSGEN_SERVICENAME_MISSING_LOCALNAME(args[i]));
        }
        return 2;
    } else if (args[i].equals(PORTNAME_OPTION)) {
        portName = QName.valueOf(requireArgument(PORTNAME_OPTION, args, ++i));
        if (portName.getNamespaceURI() == null || portName.getNamespaceURI().length() == 0) {
            throw new BadCommandLineException(WscompileMessages.WSGEN_PORTNAME_MISSING_NAMESPACE(args[i]));
        }
        if (portName.getLocalPart() == null || portName.getLocalPart().length() == 0) {
            throw new BadCommandLineException(WscompileMessages.WSGEN_PORTNAME_MISSING_LOCALNAME(args[i]));
        }
        return 2;
    } else if (args[i].equals("-r")) {
        nonclassDestDir = new File(requireArgument("-r", args, ++i));
        if (!nonclassDestDir.exists()) {
            throw new BadCommandLineException(WscompileMessages.WSCOMPILE_NO_SUCH_DIRECTORY(nonclassDestDir.getPath()));
        }
        return 2;
    } else if (args[i].startsWith("-wsdl")) {
        genWsdl = true;
        //String value = requireArgument("-wsdl", args, ++i).substring(5);
        String value = args[i].substring(5);
        int index = value.indexOf(':');
        if (index == 0) {
            value = value.substring(1);
            index = value.indexOf('/');
            if (index == -1) {
                protocol = value;
            } else {
                protocol = value.substring(0, index);
            }
            protocolSet = true;
        }
        return 1;
    } else if (args[i].equals("-XwsgenReport")) {
        // undocumented switch for the test harness
        wsgenReport = new File(requireArgument("-XwsgenReport", args, ++i));
        return 2;
    } else if (args[i].equals("-Xdonotoverwrite")) {
        doNotOverWrite = true;
        return 1;
    } else if (args[i].equals("-inlineSchemas")) {
        inlineSchemas = true;
        return 1;
    } else if ("-x".equals(args[i])) {
        externalMetadataFiles.add(requireArgument("-x", args, ++i));
        return 1;
    }

    return j;
}
 
Example 6
Source File: WsgenOptions.java    From hottub with GNU General Public License v2.0 4 votes vote down vote up
@Override
protected int parseArguments(String[] args, int i) throws BadCommandLineException {

    int j = super.parseArguments(args, i);
    if (args[i].equals(SERVICENAME_OPTION)) {
        serviceName = QName.valueOf(requireArgument(SERVICENAME_OPTION, args, ++i));
        if (serviceName.getNamespaceURI() == null || serviceName.getNamespaceURI().length() == 0) {
            throw new BadCommandLineException(WscompileMessages.WSGEN_SERVICENAME_MISSING_NAMESPACE(args[i]));
        }
        if (serviceName.getLocalPart() == null || serviceName.getLocalPart().length() == 0) {
            throw new BadCommandLineException(WscompileMessages.WSGEN_SERVICENAME_MISSING_LOCALNAME(args[i]));
        }
        return 2;
    } else if (args[i].equals(PORTNAME_OPTION)) {
        portName = QName.valueOf(requireArgument(PORTNAME_OPTION, args, ++i));
        if (portName.getNamespaceURI() == null || portName.getNamespaceURI().length() == 0) {
            throw new BadCommandLineException(WscompileMessages.WSGEN_PORTNAME_MISSING_NAMESPACE(args[i]));
        }
        if (portName.getLocalPart() == null || portName.getLocalPart().length() == 0) {
            throw new BadCommandLineException(WscompileMessages.WSGEN_PORTNAME_MISSING_LOCALNAME(args[i]));
        }
        return 2;
    } else if (args[i].equals("-r")) {
        nonclassDestDir = new File(requireArgument("-r", args, ++i));
        if (!nonclassDestDir.exists()) {
            throw new BadCommandLineException(WscompileMessages.WSCOMPILE_NO_SUCH_DIRECTORY(nonclassDestDir.getPath()));
        }
        return 2;
    } else if (args[i].startsWith("-wsdl")) {
        genWsdl = true;
        //String value = requireArgument("-wsdl", args, ++i).substring(5);
        String value = args[i].substring(5);
        int index = value.indexOf(':');
        if (index == 0) {
            value = value.substring(1);
            index = value.indexOf('/');
            if (index == -1) {
                protocol = value;
            } else {
                protocol = value.substring(0, index);
            }
            protocolSet = true;
        }
        return 1;
    } else if (args[i].equals("-XwsgenReport")) {
        // undocumented switch for the test harness
        wsgenReport = new File(requireArgument("-XwsgenReport", args, ++i));
        return 2;
    } else if (args[i].equals("-Xdonotoverwrite")) {
        doNotOverWrite = true;
        return 1;
    } else if (args[i].equals("-inlineSchemas")) {
        inlineSchemas = true;
        return 1;
    } else if ("-x".equals(args[i])) {
        externalMetadataFiles.add(requireArgument("-x", args, ++i));
        return 1;
    }

    return j;
}
 
Example 7
Source File: WsgenOptions.java    From openjdk-8-source with GNU General Public License v2.0 4 votes vote down vote up
@Override
protected int parseArguments(String[] args, int i) throws BadCommandLineException {

    int j = super.parseArguments(args, i);
    if (args[i].equals(SERVICENAME_OPTION)) {
        serviceName = QName.valueOf(requireArgument(SERVICENAME_OPTION, args, ++i));
        if (serviceName.getNamespaceURI() == null || serviceName.getNamespaceURI().length() == 0) {
            throw new BadCommandLineException(WscompileMessages.WSGEN_SERVICENAME_MISSING_NAMESPACE(args[i]));
        }
        if (serviceName.getLocalPart() == null || serviceName.getLocalPart().length() == 0) {
            throw new BadCommandLineException(WscompileMessages.WSGEN_SERVICENAME_MISSING_LOCALNAME(args[i]));
        }
        return 2;
    } else if (args[i].equals(PORTNAME_OPTION)) {
        portName = QName.valueOf(requireArgument(PORTNAME_OPTION, args, ++i));
        if (portName.getNamespaceURI() == null || portName.getNamespaceURI().length() == 0) {
            throw new BadCommandLineException(WscompileMessages.WSGEN_PORTNAME_MISSING_NAMESPACE(args[i]));
        }
        if (portName.getLocalPart() == null || portName.getLocalPart().length() == 0) {
            throw new BadCommandLineException(WscompileMessages.WSGEN_PORTNAME_MISSING_LOCALNAME(args[i]));
        }
        return 2;
    } else if (args[i].equals("-r")) {
        nonclassDestDir = new File(requireArgument("-r", args, ++i));
        if (!nonclassDestDir.exists()) {
            throw new BadCommandLineException(WscompileMessages.WSCOMPILE_NO_SUCH_DIRECTORY(nonclassDestDir.getPath()));
        }
        return 2;
    } else if (args[i].startsWith("-wsdl")) {
        genWsdl = true;
        //String value = requireArgument("-wsdl", args, ++i).substring(5);
        String value = args[i].substring(5);
        int index = value.indexOf(':');
        if (index == 0) {
            value = value.substring(1);
            index = value.indexOf('/');
            if (index == -1) {
                protocol = value;
            } else {
                protocol = value.substring(0, index);
            }
            protocolSet = true;
        }
        return 1;
    } else if (args[i].equals("-XwsgenReport")) {
        // undocumented switch for the test harness
        wsgenReport = new File(requireArgument("-XwsgenReport", args, ++i));
        return 2;
    } else if (args[i].equals("-Xdonotoverwrite")) {
        doNotOverWrite = true;
        return 1;
    } else if (args[i].equals("-inlineSchemas")) {
        inlineSchemas = true;
        return 1;
    } else if ("-x".equals(args[i])) {
        externalMetadataFiles.add(requireArgument("-x", args, ++i));
        return 1;
    }

    return j;
}
 
Example 8
Source File: WsgenOptions.java    From openjdk-8 with GNU General Public License v2.0 4 votes vote down vote up
@Override
protected int parseArguments(String[] args, int i) throws BadCommandLineException {

    int j = super.parseArguments(args, i);
    if (args[i].equals(SERVICENAME_OPTION)) {
        serviceName = QName.valueOf(requireArgument(SERVICENAME_OPTION, args, ++i));
        if (serviceName.getNamespaceURI() == null || serviceName.getNamespaceURI().length() == 0) {
            throw new BadCommandLineException(WscompileMessages.WSGEN_SERVICENAME_MISSING_NAMESPACE(args[i]));
        }
        if (serviceName.getLocalPart() == null || serviceName.getLocalPart().length() == 0) {
            throw new BadCommandLineException(WscompileMessages.WSGEN_SERVICENAME_MISSING_LOCALNAME(args[i]));
        }
        return 2;
    } else if (args[i].equals(PORTNAME_OPTION)) {
        portName = QName.valueOf(requireArgument(PORTNAME_OPTION, args, ++i));
        if (portName.getNamespaceURI() == null || portName.getNamespaceURI().length() == 0) {
            throw new BadCommandLineException(WscompileMessages.WSGEN_PORTNAME_MISSING_NAMESPACE(args[i]));
        }
        if (portName.getLocalPart() == null || portName.getLocalPart().length() == 0) {
            throw new BadCommandLineException(WscompileMessages.WSGEN_PORTNAME_MISSING_LOCALNAME(args[i]));
        }
        return 2;
    } else if (args[i].equals("-r")) {
        nonclassDestDir = new File(requireArgument("-r", args, ++i));
        if (!nonclassDestDir.exists()) {
            throw new BadCommandLineException(WscompileMessages.WSCOMPILE_NO_SUCH_DIRECTORY(nonclassDestDir.getPath()));
        }
        return 2;
    } else if (args[i].startsWith("-wsdl")) {
        genWsdl = true;
        //String value = requireArgument("-wsdl", args, ++i).substring(5);
        String value = args[i].substring(5);
        int index = value.indexOf(':');
        if (index == 0) {
            value = value.substring(1);
            index = value.indexOf('/');
            if (index == -1) {
                protocol = value;
            } else {
                protocol = value.substring(0, index);
            }
            protocolSet = true;
        }
        return 1;
    } else if (args[i].equals("-XwsgenReport")) {
        // undocumented switch for the test harness
        wsgenReport = new File(requireArgument("-XwsgenReport", args, ++i));
        return 2;
    } else if (args[i].equals("-Xdonotoverwrite")) {
        doNotOverWrite = true;
        return 1;
    } else if (args[i].equals("-inlineSchemas")) {
        inlineSchemas = true;
        return 1;
    } else if ("-x".equals(args[i])) {
        externalMetadataFiles.add(requireArgument("-x", args, ++i));
        return 1;
    }

    return j;
}