JavaScript-oproep SOAP
JavaScrip altijd al wilde bellen rechtstreeks Xurrency.com de SOAP, de realisatie van de wisselkoers van AJAX, het vinden van een JavaScript-SOAP Client getest. Deze machine IE, Chrome succesvolle terugkeer, firefox en in het gastland op de fout, "toegang tot beperkte URI DENIED" Ik weet het niet haar所以然.
Besloten het op te geven. Switch to php soapclient + jquery ajax bereiken.
JavaScript SOAP Client test code is als volgt:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 | "-//W3C//DTD XHTML 1.0 Strict//EN" <! DOCTYPE html PUBLIC "- / / W3C / / DTD XHTML 1.0 Strict / / EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> "http://www.w3.org/1999/xhtml" lang = "en" xml : lang = "en" > <html Xmlns = "http://www.w3.org/1999/xhtml" lang = "en" xml: lang = "en"> <head> XHTML - document </ title > <title> XHTML - document </ title> "text/javascript" src = "soapclient.js" ></ script > <script Type = "text / javascript" src = "soapclient.js"> </ script> "text/javascript" > <script Type = "text / javascript"> functie valuta () ( "http://xurrency.com/servidor_soap.php" ; var url = "http://xurrency.com/servidor_soap.php"; new SOAPClientParameters ( ) ; var pl = new SOAPClientParameters (); "amount" , 5 ) ; pl. toevoegen ( "bedrag", 5); "base" , "usd" ) ; pl. toevoegen ( "basis", "USD"); "target" , "eur" ) ; pl. toevoegen ( "target", "EUR"); url , "getValue" , pl , true , Currency_callBack ) ; SOAPClient. Invoke (url, "getValue", PL, waar, Currency_callBack); ) r ) { functie Currency_callBack (r) ( r ) ; alert (r); ) </ Script> </ Head> <body> "" > <form Action = ""> button value = "Invoke" onclick = "currency();" /> <input Type = knop waarde = "Invoke" onclick = "currency ();" /> </ Form> </ Body> </ Html> |











































