<?php
/* Create a class for your webservice structure, in this case: Contact */
class TP_Ozel_Oran_SK_Liste{
    function TP_Ozel_Oran_SK_Liste($guid){
        $this->GUID = $guid;
        $this->G = new G(15646, "TP10029813" , "C5288DC8521720E9");
    }
}
class G {
	function G($cc,$cu,$cp){
        $this->CLIENT_CODE = $cc;
        $this->CLIENT_USERNAME = $cu;
        $this->CLIENT_PASSWORD = $cp;
    }
}
if($_POST):
    $gguid = $_POST['guuid'];
    $Bagla 			= new SoapClient("https://dmzws.ew.com.tr/turkpos.ws/service_turkpos_test.asmx?wsdl");
    $OzelOranSKListe 	= new TP_Ozel_Oran_SK_Liste($gguid);
    $Veri 			= $Bagla->TP_Ozel_Oran_SK_Liste($OzelOranSKListe);
    $q1 = $Veri->TP_Ozel_Oran_SK_ListeResult;
    $DT_Bilgi = $q1->{'DT_Bilgi'};
    $Sonuc = $q1->{'Sonuc'};
    $Sonuc_Str = $q1->{'Sonuc_Str'};
    $xml = $DT_Bilgi->{'any'};
    $xmlstr = <<<XML
<?xml version='1.0' standalone='yes'?>
<root>
{$xml}
</root>
XML;
    $xmlstr    = str_replace(array("diffgr:","msdata:"),'', $xmlstr);
    $data = simplexml_load_string($xmlstr);
    $liste = $data->diffgram->NewDataSet;
    foreach ($liste->DT_Ozel_Oranlar_SK as $oran):
        echo "<br/>";
        echo "GUID: {$oran->GUID}"."<br/>";
        echo "Ozel_Oran_ID: {$oran->Ozel_Oran_SK_ID}"."<br/>";
        echo "SanalPOS_ID: {$oran->SanalPOS_ID}"."<br/>";
        echo "Kredi_Karti_Banka: {$oran->Kredi_Karti_Banka}"."<br/>";
        echo "Kredi_Karti_Banka_Gorsel: {$oran->Kredi_Karti_Banka_Gorsel}"."<br/>";
        echo "MO_01: {$oran->MO_01}"."<br/>";
        echo "MO_02: {$oran->MO_02}"."<br/>";
        echo "MO_03: {$oran->MO_03}"."<br/>";
        echo "MO_04: {$oran->MO_04}"."<br/>";
        echo "MO_05: {$oran->MO_05}"."<br/>";
        echo "MO_06: {$oran->MO_06}"."<br/>";
        echo "MO_07: {$oran->MO_07}"."<br/>";
        echo "MO_08: {$oran->MO_08}"."<br/>";
        echo "MO_09: {$oran->MO_09}"."<br/>";
    endforeach;
endif;
$TP_Ozel_Oran_SK_Liste = new TP_Ozel_Oran_SK_Liste("E84DA62F-0EE5-4519-90DE-26648504162A"); 
$TP_Ozel_Oran_SK_Liste->TP_Ozel_Oran_SK_Liste("E84DA62F-0EE5-4519-90DE-26648504162A"); 
//$this->TP_Ozel_Oran_SK_Liste("E84DA62F-0EE5-4519-90DE-26648504162A");  
?>
<form action="skoran.php" method="post" enctype="multipart/form-data" >
    <div>
        <label>GUID</label>
        <input type="text" class="Text" name="guuid" value="E84DA62F-0EE5-4519-90DE-26648504162A" />
    </div>
    <div>
        <input class="Submit" type="submit" name="submit" id="submit" value="Gönder" />
    </div>
</form>