完成《Building a Declaratively-Driven POJO Web Service》。
WebService Annotation虽然使得创建和发布WebService变得非常简单,但由于元注释元素很多,学习起来还是比较费时的。
有没有一些辅助手段,可以帮助我们生成这些元注释,而不必人工输入呢?
JDeveloper考虑到了这一点——它提供了一个Wizard帮我们生成元注释。
嘿嘿,真是我们开发人员的福气啊。
重点步骤说明:
1. 创建好POJO类以后,右键点击该类,选择“Create Web Service”


可以修改服务名和端口名

选择 SOAP1.2Binding

选择要发布WebService的operation,这里只有一个,因此默认选中。

点击Finish,生成的元注释如下:

2. 测试WebService
步骤跟上一个实验一样,这里省略。
3. 导出WSDL,保存到本地

然后可以选择File-> Save As
Project 下载:WebServices (2).7z。
没有评论:
发表评论