Please enable JavaScript.
Coggle requires JavaScript to display documents.
SOAP-RPC (RPC (always_populate_raw_post_data = On (php.ini, preuzimanje,…
SOAP-RPC
RPC
-
xmlrpc_server_register_method($server, "sabiranje", "sabiranjeFunkcija");
-
-
$response = xmlrpc_server_call_method($server, $HTTP_RAW_POST_DATA, null);
-
function sabiranjeFunkcija($metod, $parametri) { return $parametri[0] + $parametri[1]; }
-
SOAP objekat
-
-
function sabiranje($a, $b) { return $a + $b; }
-
ini_set("soap.wsdl_cache_enabled", "0");
-
-
-
-
pristup
-
$request = xmlrpc_encode_request("sabiranje", array(2,4));
-
-
-
$kontekst = stream_context_create(array('http' => array( 'method' => "POST",
'header' => "Content-Type: text/xml", 'content' => $request)));
-
-
-
-
-
if ($response && xmlrpc_is_fault($response)) { trigger_error("Greska!");
} else { print($response[0]);}
-
-
Pristup
-
-
$klijent = new SoapClient("mojOpis.wsdl");
echo $klijent->sabiranje(3,4);
-