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


Java EndpointContext类代码示例

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


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

示例1: compileGeneratedClasses

import javax.xml.ws.EndpointContext; //导入依赖的package包/类
protected boolean compileGeneratedClasses(ErrorReceiver receiver, WsimportListener listener){
    List<String> sourceFiles = new ArrayList<String>();

    for (File f : options.getGeneratedFiles()) {
        if (f.exists() && f.getName().endsWith(".java")) {
            sourceFiles.add(f.getAbsolutePath());
        }
    }

    if (sourceFiles.size() > 0) {
        String classDir = options.destDir.getAbsolutePath();
        String classpathString = createClasspathString();
        boolean bootCP = useBootClasspath(EndpointContext.class) || useBootClasspath(JAXBPermission.class);
        List<String> args = new ArrayList<String>();
        args.add("-d");
        args.add(classDir);
        args.add("-classpath");
        args.add(classpathString);
        //javac is not working in osgi as the url starts with a bundle
        if (bootCP) {
            args.add("-Xbootclasspath/p:"
                    + JavaCompilerHelper.getJarFile(EndpointContext.class)
                    + File.pathSeparator
                    + JavaCompilerHelper.getJarFile(JAXBPermission.class));
        }

        if (options.debug) {
            args.add("-g");
        }

        if (options.encoding != null) {
            args.add("-encoding");
            args.add(options.encoding);
        }

        if (options.javacOptions != null) {
            args.addAll(options.getJavacOptions(args, listener));
        }

        for (int i = 0; i < sourceFiles.size(); ++i) {
            args.add(sourceFiles.get(i));
        }

        listener.message(WscompileMessages.WSIMPORT_COMPILING_CODE());
        if(options.verbose){
            StringBuilder argstr = new StringBuilder();
            for(String arg:args){
                argstr.append(arg).append(" ");
            }
            listener.message("javac "+ argstr.toString());
        }

        return JavaCompilerHelper.compile(args.toArray(new String[args.size()]), out, receiver);
    }
    //there are no files to compile, so return true?
    return true;
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:58,代码来源:WsimportTool.java

示例2: compileGeneratedClasses

import javax.xml.ws.EndpointContext; //导入依赖的package包/类
protected boolean compileGeneratedClasses(ErrorReceiver receiver, WsimportListener listener){
    List<String> sourceFiles = new ArrayList<String>();

    for (File f : options.getGeneratedFiles()) {
        if (f.exists() && f.getName().endsWith(".java")) {
            sourceFiles.add(f.getAbsolutePath());
        }
    }

    if (sourceFiles.size() > 0) {
        String classDir = options.destDir.getAbsolutePath();
        String classpathString = createClasspathString();
        boolean bootCP = useBootClasspath(EndpointContext.class) || useBootClasspath(JAXBPermission.class);
        List<String> args = new ArrayList<String>();
        args.add("-addmods");
        args.add("java.xml.ws");
        args.add("-d");
        args.add(classDir);
        args.add("-classpath");
        args.add(classpathString);
        //javac is not working in osgi as the url starts with a bundle
        if (bootCP) {
            args.add("-Xbootclasspath/p:"
                    + JavaCompilerHelper.getJarFile(EndpointContext.class)
                    + File.pathSeparator
                    + JavaCompilerHelper.getJarFile(JAXBPermission.class));
        }

        if (options.debug) {
            args.add("-g");
        }

        if (options.encoding != null) {
            args.add("-encoding");
            args.add(options.encoding);
        }

        if (options.javacOptions != null) {
            args.addAll(options.getJavacOptions(args, listener));
        }

        for (int i = 0; i < sourceFiles.size(); ++i) {
            args.add(sourceFiles.get(i));
        }

        if (!options.quiet) listener.message(WscompileMessages.WSIMPORT_COMPILING_CODE());

        if(options.verbose){
            StringBuilder argstr = new StringBuilder();
            for(String arg:args){
                argstr.append(arg).append(" ");
            }
            listener.message("javac "+ argstr.toString());
        }

        return JavaCompilerHelper.compile(args.toArray(new String[args.size()]), out, receiver);
    }
    //there are no files to compile, so return true?
    return true;
}
 
开发者ID:campolake,项目名称:openjdk9,代码行数:61,代码来源:WsimportTool.java

示例3: setEndpointContext

import javax.xml.ws.EndpointContext; //导入依赖的package包/类
@Override
//jaxws2.2 api
public void setEndpointContext(EndpointContext ctxt)
{
   delegate.setEndpointContext(ctxt);
}
 
开发者ID:jbossws,项目名称:jbossws-cxf,代码行数:7,代码来源:ProviderImpl.java

示例4: compileGeneratedClasses

import javax.xml.ws.EndpointContext; //导入依赖的package包/类
protected boolean compileGeneratedClasses(ErrorReceiver receiver, WsimportListener listener){
    List<String> sourceFiles = new ArrayList<String>();

    for (File f : options.getGeneratedFiles()) {
        if (f.exists() && f.getName().endsWith(".java")) {
            sourceFiles.add(f.getAbsolutePath());
        }
    }

    if (sourceFiles.size() > 0) {
        String classDir = options.destDir.getAbsolutePath();
        String classpathString = createClasspathString();
        boolean bootCP = useBootClasspath(EndpointContext.class) || useBootClasspath(JAXBPermission.class);
        String[] args = new String[4 + (bootCP ? 1 : 0) + (options.debug ? 1 : 0)
                + sourceFiles.size()];
        args[0] = "-d";
        args[1] = classDir;
        args[2] = "-classpath";
        args[3] = classpathString;
        int baseIndex = 4;
        //javac is not working in osgi as the url starts with a bundle
        if (bootCP) {
            args[baseIndex++] = "-Xbootclasspath/p:"+JavaCompilerHelper.getJarFile(EndpointContext.class)+File.pathSeparator+JavaCompilerHelper.getJarFile(JAXBPermission.class);
        }

        if (options.debug) {
            args[baseIndex++] = "-g";
        }
        for (int i = 0; i < sourceFiles.size(); ++i) {
            args[baseIndex + i] = sourceFiles.get(i);
        }

        listener.message(WscompileMessages.WSIMPORT_COMPILING_CODE());
        if(options.verbose){
            StringBuffer argstr = new StringBuffer();
            for(String arg:args){
                argstr.append(arg).append(" ");
            }
            listener.message("javac "+ argstr.toString());
        }

        return JavaCompilerHelper.compile(args, out, receiver);
    }
    //there are no files to compile, so return true?
    return true;
}
 
开发者ID:alexkasko,项目名称:openjdk-icedtea7,代码行数:47,代码来源:WsimportTool.java


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