View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0009102 | mantisbt | api soap | public | 2008-04-23 17:27 | 2009-06-23 15:26 |
Reporter | tremlin | Assigned To | vboctor | ||
Priority | normal | Severity | major | Reproducibility | always |
Status | closed | Resolution | fixed | ||
Platform | PHP-5.2.0-8+etch10 | OS | Debian | OS Version | Etch |
Product Version | 1.1.1 | ||||
Fixed in Version | 1.2.0rc1 | ||||
Summary | 0009102: 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) | ||||
Tags | No tags attached. | ||||
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. |
|
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. Are you willing to help in this task? |
|
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. |
|