View Issue Details

IDProjectCategoryView StatusLast Update
0015517mantisbtapi soappublic2013-04-06 08:26
Reportervboctor Assigned Todregad  
PrioritynormalSeverityminorReproducibilityhave not tried
Status closedResolutionfixed 
Product Version1.2.14 
Target Version1.2.15Fixed in Version1.2.15 
Summary0015517: mc_project_get_versions() result can't be parsed by C#
Description

I've tested this against the demo instance. The output can't be parsed by the old WebReference proxy or WCF (ServiceReference) proxy.

I don't know exactly what is wrong with the output, but I suspect that the type for date_order is showing as "dateTime" rather than "xsd:dateTime".

<?xml version="1.0" encoding="UTF-8"?>
-<SOAP-ENV:Envelope SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns1="http://futureware.biz/mantisconnect" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">-<SOAP-ENV:Body>-<ns1:mc_project_get_versionsResponse>-<return xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="ns1:ProjectVersionData[6]">-<item xsi:type="ns1:ProjectVersionData"><id xsi:type="xsd:integer">4</id><name xsi:type="xsd:string">1.5</name><project_id xsi:type="xsd:integer">1</project_id><date_order xsi:type="dateTime">2007-01-14T01:04:00-05:00</date_order><description xsi:type="xsd:string">1.5 desc</description><released xsi:type="xsd:boolean">false</released><obsolete xsi:type="xsd:boolean">false</obsolete></item>-<item xsi:type="ns1:ProjectVersionData"><id xsi:type="xsd:integer">5</id><name xsi:type="xsd:string">1.4</name><project_id xsi:type="xsd:integer">1</project_id><date_order xsi:type="dateTime">2007-01-14T01:04:00-05:00</date_order><description xsi:type="xsd:string">1.4 desc</description><released xsi:type="xsd:boolean">false</released><obsolete xsi:type="xsd:boolean">false</obsolete></item>-<item xsi:type="ns1:ProjectVersionData"><id xsi:type="xsd:integer">6</id><name xsi:type="xsd:string">1.3</name><project_id xsi:type="xsd:integer">1</project_id><date_order xsi:type="dateTime">2007-01-14T01:04:00-05:00</date_order><description xsi:type="xsd:string">1.3 desc</description><released xsi:type="xsd:boolean">false</released><obsolete xsi:type="xsd:boolean">false</obsolete></item>-<item xsi:type="ns1:ProjectVersionData"><id xsi:type="xsd:integer">1</id><name xsi:type="xsd:string">1.2</name><project_id xsi:type="xsd:integer">1</project_id><date_order xsi:type="dateTime">2006-08-20T18:35:00-04:00</date_order><description xsi:type="xsd:string">1.2 desc</description><released xsi:type="xsd:boolean">true</released><obsolete xsi:type="xsd:boolean">false</obsolete></item>-<item xsi:type="ns1:ProjectVersionData"><id xsi:type="xsd:integer">2</id><name xsi:type="xsd:string">1.1</name><project_id xsi:type="xsd:integer">1</project_id><date_order xsi:type="dateTime">2006-08-20T18:35:00-04:00</date_order><description xsi:type="xsd:string">1.1</description><released xsi:type="xsd:boolean">true</released><obsolete xsi:type="xsd:boolean">false</obsolete></item>-<item xsi:type="ns1:ProjectVersionData"><id xsi:type="xsd:integer">3</id><name xsi:type="xsd:string">1.0</name><project_id xsi:type="xsd:integer">1</project_id><date_order xsi:type="dateTime">2006-08-20T18:35:00-04:00</date_order><description xsi:type="xsd:string">1.0</description><released xsi:type="xsd:boolean">true</released><obsolete xsi:type="xsd:boolean">false</obsolete></item></return></ns1:mc_project_get_versionsResponse></SOAP-ENV:Body></SOAP-ENV:Envelope>

TagsNo tags attached.

Relationships

related to 0015721 closedgrangeway Functionality to consider porting to master-2.0.x 

Activities

vboctor

vboctor

2013-02-19 01:29

manager   ~0035226

mc_filter_get_issues() has the same problem. It also has dateTime fields if that is the issue.

