Welcome Guest, Not a member yet? Register   Sign In
Using XML-RPC to access Box.net api
#1

[eluser]Unknown[/eluser]
Hello,
I am trying to access my box.net account from a custom CI application. I am using the XML interface provided by Box.net. Here is the standard box.net request XML
Code:
<?xml version='1.0' encoding='UTF-8' ?>
<request>
    <action>get_ticket</action>
    <api_key>rrc1d3ntb53tt6b2vhail6rdtrsxov3v</api_key>
</request>

and the expected response is :
Code:
&lt;?xml version='1.0' encoding='UTF-8'?&gt;
<response>
    <status>get_ticket_ok</status>
    <ticket>bxquuv025arztljze2n438md9zef95e8</ticket>
</response>

This is the request array that I used:
Code:
$request = array(
                 array(
                       // Param 0
                       array(
                             'action'=>'get_ticket'
                             ),
                             'struct'
                       ),
                       array(
                             // Param 1
                             array(
                                   'api_key'=> $api_key
                                   ),
                             'struct'
                       )
                 );

However, I am getting the following error while trying to connect:
Code:
---DATA---
HTTP/1.1 200 OK
Server: nginx/0.6.32
Date: Fri, 10 Oct 2008 17:37:31 GMT
Content-Type: text/xml
Connection: close

&lt;?xml version='1.0' encoding='UTF-8' ?&gt;
<response><status>Wrong input XML</status></response>
---END DATA---


---Invalid Return--- Top level XML-RPC element is missing---Invalid Return--- The XML data receieved was either invalid or not in the correct form for XML-RPC. Turn on debugging to examine the XML data further. Top level XML-RPC element is missing

I'm afraid, the request array is not of the correct form. Can somebody help me to create the right array for the request XML posted above?

thanks
libregeek.
#2

[eluser]alexaaaaaaaaaa[/eluser]
Hi, i have the same error like you, did you fixed it???
#3

[eluser]Unknown[/eluser]
Sorry, I don't remember whether I solved this issue. If I remember correctly, the client dropped this enhancement and I didn't got time to look into it further.
#4

[eluser]alexaaaaaaaaaa[/eluser]
Ok, i was asking becouse i'm also working for the first time with XML-RPC and codeigniter.
Thank you anyway.




Theme © iAndrew 2016 - Forum software by © MyBB