为多个类生成单个 WSDL 文件 [英] Generating Single WSDL file for Multiple classes

查看:35
本文介绍了为多个类生成单个 WSDL 文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们正在使用自下而上"的方法来构建网络服务.我们有 10 个想要作为 Web 服务公开的 Java 类.我们如何为这些类只创建一个 WSDL 文件?(java2wsdl 实用程序及其 Ant 任务仅采用一个类作为参数来生成 WSDL 文件.)

We are using "Bottom Up" approach for building webservices. We have 10 java classes which we want to expose as a webservice. How can we create only one WSDL file for these classes? (java2wsdl utility & its Ant task takes only one class as parameter for generating WSDL file.)

推荐答案

我能想到的一种方法,类似于@shivaspk 提出的方法是创建一个接口并声明底层类的功能的方法.为此接口.在该接口的实现中,您可以在相应的方法中调用底层类."

One approach I can think of, simillar to what @shivaspk has proposed is "Create an interface and declare the methods for functionalities of your underlying classes. Generate WSDL for this interface. In the implementation of that interface you can call the underlying class in corresponding method."

这篇关于为多个类生成单个 WSDL 文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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