<?xml version="1.0" encoding="UTF-8"?>
-<SOAP-ENV:Envelope SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns1="http://futureware.biz/mantisconnect" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">-<SOAP-ENV:Body>-<ns1:mc_filter_get_issuesResponse>-<return xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="ns1:IssueData[1]">-<item xsi:type="ns1:IssueData"><id xsi:type="xsd:integer">15987</id>-<view_state xsi:type="ns1:ObjectRef"><id xsi:type="xsd:integer">10</id><name xsi:type="xsd:string">public</name></view_state><last_updated xsi:type="dateTime">2013-02-18T17:29:41-05:00</last_updated>-<project xsi:type="ns1:ObjectRef"><id xsi:type="xsd:integer">1</id><name xsi:type="xsd:string">Demo</name></project><category xsi:type="xsd:string">Other</category>-<priority xsi:type="ns1:ObjectRef"><id xsi:type="xsd:integer">30</id><name xsi:type="xsd:string">normal</name></priority>-<severity xsi:type="ns1:ObjectRef"><id xsi:type="xsd:integer">50</id><name xsi:type="xsd:string">minor</name></severity>-<status xsi:type="ns1:ObjectRef"><id xsi:type="xsd:integer">50</id><name xsi:type="xsd:string">assigned</name></status>-<reporter xsi:type="ns1:AccountData"><id xsi:type="xsd:integer">26</id><name xsi:type="xsd:string">demo</name><real_name xsi:type="xsd:string">Demo</real_name><email xsi:type="xsd:string">vboctor+demo@gmail.com</email></reporter><summary xsi:type="xsd:string">this is a new task</summary><version xsi:type="xsd:string">1.1</version>-<reproducibility xsi:type="ns1:ObjectRef"><id xsi:type="xsd:integer">70</id><name xsi:type="xsd:string">have not tried</name></reproducibility><date_submitted xsi:type="dateTime">2013-02-14T14:52:40-05:00</date_submitted><sponsorship_total xsi:type="xsd:integer">0</sponsorship_total>-<handler xsi:type="ns1:AccountData"><id xsi:type="xsd:integer">26</id><name xsi:type="xsd:string">demo</name><real_name xsi:type="xsd:string">Demo</real_name><email xsi:type="xsd:string">vboctor+demo@gmail.com</email></handler>-<projection xsi:type="ns1:ObjectRef"><id xsi:type="xsd:integer">10</id><name xsi:type="xsd:string">none</name></projection>-<eta xsi:type="ns1:ObjectRef"><id xsi:type="xsd:integer">10</id><name xsi:type="xsd:string">none</name></eta>-<resolution xsi:type="ns1:ObjectRef"><id xsi:type="xsd:integer">10</id><name xsi:type="xsd:string">open</name></resolution><description xsi:type="xsd:string">Paul - please send this report to me tomorrow</description><attachments xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="ns1:AttachmentData[0]"/>-<notes xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="ns1:IssueNoteData[2]">-<item xsi:type="ns1:IssueNoteData"><id xsi:type="xsd:integer">11944</id>-<reporter xsi:type="ns1:AccountData"><id xsi:type="xsd:integer">43418</id><name xsi:type="xsd:string">lbtester</name><email xsi:type="xsd:string">Lb@lbergelt.de</email></reporter><text xsi:type="xsd:string">Gg</text>-<view_state xsi:type="ns1:ObjectRef"><id xsi:type="xsd:integer">10</id><name xsi:type="xsd:string">public</name></view_state><date_submitted xsi:type="xsd:dateTime">2013-02-14T15:15:16-05:00</date_submitted><last_modified xsi:type="xsd:dateTime">2013-02-14T15:15:16-05:00</last_modified><time_tracking xsi:type="xsd:integer">0</time_tracking><note_type xsi:type="xsd:integer">0</note_type><note_attr xsi:type="xsd:string"/></item>-<item xsi:type="ns1:IssueNoteData"><id xsi:type="xsd:integer">11957</id>-<reporter xsi:type="ns1:AccountData"><id xsi:type="xsd:integer">26</id><name xsi:type="xsd:string">demo</name><real_name xsi:type="xsd:string">Demo</real_name><email xsi:type="xsd:string">vboctor+demo@gmail.com</email></reporter><text xsi:type="xsd:string">test</text>-<view_state xsi:type="ns1:ObjectRef"><id xsi:type="xsd:integer">10</id><name xsi:type="xsd:string">public</name></view_state><date_submitted xsi:type="xsd:dateTime">2013-02-18T17:29:41-05:00</date_submitted><last_modified xsi:type="xsd:dateTime">2013-02-18T17:29:41-05:00</last_modified><time_tracking xsi:type="xsd:integer">0</time_tracking><note_type xsi:type="xsd:integer">0</note_type><note_attr xsi:type="xsd:string"/></item></notes><sticky xsi:type="xsd:boolean">false</sticky><tags xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="ns1:ObjectRef[0]"/></item></return></ns1:mc_filter_get_issuesResponse></SOAP-ENV:Body></SOAP-ENV:Envelope>

rombert

rombert

2013-02-19 01:36

reporter   ~0035227

Did this work previously? Can this be related to nusoap vs the php soap extension?

vboctor

vboctor

2013-02-19 22:33

manager   ~0035245

I've switched the demo instance to use nusoap and it resolved both issues.

wiggisser

wiggisser

2013-02-20 05:22

reporter   ~0035246

I fixed this in my installation by altering line 41 of mc_api.php to

return new SoapVar( $string_value, XSD_DATETIME, 'xsd:dateTime');

instead of

return new SoapVar( $string_value, XSD_DATETIME, 'dateTime');

rombert

rombert

2013-02-20 05:34

reporter   ~0035247

Thanks! Can you add a git patch or a pull request, for proper attribution?

wiggisser

wiggisser

2013-02-20 05:40

reporter   ~0035248

As I have never worked with git, I'm not sure how to do this.

wiggisser

wiggisser

2013-02-20 08:26

reporter   ~0035250

I think i figured it out :-)

dregad

dregad

2013-02-20 12:43

developer   ~0035255

Last edited: 2013-02-20 12:44

Thanks for the pull request https://github.com/mantisbt/mantisbt/pull/74. I committed the patch.

grangeway

grangeway

2013-04-05 17:56

reporter   ~0036091

Marking as 'acknowledged' not resolved/closed to track that change gets ported to master-2.0.x branch

Related Changesets

MantisBT: master-1.2.x 3980754c

2013-02-20 08:22

wiggisser


Details Diff
Fix 0015517: soap API datatype for DateTime

Wrong datatype for DateTime  'dateTime' vs. 'xsd:dateTime'
results in an error during deserialization in .net

Signed-off-by: Damien Regad <damien.regad@merckgroup.com>
Affected Issues
0015517
mod - api/soap/mc_api.php Diff File

MantisBT: master 3833d574

2013-02-20 08:22

wiggisser


Details Diff
Fix 0015517: soap API datatype for DateTime

Wrong datatype for DateTime  'dateTime' vs. 'xsd:dateTime'
results in an error during deserialization in .net

Signed-off-by: Damien Regad <damien.regad@merckgroup.com>
Affected Issues
0015517
mod - api/soap/mc_api.php Diff File