使用RPC /编码的Web服务的最佳方式是什么? [英] Best way to consume RPC/encoded webservice?

查看:212
本文介绍了使用RPC /编码的Web服务的最佳方式是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要为后端使用旧式RPC /编码的WSDL Web服务。起初我尝试使用Apache CXF和JAX-WS,但JAX-WS wsimport 工具不吃rpc / enoded WSDL。

I need to consume old-school RPC/encoded WSDL webservice for my backend. At first I tried to use Apache CXF and JAX-WS for that, but JAX-WS wsimport tool doesn't eat rpc/enoded WSDL.


[错误] JAXWS 2.0不支持rpc / encoded wsdls。

[ERROR] rpc/encoded wsdls are not supported in JAXWS 2.0.



<我也对使用JAX-RPC做这项工作有疑问,因为它已经过时了。 Axis 1.4是5年的工具。

I'm also in doubt about using JAX-RPC for this job, because it's way out-dated. Axis 1.4 is 5 years old tool.

目前我看到这三个选项:

Currently I see these three options:


  1. 使用JAX-WS javax.xml.ws.Dispatch 发送和接收SOAP并以某种方式解析它,一个例子

  2. 使用JAX-RPC并获得使用过时的恶误业力技术,

  3. 手动完成所有操作并稍后讨厌自己。

  1. use JAX-WS javax.xml.ws.Dispatch to send and receive SOAP and parse it somehow, one example
  2. use JAX-RPC and gain bad karma for using outdated technology,
  3. do it all manually and hate myself later.

这些都听起来都不是好的,所以如果你能提供一些好的线索,想要做什么以及如何解决它,我将不胜感激。

Neither of these sound too good, so I would appreciate if you could give some good leads, thought what to do and how to solve it.

推荐答案

更新



我的案例是通过手工编辑从编码文字的WSDL解决的(基本上在操作输入和输出<$下) c $ c> use =literal是唯一的替代品)然后我可以用 Apache CXF 生成存根。可以这样做,因为端点没有完全解析RPC /编码,并且无法针对WSDL验证RPC /编码规范XML。

UPDATE

My case was solved with hand editing WSDL from encoded to literal (basically under operations input and output use="literal" was the only replacement) and then I could generate stubs with Apache CXF. It could be done, because endpoint wasn't parsing RPC/encoded exactly and RPC/encoded spec XML couldn't be validated against WSDL).

尽管Axis 1.4可能有效对于你来说,使用Apache CXF和那个小WSDL黑客,可能是一个更好的方法。

Although Axis 1.4 may work for you, using Apache CXF with that little WSDL hack, may be a better way.

作为参考 - 我这次选择使用JAX-RPC和Axis 1.4。我生成了客户端代码,并希望在服务升级时可以用JAX-WS实现替换它。

For reference -- I opted for using JAX-RPC and Axis 1.4 this time. I generated client code and hopefully can replace it with JAX-WS implementation when service gets upgraded.

这篇关于使用RPC /编码的Web服务的最佳方式是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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