View Issue Details

IDProjectCategoryView StatusLast Update
0011138mantisbtapi soappublic2010-02-22 14:34
ReporterJoe_Fowler Assigned Torombert  
PrioritynormalSeverityblockReproducibilityalways
Status closedResolutionfixed 
Product Version1.2.0rc2 
Target Version1.2.0Fixed in Version1.2.0 
Summary0011138: Error when retrieving bug via SOAP
Description

An error occurs when retrieving a bug via SOAP. May be related to bug 0011137 Also tried in the latest snapshot.

Here is a link to my original forum post: http://www.mantisbt.org/forums/viewtopic.php?f=3&t=8600

Steps To Reproduce

Sample Request:

<soapenv:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance&quot; xmlns:xsd="http://www.w3.org/2001/XMLSchema&quot; xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/&quot; xmlns:man="http://futureware.biz/mantisconnect&quot;>
<soapenv:Header/>
<soapenv:Body>
<man:mc_issue_get soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/&quot;>
<username xsi:type="xsd:string">user</username>
<password xsi:type="xsd:string">pass</password>
<issue_id xsi:type="xsd:integer">3893</issue_id>
</man:mc_issue_get>
</soapenv:Body>
</soapenv:Envelope>

Sample Response:

<SOAP-ENV:Envelope SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/&quot; xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/&quot; xmlns:xsd="http://www.w3.org/2001/XMLSchema&quot; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance&quot; xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/&quot;>
<SOAP-ENV:Body>
<SOAP-ENV:Fault>
<faultcode xsi:type="xsd:string">Server</faultcode>
<faultactor xsi:type="xsd:string"/>
<faultstring xsi:type="xsd:string"><![CDATA[Error Type: SYSTEM WARNING,
Error Description:
Invalid argument supplied for foreach(),
Stack Trace:
mc_issue_api.php L103 mci_issue_get_attachments(<integer>3893)
UnknownFile L? mc_issue_get(<string>'user', <string>'pass', <integer>3893)
nusoap.php L3997 call_user_func_array(<string>'mc_issue_get', <Array> { [0] => 'user', [1] => 'pass', [2] => 3893 })
nusoap.php L3686 invoke_method()
mantisconnect.php L1390 service(<string>'<soapenv:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance&quot; xmlns:xsd="http://www.w3.org/2001/XMLSchema&quot; xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/&quot; xmlns:man="http://futureware.biz/mantisconnect&quot;>
<soapenv:Header/>
<soapenv:Body>
<man:mc_issue_get soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/&quot;>
<username xsi:type="xsd:string">user</username>
<password xsi:type="xsd:string">pass</password>
<issue_id xsi:type="xsd:integer">3893</issue_id>
</man:mc_issue_get>
</soapenv:Body>
</soapenv:Envelope>')]]></faultstring>
<detail xsi:type="xsd:string"/>
</SOAP-ENV:Fault>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>

TagsNo tags attached.

Activities

rombert

rombert

2009-11-09 16:21

reporter   ~0023626

I have fixed one possible problem - user does not have privileges to view attachments.

I can't really tell if this is your case since attachments work fine for me. Please try a more recent git version.

Joe_Fowler

Joe_Fowler

2009-11-10 04:57

reporter   ~0023637

I tried the latest git version.

This error is still occurring, but only when the user credentials supplied do not have permission to see the bug requested. (Instead of an access denied message.)

When they do have access it is working great. :)

rombert

rombert

2009-11-10 05:08

reporter   ~0023638

Is this the same stack trace or a different one? Please attach an updated stack trace if possible, I need to understand where this is triggered from.

Joe_Fowler

Joe_Fowler

2009-11-10 08:37

reporter   ~0023639

Here is the response I get:

<SOAP-ENV:Envelope SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/&quot; xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/&quot; xmlns:xsd="http://www.w3.org/2001/XMLSchema&quot; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance&quot; xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/&quot;>
<SOAP-ENV:Body>
<SOAP-ENV:Fault>
<faultcode xsi:type="xsd:string">Server</faultcode>
<faultactor xsi:type="xsd:string"/>
<faultstring xsi:type="xsd:string"><![CDATA[Error Type: SYSTEM WARNING,
Error Description:
Invalid argument supplied for foreach(),
Stack Trace:
mc_issue_api.php L105 mci_issue_get_attachments(<integer>3895)
UnknownFile L? mc_issue_get(<string>'Scambs_Reporter', <string>'scambs', <integer>3895)
nusoap.php L4000 call_user_func_array(<string>'mc_issue_get', <Array> { [0] => 'user', [1] => 'pass', [2] => 3895 })
nusoap.php L3689 invoke_method()
mantisconnect.php L1391 service(<string>'<soapenv:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance&quot; xmlns:xsd="http://www.w3.org/2001/XMLSchema&quot; xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/&quot; xmlns:man="http://futureware.biz/mantisconnect&quot;>
<soapenv:Header/>
<soapenv:Body>
<man:mc_issue_get soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/&quot;>
<username xsi:type="xsd:string">user</username>
<password xsi:type="xsd:string">pass</password>
<issue_id xsi:type="xsd:integer">3895</issue_id>
</man:mc_issue_get>
</soapenv:Body>
</soapenv:Envelope>')]]></faultstring>
<detail xsi:type="xsd:string"/>
</SOAP-ENV:Fault>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>

If I can be of more assistance, I am happy to help.

rombert

rombert

2009-11-10 15:14

reporter   ~0023643

I've committed another set of fixes. Please try them when you have the time.

Joe_Fowler

Joe_Fowler

2009-11-11 04:46

reporter   ~0023650

This seems to be working perfectly now. Thanks for the fixes.

rombert

rombert

2009-11-11 05:08

reporter   ~0023651

Thanks for confirming.

Related Changesets

MantisBT: master-1.2.x 70bbad26

2009-11-09 16:16

rombert


Details Diff
Issue 0011138: Error when retrieving bug via SOAP

Fixes a possible error in mci_issue_get_attachments when the
user does not have access to viewing attachments.
Affected Issues
0011138
mod - api/soap/mc_issue_api.php Diff File

MantisBT: master bbe5fb15

2009-11-09 16:16

rombert


Details Diff
Issue 0011138: Error when retrieving bug via SOAP

Fixes a possible error in mci_issue_get_attachments when the
user does not have access to viewing attachments.
Affected Issues
0011138
mod - api/soap/mc_issue_api.php Diff File

MantisBT: master-1.2.x 2656c2f5

2009-11-10 15:07

rombert


Details Diff
Issue 0011138: Error when retrieving bug via SOAP

Proper check for return values and avoid returning nulls to count.
Affected Issues
0011138
mod - api/soap/mc_issue_api.php Diff File

MantisBT: master f7435b8c

2009-11-10 15:07

rombert


Details Diff
Issue 0011138: Error when retrieving bug via SOAP

Proper check for return values and avoid returning nulls to count.
Affected Issues
0011138
mod - api/soap/mc_issue_api.php Diff File