Verdikleri doküman da doktor tc kimlik numarasını long olarak istemişler fakat test ortamında verdigi "99999999990" değer long limitini geçmekte, aşağıdaki gibi değiştirirsen büyük ihtimal sorunun düzelecektir.
<?php try{ $client = new SoapClient("https://sgkt.sgk.gov.tr/medula/eczane/saglikTesisiYardimciIslemleriWS?wsdl"); $wsse = '<wsse:Security xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"> <wsse:UsernameToken xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"> <wsse:Username>99999999990</wsse:Username> <wsse:Password Type="http://docs.oasis-open.org/ws ms/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">99999999990</wsse:Password> </wsse:UsernameToken> </wsse:Security>'; $header_data = new SoapVar($wsse, XSD_ANYXML); $header = new SoapHeader('http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd', 'Security', $header_data); $client->__setSoapHeaders($header); $parameters = []; $parameters[] = new SoapVar('11068891', XSD_INT, null, "", 'tesisKodu', ''); $parameters[] = new SoapVar('99999999990', XSD_STRING, null, "", 'doktorTcKimlikNo'); $parameters[] = new SoapVar('29.12.2017', XSD_STRING, null, "", 'islemTarihi'); $parameter = [ 'arg0' => new SoapVar($parameters, SOAP_ENC_OBJECT) ]; $results = $client->aktifIlacListesiSorgula($parameter); print_r($results); }catch (SoapFault $e){ die('ERR: ' . $e->getMessage()); } ?>
Hocam selamlar, ne zamandır üzerine uğraştığım bir konuydu, ellerinize sağlık, çok teşekkürler.
Verdikleri doküman da doktor tc kimlik numarasını long olarak istemişler fakat test ortamında verdigi "99999999990" değer long limitini geçmekte, aşağıdaki gibi değiştirirsen büyük ihtimal sorunun düzelecektir.
<?php try{ $client = new SoapClient("https://sgkt.sgk.gov.tr/medula/eczane/saglikTesisiYardimciIslemleriWS?wsdl"); $wsse = '<wsse:Security xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"> <wsse:UsernameToken xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"> <wsse:Username>99999999990</wsse:Username> <wsse:Password Type="http://docs.oasis-open.org/ws ms/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">99999999990</wsse:Password> </wsse:UsernameToken> </wsse:Security>'; $header_data = new SoapVar($wsse, XSD_ANYXML); $header = new SoapHeader('http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd', 'Security', $header_data); $client->__setSoapHeaders($header); $parameters = []; $parameters[] = new SoapVar('11068891', XSD_INT, null, "", 'tesisKodu', ''); $parameters[] = new SoapVar('99999999990', XSD_STRING, null, "", 'doktorTcKimlikNo'); $parameters[] = new SoapVar('29.12.2017', XSD_STRING, null, "", 'islemTarihi'); $parameter = [ 'arg0' => new SoapVar($parameters, SOAP_ENC_OBJECT) ]; $results = $client->aktifIlacListesiSorgula($parameter); print_r($results); }catch (SoapFault $e){ die('ERR: ' . $e->getMessage()); } ?>
yassey Tekrar merhaba,
Benim de bir sorum olacaktı. Gönderdiğin kodların üzerinden giderek, e reçete oluşturmaya çalışıyorum. Test ortamında "stdClass Object ( [ereceteGirisReturn] => stdClass Object ( [sonucKodu] => 9109 [sonucMesaji] => Gonderdiginiz mesaj beklenen mesaj formatina uymamaktadir. Detay: cvc-complex-type.2.4.a: Invalid content was found starting with element 'tesisKodu'. One of '{ereceteDVO}' is expected. ) )" şeklinde hata aldım. Bakmanız mümkün müdür?
try {
$client = new SoapClient("https://sgkt.sgk.gov.tr/medula/eczane/saglikTesisiReceteIslemleriWS?wsdl");
$wsse = '<wsse:Security xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
<wsse:UsernameToken xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
<wsse:Username>' . $user_medula_username . '</wsse:Username>
<wsse:Password Type="http://docs.oasis-open.org/ws ms/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">' . $user_medula_password . '</wsse:Password>
</wsse:UsernameToken>
</wsse:Security>';
$header_data = new SoapVar($wsse, XSD_ANYXML);
$header = new SoapHeader('http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd', 'Security', $header_data);
$client->__setSoapHeaders($header);
$parameters = [];
$parameters[] = new SoapVar('11069903', XSD_INT, null, "", 'tesisKodu', '');
$parameters[] = new SoapVar('99999999990', XSD_STRING, null, "", 'doktorTcKimlikNo');
$parameters[] = new SoapVar($MEDULAreceteTarihi, XSD_STRING, null, "", 'receteTarihi');
$parameter = [
'arg0' => new SoapVar($parameters, SOAP_ENC_OBJECT)
];
$results = $client->ereceteGiris($parameter);
print_r($results);
} catch (SoapFault $e) {
die('ERR: ' . $e->getMessage());
}