﻿<?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-无题-文章分类-Web Service</title><link>http://www.blogjava.net/fenghao/category/18450.html</link><description>拿个学位是骗自己的。学问是一辈子的。</description><language>zh-cn</language><lastBuildDate>Wed, 28 Feb 2007 04:19:53 GMT</lastBuildDate><pubDate>Wed, 28 Feb 2007 04:19:53 GMT</pubDate><ttl>60</ttl><item><title>如何使用Eclipse开发Axis应用并部署到Tomcat</title><link>http://www.blogjava.net/fenghao/articles/DevelopAxisAppOnTomcatUsingEclipse.html</link><dc:creator>浩</dc:creator><author>浩</author><pubDate>Sun, 17 Dec 2006 00:43:00 GMT</pubDate><guid>http://www.blogjava.net/fenghao/articles/DevelopAxisAppOnTomcatUsingEclipse.html</guid><wfw:comment>http://www.blogjava.net/fenghao/comments/88310.html</wfw:comment><comments>http://www.blogjava.net/fenghao/articles/DevelopAxisAppOnTomcatUsingEclipse.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/fenghao/comments/commentRss/88310.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/fenghao/services/trackbacks/88310.html</trackback:ping><description><![CDATA[
		<p>这是我继《如何在Tomcat上安装配置Axis》之后的第二篇技术备忘，与大家分享。所涉及的所有软件仍然都是开源软件（开源传万世，因有我参与！）。本篇假设《如何在Tomcat上安装配置Axis》中描述的所有步骤你都已完成。</p>
		<p>首先，列出在《如何在Tomcat上安装配置Axis》所用软件基础之上还需要用到的软件：<br />1．Eclipse SDK：eclipse-SDK-3.2-win32.zip<br />2．Eclipse SDK 语言插件：NLpack1-eclipse-SDK-3.2-win32.zip<br />版本问题仍然需要关注，最好与上述一致，下面我们从安装配置Eclipse开始：</p>
		<p>一． 安装配置Eclipse<br />将eclipse-SDK-3.2-win32.zip解压，拷贝其下的eclipse文件夹到任何你所希望的安装路径，例如：D:\Eclipse。好了，现在已经可以通过运行D:\Eclipse\eclipse下的eclipse.exe启动Eclipse了，但是如果还想安装语言插件汉化它的话，现在最好先别启动。先安装语言插件，采用link方式，解压NLpack1-eclipse-SDK-3.2-win32.zip，在D:\Eclipse\eclipse下新建两个文件夹例如：links和Language Pack，将解压得到的NLpack1-eclipse-SDK-3.2-win32文件夹拷贝到Language Pack文件夹中，并在links文件夹下新建一个文本文件，例如命名为：language pack.link，在文件中加入一行：path=D:\\Eclipse\\eclipse\\Language Pack\\NLpack1-eclipse-SDK-3.2-win32并保存，注意分隔符是两个\。现在再启动Eclipse，可以看到它已经被汉化了（如果还没有被汉化，不要紧，可以先关闭它，然后带参数-clean再启动试试，目的达到后，以后启动就不要带这参数了，否则影响启动速度）。</p>
		<p>二． 在Eclipse中创建Axis应用<br />启动Eclipse，选择工作空间路径（例如D:\My_Eclipse_WorkSpace），从欢迎界面转至工作台，必要的话，先通过窗口——首选项——Java中的编译器和已安装的JRE两个设置，将编译器一致性级别和JDK安装路径设置好（当然也可以设置JRE安装路径，不过这样在编写Java代码时Eclipse的提示信息无法链接到类库源码，似乎不太方便）。<br />接下来，选择Java透视图，新建一个Java项目，例如项目名为MoneyManage。鼠标右键单击包资源管理器中的项目名MoneyManage，新建一个文件夹，命名为lib，选中lib文件夹，右键单击，选择导入命令，选择常规下的文件系统作为导入源，单击下一步浏览我们先前建好的C:\Tomcat5.0\webapps\axis\WEB-INF\lib目录，勾选其中的所有jar文件，单击完成。右击项目名MoneyManage，选择属性——Java构建路径——库，点击添加Jar按钮，选中刚才导入到lib文件夹下的所有Jar文件，点击确定将它们都加入项目构建路径。这样就将所有我们开发可能涉及到的库都导入了项目。<br />紧接着我们就可以在项目MoneyManage下新建一个包（例如也叫MoneyManage）在其中实现一些类来提供WS的方法了。<br />例如，这里我们实现了4个类Action、Admin、MoneyManage和moneyClient。<br /><br />三． 将应用部署到Tomcat发布为WS<br />例如，我们希望将moneyClient中的所有可访问（public）方法作为WS发布。<br />在项目中新建一XML文件，命名为server-config.wsdd，内容如下：<br /></p>
		<div style="BORDER-RIGHT: #cccccc 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #cccccc 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 13px; PADDING-BOTTOM: 4px; BORDER-LEFT: #cccccc 1px solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: #cccccc 1px solid; BACKGROUND-COLOR: #eeeeee">
				<span style="COLOR: #008080"> 1</span>
				<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" />
				<span style="COLOR: #0000ff">&lt;?</span>
				<span style="COLOR: #ff00ff">xml version="1.0" encoding="UTF-8"</span>
				<span style="COLOR: #0000ff">?&gt;</span>
				<span style="COLOR: #000000">
						<br />
				</span>
				<span style="COLOR: #008080"> 2</span>
				<span style="COLOR: #000000">
						<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" />
				</span>
				<span style="COLOR: #0000ff">&lt;</span>
				<span style="COLOR: #800000">deployment </span>
				<span style="COLOR: #ff0000">xmlns</span>
				<span style="COLOR: #0000ff">="http://xml.apache.org/axis/wsdd/"</span>
				<span style="COLOR: #ff0000">
						<br />
				</span>
				<span style="COLOR: #008080"> 3</span>
				<span style="COLOR: #ff0000">
						<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" /> xmlns:java</span>
				<span style="COLOR: #0000ff">="http://xml.apache.org/axis/wsdd/providers/java"</span>
				<span style="COLOR: #0000ff">&gt;</span>
				<span style="COLOR: #000000">
						<br />
				</span>
				<span style="COLOR: #008080"> 4</span>
				<span style="COLOR: #000000">
						<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" /> </span>
				<span style="COLOR: #0000ff">&lt;</span>
				<span style="COLOR: #800000">globalConfiguration</span>
				<span style="COLOR: #0000ff">&gt;</span>
				<span style="COLOR: #000000">
						<br />
				</span>
				<span style="COLOR: #008080"> 5</span>
				<span style="COLOR: #000000">
						<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" />  </span>
				<span style="COLOR: #0000ff">&lt;</span>
				<span style="COLOR: #800000">parameter </span>
				<span style="COLOR: #ff0000">name</span>
				<span style="COLOR: #0000ff">="adminPassword"</span>
				<span style="COLOR: #ff0000"> value</span>
				<span style="COLOR: #0000ff">="admin"</span>
				<span style="COLOR: #ff0000"> </span>
				<span style="COLOR: #0000ff">/&gt;</span>
				<span style="COLOR: #000000">
						<br />
				</span>
				<span style="COLOR: #008080"> 6</span>
				<span style="COLOR: #000000">
						<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" />  </span>
				<span style="COLOR: #0000ff">&lt;</span>
				<span style="COLOR: #800000">parameter </span>
				<span style="COLOR: #ff0000">name</span>
				<span style="COLOR: #0000ff">="attachments.implementation"</span>
				<span style="COLOR: #ff0000">
						<br />
				</span>
				<span style="COLOR: #008080"> 7</span>
				<span style="COLOR: #ff0000">
						<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" />   value</span>
				<span style="COLOR: #0000ff">="org.apache.axis.attachments.AttachmentsImpl"</span>
				<span style="COLOR: #ff0000"> </span>
				<span style="COLOR: #0000ff">/&gt;</span>
				<span style="COLOR: #000000">
						<br />
				</span>
				<span style="COLOR: #008080"> 8</span>
				<span style="COLOR: #000000">
						<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" />  </span>
				<span style="COLOR: #0000ff">&lt;</span>
				<span style="COLOR: #800000">parameter </span>
				<span style="COLOR: #ff0000">name</span>
				<span style="COLOR: #0000ff">="sendXsiTypes"</span>
				<span style="COLOR: #ff0000"> value</span>
				<span style="COLOR: #0000ff">="true"</span>
				<span style="COLOR: #ff0000"> </span>
				<span style="COLOR: #0000ff">/&gt;</span>
				<span style="COLOR: #000000">
						<br />
				</span>
				<span style="COLOR: #008080"> 9</span>
				<span style="COLOR: #000000">
						<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" />  </span>
				<span style="COLOR: #0000ff">&lt;</span>
				<span style="COLOR: #800000">parameter </span>
				<span style="COLOR: #ff0000">name</span>
				<span style="COLOR: #0000ff">="sendMultiRefs"</span>
				<span style="COLOR: #ff0000"> value</span>
				<span style="COLOR: #0000ff">="true"</span>
				<span style="COLOR: #ff0000"> </span>
				<span style="COLOR: #0000ff">/&gt;</span>
				<span style="COLOR: #000000">
						<br />
				</span>
				<span style="COLOR: #008080">10</span>
				<span style="COLOR: #000000">
						<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" />  </span>
				<span style="COLOR: #0000ff">&lt;</span>
				<span style="COLOR: #800000">parameter </span>
				<span style="COLOR: #ff0000">name</span>
				<span style="COLOR: #0000ff">="sendXMLDeclaration"</span>
				<span style="COLOR: #ff0000"> value</span>
				<span style="COLOR: #0000ff">="true"</span>
				<span style="COLOR: #ff0000"> </span>
				<span style="COLOR: #0000ff">/&gt;</span>
				<span style="COLOR: #000000">
						<br />
				</span>
				<span style="COLOR: #008080">11</span>
				<span style="COLOR: #000000">
						<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" />  </span>
				<span style="COLOR: #0000ff">&lt;</span>
				<span style="COLOR: #800000">parameter </span>
				<span style="COLOR: #ff0000">name</span>
				<span style="COLOR: #0000ff">="axis.sendMinimizedElements"</span>
				<span style="COLOR: #ff0000"> value</span>
				<span style="COLOR: #0000ff">="true"</span>
				<span style="COLOR: #ff0000"> </span>
				<span style="COLOR: #0000ff">/&gt;</span>
				<span style="COLOR: #000000">
						<br />
				</span>
				<span style="COLOR: #008080">12</span>
				<span style="COLOR: #000000">
						<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" />  </span>
				<span style="COLOR: #0000ff">&lt;</span>
				<span style="COLOR: #800000">requestFlow</span>
				<span style="COLOR: #0000ff">&gt;</span>
				<span style="COLOR: #000000">
						<br />
				</span>
				<span style="COLOR: #008080">13</span>
				<span style="COLOR: #000000">
						<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" />   </span>
				<span style="COLOR: #0000ff">&lt;</span>
				<span style="COLOR: #800000">handler </span>
				<span style="COLOR: #ff0000">type</span>
				<span style="COLOR: #0000ff">="java:org.apache.axis.handlers.JWSHandler"</span>
				<span style="COLOR: #0000ff">&gt;</span>
				<span style="COLOR: #000000">
						<br />
				</span>
				<span style="COLOR: #008080">14</span>
				<span style="COLOR: #000000">
						<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" />    </span>
				<span style="COLOR: #0000ff">&lt;</span>
				<span style="COLOR: #800000">parameter </span>
				<span style="COLOR: #ff0000">name</span>
				<span style="COLOR: #0000ff">="scope"</span>
				<span style="COLOR: #ff0000"> value</span>
				<span style="COLOR: #0000ff">="session"</span>
				<span style="COLOR: #ff0000"> </span>
				<span style="COLOR: #0000ff">/&gt;</span>
				<span style="COLOR: #000000">
						<br />
				</span>
				<span style="COLOR: #008080">15</span>
				<span style="COLOR: #000000">
						<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" />   </span>
				<span style="COLOR: #0000ff">&lt;/</span>
				<span style="COLOR: #800000">handler</span>
				<span style="COLOR: #0000ff">&gt;</span>
				<span style="COLOR: #000000">
						<br />
				</span>
				<span style="COLOR: #008080">16</span>
				<span style="COLOR: #000000">
						<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" />   </span>
				<span style="COLOR: #0000ff">&lt;</span>
				<span style="COLOR: #800000">handler </span>
				<span style="COLOR: #ff0000">type</span>
				<span style="COLOR: #0000ff">="java:org.apache.axis.handlers.JWSHandler"</span>
				<span style="COLOR: #0000ff">&gt;</span>
				<span style="COLOR: #000000">
						<br />
				</span>
				<span style="COLOR: #008080">17</span>
				<span style="COLOR: #000000">
						<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" />    </span>
				<span style="COLOR: #0000ff">&lt;</span>
				<span style="COLOR: #800000">parameter </span>
				<span style="COLOR: #ff0000">name</span>
				<span style="COLOR: #0000ff">="scope"</span>
				<span style="COLOR: #ff0000"> value</span>
				<span style="COLOR: #0000ff">="request"</span>
				<span style="COLOR: #ff0000"> </span>
				<span style="COLOR: #0000ff">/&gt;</span>
				<span style="COLOR: #000000">
						<br />
				</span>
				<span style="COLOR: #008080">18</span>
				<span style="COLOR: #000000">
						<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" />    </span>
				<span style="COLOR: #0000ff">&lt;</span>
				<span style="COLOR: #800000">parameter </span>
				<span style="COLOR: #ff0000">name</span>
				<span style="COLOR: #0000ff">="extension"</span>
				<span style="COLOR: #ff0000"> value</span>
				<span style="COLOR: #0000ff">=".jwr"</span>
				<span style="COLOR: #ff0000"> </span>
				<span style="COLOR: #0000ff">/&gt;</span>
				<span style="COLOR: #000000">
						<br />
				</span>
				<span style="COLOR: #008080">19</span>
				<span style="COLOR: #000000">
						<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" />   </span>
				<span style="COLOR: #0000ff">&lt;/</span>
				<span style="COLOR: #800000">handler</span>
				<span style="COLOR: #0000ff">&gt;</span>
				<span style="COLOR: #000000">
						<br />
				</span>
				<span style="COLOR: #008080">20</span>
				<span style="COLOR: #000000">
						<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" />  </span>
				<span style="COLOR: #0000ff">&lt;/</span>
				<span style="COLOR: #800000">requestFlow</span>
				<span style="COLOR: #0000ff">&gt;</span>
				<span style="COLOR: #000000">
						<br />
				</span>
				<span style="COLOR: #008080">21</span>
				<span style="COLOR: #000000">
						<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" /> </span>
				<span style="COLOR: #0000ff">&lt;/</span>
				<span style="COLOR: #800000">globalConfiguration</span>
				<span style="COLOR: #0000ff">&gt;</span>
				<span style="COLOR: #000000">
						<br />
				</span>
				<span style="COLOR: #008080">22</span>
				<span style="COLOR: #000000">
						<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" /> </span>
				<span style="COLOR: #0000ff">&lt;</span>
				<span style="COLOR: #800000">handler </span>
				<span style="COLOR: #ff0000">name</span>
				<span style="COLOR: #0000ff">="LocalResponder"</span>
				<span style="COLOR: #ff0000">
						<br />
				</span>
				<span style="COLOR: #008080">23</span>
				<span style="COLOR: #ff0000">
						<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" />  type</span>
				<span style="COLOR: #0000ff">="java:org.apache.axis.transport.local.LocalResponder"</span>
				<span style="COLOR: #ff0000"> </span>
				<span style="COLOR: #0000ff">/&gt;</span>
				<span style="COLOR: #000000">
						<br />
				</span>
				<span style="COLOR: #008080">24</span>
				<span style="COLOR: #000000">
						<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" /> </span>
				<span style="COLOR: #0000ff">&lt;</span>
				<span style="COLOR: #800000">handler </span>
				<span style="COLOR: #ff0000">name</span>
				<span style="COLOR: #0000ff">="URLMapper"</span>
				<span style="COLOR: #ff0000">
						<br />
				</span>
				<span style="COLOR: #008080">25</span>
				<span style="COLOR: #ff0000">
						<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" />  type</span>
				<span style="COLOR: #0000ff">="java:org.apache.axis.handlers.http.URLMapper"</span>
				<span style="COLOR: #ff0000"> </span>
				<span style="COLOR: #0000ff">/&gt;</span>
				<span style="COLOR: #000000">
						<br />
				</span>
				<span style="COLOR: #008080">26</span>
				<span style="COLOR: #000000">
						<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" /> </span>
				<span style="COLOR: #0000ff">&lt;</span>
				<span style="COLOR: #800000">handler </span>
				<span style="COLOR: #ff0000">name</span>
				<span style="COLOR: #0000ff">="Authenticate"</span>
				<span style="COLOR: #ff0000">
						<br />
				</span>
				<span style="COLOR: #008080">27</span>
				<span style="COLOR: #ff0000">
						<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" />  type</span>
				<span style="COLOR: #0000ff">="java:org.apache.axis.handlers.SimpleAuthenticationHandler"</span>
				<span style="COLOR: #ff0000"> </span>
				<span style="COLOR: #0000ff">/&gt;</span>
				<span style="COLOR: #000000">
						<br />
				</span>
				<span style="COLOR: #008080">28</span>
				<span style="COLOR: #000000">
						<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" /> </span>
				<span style="COLOR: #008000">&lt;!--</span>
				<span style="COLOR: #008000"> 服务名 </span>
				<span style="COLOR: #008000">--&gt;</span>
				<span style="COLOR: #000000">
						<br />
				</span>
				<span style="COLOR: #008080">29</span>
				<span style="COLOR: #000000">
						<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" /> </span>
				<span style="COLOR: #0000ff">&lt;</span>
				<span style="COLOR: #800000">service </span>
				<span style="COLOR: #ff0000">name</span>
				<span style="COLOR: #0000ff">="moneyClient"</span>
				<span style="COLOR: #ff0000"> provider</span>
				<span style="COLOR: #0000ff">="java:RPC"</span>
				<span style="COLOR: #0000ff">&gt;</span>
				<span style="COLOR: #000000">
						<br />
				</span>
				<span style="COLOR: #008080">30</span>
				<span style="COLOR: #000000">
						<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" />  </span>
				<span style="COLOR: #008000">&lt;!--</span>
				<span style="COLOR: #008000"> 服务类名 </span>
				<span style="COLOR: #008000">--&gt;</span>
				<span style="COLOR: #000000">
						<br />
				</span>
				<span style="COLOR: #008080">31</span>
				<span style="COLOR: #000000">
						<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" />  </span>
				<span style="COLOR: #0000ff">&lt;</span>
				<span style="COLOR: #800000">parameter </span>
				<span style="COLOR: #ff0000">name</span>
				<span style="COLOR: #0000ff">="className"</span>
				<span style="COLOR: #ff0000"> value</span>
				<span style="COLOR: #0000ff">="MoneyManage.moneyClient"</span>
				<span style="COLOR: #ff0000"> </span>
				<span style="COLOR: #0000ff">/&gt;</span>
				<span style="COLOR: #000000">
						<br />
				</span>
				<span style="COLOR: #008080">32</span>
				<span style="COLOR: #000000">
						<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" />  </span>
				<span style="COLOR: #008000">&lt;!--</span>
				<span style="COLOR: #008000"> 允许访问所有方法 </span>
				<span style="COLOR: #008000">--&gt;</span>
				<span style="COLOR: #000000">
						<br />
				</span>
				<span style="COLOR: #008080">33</span>
				<span style="COLOR: #000000">
						<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" />  </span>
				<span style="COLOR: #0000ff">&lt;</span>
				<span style="COLOR: #800000">parameter </span>
				<span style="COLOR: #ff0000">name</span>
				<span style="COLOR: #0000ff">="allowedMethods"</span>
				<span style="COLOR: #ff0000"> value</span>
				<span style="COLOR: #0000ff">="*"</span>
				<span style="COLOR: #ff0000"> </span>
				<span style="COLOR: #0000ff">/&gt;</span>
				<span style="COLOR: #000000">
						<br />
				</span>
				<span style="COLOR: #008080">34</span>
				<span style="COLOR: #000000">
						<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" /> </span>
				<span style="COLOR: #0000ff">&lt;/</span>
				<span style="COLOR: #800000">service</span>
				<span style="COLOR: #0000ff">&gt;</span>
				<span style="COLOR: #000000">
						<br />
				</span>
				<span style="COLOR: #008080">35</span>
				<span style="COLOR: #000000">
						<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" /> </span>
				<span style="COLOR: #0000ff">&lt;</span>
				<span style="COLOR: #800000">transport </span>
				<span style="COLOR: #ff0000">name</span>
				<span style="COLOR: #0000ff">="http"</span>
				<span style="COLOR: #0000ff">&gt;</span>
				<span style="COLOR: #000000">
						<br />
				</span>
				<span style="COLOR: #008080">36</span>
				<span style="COLOR: #000000">
						<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" />  </span>
				<span style="COLOR: #0000ff">&lt;</span>
				<span style="COLOR: #800000">requestFlow</span>
				<span style="COLOR: #0000ff">&gt;</span>
				<span style="COLOR: #000000">
						<br />
				</span>
				<span style="COLOR: #008080">37</span>
				<span style="COLOR: #000000">
						<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" />   </span>
				<span style="COLOR: #0000ff">&lt;</span>
				<span style="COLOR: #800000">handler </span>
				<span style="COLOR: #ff0000">type</span>
				<span style="COLOR: #0000ff">="URLMapper"</span>
				<span style="COLOR: #ff0000"> </span>
				<span style="COLOR: #0000ff">/&gt;</span>
				<span style="COLOR: #000000">
						<br />
				</span>
				<span style="COLOR: #008080">38</span>
				<span style="COLOR: #000000">
						<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" />   </span>
				<span style="COLOR: #0000ff">&lt;</span>
				<span style="COLOR: #800000">handler<br /></span>
				<span style="COLOR: #008080">39</span>
				<span style="COLOR: #800000">
						<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" />    </span>
				<span style="COLOR: #ff0000">type</span>
				<span style="COLOR: #0000ff">="java:org.apache.axis.handlers.http.HTTPAuthHandler"</span>
				<span style="COLOR: #ff0000"> </span>
				<span style="COLOR: #0000ff">/&gt;</span>
				<span style="COLOR: #000000">
						<br />
				</span>
				<span style="COLOR: #008080">40</span>
				<span style="COLOR: #000000">
						<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" />  </span>
				<span style="COLOR: #0000ff">&lt;/</span>
				<span style="COLOR: #800000">requestFlow</span>
				<span style="COLOR: #0000ff">&gt;</span>
				<span style="COLOR: #000000">
						<br />
				</span>
				<span style="COLOR: #008080">41</span>
				<span style="COLOR: #000000">
						<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" /> </span>
				<span style="COLOR: #0000ff">&lt;/</span>
				<span style="COLOR: #800000">transport</span>
				<span style="COLOR: #0000ff">&gt;</span>
				<span style="COLOR: #000000">
						<br />
				</span>
				<span style="COLOR: #008080">42</span>
				<span style="COLOR: #000000">
						<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" /> </span>
				<span style="COLOR: #0000ff">&lt;</span>
				<span style="COLOR: #800000">transport </span>
				<span style="COLOR: #ff0000">name</span>
				<span style="COLOR: #0000ff">="local"</span>
				<span style="COLOR: #0000ff">&gt;</span>
				<span style="COLOR: #000000">
						<br />
				</span>
				<span style="COLOR: #008080">43</span>
				<span style="COLOR: #000000">
						<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" />  </span>
				<span style="COLOR: #0000ff">&lt;</span>
				<span style="COLOR: #800000">responseFlow</span>
				<span style="COLOR: #0000ff">&gt;</span>
				<span style="COLOR: #000000">
						<br />
				</span>
				<span style="COLOR: #008080">44</span>
				<span style="COLOR: #000000">
						<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" />   </span>
				<span style="COLOR: #0000ff">&lt;</span>
				<span style="COLOR: #800000">handler </span>
				<span style="COLOR: #ff0000">type</span>
				<span style="COLOR: #0000ff">="LocalResponder"</span>
				<span style="COLOR: #ff0000"> </span>
				<span style="COLOR: #0000ff">/&gt;</span>
				<span style="COLOR: #000000">
						<br />
				</span>
				<span style="COLOR: #008080">45</span>
				<span style="COLOR: #000000">
						<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" />  </span>
				<span style="COLOR: #0000ff">&lt;/</span>
				<span style="COLOR: #800000">responseFlow</span>
				<span style="COLOR: #0000ff">&gt;</span>
				<span style="COLOR: #000000">
						<br />
				</span>
				<span style="COLOR: #008080">46</span>
				<span style="COLOR: #000000">
						<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" /> </span>
				<span style="COLOR: #0000ff">&lt;/</span>
				<span style="COLOR: #800000">transport</span>
				<span style="COLOR: #0000ff">&gt;</span>
				<span style="COLOR: #000000">
						<br />
				</span>
				<span style="COLOR: #008080">47</span>
				<span style="COLOR: #000000">
						<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" />
				</span>
				<span style="COLOR: #0000ff">&lt;/</span>
				<span style="COLOR: #800000">deployment</span>
				<span style="COLOR: #0000ff">&gt;</span>
				<span style="COLOR: #000000">
						<br />
				</span>
				<span style="COLOR: #008080">48</span>
				<span style="COLOR: #000000">
						<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" />
				</span>
		</div>
		<p>
				<br />注意以上文件中的service标签，就代表了一个WS服务，服务名为moneyClient；第一个parameter子标签，其value属性为待发布成服务的方法所在的类名；第二个parameter子标签表明将类的所有方法发布，允许服务调用者访问第一个parameter子标签指出类的所有可访问方法。<br />将编写好的server-config.wsdd文件拷入C:\Tomcat5.0\webapps\axis\WEB-INF目录，并将所有4个类都编译为class文件后按包结构（可以在D:\My_Eclipse_WorkSpace\MoneyManage\bin下找到现成的）拷入C:\Tomcat5.0\webapps\axis\WEB-INF\classes目录。<br />注意，凡是开发中用到的额外第三方jar库文件，除了在项目构建路径中添加外，也要在C:\Tomcat5.0\webapps\axis\WEB-INF\lib下添加，也要在C:\Tomcat5.0\common\lib下添加。<br />还算简单，部署完成。<br /><br />四． 测试发布的WS<br />可以测试了，看看我们是否发布成功。<br />启动Tomcat服务，如果服务已启动，则先关闭它，并重新启动。<br />通过浏览器访问<a href="http://localhost:8080/axis/services/moneyClient?wsdl">http://localhost:8080/axis/services/moneyClient?wsdl</a>，如果看到显示出wsdl文件，则表明WS服务发布成功。<br />进而，我们还可以通过具体编程来测试调用服务的某些方法。例如，下面这个类AccessTest就调用了我们发布的moneyClient服务中的getStatus方法来查看用户名为admin密码为change的帐户的状态是否可用。<br /></p>
		<div style="BORDER-RIGHT: #cccccc 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #cccccc 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 13px; PADDING-BOTTOM: 4px; BORDER-LEFT: #cccccc 1px solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: #cccccc 1px solid; BACKGROUND-COLOR: #eeeeee">
				<span style="COLOR: #008080"> 1</span>
				<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" />
				<span style="COLOR: #0000ff">package</span>
				<span style="COLOR: #000000"> MoneyManage;<br /></span>
				<span style="COLOR: #008080"> 2</span>
				<span style="COLOR: #000000">
						<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" />
						<br />
				</span>
				<span style="COLOR: #008080"> 3</span>
				<span style="COLOR: #000000">
						<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" />
				</span>
				<span style="COLOR: #0000ff">import</span>
				<span style="COLOR: #000000"> javax.xml.namespace.QName;<br /></span>
				<span style="COLOR: #008080"> 4</span>
				<span style="COLOR: #000000">
						<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" />
						<br />
				</span>
				<span style="COLOR: #008080"> 5</span>
				<span style="COLOR: #000000">
						<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" />
				</span>
				<span style="COLOR: #0000ff">import</span>
				<span style="COLOR: #000000"> org.apache.axis.client.Call;<br /></span>
				<span style="COLOR: #008080"> 6</span>
				<span style="COLOR: #000000">
						<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" />
				</span>
				<span style="COLOR: #0000ff">import</span>
				<span style="COLOR: #000000"> org.apache.axis.client.Service;<br /></span>
				<span style="COLOR: #008080"> 7</span>
				<span style="COLOR: #000000">
						<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" />
						<br />
				</span>
				<span style="COLOR: #008080"> 8</span>
				<span style="COLOR: #000000">
						<img id="Codehighlighter1_157_773_Open_Image" onclick="this.style.display='none'; Codehighlighter1_157_773_Open_Text.style.display='none'; Codehighlighter1_157_773_Closed_Image.style.display='inline'; Codehighlighter1_157_773_Closed_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ExpandedBlockStart.gif" align="top" />
						<img id="Codehighlighter1_157_773_Closed_Image" style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_157_773_Closed_Text.style.display='none'; Codehighlighter1_157_773_Open_Image.style.display='inline'; Codehighlighter1_157_773_Open_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ContractedBlock.gif" align="top" />
				</span>
				<span style="COLOR: #0000ff">public</span>
				<span style="COLOR: #000000"> </span>
				<span style="COLOR: #0000ff">class</span>
				<span style="COLOR: #000000"> AccessTest </span>
				<span id="Codehighlighter1_157_773_Closed_Text" style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff">
						<img src="http://www.blogjava.net/images/dot.gif" />
				</span>
				<span id="Codehighlighter1_157_773_Open_Text">
						<span style="COLOR: #000000">{<br /></span>
						<span style="COLOR: #008080"> 9</span>
						<span style="COLOR: #000000">
								<img id="Codehighlighter1_181_673_Open_Image" onclick="this.style.display='none'; Codehighlighter1_181_673_Open_Text.style.display='none'; Codehighlighter1_181_673_Closed_Image.style.display='inline'; Codehighlighter1_181_673_Closed_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" />
								<img id="Codehighlighter1_181_673_Closed_Image" style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_181_673_Closed_Text.style.display='none'; Codehighlighter1_181_673_Open_Image.style.display='inline'; Codehighlighter1_181_673_Open_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ContractedSubBlock.gif" align="top" />    </span>
						<span style="COLOR: #0000ff">public</span>
						<span style="COLOR: #000000"> </span>
						<span style="COLOR: #0000ff">void</span>
						<span style="COLOR: #000000"> Access() </span>
						<span id="Codehighlighter1_181_673_Closed_Text" style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff">
								<img src="http://www.blogjava.net/images/dot.gif" />
						</span>
						<span id="Codehighlighter1_181_673_Open_Text">
								<span style="COLOR: #000000">{<br /></span>
								<span style="COLOR: #008080">10</span>
								<span style="COLOR: #000000">
										<img id="Codehighlighter1_189_580_Open_Image" onclick="this.style.display='none'; Codehighlighter1_189_580_Open_Text.style.display='none'; Codehighlighter1_189_580_Closed_Image.style.display='inline'; Codehighlighter1_189_580_Closed_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" />
										<img id="Codehighlighter1_189_580_Closed_Image" style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_189_580_Closed_Text.style.display='none'; Codehighlighter1_189_580_Open_Image.style.display='inline'; Codehighlighter1_189_580_Open_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ContractedSubBlock.gif" align="top" />        </span>
								<span style="COLOR: #0000ff">try</span>
								<span style="COLOR: #000000"> </span>
								<span id="Codehighlighter1_189_580_Closed_Text" style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff">
										<img src="http://www.blogjava.net/images/dot.gif" />
								</span>
								<span id="Codehighlighter1_189_580_Open_Text">
										<span style="COLOR: #000000">{<br /></span>
										<span style="COLOR: #008080">11</span>
										<span style="COLOR: #000000">
												<img src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align="top" />            String endPoint </span>
										<span style="COLOR: #000000">=</span>
										<span style="COLOR: #000000"> </span>
										<span style="COLOR: #000000">"</span>
										<span style="COLOR: #000000">http://localhost:8080/axis/services/moneyClient?wsdl</span>
										<span style="COLOR: #000000">"</span>
										<span style="COLOR: #000000">;<br /></span>
										<span style="COLOR: #008080">12</span>
										<span style="COLOR: #000000">
												<img src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align="top" />            Service service </span>
										<span style="COLOR: #000000">=</span>
										<span style="COLOR: #000000"> </span>
										<span style="COLOR: #0000ff">new</span>
										<span style="COLOR: #000000"> Service();<br /></span>
										<span style="COLOR: #008080">13</span>
										<span style="COLOR: #000000">
												<img src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align="top" />            Call call </span>
										<span style="COLOR: #000000">=</span>
										<span style="COLOR: #000000"> (Call) service.createCall();<br /></span>
										<span style="COLOR: #008080">14</span>
										<span style="COLOR: #000000">
												<img src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align="top" />            call.setTargetEndpointAddress(endPoint);<br /></span>
										<span style="COLOR: #008080">15</span>
										<span style="COLOR: #000000">
												<img src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align="top" />            <br /></span>
										<span style="COLOR: #008080">16</span>
										<span style="COLOR: #000000">
												<img src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align="top" />            call.setOperationName(</span>
										<span style="COLOR: #0000ff">new</span>
										<span style="COLOR: #000000"> QName(</span>
										<span style="COLOR: #000000">"</span>
										<span style="COLOR: #000000">moneyClient</span>
										<span style="COLOR: #000000">"</span>
										<span style="COLOR: #000000">, </span>
										<span style="COLOR: #000000">"</span>
										<span style="COLOR: #000000">getStatus</span>
										<span style="COLOR: #000000">"</span>
										<span style="COLOR: #000000">));<br /></span>
										<span style="COLOR: #008080">17</span>
										<span style="COLOR: #000000">
												<img id="Codehighlighter1_514_539_Open_Image" onclick="this.style.display='none'; Codehighlighter1_514_539_Open_Text.style.display='none'; Codehighlighter1_514_539_Closed_Image.style.display='inline'; Codehighlighter1_514_539_Closed_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" />
												<img id="Codehighlighter1_514_539_Closed_Image" style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_514_539_Closed_Text.style.display='none'; Codehighlighter1_514_539_Open_Image.style.display='inline'; Codehighlighter1_514_539_Open_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ContractedSubBlock.gif" align="top" />            String result </span>
										<span style="COLOR: #000000">=</span>
										<span style="COLOR: #000000"> (String) call.invoke(</span>
										<span style="COLOR: #0000ff">new</span>
										<span style="COLOR: #000000"> Object[] </span>
										<span id="Codehighlighter1_514_539_Closed_Text" style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff">
												<img src="http://www.blogjava.net/images/dot.gif" />
										</span>
										<span id="Codehighlighter1_514_539_Open_Text">
												<span style="COLOR: #000000">{ </span>
												<span style="COLOR: #000000">"</span>
												<span style="COLOR: #000000">admin</span>
												<span style="COLOR: #000000">"</span>
												<span style="COLOR: #000000">,<br /></span>
												<span style="COLOR: #008080">18</span>
												<span style="COLOR: #000000">
														<img src="http://www.blogjava.net/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top" />                    </span>
												<span style="COLOR: #000000">"</span>
												<span style="COLOR: #000000">change</span>
												<span style="COLOR: #000000">"</span>
												<span style="COLOR: #000000"> }</span>
										</span>
										<span style="COLOR: #000000">);<br /></span>
										<span style="COLOR: #008080">19</span>
										<span style="COLOR: #000000">
												<img src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align="top" />            System.out.println(result);<br /></span>
										<span style="COLOR: #008080">20</span>
										<span style="COLOR: #000000">
												<img src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align="top" />            <br /></span>
										<span style="COLOR: #008080">21</span>
										<span style="COLOR: #000000">
												<img id="Codehighlighter1_602_670_Open_Image" onclick="this.style.display='none'; Codehighlighter1_602_670_Open_Text.style.display='none'; Codehighlighter1_602_670_Closed_Image.style.display='inline'; Codehighlighter1_602_670_Closed_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" />
												<img id="Codehighlighter1_602_670_Closed_Image" style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_602_670_Closed_Text.style.display='none'; Codehighlighter1_602_670_Open_Image.style.display='inline'; Codehighlighter1_602_670_Open_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ContractedSubBlock.gif" align="top" />        }</span>
								</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #0000ff">catch</span>
								<span style="COLOR: #000000"> (Exception e) </span>
								<span id="Codehighlighter1_602_670_Closed_Text" style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff">
										<img src="http://www.blogjava.net/images/dot.gif" />
								</span>
								<span id="Codehighlighter1_602_670_Open_Text">
										<span style="COLOR: #000000">{<br /></span>
										<span style="COLOR: #008080">22</span>
										<span style="COLOR: #000000">
												<img src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align="top" />            e.printStackTrace();<br /></span>
										<span style="COLOR: #008080">23</span>
										<span style="COLOR: #000000">
												<img src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align="top" />            System.out.println(</span>
										<span style="COLOR: #000000">"</span>
										<span style="COLOR: #000000">access error!</span>
										<span style="COLOR: #000000">"</span>
										<span style="COLOR: #000000">);<br /></span>
										<span style="COLOR: #008080">24</span>
										<span style="COLOR: #000000">
												<img src="http://www.blogjava.net/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top" />        }</span>
								</span>
								<span style="COLOR: #000000">
										<br />
								</span>
								<span style="COLOR: #008080">25</span>
								<span style="COLOR: #000000">
										<img src="http://www.blogjava.net/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top" />    }</span>
						</span>
						<span style="COLOR: #000000">
								<br />
						</span>
						<span style="COLOR: #008080">26</span>
						<span style="COLOR: #000000">
								<img src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align="top" />
								<br />
						</span>
						<span style="COLOR: #008080">27</span>
						<span style="COLOR: #000000">
								<img id="Codehighlighter1_716_770_Open_Image" onclick="this.style.display='none'; Codehighlighter1_716_770_Open_Text.style.display='none'; Codehighlighter1_716_770_Closed_Image.style.display='inline'; Codehighlighter1_716_770_Closed_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" />
								<img id="Codehighlighter1_716_770_Closed_Image" style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_716_770_Closed_Text.style.display='none'; Codehighlighter1_716_770_Open_Image.style.display='inline'; Codehighlighter1_716_770_Open_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ContractedSubBlock.gif" align="top" />    </span>
						<span style="COLOR: #0000ff">public</span>
						<span style="COLOR: #000000"> </span>
						<span style="COLOR: #0000ff">static</span>
						<span style="COLOR: #000000"> </span>
						<span style="COLOR: #0000ff">void</span>
						<span style="COLOR: #000000"> main(String args[]) </span>
						<span id="Codehighlighter1_716_770_Closed_Text" style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff">
								<img src="http://www.blogjava.net/images/dot.gif" />
						</span>
						<span id="Codehighlighter1_716_770_Open_Text">
								<span style="COLOR: #000000">{<br /></span>
								<span style="COLOR: #008080">28</span>
								<span style="COLOR: #000000">
										<img src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align="top" />        AccessTest at </span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #0000ff">new</span>
								<span style="COLOR: #000000"> AccessTest();<br /></span>
								<span style="COLOR: #008080">29</span>
								<span style="COLOR: #000000">
										<img src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align="top" />        at.Access();<br /></span>
								<span style="COLOR: #008080">30</span>
								<span style="COLOR: #000000">
										<img src="http://www.blogjava.net/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top" />    }</span>
						</span>
						<span style="COLOR: #000000">
								<br />
						</span>
						<span style="COLOR: #008080">31</span>
						<span style="COLOR: #000000">
								<img src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align="top" />
								<br />
						</span>
						<span style="COLOR: #008080">32</span>
						<span style="COLOR: #000000">
								<img src="http://www.blogjava.net/images/OutliningIndicators/ExpandedBlockEnd.gif" align="top" />}</span>
				</span>
		</div>
		<p>
				<br />我们也可以通过一些工具来对服务进行测试与调用，例如王咏刚编写的wsCaller 1.0。</p>
		<p>我这样利用Axis和Tomcat发布服务的方法是简单的，因而，服务在可靠性、安全性和客户容量等等方面都是脆弱的，如果要保证这些特性，还必须进一步深入对Axis和Tomcat进行更深层次的应用研究。似乎把应用服务器从Tomcat换为JBOSS会更好？</p>
<img src ="http://www.blogjava.net/fenghao/aggbug/88310.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/fenghao/" target="_blank">浩</a> 2006-12-17 08:43 <a href="http://www.blogjava.net/fenghao/articles/DevelopAxisAppOnTomcatUsingEclipse.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>如何在Tomcat上安装配置Axis</title><link>http://www.blogjava.net/fenghao/articles/HowToConfigureAxisOnTomcat.html</link><dc:creator>浩</dc:creator><author>浩</author><pubDate>Sat, 16 Dec 2006 05:23:00 GMT</pubDate><guid>http://www.blogjava.net/fenghao/articles/HowToConfigureAxisOnTomcat.html</guid><wfw:comment>http://www.blogjava.net/fenghao/comments/88154.html</wfw:comment><comments>http://www.blogjava.net/fenghao/articles/HowToConfigureAxisOnTomcat.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/fenghao/comments/commentRss/88154.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/fenghao/services/trackbacks/88154.html</trackback:ping><description><![CDATA[
		<p>最近因为web计算课程大作业和将来的需要，自己结合网上资料摸索总结成功了Axis（Axis2早出了，以后准备也试试）在Tomcat上的安装配置方法，特撰此文，以备忘，同时与大家分享。（这是我写的技术方面的第一篇备忘，以前很长一段时间，自己总是很懒，不愿写任何东西，尤其是这样的文章，总觉得自己做过的都能记住，现在由于经历了一些事，慢慢地开始真实地感觉到文档的重要性，人是不可能记住所有细节的，现在你觉得你记住了，一个月以后，一年以后呢？只有文字真正传承了知识与经验！）<br />我的操作系统是Windows XP Professional SP2，要用到的主要软件有：<br />1．Axis：axis-1_3（axis-bin-1_3.zip）<br />2．Tomcat：jakarta-tomcat-5.0.28（jakarta-tomcat-5.0.28.exe）<br />3．JDK：jdk1.5.0_06 （jdk-1_5_0_06-windows-i586-p.exe）<br />4．JRE：jre1.5.0_06 （jdk-1_5_0_06-windows-i586-p.exe）<br />先去SUN和Apache网站把上述软件找好，版本最好一致，开源软件的版本兼容性不佳，所以不一致的话我不能保证下述的方法可行，接下来从最基本的开始：</p>
		<p>一．安装Java环境<br />通过jdk-1_5_0_06-windows-i586-p.exe（前几天在SUN网站上看到现在最新的好像是是jdk-1_5_0_10-windows-i586-p.exe，嗯，如果用这个的话应该也可以）安装jdk1.5.0_06和jre1.5.0_06，注意首先会安装JDK，然后接着会安装JRE，必须分别给它们选两个不同的路径来装，如C:\jdk1.5.0_06和C:\jre1.5.0_06。</p>
		<p>二．安装Tomcat<br />通过jakarta-tomcat-5.0.28.exe（最新都出Tomcat 6.0.2-beta了，不知道行不行）安装Tomcat 5.0.28，记得是要选择安装路径、系统JRE路径、管理员用户名和密码、Tomcat端口号等等，例如：C:\Tomcat5.0、C:\jre1.5.0_06、admin和admin、8080（端口别被别的软件占用，否则换一个）。</p>
		<p>三．将Axis集成到Tomcat<br />先不要启动Tomcat服务，解压axis-bin-1_3.zip，将\axis-bin-1_3\axis-1_3\webapps目录下的axis整个文件夹拷贝到Tomcat安装路径（例如C:\Tomcat5.0）下的webapps文件夹下。再把Tomcat安装路径（例如C:\Tomcat5.0）下刚拷贝的axis目录下的WEB-INF\lib目录下的所有文件拷贝到Tomcat的安装路径下的common\lib目录中。在jdk1.5.0_06的lib目录（例如C:\jdk1.5.0_06\lib）下有一个tools.jar文件,把它拷到Tomcat安装目录(例如C:\Tomcat5.0)下的common\lib目录下。</p>
		<p>四．配置系统环境变量<br />通过我的电脑——属性——高级——环境变量在下面的系统变量中添加如下一些项：<br />1.变量名TOMCAT_HOME <br />变量值C:\Tomcat5.0<br />2. 变量名AXIS_HOME <br />变量值%TOMCAT_HOME%\webapps\axis<br />3. 变量名AXIS_LIB<br />变量值%AXIS_HOME%\lib<br />4. 变量名AXISCLASSPATH<br />变量值%AXIS_LIB%\axis.jar;%AXIS_LIB%\axis-ant.jar;%AXIS_LIB%\axis-schema.jar;%AXIS_LIB%\commons-discovery-0.2.jar;%AXIS_LIB%\commons-logging-1.0.4.jar;%AXIS_LIB%\jaxrpc.jar;%AXIS_LIB%\log4j-1.2.8.jar;%AXIS_LIB%\saaj.jar;%AXIS_LIB%\wsdl4j-1.5.1.jar; %AXIS_LIB%\activation.jar;%AXIS_LIB%\mail.jar;%AXIS_LIB%\xmlsec-1.3.0.jar;<br />5．变量名CLASSPATH<br />变量值%AXIS_LIB%\axis.jar;%AXIS_LIB%\axis-ant.jar;%AXIS_LIB%\axis-schema.jar;%AXIS_LIB%\commons-discovery-0.2.jar;%AXIS_LIB%\commons-logging-1.0.4.jar;%AXIS_LIB%\jaxrpc.jar;%AXIS_LIB%\log4j-1.2.8.jar;%AXIS_LIB%\saaj.jar;%AXIS_LIB%\wsdl4j-1.5.1.jar; %AXIS_LIB%\activation.jar;%AXIS_LIB%\mail.jar;%AXIS_LIB%\xmlsec-1.3.0.jar;<br />6．变量名JAVA_HOME<br />变量值C:\jdk1.5.0_06\bin<br />注意保证以上变量值中提及的相应文件都在相应目录。特别的是，在axis-bin-1_3.zip中不包括activation.jar、mail.jar和xmlsec-1.3.0.jar这3个文件，需要去SUN和Apache主页单独下载，分别是jaf-1_0_2-upd2.zip、javamail-1_4.zip和xml-security-bin-1_3_0.zip。（版本不同不知道行不行）</p>
		<p>五．检查是否安装成功 <br />启动Tomcat服务，使用web浏览器访问<a href="http://localhost:8080/axis/">http://localhost:8080/axis/</a>，可以看到Hello! Welcome to Apache-Axis.的提示信息，再单击Validation链接转到<a href="http://localhost:8080/axis/happyaxis.jsp">http://localhost:8080/axis/happyaxis.jsp</a>，如果看到提示The core axis libraries are present.The optional components are present. 就表示安装Axis成功了。否则根据提示提供的链接，下载对应的文件，拷贝到Tomcat目录下Webapps里面的axis文件夹下的WEB-INF下的lib目录中，同时Tomcat安装路径下的common目录下的lib中也要拷贝，再重新访问<a href="http://localhost:8080/axis/happyaxis.jsp">http://localhost:8080/axis/happyaxis.jsp</a>，直到提示The core axis libraries are present.The optional components are present.表示安装Axis成功！（怎么还有一句Note: Even if everything this page probes for is present, there is no guarantee your web service will work, because there are many configuration options that we do not check for. These tests are necessary but not sufficient啊！）<br /> <br />好，配置好了，接下来就可以开发基于Axis的WS应用并部署到Tomcat了。过几天准备再写一篇关于开发Axis应用的。</p>
<img src ="http://www.blogjava.net/fenghao/aggbug/88154.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/fenghao/" target="_blank">浩</a> 2006-12-16 13:23 <a href="http://www.blogjava.net/fenghao/articles/HowToConfigureAxisOnTomcat.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item></channel></rss>