Javascript SOAP Client
Javascript SOAP Client PDF Print E-mail

This is how to use SOAP Client javascript for SOA For VM.

This sample code is for calling "GetVersions" Method in VM_Users Service.

Download Javascript SOAP Client



<SCRIPT language='javascript' 
    src='http://YOUR_URL/administrator/components/com_vm_soa/js/soapclient.js'>
</SCRIPT>

<SCRIPT language=javascript>

var url = "http://YOUR_URL/administrator/components/com_vm_soa/services/VM_UsersWSDL.php";

function GetVersions()
{

   var method = "GetVersions"; // Method name to Call

   var pl = new SOAPClientParameters();
   pl.add("login", login);
   pl.add("password", password);
   SOAPClient.invoke(url, method, pl, true, GetVersions_callBack);
}

/* WebService CallBack*/
function GetVersions_callBack(r,soapResponse)
{

   if(soapResponse.xml)    // IE
   alert(soapResponse.xml);
   else    // MOZ
   alert((new XMLSerializer()).serializeToString(soapResponse)); //print SOAP Response
				
   //print Object result
   alert("Author : "+r.Author+"\nSOA_For_Virtuemart_Version : "+r.SOA_For_Virtuemart_Version+
"\nVirtuemart_Version : "+r.Virtuemart_Version+"\nDatabase_Version : "+r.Database_Version);

} 

</script>

More info about Javascript SOAP Client parameters here

Result:

GetVersions Webservice


 

Follow us on Facebook & Twitter



  

Useful informations

Itunes / Online store / Forum / FAQS / Contacts / About Us / Terms of Service