Menu

#3 I think I just found a bug inside callService function...

open
Bug (1)
1
2014-05-21
2014-05-21
No

I think I just found a bug while using the method callService. It only checks for http:// protocol instead of checking also for https:// so, if you have a webservice installed in an https site, it will ignore this and always replace protocol by http:// no matter what, and after that, it will also throw an error regarding getElementsByTagName...

I've replaced the following piece of code :

if(serviceUrl.indexOf("http://")<0)serviceUrl="http://"+serviceUrl;serviceUrl+="?WSDL";

by this :

if ((serviceUrl.indexOf("https://")<0) && (serviceUrl.indexOf("http://")<0)) {serviceUrl=location.protocol +"//"+serviceUrl;}serviceUrl+="?WSDL";

avoiding the issue.

Discussion


Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.