pxd119 / as3-rpclib

Automatically exported from code.google.com/p/as3-rpclib
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

Error when making XMLRPC call #3

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. took example from tutorial
2. attempted to access wordpress site
3. works on one wordpress site but generates error on other

What is the expected output? What do you see instead?
i expect to see a list of objects returned. i see dead people. i mean i see
the error below:

TypeError: Error #1009: Cannot access a property or method of a null object
reference.
    at
com.ak33m.rpc.xmlrpc::XMLRPCSerializer$/com.ak33m.rpc.xmlrpc:XMLRPCSerializer::d
ecodeObject()[C:\projects\flex\FlashTerbate;com\ak33m\rpc\xmlrpc;XMLRPCSerialize
r.as:209]
    at
com.ak33m.rpc.xmlrpc::XMLRPCSerializer$/com.ak33m.rpc.xmlrpc:XMLRPCSerializer::d
ecodeObject()[C:\projects\flex\FlashTerbate;com\ak33m\rpc\xmlrpc;XMLRPCSerialize
r.as:233]
    at
com.ak33m.rpc.xmlrpc::XMLRPCSerializer$/com.ak33m.rpc.xmlrpc:XMLRPCSerializer::d
ecodeObject()[C:\projects\flex\FlashTerbate;com\ak33m\rpc\xmlrpc;XMLRPCSerialize
r.as:224]
    at
com.ak33m.rpc.xmlrpc::XMLRPCSerializer$/deserialize()[C:\projects\flex\FlashTerb
ate;com\ak33m\rpc\xmlrpc;XMLRPCSerializer.as:173]
    at
mx.rpc.http::HTTPService/http://www.adobe.com/2006/flex/mx/internal::processResu
lt()[E:\dev\flex_201_borneo\sdk\frameworks;mx\rpc\http;HTTPService.as:802]
    at
mx.rpc::AbstractInvoker/http://www.adobe.com/2006/flex/mx/internal::resultHandle
r()[E:\dev\flex_201_borneo\sdk\frameworks;mx\rpc;AbstractInvoker.as:165]
    at
mx.rpc::Responder/result()[E:\dev\flex_201_borneo\sdk\frameworks;mx\rpc;Responde
r.as:48]
    at
mx.rpc::AsyncRequest/acknowledge()[E:\dev\flex_201_borneo\sdk\frameworks;mx\rpc;
AsyncRequest.as:81]
    at
DirectHTTPChannel.as$130::DirectHTTPMessageResponder/completeHandler()[E:\dev\fl
ex_201_borneo\sdk\frameworks;mx\messaging\channels;DirectHTTPChannel.as:381]
    at
flash.events::EventDispatcher/flash.events:EventDispatcher::dispatchEventFunctio
n()
    at flash.events::EventDispatcher/dispatchEvent()
    at flash.net::URLLoader/flash.net:URLLoader::onComplete()
    at [io]

What version of the product are you using? On what operating system?
fb3 beta using sdk 2.0.1 hotfix 2
winxp

Please provide any additional information below.
i took the example provided on this site and tested it against a wordpress
xmlrpc file. it works for arpitonline.com but does not work for my site
(included in attached example). 

i am attaching the file. 

Original issue reported on code.google.com by dorkiedo...@gmail.com on 11 Aug 2007 at 12:48

Attachments:

GoogleCodeExporter commented 8 years ago
Using service capture I can see the results. You can use this call to just 
return 1 post,

var token:AsyncToken = blogapi.call("metaWeblog.getRecentPosts", "", 
user_txt.text,
password_txt.text, 1);

Original comment by dorkiedo...@gmail.com on 11 Aug 2007 at 1:36

GoogleCodeExporter commented 8 years ago
I think its having trouble with this date: "20070804T00:28:12Z"

It is breaking in the decodeObject() method:

else if (robject.children().name()== TYPE_DATE)
{
    var tdatestring:String = robject.children();
    var datepattern:RegExp = /^(-?\d\d\d\d)-?(\d\d)-?(\d\d)T(\d\d):(\d\d):(\d\d)$/;
    var d:Array = tdatestring.match(datepattern); // d is null
    var tdate:Date =  new Date(d[1],d[2]-1,d[3],d[4],d[5],d[6]); // error here
    return tdate;
}

Original comment by dorkiedo...@gmail.com on 11 Aug 2007 at 11:54

GoogleCodeExporter commented 8 years ago
This seems to have fixed it:

var datepattern:RegExp = /^(-?\d\d\d\d)-?(\d\d)-?(\d\d)T(\d\d):(\d\d):(\d\d)/;

I took off the end of the string character, "$". 

I don't know if this is a bug in the latest wordpress (2.2.2) or part of the 
date. 

Original comment by dorkiedo...@gmail.com on 11 Aug 2007 at 12:18

GoogleCodeExporter commented 8 years ago
Thank you very much for the catch. You can get a new build and source from svn 
(I
advise this because there are other fixes in there that are not in the latest 
build).

Original comment by akeemphi...@gmail.com on 15 Aug 2007 at 3:36