Java released via Axis2 WebService

Source: Internet
Author: User

Reference Documentation:

http://blog.csdn.net/ghsau/article/details/12714965http://www.iteye.com/topic/ 1135747http://luyongxin88.blog.163.com/blog/static/92558072011321104415119/http://  www.blogjava.net/tianchijiaozi/archive/2013/03/15/396452.html

1. Download Axis2

http://mirror.bit.edu.cn/apache//axis/axis2/java/core/1.6.2/ Axis2-1.6.2-war.zip

2. Deploying Axis2

Unzip the downloaded compressed package to, under Tomcat WebApps (Axis2.war will automatically unzip after boot). Create the/webapps/axis2/web-inf/pojo directory.
Classes published by Pojo cannot be placed in a package and cannot be used in packages, but can be packaged and then published under sibling directory services, such as/services/test.aar/jar.

3. Method classes for writing WebService

 Public class HelloService {    public  String SayHello () {        return "Hello, world!" ;    }          Public string Saysorry (string name) {        return ' Sorry, ' + name;    }}

After compiling, put Helloservice.class into the Pojo directory.

4. Start Tomcat

5. Visit http://localhost:8080/axis2/services/listServices

For example, the delegate was published successfully.

6. Load into SOAPUI test

http://localhost:8080/axis2/services/HelloService?wsdl

Test OK

Java released via Axis2 WebService

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.