Description: Development environment: jdk1.6+ Tomcat7+ MyEclipse10
Download source code posted at the end of the article:
The first is implemented using the WSDL protocol: XFire is used here
XFire a free, open source SOAP framework, which builds a bridge between POJO and SOA, the main feature is to support the POJO in a very simple way to publish into a Web service, the principle is to automatically obtain the remote interface reflection mechanism
A WSDL is an XML language that describes a Web service and describes how to communicate with a Web service
Prepare: Download xfire-distribution-1.2.6.zip and unzip it before proceeding
(1), create a new Web project (server), the name is XFireWebService, its purpose is to test WebService server
XFire support for the project to support the class library, the xfire-1.2.6 lib all jar and xfire-all-1.2.6.jar copy to the project lib
(2), the XFire loaded into the system to increase web.xml configuration information
To Search:
File list (Check if you may need any files):
XFireWebService\.classpath
...............\.mymetadata
...............\.project
...............\.settings\.jsdtscope
...............\.........\org.eclipse.jdt.core.prefs
...............\.........\org.eclipse.wst.jsdt.ui.superType.container
...............\.........\org.eclipse.wst.jsdt.ui.superType.name
...............\src\com\test\ws\EnterVO.java
...............\...\...\....\..\ExceedVO.java
...............\...\...\....\..\HelloServiceImpl.java
...............\...\...\....\..\IHelloService.aegis.xml
...............\...\...\....\..\IHelloService.java
...............\...\META-INF\xfire\services.xml
...............\WebRoot\index.jsp
...............\.......\META-INF\MANIFEST.MF
...............\.......\WEB-INF\classes\com\test\ws\EnterVO.class
...............\.......\.......\.......\...\....\..\ExceedVO.class
...............\.......\.......\.......\...\....\..\HelloServiceImpl.class
...............\.......\.......\.......\...\....\..\IHelloService.aegis.xml
...............\.......\.......\.......\...\....\..\IHelloService.class
...............\.......\.......\.......\META-INF\xfire\services.xml
...............\.......\.......\lib\activation-1.1.jar
...............\.......\.......\...\ASL-2.0.txt
...............\.......\.......\...\bcprov-jdk15-133.jar
...............\.......\.......\...\castor-BSD.txt
...............\.......\.......\...\CDDL-1.0.txt
...............\.......\.......\...\commons-attributes-api-2.1.jar
...............\.......\.......\...\commons-beanutils-1.7.0.jar
...............\.......\.......\...\commons-codec-1.3.jar
...............\.......\.......\...\commons-discovery-0.2.jar
...............\.......\.......\...\commons-httpclient-3.0.jar
...............\.......\.......\...\commons-logging-1.0.4.jar
...............\.......\.......\...\jaxb-api-2.0.jar
...............\.......\.......\...\jaxb-impl-2.0.1.jar
...............\.......\.......\...\jaxb-xjc-2.0.1.jar
...............\.......\.......\...\jaxen-1.1-beta-9.jar
...............\.......\.......\...\jaxen-ASL-1.1.txt
...............\.......\.......\...\jaxws-api-2.0.jar
...............\.......\.......\...\jdom-1.0.jar
...............\.......\.......\...\jetty-6.1.2rc0.jar
...............\.......\.......\...\jetty-util-6.1.2rc0.jar
...............\.......\.......\...\jmock-1.0.1.jar
...............\.......\.......\...\jsr173_api-1.0.jar
...............\.......\.......\...\junit-3.8.1.jar
...............\.......\.......\...\mail-1.4.jar
...............\.......\.......\...\opensaml-1.0.1.jar
...............\.......\.......\...\saaj-api-1.3.jar
...............\.......\.......\...\saaj-impl-1.3.jar
...............\.......\.......\...\servlet-api-2.3.jar
...............\.......\.......\...\servlet-api-2.5-6.1.2rc0.jar
...............\.......\.......\...\spring-1.2.6.jar
...............\.......\.......\...\stax-api-1.0.1.jar
...............\.......\.......\...\stax-utils-20040917.jar
...............\.......\.......\...\wsdl4j-1.6.1.jar
...............\.......\.......\...\wss4j-1.5.1.jar
...............\.......\.......\...\wstx-asl-3.2.0.jar
...............\.......\.......\...\xbean-2.2.0.jar
...............\.......\.......\...\xbean-spring-2.8.jar
...............\.......\.......\...\xercesImpl-2.6.2.jar
...............\.......\.......\...\xfire-all-1.2.6.jar
...............\.......\.......\...\xfire-jsr181-api-1.0-M1.jar
...............\.......\.......\...\xml-apis-1.0.b2.jar
...............\.......\.......\...\XmlSchema-1.1.jar
...............\.......\.......\...\xmlsec-1.3.0.jar
...............\.......\.......\web.xml
........Client\.classpath
..............\.mymetadata
..............\.project
..............\.settings\.jsdtscope
..............\.........\org.eclipse.jdt.core.prefs
..............\.........\org.eclipse.wst.jsdt.ui.superType.container
..............\.........\org.eclipse.wst.jsdt.ui.superType.name
..............\src\com\test\ws\ClientTestServlet.java
..............\...\...\....\..\IHelloService.aegis.xml
..............\WebRoot\index.jsp
..............\.......\META-INF\MANIFEST.MF
..............\.......\result.jsp
..............\.......\WEB-IN