Şimdi Ara

PHP ile Web Service Nasıl HTML Olarak Yazdırırım?

Daha Fazla
Bu Konudaki Kullanıcılar: Daha Az
1 Misafir - 1 Masaüstü
5 sn
4
Cevap
0
Favori
483
Tıklama
Daha Fazla
İstatistik
  • Konu İstatistikleri Yükleniyor
0 oy
Öne Çıkar
Sayfa: 1
Giriş
Mesaj
  • İstemci olarak PHP ile aşağıdaki wev servisten veri çekip HTML olarak ekrana yazdırmam gerekiyor bu konuda bana yardımcı olur musunuz? Şimdiden teşekkürler.

    WSDL Cıktısı:

     
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <definitions xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:tns="http://localhost/bekad/wservice/index.php" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns="http://schemas.xmlsoap.org/wsdl/" targetNamespace="http://localhost/bekad/wservice/index.php">
    <types>
    <xsd:schema targetNamespace="http://localhost/bekad/wservice/index.php"
    >
    <xsd:import namespace="http://schemas.xmlsoap.org/soap/encoding/" />
    <xsd:import namespace="http://schemas.xmlsoap.org/wsdl/" />
    <xsd:complexType name="duyuru">
    <xsd:all>
    <xsd:element name="id" type="xsd:int"/>
    <xsd:element name="baslik" type="xsd:string"/>
    <xsd:element name="tarih" type="xsd:string"/>
    </xsd:all>
    </xsd:complexType>
    <xsd:complexType name="duyurular">
    <xsd:complexContent>
    <xsd:restriction base="SOAP-ENC:Array">
    <xsd:attribute ref="SOAP-ENC:arrayType" wsdl:arrayType="tns:duyuru[]"/>
    </xsd:restriction>
    </xsd:complexContent>
    </xsd:complexType>
    <xsd:complexType name="seminer">
    <xsd:all>
    <xsd:element name="id" type="xsd:int"/>
    <xsd:element name="baslik" type="xsd:string"/>
    <xsd:element name="kisaaciklama" type="xsd:string"/>
    <xsd:element name="foto" type="xsd:string"/>
    </xsd:all>
    </xsd:complexType>
    <xsd:complexType name="seminerler">
    <xsd:complexContent>
    <xsd:restriction base="SOAP-ENC:Array">
    <xsd:attribute ref="SOAP-ENC:arrayType" wsdl:arrayType="tns:seminer[]"/>
    </xsd:restriction>
    </xsd:complexContent>
    </xsd:complexType>
    <xsd:complexType name="seminerfotograf">
    <xsd:all>
    <xsd:element name="fotograf" type="xsd:string"/>
    </xsd:all>
    </xsd:complexType>
    <xsd:complexType name="seminerfotolar">
    <xsd:complexContent>
    <xsd:restriction base="SOAP-ENC:Array">
    <xsd:attribute ref="SOAP-ENC:arrayType" wsdl:arrayType="tns:seminerfotograf[]"/>
    </xsd:restriction>
    </xsd:complexContent>
    </xsd:complexType>
    <xsd:complexType name="duyurudetay">
    <xsd:all>
    <xsd:element name="id" type="xsd:int"/>
    <xsd:element name="baslik" type="xsd:string"/>
    <xsd:element name="tarih" type="xsd:string"/>
    <xsd:element name="icerik" type="xsd:string"/>
    </xsd:all>
    </xsd:complexType>
    <xsd:complexType name="makale">
    <xsd:all>
    <xsd:element name="id" type="xsd:int"/>
    <xsd:element name="baslik" type="xsd:string"/>
    <xsd:element name="yazar" type="xsd:string"/>
    <xsd:element name="tarih" type="xsd:string"/>
    </xsd:all>
    </xsd:complexType>
    <xsd:complexType name="makaleler">
    <xsd:complexContent>
    <xsd:restriction base="SOAP-ENC:Array">
    <xsd:attribute ref="SOAP-ENC:arrayType" wsdl:arrayType="tns:makale[]"/>
    </xsd:restriction>
    </xsd:complexContent>
    </xsd:complexType>
    <xsd:complexType name="makaledetay">
    <xsd:all>
    <xsd:element name="id" type="xsd:int"/>
    <xsd:element name="baslik" type="xsd:string"/>
    <xsd:element name="yazar" type="xsd:string"/>
    <xsd:element name="tarih" type="xsd:string"/>
    <xsd:element name="icerik" type="xsd:string"/>
    </xsd:all>
    </xsd:complexType>
    <xsd:complexType name="kitapdetay">
    <xsd:all>
    <xsd:element name="id" type="xsd:int"/>
    <xsd:element name="baslik" type="xsd:string"/>
    <xsd:element name="fiyat" type="xsd:string"/>
    <xsd:element name="fotograf" type="xsd:string"/>
    <xsd:element name="icerik" type="xsd:string"/>
    </xsd:all>
    </xsd:complexType>
    <xsd:complexType name="kitap">
    <xsd:all>
    <xsd:element name="id" type="xsd:int"/>
    <xsd:element name="baslik" type="xsd:string"/>
    <xsd:element name="fiyat" type="xsd:string"/>
    <xsd:element name="fotograf" type="xsd:string"/>
    </xsd:all>
    </xsd:complexType>
    <xsd:complexType name="kitaplar">
    <xsd:complexContent>
    <xsd:restriction base="SOAP-ENC:Array">
    <xsd:attribute ref="SOAP-ENC:arrayType" wsdl:arrayType="tns:kitap[]"/>
    </xsd:restriction>
    </xsd:complexContent>
    </xsd:complexType>
    </xsd:schema>
    </types>
    <message name="duyurulisteRequest">
    <part name="duyurusayisi" type="xsd:int" /></message>
    <message name="duyurulisteResponse">
    <part name="return" type="tns:duyurular" /></message>
    <message name="seminerlisteRequest"></message>
    <message name="seminerlisteResponse">
    <part name="return" type="tns:seminerler" /></message>
    <message name="seminerfotolariRequest">
    <part name="seminerid" type="xsd:int" /></message>
    <message name="seminerfotolariResponse">
    <part name="return" type="tns:seminerfotolar" /></message>
    <message name="makalelisteRequest"></message>
    <message name="makalelisteResponse">
    <part name="return" type="tns:makaleler" /></message>
    <message name="kitaplisteRequest"></message>
    <message name="kitaplisteResponse">
    <part name="return" type="tns:kitaplar" /></message>
    <message name="dernegimiz_hakkindaRequest"></message>
    <message name="dernegimiz_hakkindaResponse">
    <part name="return" type="xsd:string" /></message>
    <message name="danismanlikRequest"></message>
    <message name="danismanlikResponse">
    <part name="return" type="xsd:string" /></message>
    <message name="etik_degerlerimizRequest"></message>
    <message name="etik_degerlerimizResponse">
    <part name="return" type="xsd:string" /></message>
    <message name="hizmet_ici_ozel_egitimRequest"></message>
    <message name="hizmet_ici_ozel_egitimResponse">
    <part name="return" type="xsd:string" /></message>
    <message name="iletisimRequest"></message>
    <message name="iletisimResponse">
    <part name="return" type="xsd:string" /></message>
    <message name="dergiRequest"></message>
    <message name="dergiResponse">
    <part name="return" type="xsd:string" /></message>
    <message name="referanslarRequest"></message>
    <message name="referanslarResponse">
    <part name="return" type="xsd:string" /></message>
    <message name="tamamlanmisseminerlerRequest"></message>
    <message name="tamamlanmisseminerlerResponse">
    <part name="return" type="xsd:string" /></message>
    <message name="seminergosterRequest">
    <part name="seminerid" type="xsd:int" /></message>
    <message name="seminergosterResponse">
    <part name="return" type="xsd:string" /></message>
    <message name="duyurugosterRequest">
    <part name="duyuruid" type="xsd:int" /></message>
    <message name="duyurugosterResponse">
    <part name="return" type="tns:duyurudetay" /></message>
    <message name="makalegosterRequest">
    <part name="makaleid" type="xsd:int" /></message>
    <message name="makalegosterResponse">
    <part name="return" type="tns:makaledetay" /></message>
    <message name="kitapgosterRequest">
    <part name="kitapid" type="xsd:int" /></message>
    <message name="kitapgosterResponse">
    <part name="return" type="tns:kitapdetay" /></message>
    <portType name="bekadorgwsdlPortType">
    <operation name="duyuruliste">
    <documentation>istenen sayida duyuruyu multi dimension array olarak listeler parametre olarak listelenecek duyuru sayisini alir cikti: id, baslik, tarih</documentation>
    <input message="tns:duyurulisteRequest"/>
    <output message="tns:duyurulisteResponse"/>
    </operation>
    <operation name="seminerliste">
    <documentation>aktif olan seminerleri multi dimension array olarak listeler cikti: id, baslik, kisaaciklama, foto</documentation>
    <input message="tns:seminerlisteRequest"/>
    <output message="tns:seminerlisteResponse"/>
    </operation>
    <operation name="seminerfotolari">
    <documentation>Id si verilen seminere ait fotoğrafları array olarak döndürür</documentation>
    <input message="tns:seminerfotolariRequest"/>
    <output message="tns:seminerfotolariResponse"/>
    </operation>
    <operation name="makaleliste">
    <documentation>Makaleleri multi dimension array olarak listeler cikti: id, baslik, yazar, tarih</documentation>
    <input message="tns:makalelisteRequest"/>
    <output message="tns:makalelisteResponse"/>
    </operation>
    <operation name="kitapliste">
    <documentation>Kitaplari multi dimension array olarak listeler cikti: id, baslik, fiyat, fotograf</documentation>
    <input message="tns:kitaplisteRequest"/>
    <output message="tns:kitaplisteResponse"/>
    </operation>
    <operation name="dernegimiz_hakkinda">
    <documentation>Hakkimizda sayfasi icerigini html olarak verir</documentation>
    <input message="tns:dernegimiz_hakkindaRequest"/>
    <output message="tns:dernegimiz_hakkindaResponse"/>
    </operation>
    <operation name="danismanlik">
    <documentation>Danismanlik sayfasi icerigini html olarak verir</documentation>
    <input message="tns:danismanlikRequest"/>
    <output message="tns:danismanlikResponse"/>
    </operation>
    <operation name="etik_degerlerimiz">
    <documentation>Etik Degerleriniz sayfasi icerigini html olarak verir</documentation>
    <input message="tns:etik_degerlerimizRequest"/>
    <output message="tns:etik_degerlerimizResponse"/>
    </operation>
    <operation name="hizmet_ici_ozel_egitim">
    <documentation>Hizmet ici ozel egitim sayfasi icerigini html olarak verir</documentation>
    <input message="tns:hizmet_ici_ozel_egitimRequest"/>
    <output message="tns:hizmet_ici_ozel_egitimResponse"/>
    </operation>
    <operation name="iletisim">
    <documentation>Iletisim sayfasi icerigini html olarak verir</documentation>
    <input message="tns:iletisimRequest"/>
    <output message="tns:iletisimResponse"/>
    </operation>
    <operation name="dergi">
    <documentation>Dergi sayfasi icerigini html olarak verir</documentation>
    <input message="tns:dergiRequest"/>
    <output message="tns:dergiResponse"/>
    </operation>
    <operation name="referanslar">
    <documentation>Referanslar sayfasi icerigini html olarak verir</documentation>
    <input message="tns:referanslarRequest"/>
    <output message="tns:referanslarResponse"/>
    </operation>
    <operation name="tamamlanmisseminerler">
    <documentation>Tamamlanmis seminerler sayfasi icerigini html olarak verir</documentation>
    <input message="tns:tamamlanmisseminerlerRequest"/>
    <output message="tns:tamamlanmisseminerlerResponse"/>
    </operation>
    <operation name="seminergoster">
    <documentation>Id degeri verilen seminerlerin detay bilgisini html olarak verir</documentation>
    <input message="tns:seminergosterRequest"/>
    <output message="tns:seminergosterResponse"/>
    </operation>
    <operation name="duyurugoster">
    <documentation>Id degeri verilen duyurunun bilgilerini getirir</documentation>
    <input message="tns:duyurugosterRequest"/>
    <output message="tns:duyurugosterResponse"/>
    </operation>
    <operation name="makalegoster">
    <documentation>Id degeri verilen makalenin bilgilerini getirir</documentation>
    <input message="tns:makalegosterRequest"/>
    <output message="tns:makalegosterResponse"/>
    </operation>
    <operation name="kitapgoster">
    <documentation>Id degeri verilen kitabin bilgilerini getirir</documentation>
    <input message="tns:kitapgosterRequest"/>
    <output message="tns:kitapgosterResponse"/>
    </operation>
    </portType>
    <binding name="bekadorgwsdlBinding" type="tns:bekadorgwsdlPortType">
    <soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
    <operation name="duyuruliste">
    <soap:operation soapAction="http://localhost/bekad/wservice/index.php#duyuruliste" style="rpc"/>
    <input><soap:body use="encoded" namespace="http://localhost/bekad/wservice/index.php" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/></input>
    <output><soap:body use="encoded" namespace="http://localhost/bekad/wservice/index.php" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/></output>
    </operation>
    <operation name="seminerliste">
    <soap:operation soapAction="http://localhost/bekad/wservice/index.php#seminerliste" style="rpc"/>
    <input><soap:body use="encoded" namespace="http://localhost/bekad/wservice/index.php" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/></input>
    <output><soap:body use="encoded" namespace="http://localhost/bekad/wservice/index.php" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/></output>
    </operation>
    <operation name="seminerfotolari">
    <soap:operation soapAction="http://localhost/bekad/wservice/index.php#seminerfotolari" style="rpc"/>
    <input><soap:body use="encoded" namespace="http://localhost/bekad/wservice/index.php" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/></input>
    <output><soap:body use="encoded" namespace="http://localhost/bekad/wservice/index.php" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/></output>
    </operation>
    <operation name="makaleliste">
    <soap:operation soapAction="http://localhost/bekad/wservice/index.php#makaleliste" style="rpc"/>
    <input><soap:body use="encoded" namespace="http://localhost/bekad/wservice/index.php" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/></input>
    <output><soap:body use="encoded" namespace="http://localhost/bekad/wservice/index.php" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/></output>
    </operation>
    <operation name="kitapliste">
    <soap:operation soapAction="http://localhost/bekad/wservice/index.php#kitapliste" style="rpc"/>
    <input><soap:body use="encoded" namespace="http://localhost/bekad/wservice/index.php" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/></input>
    <output><soap:body use="encoded" namespace="http://localhost/bekad/wservice/index.php" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/></output>
    </operation>
    <operation name="dernegimiz_hakkinda">
    <soap:operation soapAction="http://localhost/bekad/wservice/index.php#dernegimiz_hakkinda" style="rpc"/>
    <input><soap:body use="encoded" namespace="http://localhost/bekad/wservice/index.php" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/></input>
    <output><soap:body use="encoded" namespace="http://localhost/bekad/wservice/index.php" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/></output>
    </operation>
    <operation name="danismanlik">
    <soap:operation soapAction="http://localhost/bekad/wservice/index.php#danismanlik" style="rpc"/>
    <input><soap:body use="encoded" namespace="http://localhost/bekad/wservice/index.php" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/></input>
    <output><soap:body use="encoded" namespace="http://localhost/bekad/wservice/index.php" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/></output>
    </operation>
    <operation name="etik_degerlerimiz">
    <soap:operation soapAction="http://localhost/bekad/wservice/index.php#etik_degerlerimiz" style="rpc"/>
    <input><soap:body use="encoded" namespace="http://localhost/bekad/wservice/index.php" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/></input>
    <output><soap:body use="encoded" namespace="http://localhost/bekad/wservice/index.php" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/></output>
    </operation>
    <operation name="hizmet_ici_ozel_egitim">
    <soap:operation soapAction="http://localhost/bekad/wservice/index.php#hizmet_ici_ozel_egitim" style="rpc"/>
    <input><soap:body use="encoded" namespace="http://localhost/bekad/wservice/index.php" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/></input>
    <output><soap:body use="encoded" namespace="http://localhost/bekad/wservice/index.php" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/></output>
    </operation>
    <operation name="iletisim">
    <soap:operation soapAction="http://localhost/bekad/wservice/index.php#iletisim" style="rpc"/>
    <input><soap:body use="encoded" namespace="http://localhost/bekad/wservice/index.php" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/></input>
    <output><soap:body use="encoded" namespace="http://localhost/bekad/wservice/index.php" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/></output>
    </operation>
    <operation name="dergi">
    <soap:operation soapAction="http://localhost/bekad/wservice/index.php#dergi" style="rpc"/>
    <input><soap:body use="encoded" namespace="http://localhost/bekad/wservice/index.php" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/></input>
    <output><soap:body use="encoded" namespace="http://localhost/bekad/wservice/index.php" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/></output>
    </operation>
    <operation name="referanslar">
    <soap:operation soapAction="http://localhost/bekad/wservice/index.php#referanslar" style="rpc"/>
    <input><soap:body use="encoded" namespace="http://localhost/bekad/wservice/index.php" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/></input>
    <output><soap:body use="encoded" namespace="http://localhost/bekad/wservice/index.php" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/></output>
    </operation>
    <operation name="tamamlanmisseminerler">
    <soap:operation soapAction="http://localhost/bekad/wservice/index.php#tamamlanmisseminerler" style="rpc"/>
    <input><soap:body use="encoded" namespace="http://localhost/bekad/wservice/index.php" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/></input>
    <output><soap:body use="encoded" namespace="http://localhost/bekad/wservice/index.php" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/></output>
    </operation>
    <operation name="seminergoster">
    <soap:operation soapAction="http://localhost/bekad/wservice/index.php#seminergoster" style="rpc"/>
    <input><soap:body use="encoded" namespace="http://localhost/bekad/wservice/index.php" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/></input>
    <output><soap:body use="encoded" namespace="http://localhost/bekad/wservice/index.php" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/></output>
    </operation>
    <operation name="duyurugoster">
    <soap:operation soapAction="http://localhost/bekad/wservice/index.php#duyurugoster" style="rpc"/>
    <input><soap:body use="encoded" namespace="http://localhost/bekad/wservice/index.php" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/></input>
    <output><soap:body use="encoded" namespace="http://localhost/bekad/wservice/index.php" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/></output>
    </operation>
    <operation name="makalegoster">
    <soap:operation soapAction="http://localhost/bekad/wservice/index.php#makalegoster" style="rpc"/>
    <input><soap:body use="encoded" namespace="http://localhost/bekad/wservice/index.php" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/></input>
    <output><soap:body use="encoded" namespace="http://localhost/bekad/wservice/index.php" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/></output>
    </operation>
    <operation name="kitapgoster">
    <soap:operation soapAction="http://localhost/bekad/wservice/index.php#kitapgoster" style="rpc"/>
    <input><soap:body use="encoded" namespace="http://localhost/bekad/wservice/index.php" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/></input>
    <output><soap:body use="encoded" namespace="http://localhost/bekad/wservice/index.php" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/></output>
    </operation>
    </binding>
    <service name="bekadorgwsdl">
    <port name="bekadorgwsdlPort" binding="tns:bekadorgwsdlBinding">
    <soap:address location="http://bekad.org/wservice/index.php"/>
    </port>
    </service>
    </definitions>







  • Simple XML kütüphanesini kullanabilirsin yada burada adım adım anlatıyor

    http://ww w.w3schools.com/php/php_xml_simplexml.asp
  • teşekkürler başlangıç için iyi oldu ancak bu şekilde denediğim zaman veriler boş dönüyor. Sanırım biraz daha konuyu derinleştirirsek ihtiyacım olan SoapUI olan bir web service dosyayı yazdıracağım ile ilgili bir makale
  • Bu kod ile parametreleri çekiyoruz:

    <meta http-equiv="Content-Type" content="text/HTML; charset=utf-8" /> 
    <?php

    // wsdl cache 'ini devre disi birak
    ini_set("soap.wsdl_cache_enabled", "0");

    try {

    // SOAPClient nesnesi olustur ve trace modunu ac
    $client = new SoapClient("http://bekad.org/wservice/index.php?wsdl", array("trace" => 1));

    // Metodlari ekrana bas
    echo "Karsi sunucudaki kullanilabilir metodlar:<br/><pre>";
    // Karsi sunucudaki kullanilabilir metodlari listele
    $allMethods = $client->__getFunctions();
    print_r($allMethods);
    echo "</pre>";

    echo "<br/><br/><br/>";

    // SOAPClient uzerinden karsi sunucudaki seminerliste metodunu cagir
    $seminerliste = $client->seminerliste();

    echo "seminerliste metodunun sonucu asagidadir.<br/>";
    echo "<pre>";
    // Sonucu ekrana bas
    var_dump($seminerliste);
    echo "</pre>";

    echo "<br/><br/><br/>";

    // Son istegi ekrana bas
    echo "Son yapilan istek asagidadir<br/><pre>";
    echo htmlentities($client->__getLastRequest());
    echo "</pre>";

    echo "<br/><br/><br/>";

    // Son istegin header kismini ekrana bas
    echo "Son yapilan istegin header kismi<br/><pre>";
    echo htmlentities($client->__getLastRequestHeaders());
    echo "</pre>";

    echo "<br/><br/><br/>";

    // Son yapilan istege sunucunun verdigi yanit
    echo "Son yapilan metod cagrisinin yaniti<br/><pre>";
    echo htmlentities($client->__getLastResponse());
    echo "</pre>";

    echo "<br/><br/><br/>";

    // Son yapilan istege sunucunun verdigi yanitin header kismi
    echo "Son yapilan metod cagrisinin yanitinin header kismi<br/><pre>";
    echo htmlentities($client->__getLastResponseHeaders());
    echo "</pre>";

    echo "<br/><br/><br/>";
    } catch (Exception $exc) { // Hata olusursa yakala
    echo "Soap Hatasi Olustu: " . $exc->getMessage();
    }
    ?>


    Ardından her bir parametre için aşağıdaki kodu düzenliyoruz ve web service görüntülerini ayrı ayrı sayfalarda JSON'a dönüştürmüş oluyoruz.

    <meta http-equiv="Content-Type" content="text/HTML; charset=utf-8" /> 
    <?php

    // wsdl cache 'ini devre disi birak
    ini_set("soap.wsdl_cache_enabled", "0");

    try {

    // SOAPClient nesnesi olustur
    $client = new SoapClient("http://bekad.org/wservice/index.php?wsdl");

    // SOAPClient uzerinden karsi sunucudaki danismanlik metodunu cagir
    $danismanliks = $client->danismanlik();

    echo "danismanliks Metodu basarili bir sekilde calistirildi.<br/>Sonuc asagidadir.<br/>";

    echo "<pre>";
    // Sonucu ekrana bas
    var_dump($danismanliks);
    echo "</pre>";
    } catch (Exception $exc) { // Hata olusursa yakala
    echo "Soap Hatasi Olustu: " . $exc->getMessage();
    }
    ?>


    Bundan sonrasında bir de HTML olarak aktarmak kalıyor onu da yarın bakacağım :)




  • 
Sayfa: 1
- x
Bildirim
mesajınız kopyalandı (ctrl+v) yapıştırmak istediğiniz yere yapıştırabilirsiniz.