Navigacija
Lista poslednjih: 16, 32, 64, 128 poruka.

SOAP WEB servisi Agencije za privredne registre (APR)

[es] :: PHP :: SOAP WEB servisi Agencije za privredne registre (APR)

[ Pregleda: 1958 | Odgovora: 1 ] > FB > Twit

Postavi temu Odgovori

Autor

Pretraga teme: Traži
Markiranje Štampanje RSS

blackman

Član broj: 14516
Poruke: 67
212.200.53.*



Profil

icon SOAP WEB servisi Agencije za privredne registre (APR)19.07.2021. u 13:44 - pre 33 meseci
Ima li neko iskustva u korišćenju ovih servisa APR-a?
Ako ima neki prost primer u PHP-u, jer sam probao svašta,
ali nikako da prođe.
Sa web servisima NBS sam se snašao, ali sa ovim nikako.
Nemam nikakvu dokumentaciju o korišćenju servisa:
namespace ?
pominju sertifikat ?
adresa servisa OK
Ako neko ima iskustva neka pomogne!

[Ovu poruku je menjao blackman dana 19.07.2021. u 17:58 GMT+1]
 
Odgovor na temu

mP-programer
Marko Jovanovic
mikroElektronika - webmaster
Beograd, Vozdovac

Član broj: 48573
Poruke: 31
*.static.isp.telekom.rs.

ICQ: 306242071
Sajt: www.mikroe.com


Profil

icon Re: SOAP WEB servisi Agencije za privredne registre (APR)29.08.2023. u 15:40 - pre 7 meseci
Probaj sa ovim:

Code:

<?php 
        $username = "username";
        $password = "password";
        $wsdl = https://service1.apr.gov.rs:4430/plwstest/PlService.svc?wsdl;
        $location = https://service1.apr.gov.rs:4430/plwstest/PlService.svc;


        $client = new SoapClient($wsdl, [
               'location' => $location,
               'encoding' => 'utf-8',
               'trace' => 1,
               'exceptions' => true,
               'cache_wsdl' => WSDL_CACHE_NONE,
               'stream_context' => stream_context_create([
                       'ssl' => [
                               'verify_peer' => false,
                               'verify_peer_name' => false,
                       ],
               ]),
        ]);
        $auth = '<wsse:Security xmlns:wsse=http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd>
                               <wsse:UsernameToken>
                                       <wsse:Username>'.$username.'</wsse:Username>
                                      <wsse:Password Type=http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText>'.$password.'</wsse:Password>
                               </wsse:UsernameToken>
                        </wsse:Security>';
        $client->__setSoapHeaders(new SoapHeader('http://docs.oasis-open.org/wss...-wss-wssecurity-secext-1.0.xsd', 'Security', new SoapVar($auth, XSD_ANYXML)));
        $params = [
               'privredniSubjektiUlazniPodaci' => [
                       'privredniSubjekti' => [
                               'maticniBroj' => '20869623',
                               'tip' => '1'
                       ],
               ],
        ];             
        $response = $client->PreuzmiPodatkeOPrivrednomSubjektu($params);
        debug($response);
        exit();
?>



Stop, Dave…
My mind is going…
I can feel it…
I can feel it…
Stop… Please…
HAL 9000
 
Odgovor na temu

[es] :: PHP :: SOAP WEB servisi Agencije za privredne registre (APR)

[ Pregleda: 1958 | Odgovora: 1 ] > FB > Twit

Postavi temu Odgovori

Navigacija
Lista poslednjih: 16, 32, 64, 128 poruka.