Java6蝕窟WebService秘壇
扮寂:2011-02-07 51cto鴬人 leizhimin
岻念械械喘CXF、Axis2、XFire吉栖蝕窟潤栽Java囂冱栖蝕窟Web Service哘喘?宸劔議挫侃頁喘余鴻?痩試?総翌匯倖嶷勣圻咀頁厘断議伏恢桟廠頁Java5。
徽糞縞貧Java6嶄厮将屶隔喘Java蝕窟WebService哘喘阻?遇拝載圭宴。宸劔祥寄寄受富阻?朕芦廾何俸議旗勺?咀葎僉夲蝕坿議崇尺卆正寄楚及眉圭淫?殻會議樫雁蔚奐。
和中頁匯倖Java6蝕窟Web Service議秘壇箭徨。
package lavasoft;
import javax.jws.WebService;
import javax.xml.ws.Endpoint;
/**
* Java6蝕窟WebService秘壇
*
* @author leizhimin 2009-11-13 16:10:44
*/
@WebService
public class Java6WebService {
/**
* Web捲暦嶄議匍暦圭隈
*
* @return 匯倖忖憲堪
*/
public String doSomething() {
return "Hello Java6 WebService!";
}
public static void main(String[] args) {
//窟下匯倖WebService
Endpoint.publish("http://192.168.14.117:8080/java6ws/lavasoft.Java6WebService", new Java6WebService());
}
}
塰佩朔?壓箝誓匂嶄恵諒http://192.168.14.117:8080/java6ws/lavasoft.Java6WebService?wsdl氏誼欺wsdl 泌和?
<?xml version="1.0" encoding="UTF-8" ?>
<!-- Published by JAX-WS RI at http://jax-ws.dev.java.net. RI''s version is JAX-WS RI 2.1.6 in JDK 6.
-->
<!-- Generated by JAX-WS RI at http://jax-ws.dev.java.net. RI''s version is JAX-WS RI 2.1.6 in JDK 6.
-->
<definitions xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://lavasoft/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://schemas.xmlsoap.org/wsdl/"
targetNamespace="http://lavasoft/" name="Java6WebServiceService">
<types>
<xsd:schema>
<xsd:import namespace="http://lavasoft/"
schemaLocation="http://192.168.14.117:8080/java6ws/lavasoft.Java6WebService?xsd=1"/>
</xsd:schema>
</types>
<message name="doSomething">
<part name="parameters" element="tns:doSomething"/>
</message>
<message name="doSomethingResponse">
<part name="parameters" element="tns:doSomethingResponse"/>
</message>
<portType name="Java6WebServ
|