Generate the WebService client 4 Method

Source: Internet
Author: User
Tags wsdl

 

1. Use axis to produce client code (save it as a bat file)

Previously, many failures were caused by directory spaces such as axis_lib and output_path.

set Axis_Lib=F:\axis1.4\axis\WEB-INF\libset Java_Cmd=java -Djava.ext.dirs=%Axis_Lib%    set Output_Path=D:\Workspacesset Package=com.axis.sub%Java_Cmd% org.apache.axis.wsdl.WSDL2Java -o%Output_Path% -p%Package% http://192.168.11.62:8090/rainLogin?wsdlpause
2. Use wsimport.exe of jdk1.6to generate client code (add the JDK bin to the environment variable path before)

 

wsimport  -keep -p com.jdk6.sub -s JavaSrc http://192.168.11.62:8090/rainLogin?wsdl
-S (SRC): generate the client code-P (Package) in the javasrc (to be manually created) folder in the current path: Define the package name-keep of the client code to keep the. Class File

 

3. Use cxf wsdl2java. BAT (add the bin directory of cxf to the environment variable path first)

Run the following code in the SCR directory of the CMD project to generate the client code under SRC.

wsdl2java http://192.168.11.62:8080/FFWebservice/services/PortalServices?wsdl

 

 

4. Use the built-in myeclipse tool to generate client code

Create a Java project, right-click the project to create other, select the Web service client of Web Services, and enter the WSDL address in service definition, for example, http: // 192.168.11.62: 8080/ffwebservice/services/portalservices? WSDL

Finnish can generate client code.

 

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.