Eclipse创建WSDL+AXIS2 (二)

本文详细介绍了如何利用MyEclipse创建WSDL的过程,包括新建WSDL文件、操作对象、创建请求响应消息结构等步骤,旨在帮助开发者熟练掌握WSDL的创建与应用。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

 1、使用MyEclipse创建WSDL

1)  new --> other --输入WSDL --->选取WSDL --->next-->更改 ManageStudentService.wsdl-->next -->更改http://service.computer.com/ManageStudentService/   -->finish
2)  更改NewOperation 为CreateStudent;更改input\output 参数分别为CreateStudentRequestMsg;CreateStudentResponseMsg,类型为:Element
3)  为CreateStudentRequestMsg创建CreateStudentRequest对象,类型为Complex Type;为CreateStudentRequest对象创建Header和body对象
    类型分别为 RequestHeader和RequestBody
4)为RequestHeader 创建字段,分别为 version string; interFrom String;
5)为RequestBody  创建字段,分别为 name string; sex String; age String;
6)   为CreateStudentResponseMsg创建CreateStudentResponse对象,类型为Complex Type;为CreateStudentResponse对象创建Header 类型为RequestHeader.
       备注:右键CreateStudentResponse-->add Element-->head-->右键head--->set type-->new-->complex tye -->RequestHeader
7 )  为RequestHeader 创建字段,分别为 resultCode string; resultMsg String;
8 )   保存

1 下载 Myeclipse Axis2 插件 http: archive apache org dist ws axis2 tools 1 4 1 下载 axis2 eclipse codegen wizard zip 和 axis2 eclipse service archiver wizard zip http: labs xiaonei com apache mirror ws axis2 1 5 axis2 1 5 war zip 下载 axis2 1 5 war zip 2 .解压插件 $ECLIPSE HOME 表示你安装的 myeclipse 主目录 将上述两个插件都解压到 $ECLIPSE HOME eclipse plugins 目录中; Axis2 Codegen Wizard 1 3 0 和 Axis2 Service Archiver 1 3 0 3 在 $ECLIPSE HOME eclipse links 目录下增加文件 axis eclipse plugin link 写入 path $ECLIPSE HOME eclipse plugins 千万不要直接复制 4 重新启动 myeclipse 在 file >new >other 中即可看到 Axis2 Wizards 至此 axis2 插件安装成功 GXGX 5 赶快试下用 wsdl 文件生成 java 源文件吧 是不是有错误出现 对 事情就是这样发展的 6 An error occurred while completing process java lang reflect InvocationTargetException 的错误 嗯不用急 有得解 不过我当初很惨弄了一个晚上 解决方法如下: step 1 从 AXIS2 的 LIB 库中复制 "geronimo stax api 1 0 spec 1 0 1 jar" 和 "backport util concurrent 3 1 jar" 文件到 Axis2 Codegen Wizard 1 3 0 的 lib 目录中 同时修改 Axis2 Codegen Wizard 1 3 0 下的 plugin xml 文件 在 <runtime> 中添加 <library name "lib geronimo stax api 1 0 spec 1 0 1 jar"> <export name " " > < library> <library name "lib backport util concurrent 3 1 jar"> <export name " " > < library> 到 plugin xml 文件中 保存 step 2 将 $workspace 位置 metadata plugins 下目录 Axis2 Codegen Wizard 删除 step 3 在命令行下切换至 $ECLIPSE HOME 目录 然后执行: eclipse –clear step 4 除了上面步骤还要: (4 1) 把Axis2 Codegen wizard 1 3 0 eclipse plugins Axis2 Codegen wizard 1 3 0 的名字改成Axis2 Codegen wizard 1 4 0 (4 2) 在plugin xml中在<plugin>中 把Axis2 Codegen wizard的version "1 3 0"改成version "1 4 0" 到plugin xml文件中 保存后重新启动Eclipse即可 ">1 下载 Myeclipse Axis2 插件 http: archive apache org dist ws axis2 tools 1 4 1 下载 axis2 eclipse codegen wizard zip 和 axis2 eclipse service archiver wizard zip http: labs xiaonei com apache mirror ws axis2 1 5 axis2 1 5 war zip 下载 axis2 1 5 war zip 2 .解压插件 $E [更多]
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值