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未加载到那个类吧。。从这个思路再去想想?

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

报告相同问题?

悬赏问题

  • ¥20 sub地址DHCP问题
  • ¥15 delta降尺度计算的一些细节,有偿
  • ¥15 Arduino红外遥控代码有问题
  • ¥15 数值计算离散正交多项式
  • ¥30 数值计算均差系数编程
  • ¥15 redis-full-check比较 两个集群的数据出错
  • ¥15 Matlab编程问题
  • ¥15 训练的多模态特征融合模型准确度很低怎么办
  • ¥15 kylin启动报错log4j类冲突
  • ¥15 超声波模块测距控制点灯,灯的闪烁很不稳定,经过调试发现测的距离偏大