[Pywps-devel] problem setting the default values

Sylvain GRELLET s.grellet at oieau.fr
Wed Jan 21 11:10:56 CET 2009


Hi all,

Jachym Cepicky a écrit :
> Hi,
>
> fixed in revision 723 (trunk) and merged to pywps-3.0 branch (rev. 724) [1].
>
> Maybe this would be the reason for releasing of pywps-3.0.1 version?
>   
+1 for me
> any other problem, which should be solved, before 3.0.1 release?
>   
Is there a way to include in this 3.0.1 release a WSDL description (cf 
Mathieu's e-mail in november 2008) ?
> Jachym
>   

Cheers,
Sylvain
> [1] http://wald.intevation.org/plugins/scmsvn/viewcvs.php?rev=724&root=pywps&view=rev
>
> 2009/1/21 Jachym Cepicky <jachym.cepicky at gmail.com>:
>   
>> Hi,
>>
>> it looks like you are right, the DefaultValue tags are not even in the
>> templates.
>>
>> I'll have a look at it
>>
>> j
>>
>> 2009/1/20 Jorge de Jesus <jorge.de-jesus at jrc.it>:
>>     
>>> Hi to all
>>>
>>> It seems that there is a problem setting default values (or I am missing
>>> something in the process class) in PyWPS 3.0.0
>>>
>>> I have the following Dummy process that adds and subtracts, this process
>>> has the default value 100 and 200 for input1 and input2 (in case the
>>> user doesnt send anything)
>>>
>>> class Process(WPSProcess):
>>>     def __init__(self):
>>>          # init process
>>>         WPSProcess.__init__(self,
>>>              identifier = "dummyprocess", # must be same, as filename
>>>              title="Dummy Process",
>>>              version = "0.1",
>>>              storeSupported = "true",
>>>              statusSupported = "true",
>>>              abstract="The Dummy process is used for testing the WPS
>>> structure. The process will accept 2 input numbers and will return the
>>> XML result with an add one and subtract one operation",
>>>              grassLocation =False)
>>>
>>>         self.Input1 = self.addLiteralInput(
>>> identifier = "input1",
>>>                                            title = "Input1 number",
>>>                                            default=100)
>>>         self.Input2= self.addLiteralInput(identifier="input2",
>>>                                           title="Input2 number",
>>>                                          default=200)
>>>         self.Output1=self.addLiteralOutput(identifier="output1",
>>>                                            title="Output1 add 1 result")
>>>
>>> self.Output2=self.addLiteralOutput(identifier="output2",title="Output2
>>> subtract 1 result" )
>>>     def execute(self):
>>>
>>>        self.Output1.setValue(self.Input1.getValue()+1)
>>>        self.Output2.setValue(self.Input1.getValue()-1)
>>>        return
>>>
>>>
>>>
>>>
>>>
>>> The DescribeProcess for the literal is:
>>> <Input minOccurs="1" maxOccurs="1">
>>> <ows:Identifier>input1</ows:Identifier>
>>> <ows:Title>Input1 number</ows:Title>
>>> <LiteralData>
>>> <ows:DataType ows:reference="http://www.w3.org/TR/xmlschema-2/#integer
>>> <http://www.w3.org/TR/xmlschema-2/#integer>">integer</ows:DataType>
>>> <ows:AnyValue/>
>>> </LiteralData>
>>> </Input>
>>>
>>> According to the example provided in
>>> http://schemas.opengis.net/wps/1.0.0/examples/40_wpsDescribeProcess_response.xml
>>> <http://schemas.opengis.net/wps/1.0.0/examples/40_wpsDescribeProcess_response.xml>
>>> There should be a
>>> <DefaultValue>100</DefaultValue>
>>>
>>> After the <ows:AnyValue/>
>>>
>>> I looked at the DescribeProcess_LiteralValue.tmpl and there is no
>>> condiction/indication of the DefaultValue xml tag.
>>>
>>> So, did I caught a bug or lack of implementation, or am I missing
>>> something ?!
>>>
>>> Best
>>> Jorge
>>>
>>> --
>>> Ph.D. Jorge Samuel Mendes de Jesus
>>>
>>> European Commission (EC)
>>> Joint Research Centre Directorate (DG JRC)
>>> Institute for Environment and Sustainability (IES)
>>> TP 441, Via Fermi 1
>>> 21020 Ispra (VA)
>>> Italy
>>>
>>> Phone: +39 0332 78 3536
>>> Fax:   +39 0332 78 5466
>>>
>>> http://rem.jrc.ec.europa.eu
>>>
>>> "The views expressed are purely those of the writer and may not in any circumstances be regarded as stating an official position of the European Commission"
>>>
>>> _______________________________________________
>>> Pywps-devel mailing list
>>> Pywps-devel at wald.intevation.org
>>> http://lists.wald.intevation.org/mailman/listinfo/pywps-devel
>>>
>>>       
>>
>> --
>> Jachym Cepicky
>> e-mail: jachym.cepicky gmail com
>> URL: http://les-ejk.cz
>> GPG: http://les-ejk.cz/pgp/JachymCepicky.pgp
>>
>>     
>
>
>
>   
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.wald.intevation.org/pipermail/pywps-devel/attachments/20090121/0c8f08f3/attachment.htm


More information about the Pywps-devel mailing list