I found a solution. It's working when I explicitly create an object:
package simpleclient;
import helloservice.endpoint.proxy.Hello;
import helloservice.endpoint.proxy.HelloService;
import javax.xml.ws.WebServiceRef;
public class HelloClientNew {
//_at_WebServiceRef(wsdlLocation =
"
http://sun02:8080/JAXWS/HelloService?WSDL")
//_at_WebServiceRef(Hello.class)
//that way this is working
static HelloService service = new HelloService();
//this is not enough
//static HelloService service;
public static void main(String[] argv) {
try {
Hello port = service.getHelloPort();
String response = port.sayHello("Lukasz");
System.out.println(response);
} catch (Exception e) {
e.printStackTrace();
}
}
}
It looks like the @WebServiceRef annotations is not working at all. There is
no difference it is or not.
Can anybody explain why?
Thanks.
Lukasz Chomin
- application/x-pkcs7-signature attachment: smime.p7s