Ben bir müşteri olarak kendisine bağlayan olacak bir 3. parti bir şartname için bir web hizmeti oluşturmak için çalışıyorum, hizmet PHP ile yazılmış olması gerekir ama ben çok küçük bir mücadele toplam PHP n00b duyuyorum. Temelde benim yanıtları ancak istemci, çünkü bu benim yanıtları kabul etmiyor bir eleman sarılmış ediliyor, burada bir örnektir.
service.php
<?php
class MyService {
public function Ping() {
return date('d/m/Y H:i:s');
}
}
$server = new SoapServer(null, array( 'soap_version' => SOAP_1_2, 'encoding' => 'UTF-8', 'uri' => 'http://tempuri.org/'));
$server->setClass("MyService");
$server->handle();
?>
Istek
<soapenv:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:tem="http://tempuri.org/">
<soapenv:Header/>
<soapenv:Body>
<tem:Ping />
</soapenv:Body>
</soapenv:Envelope>
Tepki
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://tempuri.org/" 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/">
<SOAP-ENV:Body>
<ns1:PingTepki>
<return xsi:type="xsd:string">18/11/2010 18:51:02</return>
</ns1:PingTepki>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
What the client is expecting is the PingTepki to just contain the date but without the wrapped around the outside. How can I get the PHP SoapClient to do this?
Örneğin
<ns1:PingTepki>18/11/2010 18:51:02</ns1:PingTepki>