I actually understood it differently, and this is probably characteristic of how Netbeans does something. Shott85's answer is also good, but I think it is more specific to the way Netbeans code is generated.
So, I have a project in which all web methods are under the name SimplyLaborServer, and a project in which there is a webservice client named SimplyLaborClient.
In Netbeans, in the SimplyLaborClient project in the โGenerated Sources (jax-ws)โ node, they have a SimplyLaborServer.java file that has a class that extends Service. It has a private URL that is hardcoded to my local server address as follows:
url = new URL("http://localhost:8080/axis2/services/SimplyLaborServer?wsdl");
And in the default constructor, it uses this URL. But it also provides a constructor as follows, where I can specify a url ...
public SimplyLaborServer(URL wsdlLocation) { super(wsdlLocation, SIMPLYLABORSERVER_QNAME); }
So, when I have an auto-generated method that looks like this in my client ...
private static String testConnection() { simplylaborclient.SimplyLaborServer service = new simplylaborclient.SimplyLaborServer(); simplylaborclient.SimplyLaborServerPortType port = service.getSimplyLaborServerHttpSoap12Endpoint(); return port.testConnection(); }
I can simply load the Properties object that has the endpoint URL and change one line to something like below, where the props is the Properties object that has the Url endpoint defined with the correct URL.
simplylaborclient.SimplyLaborServer service = new simplylaborclient.SimplyLaborServer(new URL(props.getProperty("endpointUrl")));
My only concern is that these methods seem to be generated automatically when you drag them from the "web service links" node. I do not want them to be overwritten if I make additional changes on the server side.
So, I'm still open to feedback if this is the right thing here or not.
thanks