简体   繁体   中英

wsimport .wsdl : why generating .class files and not .java files?

I have a wsdl named as abc.wsdl

when I tried to generate the SEI Interface java files by this command

wsimport abc.wsdl

It generates .class files in package path abcd

but it has not generated any .java files .

Can you please tell me Why I was not able to generate the .java files ?

Actually I am new to .wsdl files.

Is it specified somewhere in .wsdl file to generate .class file and not .java file ?

AND

How I can generate .java file ?

wsimport utility from JDK 1.7 does generate java files but removes them after byte-code generation leaving class files only. You can use option -keep to specify that you want to have both.

wsimport -keep http://example.com/webservice?wsdl

如果您不需要类,可以使用wsimport工具的-Xnocompile选项。

By default wsimport generates only classes but it can be used to generate sources too with -s flag. For example make a folder src to your to-be-generated classes root folder and execute a command like this:

wsimport -s src http://example.com/webservice?wsdl

This way your classes will be as before but your sources will be on src folder. Additional info about different wsimport flags can be found by entering wsimport -help on command line.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM