简体   繁体   English

在运行时从WSDL动态调用Web服务

[英]Web Service dynamic invocation from WSDL at runtime

I'm looking for a solution of dynamic web service client such as DII from JAX-RPC. 我正在寻找动态Web服务客户端(例如来自JAX-RPC的DII)的解决方案。

I need to generate a client from a WSDL. 我需要从WSDL生成一个客户端。 But the WSDL is only known at runtime (so I don't have any available interface). 但是WSDL仅在运行时才知道(因此我没有任何可用的接口)。

I had a look on JbossESB, JbossWS, JaxWS,JaxRPC, but I could'nt find anything that fits this requirements. 我看了一下JbossESB,JbossWS,JaxWS,JaxRPC,但是找不到适合这个要求的东西。

Thanks for your help. 谢谢你的帮助。

It appears that this is possible with CXF and some java reflection. 看来这可以通过CXF和一些Java反射实现。

jax-ws-dynamic-dispatch-with-cxf jax ws动态分配与cxf

I'm personally looking for a solution for this + a dynamic server model as well. 我个人也在寻找这种+动态服务器模型的解决方案。

Good luck. 祝好运。

finding a ready-made solution to your problem is not easy. 为您的问题找到现成的解决方案并不容易。 at least none exist AFAIK. 至少不存在AFAIK。 due to the inherent, unknown complexity of the backing schema types associated w/ an operation's request and response, it's not possible to have such a solution. 由于与操作的请求和响应相关联的后备架构类型固有的,未知的复杂性,因此不可能有这样的解决方案。

however, putting together the correct tools, or using some open-source frameworks/libraries/tools you might be able to achieve something similar. 但是,将正确的工具放在一起,或者使用一些开源框架/库/工具,您也许可以实现类似的目标。 basically you'll need to have a WSDL4J implementation, along with a schema parser like XMLBeans to get this working. 基本上,您将需要具有WSDL4J实现以及XMLBeans类的模式解析器才能使此工作正常进行。

A tool which comes to my mind is SoapUI . 我想到的一个工具是SoapUI it achieves something similar - user loads a WSDL at runtime and thereafter can execute operations. 它实现了类似的功能-用户在运行时加载WSDL,然后可以执行操作。 the source of this tool is also available for modification under LGPL here . 这个工具的源也可用于修改下LGPL 这里 you'll need to strip and salvage the core functionality that suits your need. 您将需要剥离和保留适合您需要的核心功能。 or best, build one of your own :] 或最好,建立自己的一个:]

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

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