简体   繁体   English

尝试创建客户端服务库时wsimport失败

[英]wsimport fails when trying to create client service library

I am trying to create a client library to access Mantis from java. 我正在尝试创建一个客户端库来从java访问Mantis The problem is that I am getting an error and I don't know why. 问题是我收到了错误,我不知道为什么。

Running this command: 运行此命令:

wsimport http://www.mantisbt.org/demo/api/soap/mantisconnect.php?wsdl

simply fails. 简直失败了。 It is supposed to create some kind of client libraries for access to the service from java, but I get this error: 它应该创建某种客户端库来从java访问服务,但我收到此错误:

[ERROR] "Use of SOAP Encoding is not supported. 
SOAP extension element on line 1,075 in http://www.mantisbt.org/demo/api
/soap/mantisconnect.php?wsdl has use="encoded" "

I looked on internet and there are vague references to this error, that it seems as an error of an directive, but it is not the case: I've tried to fix this problem with a downloaded version of the xml and it didn't work. 我在互联网上看到了这个错误的模糊引用,它似乎是一个指令的错误,但事实并非如此:我试图用下载的xml版本解决这个问题,但它没有工作。

I think I could need some kind of catalogue for achieve this generation succesfully, could it be?? 我想我可能需要某种目录来成功实现这一代,可能是吗? If so, does anyone how to create this?? 如果是这样,有人如何创建这个? I made some search but my knowledge of web services in general is too limited to achieve that. 我做了一些搜索,但我对Web服务的了解总体来说太有限了。

Thanks in advance, 提前致谢,

The crux of the issue is that the mantis WSDL is describing an rpc/encoded web service and that style is not supported in the modern wsimport tool. 问题的关键在于,螳螂WSDL正在描述rpc /编码的Web服务,现代wsimport工具不支持该样式。

A good writeup of the different types of web service styles is at http://www.ibm.com/developerworks/webservices/library/ws-whichwsdl/ . 有关不同类型的Web服务样式的详细说明, 请访问http://www.ibm.com/developerworks/webservices/library/ws-whichwsdl/

A related question and self-service answer is provided at Best way to consume RPC/encoded webservice? 使用RPC /编码的Web服务的最佳方式中提供了相关的问题和自助服务答案 . That answer makes the comment 'I'm also in doubt about using JAX-RPC for this job, because it's way out-dated.', but that really is what you are dealing with here so using the 'old library' really would be the correct way to go. 这个回答使得评论'我对使用JAX-RPC进行这项工作也有疑问,因为它已经过时了。',但这真的是你在这里处理的事情,所以使用'旧库'真的会是正确的方法去。

Is using Axis 1.4 an option? 使用Axis 1.4是一个选项吗? If it is, we have deployed Axis 1 SOAP stubs for MantisBT on Maven central. 如果是,我们在Maven central上为MantisBT部署了Axis 1 SOAP存根

Alternatively there is a source project on Github at jerr/mantis-ws-client which should how to build artifacts with JAX-RPC. 或者,在jerr / mantis-ws-client上的Github上有一个源项目,该项目应该如何使用JAX-RPC构建工件。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM