I have a custom ESB Service that calls a web service. I could not use the Sonic Web Service client because there is a bug in it that it cannot consume the WSDL I am calling.
Anyway, I pass in a URL as a runtime parameter. How do I change the runtime parameter for a given envoronment? Currently, my custom service is pointing at a development environment, and I want to point it to a testing environment now.
Nathan,
There are a couple of patterns for this. The standard approach is that when you move a service from one deployment to another using the import and export tools there is a mapping file that can be used, see the admin's guide. However I am not 100% sure if this works on runtime parameters.
Alternatively, you can implement a DS global parameters setting, where you store a file in the Directory Service that contains a set of environment variables, similar to a environment variables. Now your runtime parameter refers the environment variable name, rather than the actual URL.
David
Great, thanks for the ideas David!
Nathan
David,
Is there documentation on setting up a global parameter is the DS?
Thanks,
Nathan
THere is no formal documentation but here are some ideas.
You will need to store a file in the DS somewhere that contains the values, I would use either a properties file, or an XML file that allows name value pairs to be stored.
For initial testing I would place the file in a workshop project location, this way it is editable within IW. Then you will need to extract the file and read the information within the service,
The standard code is
URL url = new URL("sonicfs:///a/b/filename.xml");
BufferedReader rdr = new BufferedReader(new InputStreamReader(url.openStream()));
// Normal code to read in from a Buffered Reader.
The service can now extract the information from the contents of the file.
Hope this helps
David