Publishing WS services using AIXS2

Source: Internet
Author: User
Tags wsdl

1. First download the Axis2.war file, the conf,lib,modules three folders inside copy to the project Web-inf, delete the txt file inside Lib:

2. Create a services directory under Web-inf and create a meta-inf under the service directory, and then change the new services.xml in the directory

3. Developing Java classes:

 Package Xihuyu.service;  Public class {    public  string SayHello (string name) {        return "Hello" + name;< c14/>}}

4. Writing Services.xml

<Servicename= "Axisservice">    <Description>Axisservice</Description>    <parametername= "ServiceClass">xihuyu.service.Calculate</parameter>    <Operationname= "SayHello">        <Messagereceiverclass= "Org.apache.axis2.rpc.receivers.RPCMessageReceiver" />    </Operation></Service>

5. In the Web. XML Configuration Axis2

<servlet>        <Servlet-name>Axisservlet</Servlet-name>        <Servlet-class>Org.apache.axis2.transport.http.AxisServlet</Servlet-class>        <Load-on-startup>1</Load-on-startup>    </servlet>    <servlet-mapping>        <Servlet-name>Axisservlet</Servlet-name>        <Url-pattern>/services/*</Url-pattern>    </servlet-mapping>

6. Launch our web project, browser input: http://localhost:8177/MyAxis/services/AxisService?wsdl

You can see that the WSDL that accessed us was successful.

Publishing WS services using AIXS2

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.