Use CXF to provide Web service services in Springside 2.0

Source: Internet
Author: User
Tags versions

In the previous essay, I spoke about my web site architecture, which made it necessary to use WebService in my site. For example, when users register, the user data is mainly stored in the content server, but also to submit some data to the index server, at this time, you can let the content server access to the index server to provide the webservice to submit data, but also to allow the content server to pass the timer task, Access the Index server's webservice to submit statistics.

My Site uses Springside 2.0 to develop, in Springside 2.0, the default is Xfire to provide WebService, but I follow the document, but the result failed. So I asked Jiangnan white, white recommended me to use the latest version of CXF, so I went to the official web site to download the latest version of CXF, follow the example came again, and soon succeeded. This shows that the use of CXF is not only simple, but also high success rate. Therefore, I am here to share my experience with you.

The first step, download the latest version of the CXF, download the address as shown below:

In the second step, copy the following jar files from the Lib folder in Cxf to our project's Webapp/web-inf/lib directory:

commons-logging-1.1.jar
geronimo-activation_1.1_spec-1.0-M1.jar (or Sun's Activation jar)
geronimo-annotation_1.0_spec-1.1.jar (JSR 250)
geronimo-javamail_1.4_spec-1.0-M1.jar (or Sun's JavaMail jar)
geronimo-servlet_2.5_spec-1.1-M1.jar (or Sun's Servlet jar)
geronimo-ws-metadata_2.0_spec-1.1.1.jar (JSR 181)
jaxb-api-2.0.jar
jaxb-impl-2.0.5.jar
jaxws-api-2.0.jar
neethi-2.0.jar
saaj-api-1.3.jar
saaj-impl-1.3.jar
stax-api-1.0.1.jar
wsdl4j-1.6.1.jar
wstx-asl-3.2.1.jar
XmlSchema-1.2.jar
xml-resolver-1.2.jar
cxf-2.0-incubator.jar

There are some packages in my project that are already with me, except that the version provided in the CXF will be updated. After you copy the packages into your project, you can delete the lower versions of the project and delete all the Xfire-related packages. Of course, do not delete also can, because I tried, even if there are several different versions of the package, there will be no conflict.

Of course, the light copies of these packages to the project do not guarantee a smooth development, and you need to set up a library of projects in Eclipse, as shown below:

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.