Published on WSO2 Oxygen Tank (http://wso2.org)

[commons-dev] Fault handling in native WSRequest.

By saminda
Created 2007-05-30 09:44

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi Jonathan,

In native WSRequest object's body handling in,

WSRequest.prototype._processResult = function () {
}

in line 168,

var soapBody = response.getElementsByTagName(soapPrefix + "Body")[0];
if (soapBody.hasChildNodes())

Prior "if" statement would fail if server response with a 202 OK without
a HTTP body.

Wouldn't it safer to check the httpstatus first and then check for soap
body.

If the response body is empty, should the resulting responseText be ""
and responseXML be an empty element rather being NULL.

Thank you

Saminda
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.2 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFGXbflYmklbLuW6wYRAgRTAKDOpHChLFVBxW0gESXCGKOBRIOpcgCeK2EA
2/n6/jN1ngmM3u7khc7qMa4=
=yjHP
-----END PGP SIGNATURE-----

_______________________________________________
Commons-dev mailing list
Commons-dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/commons-dev


Source URL:
http://wso2.org/forum/thread/1612