İyinet'e Hoşgeldiniz!

Türkiye'nin En Eski Webmaster Forum'una Hemen Kayıt Olun!

Kayıt Ol!

directi api gönderimi bilgi.

bestcam

0
İyinet Üyesi
Katılım
1 Aralık 2007
Mesajlar
48
Reaction score
0
Konum
istanbul-ümr
Merhaba arkadarşar directi api kullanıcamda üstdeki "XML Sent" sorgusunu "http://api.onlyfordemo.net/anacreon/servlet/APIv3" gönderdiğimde alttaki "XML Received" karşılıgını nasıl alacagım bitürlü yapamadım bununla ilgili bilgi verebilirmisiniz.
En altta yazdıgım kodu bitürlü çalıştıramadım sorun ne acaba?


XML Sent:
HTML:
POST /anacreon/servlet/APIv3 HTTP/1.0
User-Agent: NuSOAP/0.6.6
Host: www.myorderbox.com:80
Content-Type: text/xml; charset=UTF-8
SOAPAction: ""
Content-Length: 1114

<?xml version="1.0" encoding="UTF-8"?><SOAP-ENV:Envelope SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"  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:si="http://soapinterop.org/xsd"  xmlns:impl="com.logicboxes.foundation.sfnb.order.DomOrder"><SOAP-ENV:Body><impl:checkAvailabilityMultiple><userName xsi:type="xsd:string">[email protected]</userName><password xsi:type="xsd:string">123456</password><role xsi:type="xsd:string">reseller</role><langpref xsi:type="xsd:string">tr</langpref><parentid xsi:type="xsd:int">45716</parentid><domainNames xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="xsd:string[1]"><item xsi:type="xsd:string">domain-adi</item></domainNames><tlds xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="xsd:string[1]"><item xsi:type="xsd:string">com</item></tlds><suggestAlternative xsi:type="xsd:boolean">true</suggestAlternative></impl:checkAvailabilityMultiple></SOAP-ENV:Body></SOAP-ENV:Envelope>


XML Received:
HTML:
HTTP/1.0 200 OK
Server: Resin/3.1.3
Content-Type: text/xml; charset=utf-8
Date: Wed, 15 Oct 2008 23:11:33 GMT

