I created a simple web service called TimeServerBean . It works correctly, the GlassFish server is running, and I can access the WSDL file from the browser. Please note that this is done on the local host.
Then I created a new project and made a web service client and provided the URL of the WSDL file. Then I got some classes (JAX-WS). On my client class, I have this code:
public class SimpleClient { @WebServiceRef(wsdlLocation = "wsdl url here") static TimeServerBean_Service service; private TimeServerBean bean; public SimpleClient() { bean = service.getTimeServerBeanPort(); }
Although I get null when I call getTimeServerBeanPort . During this time, the server is up and running. Is there any obvious mistake? TimeServerBean and TimeServerBean_Service classes are created from WSDL.
source share