当前位置: 首页>>代码示例>>Java>>正文


Java WscompileMessages.WSGEN_SERVICENAME_MISSING_LOCALNAME属性代码示例

本文整理汇总了Java中com.sun.tools.internal.ws.resources.WscompileMessages.WSGEN_SERVICENAME_MISSING_LOCALNAME属性的典型用法代码示例。如果您正苦于以下问题:Java WscompileMessages.WSGEN_SERVICENAME_MISSING_LOCALNAME属性的具体用法?Java WscompileMessages.WSGEN_SERVICENAME_MISSING_LOCALNAME怎么用?Java WscompileMessages.WSGEN_SERVICENAME_MISSING_LOCALNAME使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在com.sun.tools.internal.ws.resources.WscompileMessages的用法示例。


在下文中一共展示了WscompileMessages.WSGEN_SERVICENAME_MISSING_LOCALNAME属性的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: parseArguments

@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;
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:61,代码来源:WsgenOptions.java

示例2: parseArguments

@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].equals("-classpath") || args[i].equals("-cp")) {
        classpath = requireArgument("-classpath", args, ++i) + File.pathSeparator + System.getProperty("java.class.path");
        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;
    }

    return j;
}
 
开发者ID:alexkasko,项目名称:openjdk-icedtea7,代码行数:61,代码来源:WsgenOptions.java


注:本文中的com.sun.tools.internal.ws.resources.WscompileMessages.WSGEN_SERVICENAME_MISSING_LOCALNAME属性示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。