Ticket #85 (new defect) — at Initial Version

Opened 10 years ago

Last modified 10 years ago

Wrong values assigned to optional input parameters

Reported by: Knut Landmark Owned by:
Priority: major Milestone:
Component: zoo-kernel Version:
Keywords: Cc:

Description

In the attached example (Example.zcfg and example.cpp), there are three input parameters: optional_complex_type, optional_literal, and mandatory_literal (default: "mandatory_literal_default"). The parameter optional_literal does not have a default value, as this is not required for LiteralData? according to the OGC WPS specification. The example code simply dumps the content of each corresponding input map to file.

The request

service=WPS&version=1&request=Execute&Identifier=Example&DataInputs?=mandatory_literal=example&ResponseDocument?=Dummy@mimeType=text/xml&storeExecuteResponse=true&status=false

(no optional data given, and status=false) yields the following input maps:

[optional_literal] minOccurs = 0 maxOccurs = 1 DataType? = string value = mandatory_literal_default inRequest = false

[optional_complex_type] minOccurs = 0 maxOccurs = 1 mimeType = text/xml encoding = UTF-8 inRequest = false value = NULL

[mandatory_literal] value = example

Note: Here optional_literal has been assigned the default value for mandatory_literal.

Running the above request with status=true instead yields the following input maps:

[optional_literal] value = 0 DataType? = string minOccurs = 0 maxOccurs = 0 inRequest = true

[optional_complex_type] value = 0 mimeType = text/xml encoding = UTF-8 minOccurs = 0 maxOccurs = 0 inRequest = true

[mandatory_literal] value = example

Note: Here optional_literal and optional_complex_type both have the attribute inRequest=true although they are not included in the request, and both have been assigned the value "0".

These tests were performed on a Windows 7 system. The behavior in the second case (status=true) may be Windows-specific, but it may also be related to this ticket: http://zoo-project.org/trac/ticket/75. There should be a safe way to determine whether an optional parameter is in the request or not.

Change History

Changed 10 years ago by landmark

Configuration file (zcfg) for example service

Changed 10 years ago by landmark

Implementation of example service (C++)

Note: See TracTickets for help on using tickets.

Search

Context Navigation

ZOO Sponsors

http://www.zoo-project.org/trac/chrome/site/img/geolabs-logo.pnghttp://www.zoo-project.org/trac/chrome/site/img/neogeo-logo.png http://www.zoo-project.org/trac/chrome/site/img/apptech-logo.png http://www.zoo-project.org/trac/chrome/site/img/3liz-logo.png http://www.zoo-project.org/trac/chrome/site/img/gateway-logo.png

Become a sponsor !

Knowledge partners

http://www.zoo-project.org/trac/chrome/site/img/ocu-logo.png http://www.zoo-project.org/trac/chrome/site/img/gucas-logo.png http://www.zoo-project.org/trac/chrome/site/img/polimi-logo.png http://www.zoo-project.org/trac/chrome/site/img/fem-logo.png http://www.zoo-project.org/trac/chrome/site/img/supsi-logo.png http://www.zoo-project.org/trac/chrome/site/img/cumtb-logo.png

Become a knowledge partner

Related links

http://zoo-project.org/img/ogclogo.png http://zoo-project.org/img/osgeologo.png