문제

I've got a task to create a webservice for school. The problem is for some reason I won't get wsgen to work correctly. I've got a class named Warehouse, which is in the package: com.horstmann.corejava.

Now I build this project named Warehouse, and after this I go into commandprompt(cmd) and type "cd C:\Program Files (x86)\Java\jdk1.6.0_20\bin" where wsgen.exe is.

Next line I type is: "wsgen -cd C:\Users\Julian\Documents\NetbeansProjects\Warehous com.horstmann.corejava.Warehouse"

Now I get an error that he wont find the class, so I change it to: "wsgen -cd C:\Users\Julian\Documents\NetbeansProjects\Warehouse\build\classes com.horstmann.corejava.Warehouse"

The next error I get here is that he wont be able to put the files in the directory...

Anyone got an solution, would be very appriciated!

도움이 되었습니까?

해결책

According to the wsgen doc, there is not -cd option. You should use -cp, I think.

wsgen -cp <location of the jar> com.horstmann.corejava.Warehouse

When you use -cd, I suspect the command is confused with -d which is the target directory where to generate the output files, and explain the second message.

Maybe this blog post will provide some help. I was using wsgen successfully.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top