0

I have a very simple webservice as follow:

package testSmart;
 import javax.jws.*;

@WebService
 public class Add {

@WebMethod
public int addElem(int i, int j){
    return i+j;
 }
}

Now when I use the following link:

http://localhost:4848/common/index.jsf

But when I open it the Add webservice is not shown in the table:

enter image description here

Just for more explanation I am following the following video which does he same:

youtube

Can anyone tell me what is the problem?

HMdeveloper
  • 2,772
  • 9
  • 45
  • 74

2 Answers2

1

Download the Full Profile version of Glassfish and not the web version. Here is the link to download.

Abdullah Khan
  • 12,010
  • 6
  • 65
  • 78
0

it seems your classes are not compiling under default build/classes directory.

Do either of the following: Right click on your project > Build Project. or Go to eclipse menu > Project > Build Automatically

Now redeploy your application again. webservices Engine should be visible along with web engine.

go through below link it might help you, https://docs.oracle.com/cd/E19798-01/821-1752/gbixz/index.html

if you have 'Web Profile' version of GlassFish then Download the 'Full Profile' version of glassfish.

Zia
  • 1,001
  • 1
  • 13
  • 25
  • Thank u. But I checked the target folder in my project and I saw Add.class over there. So wha do u think about that? Also how should I know I have a full version of glassfish? – HMdeveloper Dec 04 '15 at 15:14
  • I use the following version of glass fish: https://glassfish.java.net/download.html – HMdeveloper Dec 04 '15 at 15:20
  • in the given link https://glassfish.java.net/download.html use the "Java EE 7 Full Platform" – Zia Dec 04 '15 at 19:03