qxwtt520 2014-01-09 23:07
浏览 223
已采纳

CXF webservice问题 求大牛解决

[code="java"]
JaxWsProxyFactoryBean factory = new JaxWsProxyFactoryBean();
.......
JaxWsProxyFactoryBean.create()
调用方法等。。。

下面是JaxWsProxyFactoryBean.create()类里面的方法。
/**
* Creates a JAX-WS proxy that can be used to make remote invocations.
*
* @return the proxy. You must cast the returned object to the approriate class
* before making remote calls
*/
@Override
public synchronized Object create() {
ClassLoaderHolder orig = null;
try {
if (getBus() != null) {
ClassLoader loader = getBus().getExtension(ClassLoader.class);
if (loader != null) {
orig = ClassLoaderUtils.setThreadContextClassloader(loader);
}
}

        Object obj = super.create();
        Service service = getServiceFactory().getService();
        if (needWrapperClassInterceptor(service.getServiceInfos().get(0))) {
            List<Interceptor<? extends Message>> in = super.getInInterceptors();
            List<Interceptor<? extends Message>> out = super.getOutInterceptors();
            in.add(new WrapperClassInInterceptor());
            in.add(new HolderInInterceptor());
            out.add(new WrapperClassOutInterceptor());
            out.add(new HolderOutInterceptor());
        }
        return obj;
    } finally {
        if (orig != null) {
            orig.reset();
        }
    }
}

[/code]

Object obj = super.create(); 这句话 用main方法测试可以获取到obj 程序流程正常走完,方法也调用正常 为啥部署到tomcat或者weblogic就获取不到obj 进入java.util.concurrent.FutureTask类 直接卡死了 这个啥情况呢 有人知道吗 麻烦帮助解决下 谢谢。

  • 写回答

1条回答 默认 最新

  • liyebing 2014-01-10 07:33
    关注

    容器的classloader未加载到那个类吧。。从这个思路再去想想?

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

    报告相同问题?

    悬赏问题

    • ¥15 代码已写好,求帮我指出错误,有偿!
    • ¥15 matlab+波形匹配算法
    • ¥15 转录组分析做聚类树图时癌旁组被分到了癌组
    • ¥15 大一Python字典
    • ¥15 multisim电路设计(相关搜索:设计报告)
    • ¥15 PC-lint Plus
    • ¥15 gpl24676注释
    • ¥15 php5.3内存泄露
    • ¥15 DigSilent如何复制复合模型到自己案例?
    • ¥15 求日版华为b610s-77a 官方公版固件,有偿