Stworzyłem soap servera takiego:
header('Content-Type: text/xml; charset=utf-8');
function setStatus() {
return true;
}
$wsdl = 'http://ddomena/strony/AAA/file.wsdl';
//$soap = new SoapServer(null, array('uri' => "urn://domena/strony/AAA/ss_BBB.php"));
$soap = new SoapServer
($wsdl, array('soap_version' => SOAP_1_2
, 'uri' => "urn://domena/strony/AAA/ss_BBB.php"));
$soap->addFunction("setStatus");
$soap->handle();
Wysylam takie coś :
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:net="http://domena/AAA_2_8/">
<soapenv:Header/>
<soapenv:Body>
<net:setStatus>
<net:applicationId>12345</net:applicationId>
<net:status>ABC</net:status>
<!--Optional:-->
<net:documents>
<!--1 or more repetitions:-->
<net:document>
<net:content>cid:309278966708</net:content>
<net:documentType></net:documentType>
<net:name></net:name>
</net:document>
</net:documents>
<!--Optional:-->
<net:message></net:message>
<!--Optional:-->
<net:grantedAmount></net:grantedAmount>
<!--Optional:-->
<net:grantedTerm></net:grantedTerm>
</net:setStatus>
</soapenv:Body>
</soapenv:Envelope>
a dostaję takie coś:
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://domena/AAA_2_8//">
<SOAP-ENV:Body>
<ns1:setStatusResponse/>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
jeśli zmienię $wsdl na null
$soap = new SoapServer
(null, array('soap_version' => SOAP_1_2
, 'uri' => "urn://domena/strony/AAA/ss_BBB.php"));
wtedy zwrotka jest dobra:
<SOAP-ENV:Envelope SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="urn://domena/AAA_2_8/netCredit/file.php" 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:setStatusResponse>
<return xsi:type="xsd:boolean">true</return>
</ns1:setStatusResponse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
o co chodzi tutaj test tutek
http://www.herongyang.com/Web-Services/PHP...ServerWsdl.htmlPowinno być dobrz z $wsdl a nie jest, czemu ?