"WebService" generates webservice client code for AXIS2

Source: Internet
Author: User
Tags soap wsdl

Axis2 version: axis2-1.5.4
WebService server, after deployment, will generate the corresponding WSDL file, the open URL. The WSDL is generated by the Axis tool and is actually a "XML that describes how to communicate with a Web service", so this WSDL is used to generate theThe WebService service-side invocation class, which can be understood as a client-generated class. Previous attempts to generate Axis1 WSDL with the Axis2 tool were unsuccessful becauseAXIS1 follows the SOAP protocol, and the SOAP protocol that AXIS2 follows is different (version), so it loses. Why would there be axis1? May be someone else to deploy good things, stable, no problem, do not bother to get new version, make new version to write code, document it, in addition, Axis1 JDK version can be compatible with 1.4. For Axis2 's webservice, its client code generation steps are as follows: 1, download AXIS2 development package, in the bin directory inside there are wsdl2java.bat batch files, is the code generation tool. 2. Be sure to configure Java environment variables on your computer. 3, steps 2 and 3, equivalent to setWsdl2java.bat inside the java_home, if the computer environment variables are not equipped with Java, you can change in the Wsdl2java.bat inside. 4. The cmd command enters the Axis2 bin directory ( that is, the Wsdl2java.bat directory ). 5. If the WSDL is already stored locally, then the CMD directive is similar to this: Wsdl2java.bat-uri F:\Learning\WebService\AXIS2\wsdl2java\XXXService.wsdl-p Prc.client.wapgw-s-O e:\src\ ("-uri" is followed by the local WSDL path, "-P" is the generation of the client stub class package, the client project to put this stub under which packages, pay attention to change the past, "-S" The following is where the generated stub classes are saved . 6, if the WSDL is the Web version, then the CMD directive is similar to this:./wsdl2java.sh-uri http://10.234.137.23:8080/portal/xxx/XXXService?wsdl-p Com.mmsc.client-s-o/usr/tmp/axis2-1.5.4/bin/src/(because I am here is the Intranet Linux server, Axis2 zip up to unzip, and then to the Bin directory to execute wsdl2java.sh. ). Feel helpful friends, may wish to Axis2, axis1 the client generation process excerpt down, combined with their own understanding and practical application to modify, then find is very convenient. Reprint please indicate from whilejolly:http://blog.csdn.net/seedingly/article/details/39050111

"WebService" generates webservice client code for AXIS2

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.