Re: [Soaplab-users] ACD question
Brought to you by:
marsenger
From: Mahmut U. <ul...@eb...> - 2006-06-30 15:03:48
|
Hi Marc, On Tue, 2006-06-27 at 16:08 +0200, Marc Logghe wrote: > I thought I finally got it. But it seems I am lost again. Or is it only > due to some inconsistency in the system ? > Tried to use that trick again, as described below. But this time with a > default value set to 'true'. Guess what. It does not work at all. Just > the opposite behaviour. > Consider the acd: > > boolean: show_header [ > additional: "Y" > default: "Y" > comment: "defaults" > comment: "method --noheader" > ] > > The behaviour I expected was: > If the user sets show_header to 'true', the --noheader is not put on the > command line. In all other cases (e.g. show_header => false) the passed > value is different from the default and thus, --noheader is put on the > command line. > It happened to be completely the way around. > On the other hand, if this was put in the acd (like in the old post > below) it behaves as expected. > > boolean: no_header [ > additional: "Y" > default: "N" > comment: "defaults" > comment: "method --noheader" > ] > > Meaning: if no_header is set to 'true', --noheader is added to the > command line, if no_header is ommitted or set to 'false', the option is > not added to the command line because 'false' is the default value. > > Why did it not work in the other way (the first example) ? > What is the system behind it ???? In AppLab, having representation of Boolean parameter values in the command line are basically decided by the following piece of code in the Parameter class. <<<<< if (strVal == null) value = (paramDef.is (NODISPLAY) ? UUtils.is (paramDef.dflt) : false); else value = UUtils.is (strVal); if (! value) return new String[0]; >>>>> This can be represented by the following pseudo code. <<<<< If the parameter value is null Then the value is set to the default value if the parameter is of type nondisplay otherwise the value is set to false If the parameter value is false Then do not include any representation on the command line >>>>> The default parameter values are only used if the client didn't provide any value and the parameter is of type 'nondisplay'. Even this doesn't guarantee that the parameter will have an explicit representation on the command line because if the final parameter value is 'false' then it is automatically excluded from the command line. There is no comparison of the default value and the actual value as you expected above. In order to find out the above piece of code I needed to debug both Applab and Soaplab servers in Eclipse. It seems that Eclipse debugger works fine with debugging multiple programs at the same time even when one of the programs basically is the Tomcat server. The only tricky bit regarding the debugging of the Soaplab servers, you manually need to remove the soaplab.jar file from your axis directory and add your source code based soaplab project to the classpath of the tomcat server using the launch configuration manager provided by Eclipse. Regards, Mahmut |