webservice中碰到的问题: Could not initialize Service NoSuchMethodException getPortClassMap()
情况如下:A应用是用jaxws编写的web service客户端,单独运行该客户端成功。
B应用是基于xfire的web service服务,在B中调用A,结果在构造一个Service类的似乎出了上面的错,该类是javax.xml.ws.Service的子类。
在javax.xml.ws.Service中并没有方法getPortClassMap(),那么为什么会报NoSuchMethodException getPortClassMap()这个错呢?
查看javax.xml.ws.Service的源代码,该类的构造函数调用了javax.xml.ws.spi.Provider来创建Service类的代理,程序就是在这一步出错的。
经过搜索,网上建议删除xfire包后该错误会消失,所以判断是类加载的问题。
xfire的包在tomcat/webapps/app/web-inf的lib下,其加载顺序高于由根classloader加载的jdk中的javax.xml.ws.spi.Provider,所以在创建Service的代理的时候没有使用jdk自带的javax.xml.ws.spi.Provider,而是使用了xfire包中的javax.xml.ws.spi.Provider。
基于以上判断,我删除了xfire包中的jaxws子包,搞定!
- 浏览: 16771 次
- 性别:
- 来自: 广州
相关推荐
NULL 博文链接:https://hw1287789687.iteye.com/blog/2034439
PHP webservice SOAP解决Could not connect to host
WebService::Simple - Web 服务 API 的简单接口 概要 use WebService::Simple; # Simple use case my $flickr = WebService::Simple->new( base_url => "http://api.flickr.com/services/rest/", param => { api_...
名称WebService::Simple::AWS - 使用 WebService::Simple 的 Amazon Web Service 的简单接口概要 use WebService::Simple::AWS;my $service = WebService::Simple::AWS->new( base_url => '...
WebService::Simple::AWS - 使用 WebService::Simple 的 Amazon Web Service 的简单接口 概要 use WebService::Simple::AWS; my $service = WebService::Simple::AWS->new( base_url => '...
use WebService::Reactio; my $client = WebService::Reactio->new( api_key => '__API_KEY__', organization => '__ORGANIZATION__', ); my $incidents = $client->incidents; 描述 WebService :: Reactio是...
版本版本 2.014概要 use WebService::UrbanDictionary; my $ud = WebService::UrbanDictionary->new; my $results = request('perl'); for my $each (@{ $results->definitions }) { printf "Definition: %s\n(by %s...
use WebService::Pushover; my $push = WebService::Pushover->new( user_token => 'PUSHOVER USER TOKEN', api_token => 'PUSHOVER API TOKEN', ) or die( "Unable to instantiate WebService::Pushover.\n" ); ...
名称WebService::Algolia - Algolia API 绑定版本版本 0.1002概要 use WebService::Algolia;my $alg = WebService::Algolia->new( application_id => '12345', api_key => 'abcde',);$alg->get_indexes;描述该模块为...
这是查找语义相关性的 HSO 度量的 Java 实现。 该度量应用于 UMLS 源词汇表,并用于查找医学术语之间的相关性。 此实现使用与 WebService::UMLSKS::Similarity 相同的算法,后者是一个 CPAN perl 开源包。
springboot2-webservice:使用Spring Boot 2开发Web服务
jquery跨域调用webservice,采用jsonp,在webservice返回端采用HttpContext.Current.Response.Write返回json格式。,回调函数返回执行结果。
WebService::Instapaper - Instapaper Full API 的客户端 概要 use WebService::Instapaper; my $client = WebService::Instapaper->new(consumer_key => '...', consumer_secret => '...'); $client->auth('...
使用cxf webservice时容易出现的异常
WebServiceStudio,调试web service的利器,适合老系统接口对接,所有关于符合soap规范的web服务调试工具。
cdtrs_online_portal_webservice:CDTRS在线门户的Web服务
spring-webservice:스프링부트로구축하는서비스
webservice笔记 XML(Extensible Markup Language) :扩展型可标记语言。面向短期的临时数据处理、面向万维网络,是Soap的基础。 SOAP(Simple Object Access Protocol) :简单对象存取协议。是XML Web Service 的通信...
网络服务 Java WebService示例
附件是 WebService 的示例程序(含说明文档) :考虑到 CXF 更容易和 spring 集成,所以WebService 服务端采用了 CXF 框架, 客户端分别用 axis2 和 cxf 两种方式实现 。 框架版本 : CXF:2.3.3 Spring:2.5.6 ...