I'm new to webservice development. I'm using Netbeans 7.0 with the Axis2 plugin and Tomcat 7.
I created one project for the server components where I define the web methods, and then created another project for the client components. The client was created in Netbeans by selecting New -> Webservice Client.
When you select New -> Webservice Client in Netbeans, it asks you right then for a WSDL URL. So of course I gave it the WSDL URL from my local Tomcat installation. But what about when I distribute this as a real application? The users aren't going to point their clients at http://localhost:8080/axis2/services/?wsdl. I mean, when running the client from the IDE, it all works fine, but when I distribute this (it's a labor management application by the way where you clock in / out at one or more clients and time cards are written to a central DB), each client needs to be able to point at the webservice URL of whatever production server it's supposed to connect to.
I'd like to store the webservice URL in a properties file, but don't really know what all to do programmatically at the client to make the call to the URL that's loaded from the properties file.
In my client's dist folder, if I open the JAR that netbeans created with WinZip, I see a file name jax-ws-catalog.xml that has the URL in it (which is pointed at localhost). I assume this is where the URL that's used at runtime comes from.
So what's the correct way to go about this? I've searched around, but the things I've found looking on google searches tend to show webservice calls being made in a completely different way than the auto-generated code that Netbeans puts together, and I'd like some info specific to how Netbeans creates a webservice client so that I don't end up making changes just to have the IDE overwrite them.
Thanks! Sorry for the long explanation.
-Jim