View Issue Details

IDProjectCategoryView StatusLast Update
0009102mantisbtapi soappublic2009-06-23 15:26
Reportertremlin Assigned Tovboctor  
PrioritynormalSeveritymajorReproducibilityalways
Status closedResolutionfixed 
PlatformPHP-5.2.0-8+etch10OSDebianOS VersionEtch
Product Version1.1.1 
Fixed in Version1.2.0rc1 
Summary0009102: webservice api call causes SYSTEM NOTICEs
Description

SOAP messages that lack certain optional object values (with respect to the XSD) trigger a lot of SYSTEM NOTICEs errors leading to an abort of api call processing.

Either the mantis soap api has to not exit on NOTICEs or the code has to be changed to run even with undefined variables or the XSD has to adapted to the code behaviour.

Steps To Reproduce

e.g. call mc_issue_add without providing a value for the "priority" field of the IssueData parameter object. This triggers a SYSTEM NOTICE error answer regarding a "Undefined variable: v_priority" whereas the corresponding XSD says:

<xsd:element name="priority" type="tns:ObjectRef" minOccurs="0"/>

which marks this element as optional.

Leaving out unset variables is the default behaviour of a PHP-SOAP/5.2.3-1ubuntu6.3 (Ubuntu 7.10) SoapClient (as opposed to a PHP-5.2.0-8+etch10 / Debian Etch 4.0 which works quite well with Mantis 1.1.1)

TagsNo tags attached.

Activities

bugalood

bugalood

2008-05-17 20:03

reporter   ~0017860

Last edited: 2008-05-17 20:05

I agree this is a major issue. It's really difficult to understand why an error occured when you get a system notice. It happens too when you login with an unknown username.

So much elements are set to minoccurs=0 in the WSDL file but it does not describe correctly messages types and the Web Service semantic.

giallu

giallu

2008-05-18 04:28

reporter   ~0017862

ok. I see the problem and fixing it is not hard, it just takes some willing user to double check which parameters are really optional.
Once this is done, I think creating patches is next to trivial.

Are you willing to help in this task?

vboctor

vboctor

2009-04-12 23:52

manager   ~0021479

This is now fixed for mc_issue_add and mc_issue_update. However, mc_issue_update currently overwrites non-supplied fields with the defaults. Hence, updates are recommended to be done on the result of a mc_issue_get(). I'll open a bug to make update use the current setting rather than the default for optional parameters.