On Monday 12 January 2009 12:36:34 pm Alexey Zavizionov wrote: > On Mon, Jan 12, 2009 at 7:13 PM, Andrew Clegg <[email protected]> > > But if you generated the client code from the WSDL loaded from the > > filesystem, it takes the location attribute literally. Obviously, it > > can't know where you're going to deploy the server to... > > > > Try generating client code but using the WSDL served dynamically from > > the server. (i.e. provide the URL rather than a path on your local > > filesystem.) > > I cannot do this. I have no server with this service. I have to > develop server and client sides.
That's fine. In general, what you do in that situation is one of: 1) Use the contructor for the service object that takes the WSDL URL as an arguement . Basically, code generate with the static file on disk, but at runtime, determine the server and wsdl url (?wsdl version) and create the service based on that instead of the file. 2) At code generation time, pass the -wsdlLocation flag to specify the eventual "live" location. 3) Use the static file, but override the soap:address location via the BindingProvider.ENDPOINT_ADDRESS_PROPERTY property on the port. Dan > > I guess, that's why I have a long path for 'wsdlLocation' WebService > annotation for my service class pointed to file on local system. -- Daniel Kulp [email protected] http://dankulp.com/blog
