简体   繁体   English

一种基于现有WSDL生成Java Web服务的工具

[英]A tool to generate a Java Webservice based on an existing WSDL

Typically you would be able to generate a CLIENT java class(es) based on a WSDL. 通常,您将能够基于WSDL生成CLIENT Java类。 However, that's not what I need here. 但是,这不是我所需要的。

There is a Webservice that I want to create a proxy for. 有一个我要为其创建代理的Web服务。 I need the proxy to be able to expose the exact same WSDL as the Webservice. 我需要代理能够公开与Web服务完全相同的WSDL。 The proxy will then translate the requests and hand them off to another system. 然后,代理将转换请求并将其移交给另一个系统。 Since I have the WSDL for the Webservice, I figure there may be a tool to generate the skeleton code (Java) for the proxy so that it can satisfy that WSDL. 由于我具有用于Web服务的WSDL,因此我认为可能存在一个工具来生成代理的框架代码(Java),以便它可以满足该WSDL。 A tool would be handy because of the sheer number of operations this Webservice handles. 由于此Web服务处理的操作数量众多,因此该工具非常方便。

Once I have the skeleton code, I can go ahead and start writing the logic for each operation that the WSDL has. 一旦有了框架代码,就可以继续并为WSDL的每个操作编写逻辑。

您可以使用Apache Axis提供的wsdl2Java工具。

You can use Actional WebService proxy by Progress Software: http://www.progress.com/en/Product-Capabilities/continuous-service-optimization.html 您可以使用Progress Software的Actional WebService代理: http : //www.progress.com/en/Product-Capabilities/continuous-service-optimization.html

It does exactly what you are asking for. 它确实满足您的要求。 It also allows to register custom action handlers that you can place your java code in. Also it does out of the box XSLT transformations, and call splits (eg call one service then turn around and call multiple backend services). 它还允许注册可用于放置Java代码的自定义操作处理程序。它还提供了开箱即用的XSLT转换和调用拆分(例如,调用一个服务然后转身并调用多个后端服务)。

I might be misunderstanding the question but isn't this what any contract-first webservice library does? 我可能会误解这个问题,但这不是任何合同优先的Web服务库做什么吗? I believe Spring WS only supports writing the WSDL first and than generate you java code from that. 我相信Spring WS仅支持首先编写WSDL,而不是从中生成Java代码。 I prefer Apache CXF myself. 我自己更喜欢Apache CXF。 It supports both aproaches, java or wsdl first. 它同时支持Java或wsdl两种方式。

http://static.springsource.org/spring-ws/sites/2.0/reference/html/tutorial.html http://static.springsource.org/spring-ws/sites/2.0/reference/html/tutorial.html

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

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