Code:
$soapaction = "http://communicationoffice.nbs.rs/GetCurrentExchangeRate";
$wsdl = "https://webservices.nbs.rs/Com...tExchangeRateService.asmx?WSDL";
$namespace = "http://www.nbs.rs/TempExchangeRatesService";
$client = new soapclient($wsdl);
$mysoapmsg = $client->serializeEnvelope('<GetCurrentExchangeRates xmlns="http://www.nbs.rs/TempExchangeRatesService">
<nExchangeRatesListTypeID>1</nExchangeRatesListTypeID>
</GetCurrentExchangeRates>','<AuthenticationHeader xmlns="http://www.nbs.rs/TempExchangeRatesService">
<UserName>myUserName</UserName>
<Password>myPassword</Password>
<LicenceID>myLicenceID</LicenceID>
</AuthenticationHeader>',array(),'document', 'literal');
$response = $client->send($mysoapmsg, $soapaction);
if ($client->fault) {
echo '<h3>Fault</h3><pre>';
print_r($response);
echo '</pre>';
}
echo $client->response;
$soapaction = "http://communicationoffice.nbs.rs/GetCurrentExchangeRate";
$wsdl = "https://webservices.nbs.rs/Com...tExchangeRateService.asmx?WSDL";
$namespace = "http://www.nbs.rs/TempExchangeRatesService";
$client = new soapclient($wsdl);
$mysoapmsg = $client->serializeEnvelope('<GetCurrentExchangeRates xmlns="http://www.nbs.rs/TempExchangeRatesService">
<nExchangeRatesListTypeID>1</nExchangeRatesListTypeID>
</GetCurrentExchangeRates>','<AuthenticationHeader xmlns="http://www.nbs.rs/TempExchangeRatesService">
<UserName>myUserName</UserName>
<Password>myPassword</Password>
<LicenceID>myLicenceID</LicenceID>
</AuthenticationHeader>',array(),'document', 'literal');
$response = $client->send($mysoapmsg, $soapaction);
if ($client->fault) {
echo '<h3>Fault</h3><pre>';
print_r($response);
echo '</pre>';
}
echo $client->response;
Greska koja mi se pojavljuje je:
Fatal error: Uncaught SoapFault exception: [Client] Function ("serializeEnvelope") is not a valid method for this service in ....
..... /public_html/plugins/system/jumi.php(63) : eval()'d code on line 24.
Koliko ja razumem jumi koji je ukljucen u Joomla kako bi mi radio PHP ne moze da izvrsi funkciju serializeEnvelope prijavljuje gresku u liniji 24:
23: function plgSystemJumi( &$subject, $config ) //constuctor
24: {
25: global $mainframe, $_JUMI_ROOT;
izmenio Nemanja: Kôd stavljajte u CODE tagove.
Ima li neko ideju kako da resim ovaj problem?
Hvala.