• 04-01-2018, 10:25:40
    #10
    yassey adlı üyeden alıntı: mesajı görüntüle
    https://sgkt.sgk.gov.tr/medula/eczan...d-dfebe6de09c6

    bu linkte şeması mevcut, alması gereken tüm parametreler verdigim linkte belirtilmiş. senin kodlarında arg0 arg1 arg2 ... diye parametreler var fakat şemada böyle bir parametre istemiyor.
    arg0 içinde ereceteDVO parametresini vermen gerekiyor. tabi ereceteDVO altındada yine yeni parametreler istemekte, verdigim linkteki şema üzerinden daha kolay ilerleyebilirsin.
    Çok teşekkürler. Son bir şey daha sorsam eğer sıkmamış olursam;
    <xs:complexType name="ereceteDVO">
    <xs:sequence>
    <xs:element name="protokolNo" type="xs:string"/>
    <xs:element name="provizyonTipi" type="xs:int"/>
    <xs:element name="receteAltTuru" type="xs:int"/>
    <xs:element name="receteTarihi" type="xs:string"/>
    <xs:element name="receteTuru" nillable="true" type="xs:int"/>
    <xs:element name="takipNo" type="xs:string"/>
    <xs:element name="tcKimlikNo" type="xs:long"/>
    <xs:element name="tesisKodu" type="xs:int"/>
    <xs:element minOccurs="0" name="seriNo" nillable="true" type="xs:string"/>
    <xs:element name="doktorBransKodu" type="xs:int"/>
    <xs:element name="doktorSertifikaKodu" type="xs:int"/>
    <xs:element minOccurs="0" name="kisiDVO" nillable="true" type="tns:kisiDVO"/>
    <xs:element minOccurs="0" name="ereceteNo" nillable="true" type="xs:string"/>
    <xs:element maxOccurs="unbounded" name="ereceteIlacListesi" type="tns:ereceteIlacDVO"/>
    <xs:element maxOccurs="unbounded" name="ereceteTaniListesi" type="tns:ereceteTaniDVO"/>
    <xs:element maxOccurs="unbounded" minOccurs="0" name="ereceteAciklamaListesi" nillable="true" type="tns:ereceteAciklamaDVO"/>
    <xs:element minOccurs="0" name="doktorAdi" nillable="true" type="xs:string"/>
    <xs:element minOccurs="0" name="doktorSoyadi" nillable="true" type="xs:string"/>
    <xs:element name="doktorTcKimlikNo" type="xs:long"/>
    </xs:sequence>
    </xs:complexType>
    Bu veriyi göndereceğim, o kısım tamam ama,
    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($MEDULAtesisKodu, XSD_INT, null, "", 'tesisKodu', '');
            $parameters[] = new SoapVar($MEDULAtcKimlikNo, XSD_STRING, null, "", 'tcKimlikNo');
            $parameters[] = new SoapVar($MEDULAprovizyonTipi, XSD_INT, null, "", 'provizyonTipi', '');
            $parameters[] = new SoapVar($MEDULAreceteTarihi, XSD_STRING, null, "", 'receteTarihi');
            $parameters[] = new SoapVar($MEDULAreceteAltTuru, XSD_INT, null, "", 'receteAltTuru', '');
            $parameters[] = new SoapVar($MEDULAprotokolNo, XSD_STRING, null, "", 'protokolNo');
            $parameters[] = new SoapVar($MEDULAdoktorTcKimlikNo, XSD_STRING, null, "", 'doktorTcKimlikNo');
            $parameters[] = new SoapVar($MEDULAdoktorBransKodu, XSD_INT, null, "", 'doktorBransKodu', '');
            $parameters[] = new SoapVar($MEDULAdoktorSertifikaKodu, XSD_INT, null, "", 'doktorSertifikaKodu', '');
            $ereceteDVO = [
                'arg0' => new SoapVar($parameters, SOAP_ENC_OBJECT)
            ];
            $results = $client->ereceteGiris($ereceteDVO);
            print_r($results);
          } catch (SoapFault $e) {
            die('ERR: ' . $e->getMessage());
          }
    Bu kodun içerisinde kisiDVO yu örneğin, nasıl gönderebilirim?
    Biliyorum çok zahmet verdim size ama içinden çıkamadım bir türlü, çok teşekkürler şimdiden.



    En son bu şekilde denedim ama bu sefer de kullanıcı adı doktor tckn eşleşmedi diyor. Sanırım kotaramıyorum bu işi, en iyisi bir bilene yaptırtmak gibi duruyor, siz ne dersiniz?
    <?php
    if ($_POST) {
     $user_medula_username = trim(strip_tags($_POST['user_medula_username']));
     $user_medula_password  = trim(strip_tags($_POST['user_medula_password']));
     $MEDULAtesisKodu = "11069903"; // ereçetenin yazıldığı tesis kodu - isg için sabit
     $MEDULAtcKimlikNo = ""; // hastanın tckn
     $MEDULAprovizyonTipi = "1"; // tablo 9e
     $MEDULAreceteTarihi = date('d.m.Y'); // 01.01.2018 gibi
     $MEDULAreceteTuru = "1"; // tablo 9a
     $MEDULAreceteAltTuru = "1"; // tablo 9b
     $MEDULAprotokolNo = "";
     $MEDULAseriNo = "0";
     $MEDULAdoktorTcKimlikNo = "99999999990";
     $MEDULAdoktorBransKodu = "";
     $MEDULAdoktorSertifikaKodu = "0"; // tablo 9d
     $MEDULAdoktorAdi = "";
     $MEDULAdoktorSoyadi = "";
     $MEDULAadi = ""; // hastanın adı
     $MEDULAsoyadi = ""; // hastanın soyadı
     $MEDULAdogumTarihi = "01.01.1980"; // hastanın doğum tarihi - 01.01.1980 gibi
     $MEDULAcinsiyeti = "E"; // hastanın cinsiyeti - E veya K
     $MEDULAaciklamaTuru = "1"; // tablo 9h
     $MEDULAaciklama = ""; // ereçete açıklaması
     $MEDULAtaniKodu = ""; // ereçete tanı kodu
     $MEDULAtaniAdi = ""; // ereçete tanı açıklaması
     $MEDULAbarkod = "";
     $MEDULAadet = "";
     $MEDULAkullanimSekli = "1"; // tablo 9f
     $MEDULAkullanimDoz1 = "1";
     $MEDULAkullanimDoz2 = "1";
     $MEDULAkullanimPeriyot = "2";
     $MEDULAkullanimPeriyotBirimi = "3"; // tablo 9g
     $MEDULAgeriOdemeKapsaminda = "E"; // E veya H olacak
     $MEDULAilacAciklamaTuru = "1"; // tablo 9h
     $MEDULAilacAciklama = ""; // ereçete açıklaması
       if (empty($user_medula_username) || empty($user_medula_password)) {
         $errormsg = "Boş Alan Bırakmayın!";
       } else {
          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);
            $gonderilecekXML = '
              <xs:complexType name="ereceteDVO">
                <xs:sequence>
                  <xs:element name="protokolNo" value="' . $MEDULAprotokolNo . '" type="xs:string"/>
                  <xs:element name="provizyonTipi" value="' . $MEDULAprovizyonTipi . '" type="xs:int"/>
                  <xs:element name="receteAltTuru" value="' . $MEDULAreceteAltTuru . '" type="xs:int"/>
                  <xs:element name="receteTarihi" value="' . $MEDULAreceteTarihi . '" type="xs:string"/>
                  <xs:element name="tcKimlikNo" value="' . $MEDULAtcKimlikNo . '" type="xs:string"/>
                  <xs:element name="tesisKodu" value="' . $MEDULAtesisKodu . '" type="xs:int"/>
                  <xs:element name="doktorBransKodu" value="' . $MEDULAdoktorBransKodu . '" type="xs:int"/>
                  <xs:element name="doktorSertifikaKodu" value="' . $MEDULAdoktorSertifikaKodu . '" type="xs:int"/>
                  <xs:element maxOccurs="unbounded" name="ereceteIlacListesi" type="tns:ereceteIlacDVO"/>
                  <xs:element maxOccurs="unbounded" name="ereceteTaniListesi" type="tns:ereceteTaniDVO"/>
                  <xs:element name="doktorTcKimlikNo" value="' . $MEDULAdoktorTcKimlikNo . '" type="xs:string"/>
                </xs:sequence>
              </xs:complexType>
              <xs:complexType name="ereceteIlacDVO">
                <xs:sequence>
                  <xs:element name="adet" value="' . $MEDULAadet . '" type="xs:int"/>
                  <xs:element name="barkod" value="' . $MEDULAbarkod . '" type="xs:long"/>
                  <xs:element name="kullanimDoz1" value="' . $MEDULAkullanimDoz1 . '" type="xs:int"/>
                  <xs:element name="kullanimPeriyotBirimi" value="' . $MEDULAkullanimPeriyotBirimi . '" type="xs:int"/>
                  <xs:element name="kullanimSekli" value="' . $MEDULAkullanimSekli . '" nillable="true" type="xs:int"/>
                  <xs:element maxOccurs="unbounded" minOccurs="0" name="ereceteIlacAciklamaListesi" nillable="true" type="tns:ereceteIlacAciklamaDVO"/>
                  <xs:element name="kullanimDoz2" value="' . $MEDULAkullanimDoz2 . '" type="xs:double"/>
                  <xs:element name="kullanimPeriyot" value="' . $MEDULAkullanimPeriyot . '" type="xs:int"/>
                  <xs:element minOccurs="0" name="geriOdemeKapsaminda" value="' . $MEDULAgeriOdemeKapsaminda . '" nillable="true" type="xs:string"/>
                </xs:sequence>
              </xs:complexType>
              <xs:complexType name="ereceteIlacAciklamaDVO">
                <xs:sequence>
                  <xs:element minOccurs="0" name="aciklama" value="' . $MEDULAaciklama . '" nillable="true" type="xs:string"/>
                  <xs:element name="aciklamaTuru" value="' . $MEDULAaciklamaTuru . '" type="xs:int"/>
                </xs:sequence>
              </xs:complexType>
              <xs:complexType name="ereceteTaniDVO">
                <xs:sequence>
                  <xs:element minOccurs="0" name="taniAdi" value="' . $MEDULAtaniAdi . '" nillable="true" type="xs:string"/>
                  <xs:element name="taniKodu" value="' . $MEDULAtaniKodu . '" type="xs:string"/>
                </xs:sequence>
              </xs:complexType>
            ';
            $results = $client->ereceteGiris($gonderilecekXML);
            print_r($results);
          } catch (SoapFault $e) {
            die('ERR: ' . $e->getMessage());
          }
       }
    }
  • 04-01-2018, 14:29:09
    #11
    ozraksy adlı üyeden alıntı: mesajı görüntüle
    Çok teşekkürler. Son bir şey daha sorsam eğer sıkmamış olursam;
    <xs:complexType name="ereceteDVO">
    <xs:sequence>
    <xs:element name="protokolNo" type="xs:string"/>
    <xs:element name="provizyonTipi" type="xs:int"/>
    <xs:element name="receteAltTuru" type="xs:int"/>
    <xs:element name="receteTarihi" type="xs:string"/>
    <xs:element name="receteTuru" nillable="true" type="xs:int"/>
    <xs:element name="takipNo" type="xs:string"/>
    <xs:element name="tcKimlikNo" type="xs:long"/>
    <xs:element name="tesisKodu" type="xs:int"/>
    <xs:element minOccurs="0" name="seriNo" nillable="true" type="xs:string"/>
    <xs:element name="doktorBransKodu" type="xs:int"/>
    <xs:element name="doktorSertifikaKodu" type="xs:int"/>
    <xs:element minOccurs="0" name="kisiDVO" nillable="true" type="tns:kisiDVO"/>
    <xs:element minOccurs="0" name="ereceteNo" nillable="true" type="xs:string"/>
    <xs:element maxOccurs="unbounded" name="ereceteIlacListesi" type="tns:ereceteIlacDVO"/>
    <xs:element maxOccurs="unbounded" name="ereceteTaniListesi" type="tns:ereceteTaniDVO"/>
    <xs:element maxOccurs="unbounded" minOccurs="0" name="ereceteAciklamaListesi" nillable="true" type="tns:ereceteAciklamaDVO"/>
    <xs:element minOccurs="0" name="doktorAdi" nillable="true" type="xs:string"/>
    <xs:element minOccurs="0" name="doktorSoyadi" nillable="true" type="xs:string"/>
    <xs:element name="doktorTcKimlikNo" type="xs:long"/>
    </xs:sequence>
    </xs:complexType>
    Bu veriyi göndereceğim, o kısım tamam ama,
    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($MEDULAtesisKodu, XSD_INT, null, "", 'tesisKodu', ''); $parameters[] = new SoapVar($MEDULAtcKimlikNo, XSD_STRING, null, "", 'tcKimlikNo'); $parameters[] = new SoapVar($MEDULAprovizyonTipi, XSD_INT, null, "", 'provizyonTipi', ''); $parameters[] = new SoapVar($MEDULAreceteTarihi, XSD_STRING, null, "", 'receteTarihi'); $parameters[] = new SoapVar($MEDULAreceteAltTuru, XSD_INT, null, "", 'receteAltTuru', ''); $parameters[] = new SoapVar($MEDULAprotokolNo, XSD_STRING, null, "", 'protokolNo'); $parameters[] = new SoapVar($MEDULAdoktorTcKimlikNo, XSD_STRING, null, "", 'doktorTcKimlikNo'); $parameters[] = new SoapVar($MEDULAdoktorBransKodu, XSD_INT, null, "", 'doktorBransKodu', ''); $parameters[] = new SoapVar($MEDULAdoktorSertifikaKodu, XSD_INT, null, "", 'doktorSertifikaKodu', ''); $ereceteDVO = [ 'arg0' => new SoapVar($parameters, SOAP_ENC_OBJECT) ]; $results = $client->ereceteGiris($ereceteDVO); print_r($results); } catch (SoapFault $e) { die('ERR: ' . $e->getMessage()); }
    Bu kodun içerisinde kisiDVO yu örneğin, nasıl gönderebilirim?
    Biliyorum çok zahmet verdim size ama içinden çıkamadım bir türlü, çok teşekkürler şimdiden.




    En son bu şekilde denedim ama bu sefer de kullanıcı adı doktor tckn eşleşmedi diyor. Sanırım kotaramıyorum bu işi, en iyisi bir bilene yaptırtmak gibi duruyor, siz ne dersiniz?
    <?php if ($_POST) { $user_medula_username = trim(strip_tags($_POST['user_medula_username'])); $user_medula_password = trim(strip_tags($_POST['user_medula_password'])); $MEDULAtesisKodu = "11069903"; // ereçetenin yazıldığı tesis kodu - isg için sabit $MEDULAtcKimlikNo = ""; // hastanın tckn $MEDULAprovizyonTipi = "1"; // tablo 9e $MEDULAreceteTarihi = date('d.m.Y'); // 01.01.2018 gibi $MEDULAreceteTuru = "1"; // tablo 9a $MEDULAreceteAltTuru = "1"; // tablo 9b $MEDULAprotokolNo = ""; $MEDULAseriNo = "0"; $MEDULAdoktorTcKimlikNo = "99999999990"; $MEDULAdoktorBransKodu = ""; $MEDULAdoktorSertifikaKodu = "0"; // tablo 9d $MEDULAdoktorAdi = ""; $MEDULAdoktorSoyadi = ""; $MEDULAadi = ""; // hastanın adı $MEDULAsoyadi = ""; // hastanın soyadı $MEDULAdogumTarihi = "01.01.1980"; // hastanın doğum tarihi - 01.01.1980 gibi $MEDULAcinsiyeti = "E"; // hastanın cinsiyeti - E veya K $MEDULAaciklamaTuru = "1"; // tablo 9h $MEDULAaciklama = ""; // ereçete açıklaması $MEDULAtaniKodu = ""; // ereçete tanı kodu $MEDULAtaniAdi = ""; // ereçete tanı açıklaması $MEDULAbarkod = ""; $MEDULAadet = ""; $MEDULAkullanimSekli = "1"; // tablo 9f $MEDULAkullanimDoz1 = "1"; $MEDULAkullanimDoz2 = "1"; $MEDULAkullanimPeriyot = "2"; $MEDULAkullanimPeriyotBirimi = "3"; // tablo 9g $MEDULAgeriOdemeKapsaminda = "E"; // E veya H olacak $MEDULAilacAciklamaTuru = "1"; // tablo 9h $MEDULAilacAciklama = ""; // ereçete açıklaması if (empty($user_medula_username) || empty($user_medula_password)) { $errormsg = "Boş Alan Bırakmayın!"; } else { 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); $gonderilecekXML = ' <xs:complexType name="ereceteDVO"> <xs:sequence> <xs:element name="protokolNo" value="' . $MEDULAprotokolNo . '" type="xs:string"/> <xs:element name="provizyonTipi" value="' . $MEDULAprovizyonTipi . '" type="xs:int"/> <xs:element name="receteAltTuru" value="' . $MEDULAreceteAltTuru . '" type="xs:int"/> <xs:element name="receteTarihi" value="' . $MEDULAreceteTarihi . '" type="xs:string"/> <xs:element name="tcKimlikNo" value="' . $MEDULAtcKimlikNo . '" type="xs:string"/> <xs:element name="tesisKodu" value="' . $MEDULAtesisKodu . '" type="xs:int"/> <xs:element name="doktorBransKodu" value="' . $MEDULAdoktorBransKodu . '" type="xs:int"/> <xs:element name="doktorSertifikaKodu" value="' . $MEDULAdoktorSertifikaKodu . '" type="xs:int"/> <xs:element maxOccurs="unbounded" name="ereceteIlacListesi" type="tns:ereceteIlacDVO"/> <xs:element maxOccurs="unbounded" name="ereceteTaniListesi" type="tns:ereceteTaniDVO"/> <xs:element name="doktorTcKimlikNo" value="' . $MEDULAdoktorTcKimlikNo . '" type="xs:string"/> </xs:sequence> </xs:complexType> <xs:complexType name="ereceteIlacDVO"> <xs:sequence> <xs:element name="adet" value="' . $MEDULAadet . '" type="xs:int"/> <xs:element name="barkod" value="' . $MEDULAbarkod . '" type="xs:long"/> <xs:element name="kullanimDoz1" value="' . $MEDULAkullanimDoz1 . '" type="xs:int"/> <xs:element name="kullanimPeriyotBirimi" value="' . $MEDULAkullanimPeriyotBirimi . '" type="xs:int"/> <xs:element name="kullanimSekli" value="' . $MEDULAkullanimSekli . '" nillable="true" type="xs:int"/> <xs:element maxOccurs="unbounded" minOccurs="0" name="ereceteIlacAciklamaListesi" nillable="true" type="tns:ereceteIlacAciklamaDVO"/> <xs:element name="kullanimDoz2" value="' . $MEDULAkullanimDoz2 . '" type="xs:double"/> <xs:element name="kullanimPeriyot" value="' . $MEDULAkullanimPeriyot . '" type="xs:int"/> <xs:element minOccurs="0" name="geriOdemeKapsaminda" value="' . $MEDULAgeriOdemeKapsaminda . '" nillable="true" type="xs:string"/> </xs:sequence> </xs:complexType> <xs:complexType name="ereceteIlacAciklamaDVO"> <xs:sequence> <xs:element minOccurs="0" name="aciklama" value="' . $MEDULAaciklama . '" nillable="true" type="xs:string"/> <xs:element name="aciklamaTuru" value="' . $MEDULAaciklamaTuru . '" type="xs:int"/> </xs:sequence> </xs:complexType> <xs:complexType name="ereceteTaniDVO"> <xs:sequence> <xs:element minOccurs="0" name="taniAdi" value="' . $MEDULAtaniAdi . '" nillable="true" type="xs:string"/> <xs:element name="taniKodu" value="' . $MEDULAtaniKodu . '" type="xs:string"/> </xs:sequence> </xs:complexType> '; $results = $client->ereceteGiris($gonderilecekXML); print_r($results); } catch (SoapFault $e) { die('ERR: ' . $e->getMessage()); } } }
    ozraksy çok güzel sorular. çok teşekkür ederim. aynı hataları ben de almaktayım. bir türlü php tarafında geçemedik bu kısmı. c# da bi yere kadar getirdi arkadaş olayı ama orda da doktor belirtilen tarihte tesiste çalışmamaktadır hatası alıyoruz imzalı e-reçete kısmında. eczane@sgk.gov.tr mail attım gönderdikleri cevap:
    Aşağıdaki formata uygun veri göndermelisiniz

    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ser="http://servisler.ws.eczane.gss.sgk.gov.tr">
    <soapenv:Header/>
    <soapenv:Body>
    <ser:ereceteGiris>
    <!--Optional:-->
    <arg0>
    <ereceteDVO>
    <protokolNo>?</protokolNo>
    <provizyonTipi>?</provizyonTipi>
    <receteAltTuru>?</receteAltTuru>
    <receteTarihi>?</receteTarihi>
    <receteTuru>?</receteTuru>
    <takipNo>?</takipNo>
    <tcKimlikNo>?</tcKimlikNo>
    <tesisKodu>?</tesisKodu>
    <!--Optional:-->
    <seriNo>?</seriNo>
    <doktorBransKodu>?</doktorBransKodu>
    <doktorSertifikaKodu>?</doktorSertifikaKodu>
    <!--Optional:-->
    <kisiDVO>
    <!--Optional:-->
    <adi>?</adi>
    <!--Optional:-->
    <cinsiyeti>?</cinsiyeti>
    <!--Optional:-->
    <dogumTarihi>?</dogumTarihi>
    <!--Optional:-->
    <soyadi>?</soyadi>
    <tcKimlikNo>?</tcKimlikNo>
    </kisiDVO>
    <!--Optional:-->
    <ereceteNo>?</ereceteNo>
    <!--1 or more repetitions:-->
    <ereceteIlacListesi>
    <adet>?</adet>
    <barkod>?</barkod>
    <!--Optional:-->
    <ilacAdi>?</ilacAdi>
    <kullanimDoz1>?</kullanimDoz1>
    <kullanimPeriyotBirimi>?</kullanimPeriyotBirimi>
    <kullanimSekli>?</kullanimSekli>
    <!--Zero or more repetitions:-->
    <ereceteIlacAciklamaListesi>
    <!--Optional:-->
    <aciklama>?</aciklama>
    <aciklamaTuru>?</aciklamaTuru>
    </ereceteIlacAciklamaListesi>
    <kullanimDoz2>?</kullanimDoz2>
    <kullanimPeriyot>?</kullanimPeriyot>
    <!--Optional:-->
    <geriOdemeKapsaminda>?</geriOdemeKapsaminda>
    </ereceteIlacListesi>
    <!--1 or more repetitions:-->
    <ereceteTaniListesi>
    <!--Optional:-->
    <taniAdi>?</taniAdi>
    <taniKodu>?</taniKodu>
    </ereceteTaniListesi>
    <!--Zero or more repetitions:-->
    <ereceteAciklamaListesi>
    <!--Optional:-->
    <aciklama>?</aciklama>
    <aciklamaTuru>?</aciklamaTuru>
    </ereceteAciklamaListesi>
    <!--Optional:-->
    <doktorAdi>?</doktorAdi>
    <!--Optional:-->
    <doktorSoyadi>?</doktorSoyadi>
    <doktorTcKimlikNo>?</doktorTcKimlikNo>
    </ereceteDVO>
    <tesisKodu>?</tesisKodu>
    <doktorTcKimlikNo>?</doktorTcKimlikNo>
    </arg0>
    </ser:ereceteGiris>
    </soapenv:Body>
    </soapenv:Envelope>
    <?php
    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>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);
    $adi='';
    $cinsiyeti='';
    $dogumTarihi='';
    $soyadi='';
    $tcKimlikNo='99999999990';
    $kisidvo = [];
    $kisidvo[] = new SoapVar($adi,XSD_STRING,null,"",'adi');
    $kisidvo[] = new SoapVar($cinsiyeti,XSD_STRING,null,"",'cinsiyeti');
    $kisidvo[] = new SoapVar($dogumTarihi,XSD_STRING,null,"",'dogumTarihi');
    $kisidvo[] = new SoapVar($soyadi,XSD_STRING,null,"",'soyadi');
    $kisidvo[] = new SoapVar($tcKimlikNo,XSD_LONG,null,"",'tcKimlikNo');
    $aciklama='Hipertansiyon';
    $aciklamaTuru='1';
    $ereceteIlacAciklamaDVO = [];
    $ereceteIlacAciklamaDVO[] = new SoapVar($aciklama,XSD_STRING,null,"",'aciklama');
    $ereceteIlacAciklamaDVO[] = new SoapVar($aciklamaTuru,XSD_INT,null,"",'aciklamaTuru');
    $adet=1;
    $barkod='8699786010055';
    $ilacAdi='ATACAND PLUS 16 12.5 MG.28 TABLET';
    $kullanimDoz1='1';
    $kullanimPeriyotBirimi='1';
    $kullanimSekli='1';
    $kullanimDoz2='1';
    $kullanimPeriyot='1';
    $geriOdemeKapsaminda='E';
    $ereceteIlacDVO = [];
    $ereceteIlacDVO[] = new SoapVar($adet,XSD_INT,null,"",'adet');
    $ereceteIlacDVO[] = new SoapVar($barkod,XSD_LONG,null,"",'barkod');
    $ereceteIlacDVO[] = new SoapVar($ilacAdi,XSD_STRING,null,"",'ilacAdi');
    $ereceteIlacDVO[] = new SoapVar($kullanimDoz1,XSD_INT,null,"",'kullanimDoz1');
    $ereceteIlacDVO[] = new SoapVar($kullanimPeriyotBirimi,XSD_INT,null,"",'kullanimPeriyotBirimi');
    $ereceteIlacDVO[] = new SoapVar($kullanimSekli,XSD_INT,null,"",'kullanimSekli');
    $ereceteIlacDVO[] = new SoapVar($ereceteIlacAciklamaDVO,XSD_ANYXML,null,"",'ereceteIlacAciklamaListesi');
    $ereceteIlacDVO[] = new SoapVar($kullanimDoz2,XSD_DOUBLE,null,"",'kullanimDoz2');
    $ereceteIlacDVO[] = new SoapVar($kullanimPeriyot,XSD_INT,null,"",'kullanimPeriyot');
    $ereceteIlacDVO[] = new SoapVar($geriOdemeKapsaminda,XSD_STRING,null,"",'geriOdemeKapsaminda');
    $taniAdi='Hipertansiyon';
    $taniKodu='I15';
    $ereceteTaniDVO = [];
    $ereceteTaniDVO[] = new SoapVar($taniAdi,XSD_STRING,null,"",'taniAdi');
    $ereceteTaniDVO[] = new SoapVar($taniKodu,XSD_STRING,null,"",'taniKodu');
    $ereceteAciklamaDVO=[];
    $ereceteAciklamaDVO[] = new SoapVar($aciklama,XSD_STRING,null,"",'aciklama');
    $ereceteAciklamaDVO[] = new SoapVar($aciklamaTuru,XSD_INT,null,"",'aciklamaTuru');
    $protokolNo='2';
    $provizyonTipi='1';
    $receteAltTuru='1';
    $receteTarihi=date('m.d.Y');
    $receteTuru='1';
    $takipNo='0';
    $tcKimlikNo='99999999990';
    $tesisKodu='11069903';
    $seriNo='';
    $doktorBransKodu='9999';
    $doktorSertifikaKodu='0';
    $ereceteNo='0';
    $doktorAdi='Ferhat';
    $doktorSoyadi='Gölge';
    $doktorTcKimlikNo='99999999990';
    $erecetedvo = [];
    $erecetedvo[]= new SoapVar($protokolNo,XSD_STRING,null,"",'protokolNo');
    $erecetedvo[]= new SoapVar($provizyonTipi,XSD_INT,null,"",'provizyonTipi');
    $erecetedvo[]= new SoapVar($receteAltTuru,XSD_INT,null,"",'receteAltTuru');
    $erecetedvo[]= new SoapVar($receteTarihi,XSD_STRING,null,"",'receteTarihi');
    $erecetedvo[]= new SoapVar($receteTuru,XSD_INT,null,"",'receteTuru');
    $erecetedvo[]= new SoapVar($takipNo,XSD_STRING,null,"",'takipNo');
    $erecetedvo[]= new SoapVar($tcKimlikNo,XSD_LONG,null,"",'tcKimlikNo');
    $erecetedvo[]= new SoapVar($tesisKodu,XSD_STRING,null,"",'tesisKodu');
    $erecetedvo[]= new SoapVar($seriNo,XSD_STRING,null,"",'seriNo');
    $erecetedvo[]= new SoapVar($doktorBransKodu,XSD_INT,null,"",'doktorBransKodu');
    $erecetedvo[]= new SoapVar($doktorSertifikaKodu,XSD_INT,null,"",'doktorSertifikaKodu');
    $erecetedvo[]= new SoapVar($kisidvo,XSD_ANYXML,null,"",'kisiDVO');
    $erecetedvo[]= new SoapVar($ereceteNo,XSD_STRING,null,"",'ereceteNo');
    $erecetedvo[]= new SoapVar($ereceteIlacDVO,XSD_ANYXML,null,"",'ereceteIlacListesi');
    $erecetedvo[]= new SoapVar($ereceteTaniDVO,XSD_ANYXML,null,"",'ereceteTaniListesi');
    $erecetedvo[]= new SoapVar($ereceteAciklamaDVO,XSD_ANYXML,null,"",'ereceteAciklamaListesi');
    $erecetedvo[]= new SoapVar($doktorAdi,XSD_STRING,null,"",'doktorAdi');
    $erecetedvo[]= new SoapVar($doktorSoyadi,XSD_STRING,null,"",'doktorSoyadi');
    $erecetedvo[]= new SoapVar($doktorTcKimlikNo,XSD_LONG,null,"",'doktorTcKimlikNo');
    $parameters = [];
    $parameters[] = new SoapVar($erecetedvo, XSD_ANYXML, null, "", 'ereceteDVO');
    $parameters[] = new SoapVar('11069903', XSD_INT, null, "", 'tesisKodu', '');
    $parameters[] = new SoapVar('99999999990', XSD_STRING, null, "", 'doktorTcKimlikNo');
    $parameter = [
    'arg0' => new SoapVar($parameters, SOAP_ENC_OBJECT)
    ];
    echo json_encode($parameter);
    echo '<br>';
    $results = $client->ereceteGiris($parameter);
    print_r($results);
    }
    catch (SoapFault $e){
    die('ERR: ' . $e->getMessage());
    } ?>




    aldığım hata :
    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 'protokolNo'. One of '{ereceteDVO}' is expected. ) )
  • 05-01-2018, 09:44:10
    #12
    ferhatgolge adlı üyeden alıntı: mesajı görüntüle
    ozraksy çok güzel sorular. çok teşekkür ederim. aynı hataları ben de almaktayım. bir türlü php tarafında geçemedik bu kısmı. c# da bi yere kadar getirdi arkadaş olayı ama orda da doktor belirtilen tarihte tesiste çalışmamaktadır hatası alıyoruz imzalı e-reçete kısmında. eczane@sgk.gov.tr mail attım gönderdikleri cevap:
    Aşağıdaki formata uygun veri göndermelisiniz

    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ser="http://servisler.ws.eczane.gss.sgk.gov.tr">
    <soapenv:Header/>
    <soapenv:Body>
    <ser:ereceteGiris>
    <!--Optional:-->
    <arg0>
    <ereceteDVO>
    <protokolNo>?</protokolNo>
    <provizyonTipi>?</provizyonTipi>
    <receteAltTuru>?</receteAltTuru>
    <receteTarihi>?</receteTarihi>
    <receteTuru>?</receteTuru>
    <takipNo>?</takipNo>
    <tcKimlikNo>?</tcKimlikNo>
    <tesisKodu>?</tesisKodu>
    <!--Optional:-->
    <seriNo>?</seriNo>
    <doktorBransKodu>?</doktorBransKodu>
    <doktorSertifikaKodu>?</doktorSertifikaKodu>
    <!--Optional:-->
    <kisiDVO>
    <!--Optional:-->
    <adi>?</adi>
    <!--Optional:-->
    <cinsiyeti>?</cinsiyeti>
    <!--Optional:-->
    <dogumTarihi>?</dogumTarihi>
    <!--Optional:-->
    <soyadi>?</soyadi>
    <tcKimlikNo>?</tcKimlikNo>
    </kisiDVO>
    <!--Optional:-->
    <ereceteNo>?</ereceteNo>
    <!--1 or more repetitions:-->
    <ereceteIlacListesi>
    <adet>?</adet>
    <barkod>?</barkod>
    <!--Optional:-->
    <ilacAdi>?</ilacAdi>
    <kullanimDoz1>?</kullanimDoz1>
    <kullanimPeriyotBirimi>?</kullanimPeriyotBirimi>
    <kullanimSekli>?</kullanimSekli>
    <!--Zero or more repetitions:-->
    <ereceteIlacAciklamaListesi>
    <!--Optional:-->
    <aciklama>?</aciklama>
    <aciklamaTuru>?</aciklamaTuru>
    </ereceteIlacAciklamaListesi>
    <kullanimDoz2>?</kullanimDoz2>
    <kullanimPeriyot>?</kullanimPeriyot>
    <!--Optional:-->
    <geriOdemeKapsaminda>?</geriOdemeKapsaminda>
    </ereceteIlacListesi>
    <!--1 or more repetitions:-->
    <ereceteTaniListesi>
    <!--Optional:-->
    <taniAdi>?</taniAdi>
    <taniKodu>?</taniKodu>
    </ereceteTaniListesi>
    <!--Zero or more repetitions:-->
    <ereceteAciklamaListesi>
    <!--Optional:-->
    <aciklama>?</aciklama>
    <aciklamaTuru>?</aciklamaTuru>
    </ereceteAciklamaListesi>
    <!--Optional:-->
    <doktorAdi>?</doktorAdi>
    <!--Optional:-->
    <doktorSoyadi>?</doktorSoyadi>
    <doktorTcKimlikNo>?</doktorTcKimlikNo>
    </ereceteDVO>
    <tesisKodu>?</tesisKodu>
    <doktorTcKimlikNo>?</doktorTcKimlikNo>
    </arg0>
    </ser:ereceteGiris>
    </soapenv:Body>
    </soapenv:Envelope>
    <?php
    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>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);
    $adi='';
    $cinsiyeti='';
    $dogumTarihi='';
    $soyadi='';
    $tcKimlikNo='99999999990';
    $kisidvo = [];
    $kisidvo[] = new SoapVar($adi,XSD_STRING,null,"",'adi');
    $kisidvo[] = new SoapVar($cinsiyeti,XSD_STRING,null,"",'cinsiyeti');
    $kisidvo[] = new SoapVar($dogumTarihi,XSD_STRING,null,"",'dogumTarihi');
    $kisidvo[] = new SoapVar($soyadi,XSD_STRING,null,"",'soyadi');
    $kisidvo[] = new SoapVar($tcKimlikNo,XSD_LONG,null,"",'tcKimlikNo');
    $aciklama='Hipertansiyon';
    $aciklamaTuru='1';
    $ereceteIlacAciklamaDVO = [];
    $ereceteIlacAciklamaDVO[] = new SoapVar($aciklama,XSD_STRING,null,"",'aciklama');
    $ereceteIlacAciklamaDVO[] = new SoapVar($aciklamaTuru,XSD_INT,null,"",'aciklamaTuru');
    $adet=1;
    $barkod='8699786010055';
    $ilacAdi='ATACAND PLUS 16 12.5 MG.28 TABLET';
    $kullanimDoz1='1';
    $kullanimPeriyotBirimi='1';
    $kullanimSekli='1';
    $kullanimDoz2='1';
    $kullanimPeriyot='1';
    $geriOdemeKapsaminda='E';
    $ereceteIlacDVO = [];
    $ereceteIlacDVO[] = new SoapVar($adet,XSD_INT,null,"",'adet');
    $ereceteIlacDVO[] = new SoapVar($barkod,XSD_LONG,null,"",'barkod');
    $ereceteIlacDVO[] = new SoapVar($ilacAdi,XSD_STRING,null,"",'ilacAdi');
    $ereceteIlacDVO[] = new SoapVar($kullanimDoz1,XSD_INT,null,"",'kullanimDoz1');
    $ereceteIlacDVO[] = new SoapVar($kullanimPeriyotBirimi,XSD_INT,null,"",'kullanimPeriyotBirimi');
    $ereceteIlacDVO[] = new SoapVar($kullanimSekli,XSD_INT,null,"",'kullanimSekli');
    $ereceteIlacDVO[] = new SoapVar($ereceteIlacAciklamaDVO,XSD_ANYXML,null,"",'ereceteIlacAciklamaListesi');
    $ereceteIlacDVO[] = new SoapVar($kullanimDoz2,XSD_DOUBLE,null,"",'kullanimDoz2');
    $ereceteIlacDVO[] = new SoapVar($kullanimPeriyot,XSD_INT,null,"",'kullanimPeriyot');
    $ereceteIlacDVO[] = new SoapVar($geriOdemeKapsaminda,XSD_STRING,null,"",'geriOdemeKapsaminda');
    $taniAdi='Hipertansiyon';
    $taniKodu='I15';
    $ereceteTaniDVO = [];
    $ereceteTaniDVO[] = new SoapVar($taniAdi,XSD_STRING,null,"",'taniAdi');
    $ereceteTaniDVO[] = new SoapVar($taniKodu,XSD_STRING,null,"",'taniKodu');
    $ereceteAciklamaDVO=[];
    $ereceteAciklamaDVO[] = new SoapVar($aciklama,XSD_STRING,null,"",'aciklama');
    $ereceteAciklamaDVO[] = new SoapVar($aciklamaTuru,XSD_INT,null,"",'aciklamaTuru');
    $protokolNo='2';
    $provizyonTipi='1';
    $receteAltTuru='1';
    $receteTarihi=date('m.d.Y');
    $receteTuru='1';
    $takipNo='0';
    $tcKimlikNo='99999999990';
    $tesisKodu='11069903';
    $seriNo='';
    $doktorBransKodu='9999';
    $doktorSertifikaKodu='0';
    $ereceteNo='0';
    $doktorAdi='Ferhat';
    $doktorSoyadi='Gölge';
    $doktorTcKimlikNo='99999999990';
    $erecetedvo = [];
    $erecetedvo[]= new SoapVar($protokolNo,XSD_STRING,null,"",'protokolNo');
    $erecetedvo[]= new SoapVar($provizyonTipi,XSD_INT,null,"",'provizyonTipi');
    $erecetedvo[]= new SoapVar($receteAltTuru,XSD_INT,null,"",'receteAltTuru');
    $erecetedvo[]= new SoapVar($receteTarihi,XSD_STRING,null,"",'receteTarihi');
    $erecetedvo[]= new SoapVar($receteTuru,XSD_INT,null,"",'receteTuru');
    $erecetedvo[]= new SoapVar($takipNo,XSD_STRING,null,"",'takipNo');
    $erecetedvo[]= new SoapVar($tcKimlikNo,XSD_LONG,null,"",'tcKimlikNo');
    $erecetedvo[]= new SoapVar($tesisKodu,XSD_STRING,null,"",'tesisKodu');
    $erecetedvo[]= new SoapVar($seriNo,XSD_STRING,null,"",'seriNo');
    $erecetedvo[]= new SoapVar($doktorBransKodu,XSD_INT,null,"",'doktorBransKodu');
    $erecetedvo[]= new SoapVar($doktorSertifikaKodu,XSD_INT,null,"",'doktorSertifikaKodu');
    $erecetedvo[]= new SoapVar($kisidvo,XSD_ANYXML,null,"",'kisiDVO');
    $erecetedvo[]= new SoapVar($ereceteNo,XSD_STRING,null,"",'ereceteNo');
    $erecetedvo[]= new SoapVar($ereceteIlacDVO,XSD_ANYXML,null,"",'ereceteIlacListesi');
    $erecetedvo[]= new SoapVar($ereceteTaniDVO,XSD_ANYXML,null,"",'ereceteTaniListesi');
    $erecetedvo[]= new SoapVar($ereceteAciklamaDVO,XSD_ANYXML,null,"",'ereceteAciklamaListesi');
    $erecetedvo[]= new SoapVar($doktorAdi,XSD_STRING,null,"",'doktorAdi');
    $erecetedvo[]= new SoapVar($doktorSoyadi,XSD_STRING,null,"",'doktorSoyadi');
    $erecetedvo[]= new SoapVar($doktorTcKimlikNo,XSD_LONG,null,"",'doktorTcKimlikNo');
    $parameters = [];
    $parameters[] = new SoapVar($erecetedvo, XSD_ANYXML, null, "", 'ereceteDVO');
    $parameters[] = new SoapVar('11069903', XSD_INT, null, "", 'tesisKodu', '');
    $parameters[] = new SoapVar('99999999990', XSD_STRING, null, "", 'doktorTcKimlikNo');
    $parameter = [
    'arg0' => new SoapVar($parameters, SOAP_ENC_OBJECT)
    ];
    echo json_encode($parameter);
    echo '<br>';
    $results = $client->ereceteGiris($parameter);
    print_r($results);
    }
    catch (SoapFault $e){
    die('ERR: ' . $e->getMessage());
    } ?>





    aldığım hata :
    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 'protokolNo'. One of '{ereceteDVO}' is expected. ) )
    Hiç sormayın, resmen başa bela. Ben de yazdım onlara ama tatmin edici bir dönüş alamamıştım, ne güzel size en azından bir döküman göndermişler ((=
    Ben şimdi forumda konu da açtım, ücretli almak için de bir arayıştayım en kötü. O sırada konuyu çözebilirsem tekrar size de yazarım.
    Sevgiler.
  • 05-01-2018, 12:47:48
    #13
    aslında vermiş olduğum şemada tüm bilgiler mevcut, sadece ilerlediğiniz yol yanlış. ereceteGiriş methodu için istenilen parametreleri aşağıda paylaştım, artık bu örnek üzerinden giderek yapmak istediğiniz tüm methodların parametrelerini sunucuya doğru şekilde gönderirseniz işleminiz gerçekleşecektir.

    <?php
    
    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>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 = [];
    
        $ereceteDVO = [
            'protokolNo' => '1',
            'provizyonTipi' => 1,
            'receteAltTuru' => 1,
            'receteTarihi' => '05.01.2018',
            'receteTuru' => 1,
            'takipNo' => '',
            'tcKimlikNo' => '22222222222',
            'tesisKodu' => '11069903',
            'seriNo' => 1,
            'doktorBransKodu' => 4800,
            'doktorSertifikaKodu' => 0,
    
            'kisiDVO' => new SoapVar([
                'adi' => 'KISI ADI',
                'cinsiyeti' => 'K',
                'dogumTarihi' => '05.05.2009',
                'soyadi' => 1,
                'tcKimlikNo' => '11111111111',
            ], SOAP_ENC_OBJECT),
    
            'ereceteNo' => '',
            'ereceteIlacListesi' => new SoapVar([
                'adet' => 1,
                'barkod' => '8699612000090',
                'ilacAdi' => 'GRIPIN 8 KAPSUL',
                'kullanimDoz1' => 250,
                'kullanimPeriyotBirimi' => 30,
                'kullanimSekli' => 2,
                'ereceteIlacAciklamaListesi' => new SoapVar([
                    'aciklama' => 1,
                    'aciklamaTuru' => 1
                ], SOAP_ENC_OBJECT),
                'kullanimDoz2' => 250,
                'kullanimPeriyot' => 1,
                'geriOdemeKapsaminda' => 'E',
            ], SOAP_ENC_OBJECT),
            'ereceteTaniListesi' => new SoapVar([
                'taniAdi' => 'Kolera',
                'taniKodu' => 'A00',
            ], SOAP_ENC_OBJECT),
            'ereceteAciklamaListesi' => new SoapVar([
                'aciklama' => 1,
                'aciklamaTuru' => 1,
            ], SOAP_ENC_OBJECT),
            'doktorAdi' => 1,
            'doktorSoyadi' => 1,
            'doktorTcKimlikNo' => '99999999990',
        ];
    
    
        $parameters['ereceteDVO'] = new SoapVar($ereceteDVO, SOAP_ENC_OBJECT);
        $parameters['tesisKodu'] =  '11069903';
        $parameters['doktorTcKimlikNo'] =  '99999999990';
    
        $parameter = [
            'arg0' => new SoapVar($parameters, SOAP_ENC_OBJECT)
        ];
    
        $results = $client->ereceteGiris($parameter);
        print_r($results);
    }catch (SoapFault $e){
        die('ERR: ' . $e->getMessage());
    }
    
    ?>
  • 05-01-2018, 14:55:57
    #14
    yassey adlı üyeden alıntı: mesajı görüntüle
    aslında vermiş olduğum şemada tüm bilgiler mevcut, sadece ilerlediğiniz yol yanlış. ereceteGiriş methodu için istenilen parametreleri aşağıda paylaştım, artık bu örnek üzerinden giderek yapmak istediğiniz tüm methodların parametrelerini sunucuya doğru şekilde gönderirseniz işleminiz gerçekleşecektir.

    <?php
    
    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>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 = [];
    
        $ereceteDVO = [
            'protokolNo' => '1',
            'provizyonTipi' => 1,
            'receteAltTuru' => 1,
            'receteTarihi' => '05.01.2018',
            'receteTuru' => 1,
            'takipNo' => '',
            'tcKimlikNo' => '22222222222',
            'tesisKodu' => '11069903',
            'seriNo' => 1,
            'doktorBransKodu' => 4800,
            'doktorSertifikaKodu' => 0,
    
            'kisiDVO' => new SoapVar([
                'adi' => 'KISI ADI',
                'cinsiyeti' => 'K',
                'dogumTarihi' => '05.05.2009',
                'soyadi' => 1,
                'tcKimlikNo' => '11111111111',
            ], SOAP_ENC_OBJECT),
    
            'ereceteNo' => '',
            'ereceteIlacListesi' => new SoapVar([
                'adet' => 1,
                'barkod' => '8699612000090',
                'ilacAdi' => 'GRIPIN 8 KAPSUL',
                'kullanimDoz1' => 250,
                'kullanimPeriyotBirimi' => 30,
                'kullanimSekli' => 2,
                'ereceteIlacAciklamaListesi' => new SoapVar([
                    'aciklama' => 1,
                    'aciklamaTuru' => 1
                ], SOAP_ENC_OBJECT),
                'kullanimDoz2' => 250,
                'kullanimPeriyot' => 1,
                'geriOdemeKapsaminda' => 'E',
            ], SOAP_ENC_OBJECT),
            'ereceteTaniListesi' => new SoapVar([
                'taniAdi' => 'Kolera',
                'taniKodu' => 'A00',
            ], SOAP_ENC_OBJECT),
            'ereceteAciklamaListesi' => new SoapVar([
                'aciklama' => 1,
                'aciklamaTuru' => 1,
            ], SOAP_ENC_OBJECT),
            'doktorAdi' => 1,
            'doktorSoyadi' => 1,
            'doktorTcKimlikNo' => '99999999990',
        ];
    
    
        $parameters['ereceteDVO'] = new SoapVar($ereceteDVO, SOAP_ENC_OBJECT);
        $parameters['tesisKodu'] =  '11069903';
        $parameters['doktorTcKimlikNo'] =  '99999999990';
    
        $parameter = [
            'arg0' => new SoapVar($parameters, SOAP_ENC_OBJECT)
        ];
    
        $results = $client->ereceteGiris($parameter);
        print_r($results);
    }catch (SoapFault $e){
        die('ERR: ' . $e->getMessage());
    }
    
    ?>

    Hocam çok teşekkürler, ellerinize sağlık..
  • 13-01-2018, 02:25:45
    #15
    ferhatgolge adlı üyeden alıntı: mesajı görüntüle
    ozraksy çok güzel sorular. çok teşekkür ederim. aynı hataları ben de almaktayım. bir türlü php tarafında geçemedik bu kısmı. c# da bi yere kadar getirdi arkadaş olayı ama orda da doktor belirtilen tarihte tesiste çalışmamaktadır hatası alıyoruz imzalı e-reçete kısmında. eczane@sgk.gov.tr mail attım gönderdikleri cevap:
    Aşağıdaki formata uygun veri göndermelisiniz

    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ser="http://servisler.ws.eczane.gss.sgk.gov.tr">
    <soapenv:Header/>
    <soapenv:Body>
    <ser:ereceteGiris>
    <!--Optional:-->
    <arg0>
    <ereceteDVO>
    <protokolNo>?</protokolNo>
    <provizyonTipi>?</provizyonTipi>
    <receteAltTuru>?</receteAltTuru>
    <receteTarihi>?</receteTarihi>
    <receteTuru>?</receteTuru>
    <takipNo>?</takipNo>
    <tcKimlikNo>?</tcKimlikNo>
    <tesisKodu>?</tesisKodu>
    <!--Optional:-->
    <seriNo>?</seriNo>
    <doktorBransKodu>?</doktorBransKodu>
    <doktorSertifikaKodu>?</doktorSertifikaKodu>
    <!--Optional:-->
    <kisiDVO>
    <!--Optional:-->
    <adi>?</adi>
    <!--Optional:-->
    <cinsiyeti>?</cinsiyeti>
    <!--Optional:-->
    <dogumTarihi>?</dogumTarihi>
    <!--Optional:-->
    <soyadi>?</soyadi>
    <tcKimlikNo>?</tcKimlikNo>
    </kisiDVO>
    <!--Optional:-->
    <ereceteNo>?</ereceteNo>
    <!--1 or more repetitions:-->
    <ereceteIlacListesi>
    <adet>?</adet>
    <barkod>?</barkod>
    <!--Optional:-->
    <ilacAdi>?</ilacAdi>
    <kullanimDoz1>?</kullanimDoz1>
    <kullanimPeriyotBirimi>?</kullanimPeriyotBirimi>
    <kullanimSekli>?</kullanimSekli>
    <!--Zero or more repetitions:-->
    <ereceteIlacAciklamaListesi>
    <!--Optional:-->
    <aciklama>?</aciklama>
    <aciklamaTuru>?</aciklamaTuru>
    </ereceteIlacAciklamaListesi>
    <kullanimDoz2>?</kullanimDoz2>
    <kullanimPeriyot>?</kullanimPeriyot>
    <!--Optional:-->
    <geriOdemeKapsaminda>?</geriOdemeKapsaminda>
    </ereceteIlacListesi>
    <!--1 or more repetitions:-->
    <ereceteTaniListesi>
    <!--Optional:-->
    <taniAdi>?</taniAdi>
    <taniKodu>?</taniKodu>
    </ereceteTaniListesi>
    <!--Zero or more repetitions:-->
    <ereceteAciklamaListesi>
    <!--Optional:-->
    <aciklama>?</aciklama>
    <aciklamaTuru>?</aciklamaTuru>
    </ereceteAciklamaListesi>
    <!--Optional:-->
    <doktorAdi>?</doktorAdi>
    <!--Optional:-->
    <doktorSoyadi>?</doktorSoyadi>
    <doktorTcKimlikNo>?</doktorTcKimlikNo>
    </ereceteDVO>
    <tesisKodu>?</tesisKodu>
    <doktorTcKimlikNo>?</doktorTcKimlikNo>
    </arg0>
    </ser:ereceteGiris>
    </soapenv:Body>
    </soapenv:Envelope>
    <?php 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>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); $adi=''; $cinsiyeti=''; $dogumTarihi=''; $soyadi=''; $tcKimlikNo='99999999990'; $kisidvo = []; $kisidvo[] = new SoapVar($adi,XSD_STRING,null,"",'adi'); $kisidvo[] = new SoapVar($cinsiyeti,XSD_STRING,null,"",'cinsiyeti') ; $kisidvo[] = new SoapVar($dogumTarihi,XSD_STRING,null,"",'dogumTari hi'); $kisidvo[] = new SoapVar($soyadi,XSD_STRING,null,"",'soyadi'); $kisidvo[] = new SoapVar($tcKimlikNo,XSD_LONG,null,"",'tcKimlikNo') ; $aciklama='Hipertansiyon'; $aciklamaTuru='1'; $ereceteIlacAciklamaDVO = []; $ereceteIlacAciklamaDVO[] = new SoapVar($aciklama,XSD_STRING,null,"",'aciklama'); $ereceteIlacAciklamaDVO[] = new SoapVar($aciklamaTuru,XSD_INT,null,"",'aciklamaTur u'); $adet=1; $barkod='8699786010055'; $ilacAdi='ATACAND PLUS 16 12.5 MG.28 TABLET'; $kullanimDoz1='1'; $kullanimPeriyotBirimi='1'; $kullanimSekli='1'; $kullanimDoz2='1'; $kullanimPeriyot='1'; $geriOdemeKapsaminda='E'; $ereceteIlacDVO = []; $ereceteIlacDVO[] = new SoapVar($adet,XSD_INT,null,"",'adet'); $ereceteIlacDVO[] = new SoapVar($barkod,XSD_LONG,null,"",'barkod'); $ereceteIlacDVO[] = new SoapVar($ilacAdi,XSD_STRING,null,"",'ilacAdi'); $ereceteIlacDVO[] = new SoapVar($kullanimDoz1,XSD_INT,null,"",'kullanimDoz 1'); $ereceteIlacDVO[] = new SoapVar($kullanimPeriyotBirimi,XSD_INT,null,"",'ku llanimPeriyotBirimi'); $ereceteIlacDVO[] = new SoapVar($kullanimSekli,XSD_INT,null,"",'kullanimSe kli'); $ereceteIlacDVO[] = new SoapVar($ereceteIlacAciklamaDVO,XSD_ANYXML,null,"" ,'ereceteIlacAciklamaListesi'); $ereceteIlacDVO[] = new SoapVar($kullanimDoz2,XSD_DOUBLE,null,"",'kullanim Doz2'); $ereceteIlacDVO[] = new SoapVar($kullanimPeriyot,XSD_INT,null,"",'kullanim Periyot'); $ereceteIlacDVO[] = new SoapVar($geriOdemeKapsaminda,XSD_STRING,null,"",'g eriOdemeKapsaminda'); $taniAdi='Hipertansiyon'; $taniKodu='I15'; $ereceteTaniDVO = []; $ereceteTaniDVO[] = new SoapVar($taniAdi,XSD_STRING,null,"",'taniAdi'); $ereceteTaniDVO[] = new SoapVar($taniKodu,XSD_STRING,null,"",'taniKodu'); $ereceteAciklamaDVO=[]; $ereceteAciklamaDVO[] = new SoapVar($aciklama,XSD_STRING,null,"",'aciklama'); $ereceteAciklamaDVO[] = new SoapVar($aciklamaTuru,XSD_INT,null,"",'aciklamaTur u'); $protokolNo='2'; $provizyonTipi='1'; $receteAltTuru='1'; $receteTarihi=date('m.d.Y'); $receteTuru='1'; $takipNo='0'; $tcKimlikNo='99999999990'; $tesisKodu='11069903'; $seriNo=''; $doktorBransKodu='9999'; $doktorSertifikaKodu='0'; $ereceteNo='0'; $doktorAdi='Ferhat'; $doktorSoyadi='Gölge'; $doktorTcKimlikNo='99999999990'; $erecetedvo = []; $erecetedvo[]= new SoapVar($protokolNo,XSD_STRING,null,"",'protokolNo '); $erecetedvo[]= new SoapVar($provizyonTipi,XSD_INT,null,"",'provizyonT ipi'); $erecetedvo[]= new SoapVar($receteAltTuru,XSD_INT,null,"",'receteAltT uru'); $erecetedvo[]= new SoapVar($receteTarihi,XSD_STRING,null,"",'receteTa rihi'); $erecetedvo[]= new SoapVar($receteTuru,XSD_INT,null,"",'receteTuru'); $erecetedvo[]= new SoapVar($takipNo,XSD_STRING,null,"",'takipNo'); $erecetedvo[]= new SoapVar($tcKimlikNo,XSD_LONG,null,"",'tcKimlikNo') ; $erecetedvo[]= new SoapVar($tesisKodu,XSD_STRING,null,"",'tesisKodu') ; $erecetedvo[]= new SoapVar($seriNo,XSD_STRING,null,"",'seriNo'); $erecetedvo[]= new SoapVar($doktorBransKodu,XSD_INT,null,"",'doktorBr ansKodu'); $erecetedvo[]= new SoapVar($doktorSertifikaKodu,XSD_INT,null,"",'dokt orSertifikaKodu'); $erecetedvo[]= new SoapVar($kisidvo,XSD_ANYXML,null,"",'kisiDVO'); $erecetedvo[]= new SoapVar($ereceteNo,XSD_STRING,null,"",'ereceteNo') ; $erecetedvo[]= new SoapVar($ereceteIlacDVO,XSD_ANYXML,null,"",'erecet eIlacListesi'); $erecetedvo[]= new SoapVar($ereceteTaniDVO,XSD_ANYXML,null,"",'erecet eTaniListesi'); $erecetedvo[]= new SoapVar($ereceteAciklamaDVO,XSD_ANYXML,null,"",'er eceteAciklamaListesi'); $erecetedvo[]= new SoapVar($doktorAdi,XSD_STRING,null,"",'doktorAdi') ; $erecetedvo[]= new SoapVar($doktorSoyadi,XSD_STRING,null,"",'doktorSo yadi'); $erecetedvo[]= new SoapVar($doktorTcKimlikNo,XSD_LONG,null,"",'doktor TcKimlikNo'); $parameters = []; $parameters[] = new SoapVar($erecetedvo, XSD_ANYXML, null, "", 'ereceteDVO'); $parameters[] = new SoapVar('11069903', XSD_INT, null, "", 'tesisKodu', ''); $parameters[] = new SoapVar('99999999990', XSD_STRING, null, "", 'doktorTcKimlikNo'); $parameter = [ 'arg0' => new SoapVar($parameters, SOAP_ENC_OBJECT) ]; echo json_encode($parameter); echo '<br>'; $results = $client->ereceteGiris($parameter); print_r($results); } catch (SoapFault $e){ die('ERR: ' . $e->getMessage()); } ?>





    aldığım hata :
    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 'protokolNo'. One of '{ereceteDVO}' is expected. ) )
    @yassey in son koduyla test ortamında hem yeni reçete, hem aktif ilaç ve hem de reçete silme işlemlerini başarıyla tamamladım ama gerçek ortama geçince
    ERR: SOAP-ERROR: Parsing WSDL: Couldn't load from 'https://medeczane.sgk.gov.tr/medula/eczane/saglikTesisiYardimciIslemleriWS?wsdl' : Start tag expected, '<' not found
    şeklinde hata alıyorum. SGK'ya yazdım, gönderdiğiniz talebi atın dediler, attım ama dönüş yapmadılar. Sizin de başınıza böyle bir şey geldi mi acaba?
    İnternette bir yerlerde, TLS1.2 ile ilgili olduğu yazıyor ama şu anda kullandığım iletişim TLS1.2 imiş servis sağlayıcının söylediğine göre.
    Sevgiler.
  • 17-01-2018, 14:53:15
    #16
    @ozraksy aynen yolladığın hatayı alıyorum hala. C#'da herhangi bir problem olamamasına rağmen php tarafında test ortamında da herhangi bir problem olmamasına rağmen canlı ortamda bu hata gelmekte.
    hadi kolay gelsin.
  • 17-01-2018, 15:31:37
    #17
    ferhatgolge adlı üyeden alıntı: mesajı görüntüle
    @ozraksy aynen yolladığın hatayı alıyorum hala. C#'da herhangi bir problem olamamasına rağmen php tarafında test ortamında da herhangi bir problem olmamasına rağmen canlı ortamda bu hata gelmekte.
    hadi kolay gelsin.
    @yassey sağolsun, yine yardımcı oldu. Canlı sistem üzerinden, bizim doktorun bilgileriyle başarıyla sisteme ereçete gönderdi. Ancak ben hala aynı hatayı alıyorum aynı kod betiğiyle. Bu durumdan çıkarımım şu, bizim serverlarımızdaki componentlerde bir sorun var, ya da bu TLS1.2 olayımızda bir sorun var. Ben çözemiyorum sorunu, bakalım hosting firmasından destek almaya çalışacağım. Umarım birlikte bir çözüme ulaşabiliriz, hem daha sonra buraya aynı dertlerden geleceklere de Türkçe bir kaynak olmuş olur.
    Kolay gelsin, sevgiler.
  • 19-01-2018, 12:44:36
    #18
    Merhaba,
    Şimdi bu TLS1.2 geçişi ile bizim istek gönderdiğimiz adresin https mi olması gerekiyor? host firmasından ssl sertifika mı almam lazım yoksa host firması sunucularda bir ayar mı yapması gerekiyor? durumu tam olarak anlayamadım.
    yardımlarınız için teşekkürler.