﻿<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/"><channel><title>BlogJava-桑桑小窝-随笔分类-AXIS</title><link>http://www.blogjava.net/virtual-function/category/26248.html</link><description>光荣在于平淡，艰巨在于漫长</description><language>zh-cn</language><lastBuildDate>Sun, 21 Oct 2007 19:51:55 GMT</lastBuildDate><pubDate>Sun, 21 Oct 2007 19:51:55 GMT</pubDate><ttl>60</ttl><item><title>使用Eclipse+Axis2创建与发布Web服务</title><link>http://www.blogjava.net/virtual-function/archive/2007/10/16/153365.html</link><dc:creator>桑之兮(CS-LIN)</dc:creator><author>桑之兮(CS-LIN)</author><pubDate>Tue, 16 Oct 2007 11:57:00 GMT</pubDate><guid>http://www.blogjava.net/virtual-function/archive/2007/10/16/153365.html</guid><wfw:comment>http://www.blogjava.net/virtual-function/comments/153365.html</wfw:comment><comments>http://www.blogjava.net/virtual-function/archive/2007/10/16/153365.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/virtual-function/comments/commentRss/153365.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/virtual-function/services/trackbacks/153365.html</trackback:ping><description><![CDATA[&nbsp;
<h3 style="text-align: center" align="center"><span style="font-size: 18pt; color: blue; line-height: 173%; font-family: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">使用</span><span lang="EN-US" style="font-size: 18pt; color: blue; line-height: 173%">Eclipse+Axis2</span><span style="font-size: 18pt; color: blue; line-height: 173%; font-family: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">创建与发布</span><span lang="EN-US" style="font-size: 18pt; color: blue; line-height: 173%">Web</span><span style="font-size: 18pt; color: blue; line-height: 173%; font-family: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">服务</span><span lang="EN-US" style="font-size: 18pt; color: blue; line-height: 173%"><o:p></o:p></span></h3>
<p class="MsoNormal" style="margin-left: 21pt; text-indent: -21pt; mso-list: l0 level1 lfo1; tab-stops: list 21.0pt"><strong style="mso-bidi-font-weight: normal"><span lang="EN-US" style="font-size: 14pt; font-family: 楷体_GB2312; mso-bidi-font-family: 楷体_GB2312"><span style="mso-list: Ignore">一、<span style="font: 7pt 'Times New Roman'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span></strong><strong style="mso-bidi-font-weight: normal"><span style="font-size: 14pt; font-family: 楷体_GB2312">下载<span lang="EN-US">Axis2</span>并部署：<span lang="EN-US"><o:p></o:p></span></span></strong></p>
<p class="MsoNormal" style="margin-left: 21pt; text-indent: 21pt"><span style="font-size: 12pt; font-family: 楷体_GB2312">从<span lang="EN-US"><a href="http://apache.justdn.org/ws/axis2/1_3/">http://apache.justdn.org/ws/axis2/1_3/</a></span>的列表中下载<span lang="EN-US"><a href="http://apache.justdn.org/ws/axis2/1_3/axis2-1.3-war.zip">axis2-1.3-war.zip</a> </span>。将其解压，把其中的<span lang="EN-US">axis2.war</span>文件复制到<span lang="EN-US">tomcat</span>的<span lang="EN-US">webapps</span>目录下即可。<span lang="EN-US"><o:p></o:p></span></span></p>
<p class="MsoNormal" style="margin-left: 21pt; text-indent: -21pt; mso-list: l0 level1 lfo1; tab-stops: list 21.0pt"><strong style="mso-bidi-font-weight: normal"><span lang="EN-US" style="font-size: 14pt; font-family: 楷体_GB2312; mso-bidi-font-family: 楷体_GB2312"><span style="mso-list: Ignore">二、<span style="font: 7pt 'Times New Roman'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span></strong><strong style="mso-bidi-font-weight: normal"><span style="font-size: 14pt; font-family: 楷体_GB2312">测试部署是否成功：<span lang="EN-US"><o:p></o:p></span></span></strong></p>
<p class="MsoNormal" style="margin-left: 21pt; text-indent: 21pt"><span style="font-size: 12pt; font-family: 楷体_GB2312">启动<span lang="EN-US">tomcat</span>，在浏览器地址栏中输入<span lang="EN-US"><a href="http://localhost:8080/axis2"><span style="color: windowtext; font-family: 'Times New Roman'; text-decoration: none; mso-fareast-font-family: 宋体; text-underline: none">http://localhost:8080/axis2</span></a> </span>。查看结果，应该如下图所示，则表示部署成功：<span lang="EN-US"><o:p></o:p></span></span></p>
<p class="MsoNormal" style="margin-left: 21pt"><span lang="EN-US" style="font-family: 楷体_GB2312"><v:shapetype id="_x0000_t75" stroked="f" filled="f" path="m@4@5l@4@11@9@11@9@5xe" o:preferrelative="t" o:spt="75" coordsize="21600,21600"><v:stroke joinstyle="miter"></v:stroke><v:formulas><v:f eqn="if lineDrawn pixelLineWidth 0"></v:f><v:f eqn="sum @0 1 0"></v:f><v:f eqn="sum 0 0 @1"></v:f><v:f eqn="prod @2 1 2"></v:f><v:f eqn="prod @3 21600 pixelWidth"></v:f><v:f eqn="prod @3 21600 pixelHeight"></v:f><v:f eqn="sum @0 0 1"></v:f><v:f eqn="prod @6 1 2"></v:f><v:f eqn="prod @7 21600 pixelWidth"></v:f><v:f eqn="sum @8 21600 0"></v:f><v:f eqn="prod @7 21600 pixelHeight"></v:f><v:f eqn="sum @10 21600 0"></v:f></v:formulas><v:path o:connecttype="rect" gradientshapeok="t" o:extrusionok="f"></v:path><o:lock aspectratio="t" v:ext="edit"></o:lock></v:shapetype><v:shape id="_x0000_i1025" style="width: 392.25pt; height: 185.25pt" type="#_x0000_t75"><v:imagedata o:title="未命名" src="file:///C:\DOCUME~1\IBM\LOCALS~1\Temp\msohtml1\01\clip_image001.png"></v:imagedata></v:shape><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left: 21pt; text-indent: -21pt; mso-list: l0 level1 lfo1; tab-stops: list 21.0pt"><strong style="mso-bidi-font-weight: normal"><span lang="EN-US" style="font-size: 14pt; font-family: 楷体_GB2312; mso-bidi-font-family: 楷体_GB2312"><span style="mso-list: Ignore">三、<span style="font: 7pt 'Times New Roman'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span></strong><strong style="mso-bidi-font-weight: normal"><span style="font-size: 14pt; font-family: 楷体_GB2312">下载<span lang="EN-US">Axis Eclipse plug-in(</span>代码生成工具和打包工具<span lang="EN-US">)</span>：<span lang="EN-US"><o:p></o:p></span></span></strong></p>
<p class="MsoNormal" style="margin-left: 21pt"><span style="font-size: 12pt; font-family: 楷体_GB2312; mso-hansi-font-family: ˎ̥; mso-font-kerning: 0pt; mso-bidi-font-family: 宋体">下载地址为：<span lang="EN-US"><o:p></o:p></span></span></p>
<p class="MsoNormal" style="margin-left: 21pt; text-indent: 21pt"><span lang="EN-US" style="font-family: ˎ̥; mso-bidi-font-size: 10.5pt; mso-font-kerning: 0pt; mso-bidi-font-family: 宋体"><a href="http://apache.justdn.org/ws/axis2/tools/1_1_1/axis2-eclipse-codegen-wizard.zip">http://apache.justdn.org/ws/axis2/tools/1_1_1/axis2-eclipse-codegen-wizard.zip</a><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left: 21pt; text-indent: 21pt"><span lang="EN-US" style="font-family: ˎ̥; mso-bidi-font-size: 10.5pt; mso-font-kerning: 0pt; mso-bidi-font-family: 宋体"><a href="http://apache.justdn.org/ws/axis2/tools/1_1_1/axis2-eclipse-service-archiver-wizard.zip">http://apache.justdn.org/ws/axis2/tools/1_1_1/axis2-eclipse-service-archiver-wizard.zip</a><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left: 21pt"><span style="font-size: 12pt; font-family: 楷体_GB2312">然后解压，组织目录结构如下，用<span lang="EN-US">link</span>方法安装插件：<span lang="EN-US"><o:p></o:p></span></span></p>
<p class="MsoNormal" style="margin-left: 21pt; text-indent: 17.7pt; mso-para-margin-left: 2.0gd; mso-char-indent-count: 1.47"><strong style="mso-bidi-font-weight: normal"><span lang="EN-US" style="font-size: 12pt; font-family: 楷体_GB2312"><v:shape id="_x0000_i1026" style="width: 203.25pt; height: 190.5pt" type="#_x0000_t75"><v:imagedata o:title="未命名" src="file:///C:\DOCUME~1\IBM\LOCALS~1\Temp\msohtml1\01\clip_image003.png"></v:imagedata></v:shape><o:p></o:p></span></strong></p>
<p class="MsoNormal"><strong style="mso-bidi-font-weight: normal"><span lang="EN-US" style="font-size: 14pt; font-family: 楷体_GB2312"><span style="mso-tab-count: 1">&nbsp;&nbsp; </span></span></strong><span style="font-size: 12pt; font-family: 楷体_GB2312">然后启动<span lang="EN-US">Eclipse</span>，检查<span lang="EN-US">New-&gt;other</span>下面是否有如下选项：<span lang="EN-US"><o:p></o:p></span></span></p>
<p class="MsoNormal" style="text-indent: 21pt"><strong style="mso-bidi-font-weight: normal"><span lang="EN-US" style="font-size: 14pt; font-family: 楷体_GB2312"><v:shape id="_x0000_i1027" style="width: 166.5pt; height: 39.75pt" type="#_x0000_t75"><v:imagedata o:title="未命名" src="file:///C:\DOCUME~1\IBM\LOCALS~1\Temp\msohtml1\01\clip_image005.png"></v:imagedata></v:shape></span></strong><span style="font-size: 12pt; font-family: 楷体_GB2312">则表明插件安装成功<span lang="EN-US">.</span></span><span lang="EN-US" style="font-size: 14pt; font-family: 楷体_GB2312"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left: 21pt; text-indent: -21pt; mso-list: l0 level1 lfo1; tab-stops: list 21.0pt"><strong style="mso-bidi-font-weight: normal"><span lang="EN-US" style="font-size: 14pt; font-family: 楷体_GB2312; mso-bidi-font-family: 楷体_GB2312"><span style="mso-list: Ignore">四、<span style="font: 7pt 'Times New Roman'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span></strong><strong style="mso-bidi-font-weight: normal"><span style="font-size: 14pt; font-family: 楷体_GB2312">创建羡慕，编写<span lang="EN-US">web</span>服务类文件<span lang="EN-US"><o:p></o:p></span></span></strong></p>
<p class="MsoNormal" style="margin-left: 21pt; text-indent: 21pt"><span style="font-size: 12pt; font-family: 楷体_GB2312">创建<span lang="EN-US">Dynamic Web Project</span>项目，创建<span lang="EN-US">org.sang.virtual,</span>编写<span lang="EN-US">Toilet</span>类。项目如下图所示：<span lang="EN-US"><o:p></o:p></span></span></p>
<p class="MsoNormal" style="margin-left: 21pt; text-indent: 21pt"><span lang="EN-US" style="font-size: 12pt; font-family: 楷体_GB2312"><v:shape id="_x0000_i1028" style="width: 195.75pt; height: 168.75pt" type="#_x0000_t75"><v:imagedata o:title="未命名" src="file:///C:\DOCUME~1\IBM\LOCALS~1\Temp\msohtml1\01\clip_image007.png"></v:imagedata></v:shape><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left: 21pt"><span lang="EN-US" style="font-size: 12pt; font-family: 楷体_GB2312">Toilet</span><span style="font-size: 12pt; font-family: 楷体_GB2312">类内容如下：<span lang="EN-US"><o:p></o:p></span></span></p>
<p class="MsoNormal" style="margin-left: 21pt; text-indent: 21pt; text-align: left; mso-layout-grid-align: none" align="left"><strong><span lang="EN-US" style="font-size: 12pt; background: silver; color: #7f0055; font-family: 'Courier New'; mso-font-kerning: 0pt; mso-highlight: silver">package</span></strong><span lang="EN-US" style="font-size: 12pt; background: silver; color: black; font-family: 'Courier New'; mso-font-kerning: 0pt; mso-highlight: silver"> org.sang.virtual;</span><span lang="EN-US" style="font-size: 12pt; background: silver; font-family: 'Courier New'; mso-font-kerning: 0pt; mso-highlight: silver"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left: 21pt; text-indent: 21pt; text-align: left; mso-layout-grid-align: none" align="left"><strong><span lang="EN-US" style="font-size: 12pt; background: silver; color: #7f0055; font-family: 'Courier New'; mso-font-kerning: 0pt; mso-highlight: silver">public</span></strong><span lang="EN-US" style="font-size: 12pt; background: silver; color: black; font-family: 'Courier New'; mso-font-kerning: 0pt; mso-highlight: silver"> </span><strong><span lang="EN-US" style="font-size: 12pt; background: silver; color: #7f0055; font-family: 'Courier New'; mso-font-kerning: 0pt; mso-highlight: silver">class</span></strong><span lang="EN-US" style="font-size: 12pt; background: silver; color: black; font-family: 'Courier New'; mso-font-kerning: 0pt; mso-highlight: silver"> Toilet {</span><span lang="EN-US" style="font-size: 12pt; background: silver; font-family: 'Courier New'; mso-font-kerning: 0pt; mso-highlight: silver"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left: 42pt; text-indent: 21pt; text-align: left; mso-layout-grid-align: none" align="left"><strong><span lang="EN-US" style="font-size: 12pt; background: silver; color: #7f0055; font-family: 'Courier New'; mso-font-kerning: 0pt; mso-highlight: silver">public</span></strong><span lang="EN-US" style="font-size: 12pt; background: silver; color: black; font-family: 'Courier New'; mso-font-kerning: 0pt; mso-highlight: silver"> </span><strong><span lang="EN-US" style="font-size: 12pt; background: silver; color: #7f0055; font-family: 'Courier New'; mso-font-kerning: 0pt; mso-highlight: silver">boolean</span></strong><span lang="EN-US" style="font-size: 12pt; background: silver; color: black; font-family: 'Courier New'; mso-font-kerning: 0pt; mso-highlight: silver"> isCanUse() {</span><span lang="EN-US" style="font-size: 12pt; background: silver; font-family: 'Courier New'; mso-font-kerning: 0pt; mso-highlight: silver"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left: 63pt; text-indent: 21pt; text-align: left; mso-layout-grid-align: none" align="left"><strong><span lang="EN-US" style="font-size: 12pt; background: silver; color: #7f0055; font-family: 'Courier New'; mso-font-kerning: 0pt; mso-highlight: silver">return</span></strong><span lang="EN-US" style="font-size: 12pt; background: silver; color: black; font-family: 'Courier New'; mso-font-kerning: 0pt; mso-highlight: silver"> </span><strong><span lang="EN-US" style="font-size: 12pt; background: silver; color: #7f0055; font-family: 'Courier New'; mso-font-kerning: 0pt; mso-highlight: silver">false</span></strong><span lang="EN-US" style="font-size: 12pt; background: silver; color: black; font-family: 'Courier New'; mso-font-kerning: 0pt; mso-highlight: silver">;</span><span lang="EN-US" style="font-size: 12pt; background: silver; font-family: 'Courier New'; mso-font-kerning: 0pt; mso-highlight: silver"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left: 42pt; text-indent: 21pt; text-align: left; mso-layout-grid-align: none" align="left"><span lang="EN-US" style="font-size: 12pt; background: silver; color: black; font-family: 'Courier New'; mso-font-kerning: 0pt; mso-highlight: silver">}</span><span lang="EN-US" style="font-size: 12pt; background: silver; font-family: 'Courier New'; mso-font-kerning: 0pt; mso-highlight: silver"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left: 21pt; text-indent: 21pt; text-align: left; mso-layout-grid-align: none" align="left"><span lang="EN-US" style="font-size: 12pt; background: silver; color: black; font-family: 'Courier New'; mso-font-kerning: 0pt; mso-highlight: silver">}</span><span lang="EN-US" style="font-size: 12pt; font-family: 'Courier New'; mso-font-kerning: 0pt"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left: 21pt; text-indent: -21pt; mso-list: l0 level1 lfo1; tab-stops: list 21.0pt"><strong style="mso-bidi-font-weight: normal"><span lang="EN-US" style="font-size: 14pt; font-family: 楷体_GB2312; mso-bidi-font-family: 楷体_GB2312"><span style="mso-list: Ignore">五、<span style="font: 7pt 'Times New Roman'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span></strong><strong style="mso-bidi-font-weight: normal"><span style="font-size: 14pt; font-family: 楷体_GB2312">创建<span lang="EN-US">Web Service</span>，并生成<span lang="EN-US">WSDL</span>文件：<span lang="EN-US"><o:p></o:p></span></span></strong></p>
<p class="MsoNormal" style="margin-left: 21pt; text-indent: 21pt"><span style="font-size: 12pt; font-family: 楷体_GB2312">使用<span lang="EN-US">lomboz</span>提供的<span lang="EN-US">WTP</span>工具来创建。具体过程略。也可以通过<span lang="EN-US">Axis2 Code Generator</span>工具来，具体过程省略。<span lang="EN-US"><o:p></o:p></span></span></p>
<p class="MsoNormal" style="margin-left: 21pt; text-indent: -21pt; mso-list: l0 level1 lfo1; tab-stops: list 21.0pt"><strong style="mso-bidi-font-weight: normal"><span lang="EN-US" style="font-size: 14pt; font-family: 楷体_GB2312; mso-bidi-font-family: 楷体_GB2312"><span style="mso-list: Ignore">六、<span style="font: 7pt 'Times New Roman'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span></strong><strong style="mso-bidi-font-weight: normal"><span style="font-size: 14pt; font-family: 楷体_GB2312">在<span lang="EN-US">META-INF</span>下建立<span lang="EN-US">services</span>描述文件<span lang="EN-US">services.xml</span>如下：<span lang="EN-US"><o:p></o:p></span></span></strong></p>
<p class="MsoNormal" style="margin-left: 21pt; text-indent: 21pt; text-align: left; mso-layout-grid-align: none" align="left"><span lang="EN-US" style="font-size: 12pt; background: silver; color: teal; font-family: 'Courier New'; mso-font-kerning: 0pt; mso-highlight: silver">&lt;</span><span lang="EN-US" style="font-size: 12pt; background: silver; color: #3f7f7f; font-family: 'Courier New'; mso-font-kerning: 0pt; mso-highlight: silver">service </span><span lang="EN-US" style="font-size: 12pt; background: silver; color: #7f007f; font-family: 'Courier New'; mso-font-kerning: 0pt; mso-highlight: silver">name</span><span lang="EN-US" style="font-size: 12pt; background: silver; color: black; font-family: 'Courier New'; mso-font-kerning: 0pt; mso-highlight: silver">=</span><span lang="EN-US" style="font-size: 12pt; background: silver; color: #2a00ff; font-family: 'Courier New'; mso-font-kerning: 0pt; mso-highlight: silver">"ToiletService"</span><span lang="EN-US" style="font-size: 12pt; background: silver; color: teal; font-family: 'Courier New'; mso-font-kerning: 0pt; mso-highlight: silver">&gt;</span><span lang="EN-US" style="font-size: 12pt; background: silver; font-family: 'Courier New'; mso-font-kerning: 0pt; mso-highlight: silver"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left: 42pt; text-indent: 21pt; text-align: left; mso-layout-grid-align: none" align="left"><span lang="EN-US" style="font-size: 12pt; background: silver; color: teal; font-family: 'Courier New'; mso-font-kerning: 0pt; mso-highlight: silver">&lt;</span><span lang="EN-US" style="font-size: 12pt; background: silver; color: #3f7f7f; font-family: 'Courier New'; mso-font-kerning: 0pt; mso-highlight: silver">description</span><span lang="EN-US" style="font-size: 12pt; background: silver; color: teal; font-family: 'Courier New'; mso-font-kerning: 0pt; mso-highlight: silver">&gt;</span><span lang="EN-US" style="font-size: 12pt; background: silver; color: black; font-family: 'Courier New'; mso-font-kerning: 0pt; mso-highlight: silver">Please Type your service description here</span><span lang="EN-US" style="font-size: 12pt; background: silver; color: teal; font-family: 'Courier New'; mso-font-kerning: 0pt; mso-highlight: silver">&lt;/</span><span lang="EN-US" style="font-size: 12pt; background: silver; color: #3f7f7f; font-family: 'Courier New'; mso-font-kerning: 0pt; mso-highlight: silver">description</span><span lang="EN-US" style="font-size: 12pt; background: silver; color: teal; font-family: 'Courier New'; mso-font-kerning: 0pt; mso-highlight: silver">&gt;</span><span lang="EN-US" style="font-size: 12pt; background: silver; font-family: 'Courier New'; mso-font-kerning: 0pt; mso-highlight: silver"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left: 42pt; text-indent: 21pt; text-align: left; mso-layout-grid-align: none" align="left"><span lang="EN-US" style="font-size: 12pt; background: silver; color: teal; font-family: 'Courier New'; mso-font-kerning: 0pt; mso-highlight: silver">&lt;</span><span lang="EN-US" style="font-size: 12pt; background: silver; color: #3f7f7f; font-family: 'Courier New'; mso-font-kerning: 0pt; mso-highlight: silver">parameter </span><span lang="EN-US" style="font-size: 12pt; background: silver; color: #7f007f; font-family: 'Courier New'; mso-font-kerning: 0pt; mso-highlight: silver">name</span><span lang="EN-US" style="font-size: 12pt; background: silver; color: black; font-family: 'Courier New'; mso-font-kerning: 0pt; mso-highlight: silver">=</span><span lang="EN-US" style="font-size: 12pt; background: silver; color: #2a00ff; font-family: 'Courier New'; mso-font-kerning: 0pt; mso-highlight: silver">"ServiceClass" </span><span lang="EN-US" style="font-size: 12pt; background: silver; color: #7f007f; font-family: 'Courier New'; mso-font-kerning: 0pt; mso-highlight: silver">locked</span><span lang="EN-US" style="font-size: 12pt; background: silver; color: black; font-family: 'Courier New'; mso-font-kerning: 0pt; mso-highlight: silver">=</span><span lang="EN-US" style="font-size: 12pt; background: silver; color: #2a00ff; font-family: 'Courier New'; mso-font-kerning: 0pt; mso-highlight: silver">"false"</span><span lang="EN-US" style="font-size: 12pt; background: silver; color: teal; font-family: 'Courier New'; mso-font-kerning: 0pt; mso-highlight: silver">&gt;</span><span lang="EN-US" style="font-size: 12pt; background: silver; font-family: 'Courier New'; mso-font-kerning: 0pt; mso-highlight: silver"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left: 63pt; text-indent: 21pt; text-align: left; mso-layout-grid-align: none" align="left"><span lang="EN-US" style="font-size: 12pt; background: silver; color: black; font-family: 'Courier New'; mso-font-kerning: 0pt; mso-highlight: silver">org.sang.virtual.Toilet</span><span lang="EN-US" style="font-size: 12pt; background: silver; font-family: 'Courier New'; mso-font-kerning: 0pt; mso-highlight: silver"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left: 42pt; text-indent: 21pt; text-align: left; mso-layout-grid-align: none" align="left"><span lang="EN-US" style="font-size: 12pt; background: silver; color: teal; font-family: 'Courier New'; mso-font-kerning: 0pt; mso-highlight: silver">&lt;/</span><span lang="EN-US" style="font-size: 12pt; background: silver; color: #3f7f7f; font-family: 'Courier New'; mso-font-kerning: 0pt; mso-highlight: silver">parameter</span><span lang="EN-US" style="font-size: 12pt; background: silver; color: teal; font-family: 'Courier New'; mso-font-kerning: 0pt; mso-highlight: silver">&gt;</span><span lang="EN-US" style="font-size: 12pt; background: silver; font-family: 'Courier New'; mso-font-kerning: 0pt; mso-highlight: silver"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left: 42pt; text-indent: 21pt; text-align: left; mso-layout-grid-align: none" align="left"><span lang="EN-US" style="font-size: 12pt; background: silver; color: teal; font-family: 'Courier New'; mso-font-kerning: 0pt; mso-highlight: silver">&lt;</span><span lang="EN-US" style="font-size: 12pt; background: silver; color: #3f7f7f; font-family: 'Courier New'; mso-font-kerning: 0pt; mso-highlight: silver">excludeOperations</span><span lang="EN-US" style="font-size: 12pt; background: silver; color: teal; font-family: 'Courier New'; mso-font-kerning: 0pt; mso-highlight: silver">&gt;</span><span lang="EN-US" style="font-size: 12pt; background: silver; font-family: 'Courier New'; mso-font-kerning: 0pt; mso-highlight: silver"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left: 63pt; text-indent: 21pt; text-align: left; mso-layout-grid-align: none" align="left"><span lang="EN-US" style="font-size: 12pt; background: silver; color: teal; font-family: 'Courier New'; mso-font-kerning: 0pt; mso-highlight: silver">&lt;</span><span lang="EN-US" style="font-size: 12pt; background: silver; color: #3f7f7f; font-family: 'Courier New'; mso-font-kerning: 0pt; mso-highlight: silver">operation</span><span lang="EN-US" style="font-size: 12pt; background: silver; color: teal; font-family: 'Courier New'; mso-font-kerning: 0pt; mso-highlight: silver">&gt;</span><span lang="EN-US" style="font-size: 12pt; background: silver; color: black; font-family: 'Courier New'; mso-font-kerning: 0pt; mso-highlight: silver">isCanUse</span><span lang="EN-US" style="font-size: 12pt; background: silver; color: teal; font-family: 'Courier New'; mso-font-kerning: 0pt; mso-highlight: silver">&lt;/</span><span lang="EN-US" style="font-size: 12pt; background: silver; color: #3f7f7f; font-family: 'Courier New'; mso-font-kerning: 0pt; mso-highlight: silver">operation</span><span lang="EN-US" style="font-size: 12pt; background: silver; color: teal; font-family: 'Courier New'; mso-font-kerning: 0pt; mso-highlight: silver">&gt;</span><span lang="EN-US" style="font-size: 12pt; background: silver; font-family: 'Courier New'; mso-font-kerning: 0pt; mso-highlight: silver"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left: 42pt; text-indent: 21pt; text-align: left; mso-layout-grid-align: none" align="left"><span lang="EN-US" style="font-size: 12pt; background: silver; color: teal; font-family: 'Courier New'; mso-font-kerning: 0pt; mso-highlight: silver">&lt;/</span><span lang="EN-US" style="font-size: 12pt; background: silver; color: #3f7f7f; font-family: 'Courier New'; mso-font-kerning: 0pt; mso-highlight: silver">excludeOperations</span><span lang="EN-US" style="font-size: 12pt; background: silver; color: teal; font-family: 'Courier New'; mso-font-kerning: 0pt; mso-highlight: silver">&gt;</span><span lang="EN-US" style="font-size: 12pt; background: silver; font-family: 'Courier New'; mso-font-kerning: 0pt; mso-highlight: silver"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left: 21pt; text-indent: 21pt; text-align: left; mso-layout-grid-align: none" align="left"><span lang="EN-US" style="font-size: 12pt; background: silver; color: teal; font-family: 'Courier New'; mso-font-kerning: 0pt; mso-highlight: silver">&lt;/</span><span lang="EN-US" style="font-size: 12pt; background: silver; color: #3f7f7f; font-family: 'Courier New'; mso-font-kerning: 0pt; mso-highlight: silver">service</span><span lang="EN-US" style="font-size: 12pt; background: silver; color: teal; font-family: 'Courier New'; mso-font-kerning: 0pt; mso-highlight: silver">&gt;</span><span lang="EN-US" style="font-size: 12pt; color: teal; font-family: 'Courier New'; mso-font-kerning: 0pt"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left: 21pt; text-indent: 21pt"><span style="font-size: 12pt; font-family: 楷体_GB2312">这个文件也可以不自己手工建立，在后面可以自动生成。<span lang="EN-US"><o:p></o:p></span></span></p>
<p class="MsoNormal" style="margin-left: 21pt; text-indent: -21pt; mso-list: l0 level1 lfo1; tab-stops: list 21.0pt"><strong style="mso-bidi-font-weight: normal"><span lang="EN-US" style="font-size: 14pt; font-family: 楷体_GB2312; mso-bidi-font-family: 楷体_GB2312"><span style="mso-list: Ignore">七、<span style="font: 7pt 'Times New Roman'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span></strong><strong style="mso-bidi-font-weight: normal"><span style="font-size: 14pt; font-family: 楷体_GB2312">使用<span lang="EN-US">Axis2 Service Archiver</span>来进行打包：<span lang="EN-US"><o:p></o:p></span></span></strong></p>
<p class="MsoNormal" style="margin-left: 21pt; text-indent: 21pt"><span style="font-size: 12pt; font-family: 楷体_GB2312">启动向导，选择刚建立的类编译后的<span lang="EN-US">class</span>文件和<span lang="EN-US">services.xml</span>文件（<span lang="EN-US">services.xml </span>文件可以由工具自动生成）。如下图所示：<span lang="EN-US"><o:p></o:p></span></span></p>
<p class="MsoNormal" style="margin-left: 21pt"><strong style="mso-bidi-font-weight: normal"><span lang="EN-US" style="font-size: 14pt; font-family: 楷体_GB2312"><v:shape id="_x0000_i1029" style="width: 519pt; height: 121.5pt" type="#_x0000_t75"><v:imagedata o:title="未命名" src="file:///C:\DOCUME~1\IBM\LOCALS~1\Temp\msohtml1\01\clip_image009.png"></v:imagedata></v:shape><o:p></o:p></span></strong></p>
<p class="MsoNormal" style="margin-left: 20.75pt; text-indent: -6.9pt; mso-para-margin-left: 1.32gd; mso-char-indent-count: -.49"><strong style="mso-bidi-font-weight: normal"><span lang="EN-US" style="font-size: 14pt; font-family: 楷体_GB2312"><v:shape id="_x0000_i1030" style="width: 519pt; height: 138pt" type="#_x0000_t75"><v:imagedata o:title="未命名" src="file:///C:\DOCUME~1\IBM\LOCALS~1\Temp\msohtml1\01\clip_image011.png"></v:imagedata></v:shape></span></strong><span lang="EN-US" style="border-right: black 1pt; padding-right: 0cm; border-top: black 1pt; padding-left: 0cm; font-size: 0pt; background: black; padding-bottom: 0cm; border-left: black 1pt; layout-grid-mode: line; color: black; padding-top: 0cm; border-bottom: black 1pt; mso-fareast-font-family: 'Times New Roman'; mso-border-alt: none black 0cm; mso-font-width: 0%; mso-ansi-language: X-NONE; mso-fareast-language: X-NONE; mso-bidi-language: X-NONE"><span style="mso-spacerun: yes">&nbsp;</span></span><strong style="mso-bidi-font-weight: normal"><span lang="EN-US" style="font-size: 14pt; font-family: 楷体_GB2312"><v:shape id="_x0000_i1031" style="width: 522.75pt; height: 125.25pt" type="#_x0000_t75"> <v:imagedata o:title="未命名" src="file:///C:\DOCUME~1\IBM\LOCALS~1\Temp\msohtml1\01\clip_image013.png"></v:imagedata></v:shape><o:p></o:p></span></strong></p>
<p class="MsoNormal" style="margin-left: 20.8pt; mso-para-margin-left: 1.98gd"><strong style="mso-bidi-font-weight: normal"><span lang="EN-US" style="font-size: 14pt; font-family: 楷体_GB2312"><v:shape id="_x0000_i1032" style="width: 525.75pt; height: 159.75pt" type="#_x0000_t75"><v:imagedata o:title="未命名" src="file:///C:\DOCUME~1\IBM\LOCALS~1\Temp\msohtml1\01\clip_image015.png"></v:imagedata></v:shape><o:p></o:p></span></strong></p>
<p class="MsoNormal" style="margin-left: 21pt; text-indent: 21pt"><span style="font-size: 12pt; font-family: 楷体_GB2312">输入类的全名之后，要点击<span lang="EN-US">load</span>载入。剩下的步骤就很简单明了了！将打包后的文件后缀名改为<span lang="EN-US">.aar</span>。然后复制到<span lang="EN-US">Axis2</span>的<span lang="EN-US">\WEB-INF\services</span>目录下即可。<span lang="EN-US"><o:p></o:p></span></span></p>
<p class="MsoNormal" style="margin-left: 21pt; text-indent: -21pt; mso-list: l0 level1 lfo1; tab-stops: list 21.0pt"><strong style="mso-bidi-font-weight: normal"><span lang="EN-US" style="font-size: 14pt; font-family: 楷体_GB2312; mso-bidi-font-family: 楷体_GB2312"><span style="mso-list: Ignore">八、<span style="font: 7pt 'Times New Roman'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span></strong><strong style="mso-bidi-font-weight: normal"><span style="font-size: 14pt; font-family: 楷体_GB2312">测试是否发布成功：<span lang="EN-US"><o:p></o:p></span></span></strong></p>
<p class="MsoNormal" style="margin-left: 21pt; text-indent: 21pt"><span style="font-size: 12pt; font-family: 楷体_GB2312">使用浏览器进行测试，看是否可以看到它的<span lang="EN-US">WSDL</span>文件。<span lang="EN-US"><o:p></o:p></span></span></p>
<img src ="http://www.blogjava.net/virtual-function/aggbug/153365.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/virtual-function/" target="_blank">桑之兮(CS-LIN)</a> 2007-10-16 19:57 <a href="http://www.blogjava.net/virtual-function/archive/2007/10/16/153365.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item></channel></rss>