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