您的位置:軟件測試 > 開源軟件測試 > 開源性能測試工具 > Jmeter
JMeter Webservice測試計劃
作者:網(wǎng)絡(luò)轉(zhuǎn)載 發(fā)布時間:[ 2013/10/30 10:28:58 ] 推薦標(biāo)簽:

  接下來修改web.xml如下:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE web-app PUBLIC "-//Sun Microsystems,
Inc.//DTD Web Application 2.3//EN"
"http://java.sun.com/j2ee/dtds/web-app_2_3.dtd">
<web-app>
<listener>
<listener-class>
com.sun.xml.ws.transport.http.servlet.WSServletContextListener
</listener-class>
</listener>
<servlet>
<servlet-name>hello</servlet-name>
<servlet-class>
com.sun.xml.ws.transport.http.servlet.WSServlet
</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>hello</servlet-name>
<url-pattern>/hello</url-pattern>
</servlet-mapping>
<session-config>
<session-timeout>120</session-timeout>
</session-config>
</web-app>
  要部署的 web 服務(wù)應(yīng)用程序,我們需要 sun-jaxws.xml 配置文件,這個文件的內(nèi)容如下:
<?xml version="1.0" encoding="UTF-8"?>
<endpoints
xmlns="http://java.sun.com/xml/ns/jax-ws/ri/runtime"
version="2.0">
<endpoint
name="HelloWorld"
implementation="com.yiibai.ws.HelloWorldImpl"
url-pattern="/hello"/>
</endpoints>
  現(xiàn)在,所有文件都準(zhǔn)備好目錄結(jié)構(gòu)看起來會像下面的圖片:

  現(xiàn)在,這個應(yīng)用程序創(chuàng)建一個WAR文件。選擇 project > right click > Export > WAR文件。hello.war 文件保存Tomcat 服務(wù)器 webapps文件夾下。現(xiàn)在啟動Tomcat服務(wù)器。在服務(wù)器啟動后,你應(yīng)該能夠訪問web服務(wù)可以通過以下網(wǎng)址:
  http://localhost:8080/hello/hello

上一頁1234下一頁
軟件測試工具 | 聯(lián)系我們 | 投訴建議 | 誠聘英才 | 申請使用列表 | 網(wǎng)站地圖
滬ICP備07036474 2003-2017 版權(quán)所有 上海澤眾軟件科技有限公司 Shanghai ZeZhong Software Co.,Ltd