<?xml version="1.0" encoding="UTF-8"?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><soapenv:Body><ns1:checkAvailabilityMultipleResponse soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns1="com.logicboxes.foundation.sfnb.order.DomOrder"><ns2:Map href="#id0" xmlns:ns2="http://xml.apache.org/xml-soap"/></ns1:checkAvailabilityMultipleResponse><multiRef id="id0" soapenc:root="0" soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xsi:type="ns3:Map" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns3="http://xml.apache.org/xml-soap"><item><key xsi:type="xsd:string">domain-adi.com</key><value href="#id1"/></item><item><key xsi:type="xsd:string">domain-adi</key><value href="#id2"/></item></multiRef><multiRef id="id1" soapenc:root="0" soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xsi:type="ns4:Map" xmlns:ns4="http://xml.apache.org/xml-soap" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"><item><key xsi:type="xsd:string">status</key><value xsi:type="xsd:string">regthroughothers</value></item><item><key xsi:type="xsd:string">classkey</key><value xsi:type="xsd:string">domcno</value></item></multiRef><multiRef id="id2" soapenc:root="0" soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xsi:type="ns5:Map" xmlns:ns5="http://xml.apache.org/xml-soap" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"><item><key xsi:type="xsd:string">The0Adi</key><value href="#id3"/></item><item><key xsi:type="xsd:string">Domain0Direct</key><value href="#id4"/></item><item><key xsi:type="xsd:string">DomainRegistrationAdi</key><value href="#id5"/></item><item><key xsi:type="xsd:string">BestDomainPlus</key><value href="#id6"/></item><item><key xsi:type="xsd:string">YourDomainHunter</key><value href="#id7"/></item><item><key xsi:type="xsd:string">Super0Adi</key><value href="#id8"/></item><item><key xsi:type="xsd:string">DomainRegisterAdi</key><value href="#id9"/></item><item><key xsi:type="xsd:string">SuperDomainManager</key><value href="#id10"/></item><item><key xsi:type="xsd:string">NewDomainWorld</key><value href="#id11"/></item><item><key xsi:type="xsd:string">DomainHostingAdi</key><value href="#id12"/></item><item><key xsi:type="xsd:string">TheZionDomain</key><value href="#id13"/></item><item><key xsi:type="xsd:string">Domain0AdiRonda</key><value href="#id14"/></item><item><key xsi:type="xsd:string">Your0Adi</key><value href="#id15"/></item><item><key xsi:type="xsd:string">Domain0Online</key><value href="#id16"/></item><item><key xsi:type="xsd:string">Domain0Adi</key><value href="#id17"/></item><item><key xsi:type="xsd:string">Best0Adi</key><value href="#id18"/></item><item><key xsi:type="xsd:string">DomainSiteShop</key><value href="#id19"/></item><item><key xsi:type="xsd:string">GreatDomainRental</key><value href="#id20"/></item><item><key xsi:type="xsd:string">Domain0World</key><value href="#id21"/></item><item><key xsi:type="xsd:string">DomainNamesAdi</key><value href="#id22"/></item></multiRef><multiRef id="id14" soapenc:root="0" soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xsi:type="ns6:Map" xmlns:ns6="http://xml.apache.org/xml-soap" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"><item><key xsi:type="xsd:string">com</key><value xsi:type="xsd:string">available</value></item></multiRef><multiRef id="id3" soapenc:root="0" soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xsi:type="ns7:Map" xmlns:ns7="http://xml.apache.org/xml-soap" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"><item><key xsi:type="xsd:string">com</key><value xsi:type="xsd:string">available</value></item></multiRef><multiRef id="id13" soapenc:root="0" soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xsi:type="ns8:Map" xmlns:ns8="http://xml.apache.org/xml-soap" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"><item><key xsi:type="xsd:string">com</key><value xsi:type="xsd:string">available</value></item></multiRef><multiRef id="id19" soapenc:root="0" soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xsi:type="ns9:Map" xmlns:ns9="http://xml.apache.org/xml-soap" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"><item><key xsi:type="xsd:string">com</key><value xsi:type="xsd:string">available</value></item></multiRef><multiRef id="id10" soapenc:root="0" soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xsi:type="ns10:Map" xmlns:ns10="http://xml.apache.org/xml-soap" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"><item><key xsi:type="xsd:string">com</key><value xsi:type="xsd:string">available</value></item></multiRef><multiRef id="id22" soapenc:root="0" soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xsi:type="ns11:Map" xmlns:ns11="http://xml.apache.org/xml-soap" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"><item><key xsi:type="xsd:string">com</key><value xsi:type="xsd:string">available</value></item></multiRef><multiRef id="id5" soapenc:root="0" soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xsi:type="ns12:Map" xmlns:ns12="http://xml.apache.org/xml-soap" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"><item><key xsi:type="xsd:string">com</key><value xsi:type="xsd:string">available</value></item></multiRef><multiRef id="id6" soapenc:root="0" soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xsi:type="ns13:Map" xmlns:ns13="http://xml.apache.org/xml-soap" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"><item><key xsi:type="xsd:string">com</key><value xsi:type="xsd:string">available</value></item></multiRef><multiRef id="id7" soapenc:root="0" soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xsi:type="ns14:Map" xmlns:ns14="http://xml.apache.org/xml-soap" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"><item><key xsi:type="xsd:string">com</key><value xsi:type="xsd:string">available</value></item></multiRef><multiRef id="id12" soapenc:root="0" soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xsi:type="ns15:Map" xmlns:ns15="http://xml.apache.org/xml-soap" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"><item><key xsi:type="xsd:string">com</key><value xsi:type="xsd:string">available</value></item></multiRef><multiRef id="id17" soapenc:root="0" soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xsi:type="ns16:Map" xmlns:ns16="http://xml.apache.org/xml-soap" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"><item><key xsi:type="xsd:string">com</key><value xsi:type="xsd:string">available</value></item></multiRef><multiRef id="id16" soapenc:root="0" soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xsi:type="ns17:Map" xmlns:ns17="http://xml.apache.org/xml-soap" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"><item><key xsi:type="xsd:string">com</key><value xsi:type="xsd:string">available</value></item></multiRef><multiRef id="id8" soapenc:root="0" soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xsi:type="ns18:Map" xmlns:ns18="http://xml.apache.org/xml-soap" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"><item><key xsi:type="xsd:string">com</key><value xsi:type="xsd:string">available</value></item></multiRef><multiRef id="id11" soapenc:root="0" soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xsi:type="ns19:Map" xmlns:ns19="http://xml.apache.org/xml-soap" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"><item><key xsi:type="xsd:string">com</key><value xsi:type="xsd:string">available</value></item></multiRef><multiRef id="id15" soapenc:root="0" soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xsi:type="ns20:Map" xmlns:ns20="http://xml.apache.org/xml-soap" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"><item><key xsi:type="xsd:string">com</key><value xsi:type="xsd:string">available</value></item></multiRef><multiRef id="id20" soapenc:root="0" soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xsi:type="ns21:Map" xmlns:ns21="http://xml.apache.org/xml-soap" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"><item><key xsi:type="xsd:string">com</key><value xsi:type="xsd:string">available</value></item></multiRef><multiRef id="id18" soapenc:root="0" soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xsi:type="ns22:Map" xmlns:ns22="http://xml.apache.org/xml-soap" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"><item><key xsi:type="xsd:string">com</key><value xsi:type="xsd:string">available</value></item></multiRef><multiRef id="id9" soapenc:root="0" soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xsi:type="ns23:Map" xmlns:ns23="http://xml.apache.org/xml-soap" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"><item><key xsi:type="xsd:string">com</key><value xsi:type="xsd:string">available</value></item></multiRef><multiRef id="id21" soapenc:root="0" soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xsi:type="ns24:Map" xmlns:ns24="http://xml.apache.org/xml-soap" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"><item><key xsi:type="xsd:string">com</key><value xsi:type="xsd:string">available</value></item></multiRef><multiRef id="id4" soapenc:root="0" soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xsi:type="ns25:Map" xmlns:ns25="http://xml.apache.org/xml-soap" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"><item><key xsi:type="xsd:string">com</key><value xsi:type="xsd:string">available</value></item></multiRef></soapenv:Body></soapenv:Envelope>


