• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Java WscompileMessages类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: addFile

import com.sun.tools.internal.ws.resources.WscompileMessages; //导入依赖的package包/类
/**
 * Parses a token to a file (or a set of files)
 * and add them as {@link InputSource} to the specified list.
 *
 * @param suffix If the given token is a directory name, we do a recusive search
 *               and find all files that have the given suffix.
 */
private void addFile(String name, List<InputSource> target, String suffix) throws BadCommandLineException {
    Object src;
    try {
        src = Util.getFileOrURL(name);
    } catch (IOException e) {
        throw new BadCommandLineException(WscompileMessages.WSIMPORT_NOT_A_FILE_NOR_URL(name));
    }
    if (src instanceof URL) {
        target.add(absolutize(new InputSource(Util.escapeSpace(((URL) src).toExternalForm()))));
    } else {
        File fsrc = (File) src;
        if (fsrc.isDirectory()) {
            addRecursive(fsrc, suffix, target);
        } else {
            target.add(absolutize(fileToInputSource(fsrc)));
        }
    }
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:26,代码来源:WsimportOptions.java


示例2: validate

import com.sun.tools.internal.ws.resources.WscompileMessages; //导入依赖的package包/类
public void validate() throws BadCommandLineException {
    if(nonclassDestDir == null)
        nonclassDestDir = destDir;

    if (!protocols.contains(protocol)) {
        throw new BadCommandLineException(WscompileMessages.WSGEN_INVALID_PROTOCOL(protocol, protocols));
    }

    if (endpoints.isEmpty()) {
        throw new BadCommandLineException(WscompileMessages.WSGEN_MISSING_FILE());
    }
    if (protocol == null || protocol.equalsIgnoreCase(X_SOAP12) && !isExtensionMode()) {
        throw new BadCommandLineException(WscompileMessages.WSGEN_SOAP_12_WITHOUT_EXTENSION());
    }

    if (nonstdProtocols.containsKey(protocol) && !isExtensionMode()) {
        throw new BadCommandLineException(WscompileMessages.WSGEN_PROTOCOL_WITHOUT_EXTENSION(protocol));
    }
    if (inlineSchemas && !genWsdl) {
        throw new BadCommandLineException(WscompileMessages.WSGEN_INLINE_SCHEMAS_ONLY_WITH_WSDL());
    }

    validateEndpointClass();
    validateArguments();
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:26,代码来源:WsgenOptions.java


示例3: getJavacOptions

import com.sun.tools.internal.ws.resources.WscompileMessages; //导入依赖的package包/类
List<String> getJavacOptions(List<String> existingOptions, WsimportListener listener) {
    List<String> result = new ArrayList<String>();
    for (String o: javacOptions) {
        if (o.contains("=") && !o.startsWith("A")) {
            int i = o.indexOf('=');
            String key = o.substring(0, i);
            if (existingOptions.contains(key)) {
                listener.message(WscompileMessages.WSCOMPILE_EXISTING_OPTION(key));
            } else {
                result.add(key);
                result.add(o.substring(i + 1));
            }
        } else {
            if (existingOptions.contains(o)) {
                listener.message(WscompileMessages.WSCOMPILE_EXISTING_OPTION(o));
            } else {
                result.add(o);
            }
        }
    }
    return result;
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:23,代码来源:Options.java


示例4: getFromMetadataResolver

import com.sun.tools.internal.ws.resources.WscompileMessages; //导入依赖的package包/类
private @Nullable Element getFromMetadataResolver(String systemId, Exception ex) {
    //try MEX
    MetaDataResolver resolver;
    ServiceDescriptor serviceDescriptor = null;
    for (MetadataResolverFactory resolverFactory : ServiceFinder.find(MetadataResolverFactory.class)) {
        resolver = resolverFactory.metadataResolver(options.entityResolver);
        try {
            serviceDescriptor = resolver.resolve(new URI(systemId));
            //we got the ServiceDescriptor, now break
            if (serviceDescriptor != null)
                break;
        } catch (URISyntaxException e) {
            throw new ParseException(e);
        }
    }

    if (serviceDescriptor != null) {
        errorReceiver.warning(new SAXParseException(WsdlMessages.TRY_WITH_MEX(ex.getMessage()), null, ex));
        return parseMetadata(systemId, serviceDescriptor);
    } else {
        errorReceiver.error(null, WsdlMessages.PARSING_UNABLE_TO_GET_METADATA(ex.getMessage(), WscompileMessages.WSIMPORT_NO_WSDL(systemId)), ex);
    }
    return null;
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:25,代码来源:MetadataFinder.java


示例5: parseArguments

import com.sun.tools.internal.ws.resources.WscompileMessages; //导入依赖的package包/类
/**
 * Parses arguments and fill fields of this object.
 *
 * @exception BadCommandLineException
 *      thrown when there's a problem in the command-line arguments
 */
public void parseArguments( String[] args ) throws BadCommandLineException {

    for (int i = 0; i < args.length; i++) {
        if(args[i].length()==0)
            throw new BadCommandLineException();
        if (args[i].charAt(0) == '-') {
            int j = parseArguments(args,i);
            if(j==0)
                throw new BadCommandLineException(WscompileMessages.WSCOMPILE_INVALID_OPTION(args[i]));
            i += (j-1);
        } else {
            addFile(args[i]);
        }
    }
    if(destDir == null)
        destDir = new File(".");
    if(sourceDir == null)
        sourceDir = destDir;
}
 
开发者ID:campolake,项目名称:openjdk9,代码行数:26,代码来源:Options.java


示例6: DefaultAuthenticator

import com.sun.tools.internal.ws.resources.WscompileMessages; //导入依赖的package包/类
public DefaultAuthenticator(@NotNull ErrorReceiver receiver, @NotNull File authfile) throws BadCommandLineException {
    this.errReceiver = receiver;
    this.proxyUser = System.getProperty("http.proxyUser");
    this.proxyPasswd = System.getProperty("http.proxyPassword");

    if(authfile != null){
        this.authFile = authfile;
        this.giveError = true;
    }

    if(!authFile.exists()){
        try {
            error(new SAXParseException(WscompileMessages.WSIMPORT_AUTH_FILE_NOT_FOUND(authFile.getCanonicalPath(), defaultAuthfile), null));
        } catch (IOException e) {
            error(new SAXParseException(WscompileMessages.WSIMPORT_FAILED_TO_PARSE(authFile,e.getMessage()), null));
        }
        return;
    }

    if(!authFile.canRead()){
        error(new SAXParseException("Authorization file: "+authFile + " does not have read permission!", null));
        return;
    }
    parseAuth();
}
 
开发者ID:alexkasko,项目名称:openjdk-icedtea7,代码行数:26,代码来源:DefaultAuthenticator.java


示例7: error

import com.sun.tools.internal.ws.resources.WscompileMessages; //导入依赖的package包/类
public void error(SAXParseException e) {
    if(debug)
        e.printStackTrace();
    hasError = true;
    if((e.getSystemId() == null && e.getPublicId() == null) && (e.getCause() instanceof UnknownHostException)) {
        print(WscompileMessages.WSIMPORT_ERROR_MESSAGE(e.toString()), e);
    } else {
        print(WscompileMessages.WSIMPORT_ERROR_MESSAGE(e.getMessage()), e);
    }
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:11,代码来源:ConsoleErrorReporter.java


示例8: validate

import com.sun.tools.internal.ws.resources.WscompileMessages; //导入依赖的package包/类
public void validate() throws BadCommandLineException {
    if (wsdls.isEmpty()) {
        throw new BadCommandLineException(WscompileMessages.WSIMPORT_MISSING_FILE());
    }

    if(wsdlLocation !=null && clientjar != null) {
       throw new BadCommandLineException(WscompileMessages.WSIMPORT_WSDLLOCATION_CLIENTJAR());
    }
    if(wsdlLocation == null){
        wsdlLocation = wsdls.get(0).getSystemId();
    }


}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:15,代码来源:WsimportOptions.java


示例9: parseProxy

import com.sun.tools.internal.ws.resources.WscompileMessages; //导入依赖的package包/类
private void parseProxy(String text) throws BadCommandLineException {
    int i = text.lastIndexOf('@');
    int j = text.lastIndexOf(':');

    if (i > 0) {
        proxyAuth = text.substring(0, i);
        if (j > i) {
            proxyHost = text.substring(i + 1, j);
            proxyPort = text.substring(j + 1);
        } else {
            proxyHost = text.substring(i + 1);
            proxyPort = "8080";
        }
    } else {
        //no auth info
        if (j < 0) {
            //no port
            proxyHost = text;
            proxyPort = "8080";
        } else {
            proxyHost = text.substring(0, j);
            proxyPort = text.substring(j + 1);
        }
    }
    try {
        Integer.valueOf(proxyPort);
    } catch (NumberFormatException e) {
        throw new BadCommandLineException(WscompileMessages.WSIMPORT_ILLEGAL_PROXY(text));
    }
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:31,代码来源:WsimportOptions.java


示例10: validateEndpointClass

import com.sun.tools.internal.ws.resources.WscompileMessages; //导入依赖的package包/类
/**
 * Get an implementation class annotated with @WebService annotation.
 */
private void validateEndpointClass() throws BadCommandLineException {
    Class clazz = null;
    for(String cls : endpoints){
        clazz = getClass(cls);
        if (clazz == null)
            continue;

        if (clazz.isEnum() || clazz.isInterface() ||
            clazz.isPrimitive()) {
            continue;
        }
        isImplClass = true;
        WebService webService = (WebService) clazz.getAnnotation(WebService.class);
        if(webService == null)
            continue;
        break;
    }
    if(clazz == null){
        throw new BadCommandLineException(WscompileMessages.WSGEN_CLASS_NOT_FOUND(endpoints.get(0)));
    }
    if(!isImplClass){
        throw new BadCommandLineException(WscompileMessages.WSGEN_CLASS_MUST_BE_IMPLEMENTATION_CLASS(clazz.getName()));
    }
    endpoint = clazz;
    validateBinding();
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:30,代码来源:WsgenOptions.java


示例11: validateBinding

import com.sun.tools.internal.ws.resources.WscompileMessages; //导入依赖的package包/类
private void validateBinding() throws BadCommandLineException {
    if (genWsdl) {
        BindingID binding = BindingID.parse(endpoint);
        if ((binding.equals(BindingID.SOAP12_HTTP) ||
             binding.equals(BindingID.SOAP12_HTTP_MTOM)) &&
                !(protocol.equals(X_SOAP12) && isExtensionMode())) {
            throw new BadCommandLineException(WscompileMessages.WSGEN_CANNOT_GEN_WSDL_FOR_SOAP_12_BINDING(binding.toString(), endpoint.getName()));
        }
        if (binding.equals(BindingID.XML_HTTP)) {
            throw new BadCommandLineException(WscompileMessages.WSGEN_CANNOT_GEN_WSDL_FOR_NON_SOAP_BINDING(binding.toString(), endpoint.getName()));
        }
    }
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:14,代码来源:WsgenOptions.java


示例12: validateArguments

import com.sun.tools.internal.ws.resources.WscompileMessages; //导入依赖的package包/类
private void validateArguments() throws BadCommandLineException {
    if (!genWsdl) {
        if (serviceName != null) {
            throw new BadCommandLineException(WscompileMessages.WSGEN_WSDL_ARG_NO_GENWSDL(SERVICENAME_OPTION));
        }
        if (portName != null) {
            throw new BadCommandLineException(WscompileMessages.WSGEN_WSDL_ARG_NO_GENWSDL(PORTNAME_OPTION));
        }
    }
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:11,代码来源:WsgenOptions.java


示例13: usage

import com.sun.tools.internal.ws.resources.WscompileMessages; //导入依赖的package包/类
protected void usage(Options options) {
    // Just don't see any point in passing WsgenOptions
    // BadCommandLineException also shouldn't have options
    if (options == null)
        options = this.options;
    if (options instanceof WsgenOptions) {
        System.out.println(WscompileMessages.WSGEN_HELP("WSGEN",
                ((WsgenOptions)options).protocols,
                ((WsgenOptions)options).nonstdProtocols.keySet()));
        System.out.println(WscompileMessages.WSGEN_USAGE_EXTENSIONS());
        System.out.println(WscompileMessages.WSGEN_USAGE_EXAMPLES());
    }
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:14,代码来源:WsgenTool.java



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java LocatorTable类代码示例发布时间:2022-05-23
下一篇:
Java PBasicInputEventHandler类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap