Generate code from deployed files

42 Views Asked by At

I had mistakely deleted my web services code. I don't have any backup of this code. Tried some file recovery tools but it didn't work. I have deployed the project in glass fish 4.0 server and the application works fine from there. So I am thinking is there any way I can generate the codes of that webservice? Thank you

1

There are 1 best solutions below

1
On BEST ANSWER

If you have the application deployed in your glassfish server then it is possible. You can always find your the .class files of original codes (not the one compiled by SEI) inside your domain folder of glassfish. Then you can use some third party tools to generate java codes from the class files. There are to ways that you can deploy your application in the glass fish server:-

  1. By using the glass fish server web GUI and deploy it.
  2. By using exernal IDE like eclipse where you create the glassfish server and deploy it.

For condition 1, goto :-

glassfish\domains\domain1\applications\__internal

where domain1 is your domain name. By default it is the name of your domain

For condition2, goto:-

glassfish4\glassfish\domains\domain1\eclipseApps

where domain1 is your domain name. By default it is the name of your domain

You can find your java codes inside WEB-INF\classes inside your project name.

Hope this helps.