Yazdıgım Kod:
PHP:
<?php
$ch = curl_init();			// curl oturumunu aç
curl_setopt($ch, CURLOPT_URL, 'http://api.onlyfordemo.net/anacreon/servlet/APIv3');	//post atılacak adres
curl_setopt ($ch, CURLOPT_POST, 1);													//yukarıdaki adrese post atacağımızı belirtiyoruz
curl_setopt ($ch, CURLOPT_POSTFIELDS, '<?xml version="1.0" encoding="UTF-8"?><SOAP-ENV:Envelope SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"  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:si="http://soapinterop.org/xsd"  xmlns:impl="com.logicboxes.foundation.sfnb.order.DomOrder"><SOAP-ENV:Body><impl:checkAvailabilityMultiple><userName xsi:type="xsd:string">[email protected]</userName><password xsi:type="xsd:string">123456</password><role xsi:type="xsd:string">reseller</role><langpref xsi:type="xsd:string">tr</langpref><parentid xsi:type="xsd:int">45716</parentid><domainNames xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="xsd:string[1]"><item xsi:type="xsd:string">domain-adi</item></domainNames><tlds xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="xsd:string[1]"><item xsi:type="xsd:string">com</item></tlds><suggestAlternative xsi:type="xsd:boolean">true</suggestAlternative></impl:checkAvailabilityMultiple></SOAP-ENV:Body></SOAP-ENV:Envelope>');											//sayfanın kaynak kodundan aldığımız form değerlerini post etmek için gerekli değerleri yazıyoruz
curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);
$icerik = curl_exec ($ch);											//user-pass ile giriş yapılabilen sayfanın çıktısı elimizde artık
curl_close ($ch);													//oturumu kapatalım - hafızada yer kaplamasın
echo $icerik;
?>
 

Angelo

0
İyinet Üyesi
Katılım
13 Aralık 2004
Mesajlar
9,603
Reaction score
111
Konum
AZ
POST verisi olarak komple XML girmişsin. API'a gönderilecek girdiler POST ile gönderilip XML ile alınıyor olmalı büyük ihtimalle. Yaptığın işlem yanlış.
 

Türkiye’nin ilk webmaster forum sitesi iyinet.com'da forum üyeleri tarafından yapılan tüm paylaşımlardan; Türk Ceza Kanunu’nun 20. Maddesinin, 5651 Sayılı Kanununun 4. maddesinin 2. fıkrasına göre, paylaşım yapan üyeler sorumludur.

Backlink ve Tanıtım Yazısı için iletişime geçmek için Skype Adresimiz: .cid.1580508955483fe5

Üst