. NET access to Web Services under Axis2

Source: Internet
Author: User
Tags web services java web tomcat wsdl

Axis2 is the second generation of Axis products. About AXIS2, axis, and Xfire are arguing in the Java Web Services circle, but in the. NET is as simple as the call.

Tomcat installation Axis2 Not much said, the Axis2.war package copied to Tomcat WebApps, input address http://192.168.92.101:8080/axis2/test if you can appear Axis2 page, the basic OK. You can click on the services link above and the currently available services use only a version class, which provides a getversion method. See below. NET, how to call it.

We call this Web services in the Web application, using the C # language.

First create a Web application, add Web References to the application, enter the address http://192.168.92.101:8080/axis2/services/version?wsdl, and the WSDL is not lost. Enter the Web reference name version.

Then create a Web form, add the version reference, and enter the following code in the Page_Load:

Version vv=new version ();
Response.Write (Vv.getversion (New GetVersion ()). @return);

In Axis2, the passed parameter is no longer a simple data type, but a class structure. In this case, the GetVersion method itself does not pass the actual argument, but uses the new getversion () to create an empty getversion type parameter.

After running, it will be printed on the page:

Hello I am AXIS2 version service, my version are 1.0 may, 2006 (12:30:54 IST)

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.