[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:
<?xml version='1.0' encoding='UTF-8'?>
<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
<?xml version='1.0' encoding='UTF-8' ?>
<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.