Hi

I'm trying to post a request to saasu's REST API via Zend_Rest_Client, and i
am completely stuck.


isSeccuess fails and gives me the error: "An error occurred while parsing
EntityName. Line 1, position 22."

On asking Saasu, they have requested the actual XML posted.  

using $actual_xml = $saasu->getHttpClient()->getLastRequest(); i have sent
them 

"POST /webservices/rest/r1/tasks?wsaccesskey=super-secret-123&FileUid=shhh
HTTP/1.1
Host: secure.saasu.com
Connection: close
Accept-encoding: gzip, deflate
User-Agent: Zend_Http_Client
Content-Type: application/x-www-form-urlencoded
Content-Length: 136

method=insertInvoice&lastUpdatedUid=0&transactionType=S&date=2010-03-10&summary=a+test+order&reference=x11-wills-rubbish&layout=S&rest=1"

to which they say "that isn't xml" whats the xml fragment.

Can somebody tell me how i get the xml fragment? Am i doing the post
correctly? does the warning  at the bottom of the manual for this about
"Strictness of Zend_Rest_Client" come into play, and if so - how do i tell
that is whats going wrong.  here is my code:

        $saasu = new
Zend_Rest_Client('https://secure.saasu.com/webservices/rest/r1/tasks?wsaccesskey=super-secret-123&FileUid=shh');
        $saasu->insertInvoice();
        $saasu->lastUpdatedUid(0);
        $saasu->transactionType('S');
        $saasu->date('2010-03-10');
        $saasu->summary('a test order');
        $saasu->reference('x11-wills-rubbish');
        $saasu->layout('S');
        $response = $saasu->Post();
        $this->view->response = $response;

Thanks very much for any help.  Last hope.

Will
-- 
View this message in context: 
http://n4.nabble.com/Zend-Rest-Client-posted-XML-tp1592951p1592951.html
Sent from the Zend Framework mailing list archive at Nabble.com.

Reply via email to