《实施一个Web服务实验三》

上传人:tang****xu3 文档编号:159700342 上传时间:2021-01-07 格式:DOCX 页数:18 大小:38.51KB
返回 下载 相关 举报
《实施一个Web服务实验三》_第1页
第1页 / 共18页
《实施一个Web服务实验三》_第2页
第2页 / 共18页
《实施一个Web服务实验三》_第3页
第3页 / 共18页
《实施一个Web服务实验三》_第4页
第4页 / 共18页
《实施一个Web服务实验三》_第5页
第5页 / 共18页
点击查看更多>>
资源描述

《《实施一个Web服务实验三》》由会员分享,可在线阅读,更多相关《《实施一个Web服务实验三》(18页珍藏版)》请在金锄头文库上搜索。

1、西北工业大学电子服务系统设计 实验才艮告一、实验目的及要求1、练习实验环境的搭建。2、 练习一个web服务的实施,包括创建一个 web服务、部署一个web服务和调 用一个web服务。3、练习取消(收回)一个 web服务。二、实验设备(环境)及要求PC机最低配置:2GH彼上CPU; 1G以上内存;1G自由硬盘空间JDK1.5.0 ; Eclipse ; Axis2 ; axis2-eclipse-codegen-wizard-1.4三、实验内容与步骤1、练习实验环境的搭建2、 练习用可视化的方法(或其它方法)生成WSDLC件3、校验WSDL:件4、生成服务桩5、实施web服务6、部署并查看web

2、服务7、用客户桩产生客户端8、实施并运行web服务9、取消(收回)web服务四、实验结果与数据处理1、安装开发 WebService的插件(在实验二中已安装)FinishCancelC reate 目 Java 匚ImwsWizards;type filler text案Java Project from Existing Ant Buildffile 隅 Plug-in Praject二 Generalv Axis2 Wiaards4 Axi2 Cod GeneratorAxiService Archiverj - Connection ProfilesDatabase Web Srvict

3、5Eclipse Modeling -rametvork EJB将Axis2服务部署到Tomcat下 本(E:) Tomcat webappV 0 aiweb, P-DB0修改日期大小a松2017 12/10 17;27次快dues2017/12/10 17126exanrples2017/12/10 17:26host-manager2017/12/1017i26文玲夹manager2017/12/10 17:2文牛奏ROOT2017/12/10 17;26文快axi日T猝ksUser Assistance 4 Webw Web Services宛 Ant Files=jgl Unit Te

4、st UDDlWfrb Servi二 V7eb Service Client& WSDL File & JAX-WS10 11 12r 131415 16IS 19 70 止WSD咛的原始代码如下:1 |c r*xnl er5icn=_l.0M encoding=H(/7F-* 5tandalone=i,no-?z w=,dl: dpfinitins wulns; aap=thttp: /chffna . xmL snap. arg/udL /aoap/1 xmlng;tns wx$d: ichtina tarfietNameipace=r7ictp:/7tc;fev,xxsd: ccxnpl

5、PxTypp?Kbtl:clQirent namein,r type-xsd:str/x5d: sflquf?nc/xbdiconplexlype*p0nefl-i/xsd sequence/xsd;r FF 1g iN H.MJI Ji.p dr1*1 concatRequsst(E : EnEtTyp 财E stringI cl 我 stringDesign Source事 Linrip.$) Ini nm MebiFFa n-linnpIp&Frvire HI #回 BratK*pod|Tppci回 匚 EcmtReguieEl:画匚 nw武;stringiDrign : r-ir t摩

6、 SimpkSeTvitcwdl 23Simple ServiceQ SmpeSenflce& $ impleS tryioeSOAP季 ccrcathrtpiZ/1 q LdlliQit 80SG,白】inputE3 paranwtercE concMKquttJlcutpjtparametersE concat:Response3、校验WSDLe件验证 WSD或件,以确保它符合各种 web服务标准。右键单击 eclipse 中的 SimpleService.wsdl文件,选择验证,如果有错,在该窗口会有问题报告。3E AitisZ Codegen Wizard XOutputS-i&t i

7、lie Output OCStr&n for the generated CQCeSelect one of below to the codegen output either on eclipse workspace project or on file system and then browse to enter the output path Broy And ?elect r project on rurrent eclipse workspaceQ) Browse and select location on local file s/stemOutput pathE:edi p

8、seifforkspaceSimpleServiceBrowse.Add the Ajcis2 ccdeqen jas tc the codecen resullted projectMAdd Axis2 libraries to the ccdeqer result projectAxss Home:ajas2-1 -6.2-binaxis2-1.6.2Browse-BChrk Lib,. I Axis libs loaded successfully n01 Create a jar file of codegen resiblt p rojec: ndl add to re-sulted

9、 project lib f elder (Default: Cod c g e nRe su Its J a rjJar Hie NameP*ge Hint EnMhCancel生成后项目代码结构如下:7 _ SimpleS ?rvkev srtv ;廿 com.ttdew.ssCencatRequestJa/3.i ConcatRcponejava.ExtensionMapper.javsi Si mpl eServi c eM e s sa geReceive r| n Outj avaSimpleServiceSkeleton.java疗 SimpleServiceSkeletonln

10、terfaceJaYaf- u J RE System Library Jav ,E土 Referenced Ubrariww Dbv , rsGourees,X 5BFVBCE5 .XITil0 Simpl&Gervice,w?dI爵 build-Km IEimpleSen/ice.wsdl5、实施 WebService修改 SimpleServiceSkeleton.java的代码如下:jj SiiiTpEtSef - ce&keletDnjatfai 我12 public class SimpIqSorvi(.eSkeleton implements SimplScrviceSkclet

11、onlnterfjlq13141116 xAuto generatedmethod signature117 *gl*param roncatequetR|19*Return国 721|22public com.ttdcv*s5,ConcatRcspunconcat肛s(com. ttdev.i*,CDnatRet|ueit ehl业札一中心山)M9S2SString result = roncat:equestgetSl( + S 0 151Using AK S7_H011E F. e-L, n. S-binaris- r 6. 2bln.LltffOl LSirpl ATLsServer 1 Starti

展开阅读全文
相关资源
相关搜索

当前位置:首页 > 办公文档 > 其它办公文档

电脑版 |金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号