Cxf generates WebService client code

Source: Internet
Author: User

1. cxf: http://cxf.apache.org/download.html, download apache-cxf-2.7.0.zip (currently the latest), decompress, in the bin directory (such as: D: \ apache-cxf-2.7.0 \ bin) run the command:

Wsdl2java-d: \ SRC http: // localhost: 8080/projectname/WebService? WSDL

The client code is generated under the D: \ src directory. The WSDL path can also be a saved WSDL-type file.

 

2. Explanation of some wsdl2java commands:

Wsdl2java-P Src-D Src-all test. WSDL

-P specifies the WSDL namespace, that is, the package name of the Code to be generated-D specifies the directory where the code to be generated is located. This parameter is not set, generate in the current directory-client generation client test Web Service Code-server generation server start Web Service Code-impl generate Web service implementation code-ant generate build. XML file-All generates all the starting endpoint code: types, Service proxy, service interface, server mainline, client mainline, implementation object, and an ant build. XML file. more can refer to: http://cwiki.apache.org/CXF20DOC/wsdl-to-java.html 3. address: cxf: http://cxf.apache.org/

Web Service:

Http://www.w3school.com.cn/webservices/index.asp

WSDL: http://www.w3school.com.cn/wsdl/index.asp soap: http://www.w3school.com.cn/soap/index.asp

 

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.