I am trying to implement soap web service by using Java. It is showing package javax.jws does not exist. I have added the path to jdk also. I am new to Java, please help me.

import javax.jws.WebMethod;
import javax.jws.WebParam;
import javax.jws.WebService;
import javax.jws.soap.SOAPBinding;
public class Hello {
    public String sayHello(String name) {
        return "Hello " + name;

1 Answer 1


Please read the java 9 migration guide. Or see Replacements for deprecated JPMS modules with Java EE APIs.

Short version: use the reference implementation of JAX-WS.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.