阿帕奇CXF客户端的初始化缓慢 [英] Slow initialization of apache cxf client

查看:192
本文介绍了阿帕奇CXF客户端的初始化缓慢的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用的WSDL2Java生成的类,这code:

I'm using wsdl2java generated classes and this code:

MyService f = new MyService();
MyServicePortType type = f.getMyServicePortType();

每个这些调用的是占用到30秒。这是为什么?

Each of these calls is taking up to 30 seconds. Why is that?

推荐答案

在谷歌搜索和修补问题的时间在计划文件是如何引用:
虽然WSDL和XSD存储在本地仍有一些参考w3.org看起来是这样的:

After hours of googling and tinkering the problem was in how scheme files were referenced: although WSDL and XSD were locally stored there was still some referenced to w3.org that looked like this:

<!DOCTYPE schema PUBLIC "-//W3C//DTD XMLSchema 200102//EN" "http://www.w3.org/2001/XMLSchema.dtd" [...

<import namespace="http://www.w3.org/2000/09/xmldsig#" schemaLocation="http://www.w3.org/TR/2002/REC-xmldsig-core-20020212/xmldsig-core-schema.xsd" />

w3.org服务器resposing我的客户超慢,因此缓慢的初始化。

w3.org server was resposing super-slowly hence the slow initialization of my client.

我已经改变了参考当地的:

I have changed the reference to local:

<import namespace="http://www.w3.org/2000/09/xmldsig#" schemaLocation="xmldsig-core-schema.xsd" />

这篇关于阿帕奇CXF客户端的初始化缓慢的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