onethumb - HELP !!!!

devbobodevbobo Registered Users, Retired Mod Posts: 4,339 SmugMug Employee
Don,

I'm trying to write some code for Mozilla, and I have found that when using Smugmug's api, i get some weird results.

I was running some test code, works fine on some other xml-rpc sites, but when I ran it on smugmug, I found that the code always reported 'Error: Server reported status 200'. Which when I looked it up, i was surprised that 200 == OK.

So I did some digging in the nsXmlrpcClient.js file and found the offending piece of code...
if (!e.target.responseXML) { 
if (e.target.status) {
	 try {
		parent._listener.onError(parent, parent._context, Components.results.NS_ERROR_FAILURE, 'Server returned status ' + e.target.responseText);
	 [snip]...

so what I find is that even though a status of 200 was returned, the XML-RPC responseXML is empty. I did some more checking and find that the XML-RPC responseText has the text version of the responseXML.

so i could easily change the code to look at the responseText instead of responseXML, but my problem is that this file is code provided by Firefox and I really don't want to be modifying if possible.

Is it possible to check why smugmug isn't returning the responseXML.

Thanks,

David
David Parry
SmugMug API Developer
My Photos

Comments

  • flyingpylonflyingpylon Registered Users Posts: 260 Major grins
    edited February 9, 2005
    This is interesting.... I developed a web app using ASP/VBScript and ran into a similar problem. When I tried to use responseXML it was always empty, but when I used responseText and loaded that back into another XML object it would work fine. I'm not very experienced with XML-RPC, and smugmug's API is the first I've tried, so I figured it was something I was doing wrong.
  • devbobodevbobo Registered Users, Retired Mod Posts: 4,339 SmugMug Employee
    edited February 10, 2005
    Hi flypylon, yeah I could easily fix it...which I have temporarily, but unfortunately with Firefox, the component I had to modify was a source file that comes with the browser.

    David
    David Parry
    SmugMug API Developer
    My Photos
  • onethumbonethumb Administrators Posts: 1,269 Major grins
    edited February 11, 2005
    devbobo wrote:
    Don,

    I'm trying to write some code for Mozilla, and I have found that when using Smugmug's api, i get some weird results.

    I was running some test code, works fine on some other xml-rpc sites, but when I ran it on smugmug, I found that the code always reported 'Error: Server reported status 200'. Which when I looked it up, i was surprised that 200 == OK.

    So I did some digging in the nsXmlrpcClient.js file and found the offending piece of code...
    if (!e.target.responseXML) { 
    if (e.target.status) {
    	 try {
    		parent._listener.onError(parent, parent._context, Components.results.NS_ERROR_FAILURE, 'Server returned status ' + e.target.responseText);
    	 [snip]...
    

    so what I find is that even though a status of 200 was returned, the XML-RPC responseXML is empty. I did some more checking and find that the XML-RPC responseText has the text version of the responseXML.

    so i could easily change the code to look at the responseText instead of responseXML, but my problem is that this file is code provided by Firefox and I really don't want to be modifying if possible.

    Is it possible to check why smugmug isn't returning the responseXML.

    Thanks,

    David

    Hmm, I just made some changes on our test server that might alleviate this.

    On our next feature rollout (soon, I hope, but you never know) we'll see if it works. :)

    Don
  • devbobodevbobo Registered Users, Retired Mod Posts: 4,339 SmugMug Employee
    edited February 12, 2005
    Cool thanks Don (nt)
    Thanks,

    David
    David Parry
    SmugMug API Developer
    My Photos
  • onethumbonethumb Administrators Posts: 1,269 Major grins
    edited February 12, 2005
    onethumb wrote:
    Hmm, I just made some changes on our test server that might alleviate this.

    On our next feature rollout (soon, I hope, but you never know) we'll see if it works. :)

    Don

    It's out, can you try and see if it works better?

    Thanks,

    Don
  • flyingpylonflyingpylon Registered Users Posts: 260 Major grins
    edited February 12, 2005
    onethumb wrote:
    It's out, can you try and see if it works better?

    Thanks,

    Don
    The problem I described earlier now appears to be fixed... thanks Don!
  • devbobodevbobo Registered Users, Retired Mod Posts: 4,339 SmugMug Employee
    edited February 13, 2005
    Perfect !!!
    Thanks Don


    onethumb wrote:
    It's out, can you try and see if it works better?

    Thanks,

    Don
    David Parry
    SmugMug API Developer
    My Photos
Sign In or Register to comment.