Generate client code using the CMD WebService WSDL URL

1. The jdk environment must be installed

2. Open cmd

3. Try the wsimport command

Command parameter description:
-d: Generate customers The storage directory of the class file of the client execution class (stored in C:\Users\Administrator\ by default) contains .java and .class files

-s: The storage directory of the source files for generating client-side execution classes (stored in C:\Users\Administrator\ by default) Contains only .java files

– p: Define the package name of the generated class

4. Example

wsimport -keep -p com.wdletu.ticket.client -d H:\\ http://ws.51book.com :8000/ltips/services/getAvailableFlightWithPriceAndCommisionService1.0?wsdl


5. You can find the generation under H drive com/wdletu/ticket/client The code

Leave a Comment

Your email address will not be published.