Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 1.1.5

Bug #18378 XMLRPC2 can't decode results when querying Trac server
Submitted: 2011-03-20 05:19 UTC
From: damko Assigned:
Status: Open Package: XML_RPC2 (version 1.0.8)
PHP Version: 5.2.6 OS: linux - debian lenny
Roadmaps: (Not assigned)    
Subscription  


 [2011-03-20 05:19 UTC] damko (Damiano Venturin)
Description: ------------ I'm using XML_RPC2 to query a Trac server: I get the tickets lists but when I query a ticket I can't get a decoded result and the php script hangs giving no error. I tried with XML_RPC package (version 1) and it works smoothly. Am I wrong somewhere in the code? Test script: --------------- $options = array( 'uglyStructHack' => true, 'debug' => true, 'encoding' => 'utf-8', 'prefix' => 'ticket.', 'escaping' => array('non-ascii', 'non-print', 'markup'), ); $server = XML_RPC2_Client::create('http://dam:password@tracserver/project/login/xmlrpc', $options); echo 'This is what I get when I request the open tickets<br>'; $ticket_list = $server->query("status!=closed"); echo '<br>This is what I get when I request a ticket<br>'; $ticket = $server->get('224'); Expected result: ---------------- I expect $ticket to be filled with a decoded XMLRPC object Actual result: -------------- This is what I get when I request the open tickets ***** Request ***** <?xml version="1.0" encoding="utf-8"?><methodCall><methodName>ticket.query</methodName><params><param><value><string>status!=closed</string></value></param></params></methodCall>***** End Of request ***** ***** Server response ***** <?xml version='1.0'?> <methodResponse> <params> <param> <value><array><data> <value><int>32</int></value> <value><int>144</int></value> <value><int>167</int></value> <value><int>168</int></value> <value><int>192</int></value> <value><int>215</int></value> <value><int>216</int></value> <value><int>117</int></value> <value><int>126</int></value> <value><int>127</int></value> <value><int>131</int></value> <value><int>141</int></value> <value><int>143</int></value> <value><int>145</int></value> <value><int>148</int></value> <value><int>150</int></value> <value><int>152</int></value> <value><int>164</int></value> <value><int>171</int></value> <value><int>172</int></value> <value><int>174</int></value> <value><int>189</int></value> <value><int>197</int></value> <value><int>198</int></value> <value><int>217</int></value> <value><int>218</int></value> <value><int>219</int></value> <value><int>221</int></value> <value><int>224</int></value> <value><int>35</int></value> <value><int>42</int></value> <value><int>43</int></value> <value><int>45</int></value> <value><int>50</int></value> <value><int>51</int></value> <value><int>52</int></value> <value><int>53</int></value> <value><int>63</int></value> <value><int>100</int></value> <value><int>173</int></value> </data></array></value> </param> </params> </methodResponse> ***** End of server response ***** ***** Decoded result ***** Array ( [0] => 32 [1] => 144 [2] => 167 [3] => 168 [4] => 192 [5] => 215 [6] => 216 [7] => 117 [8] => 126 [9] => 127 [10] => 131 [11] => 141 [12] => 143 [13] => 145 [14] => 148 [15] => 150 [16] => 152 [17] => 164 [18] => 171 [19] => 172 [20] => 174 [21] => 189 [22] => 197 [23] => 198 [24] => 217 [25] => 218 [26] => 219 [27] => 221 [28] => 224 [29] => 35 [30] => 42 [31] => 43 [32] => 45 [33] => 50 [34] => 51 [35] => 52 [36] => 53 [37] => 63 [38] => 100 [39] => 173 ) ***** End of decoded result ***** This is what I get when I request a ticket ***** Request ***** <?xml version="1.0" encoding="utf-8"?><methodCall><methodName>ticket.get</methodName><params><param><value><string>224</string></value></param></params></methodCall>***** End Of request ***** ***** Server response ***** <?xml version='1.0'?> <methodResponse> <params> <param> <value><array><data> <value><string>224</string></value> <value><dateTime.iso8601>20110320T00:02:05</dateTime.iso8601></value> <value><dateTime.iso8601>20110320T00:02:05</dateTime.iso8601></value> <value><struct> <member> <name>status</name> <value><string>new</string></value> </member> <member> <name>description</name> <value><string>this is the description</string></value> </member> <member> <name>reporter</name> <value><string>dam</string></value> </member> <member> <name>cc</name> <value><string></string></value> </member> <member> <name>resolution</name> <value><string></string></value> </member> <member> <name>component</name> <value><string>code</string></value> </member> <member> <name>summary</name> <value><string>test for pear XMLRPC2</string></value> </member> <member> <name>priority</name> <value><string>major</string></value> </member> <member> <name>keywords</name> <value><string></string></value> </member> <member> <name>milestone</name> <value><string>refactoring</string></value> </member> <member> <name>owner</name> <value><string>dam</string></value> </member> <member> <name>type</name> <value><string>defect</string></value> </member> </struct></value> </data></array></value> </param> </params> </methodResponse> ***** End of server response ***** ************************* No decoded result

Comments