J'essaie de travailler avec SOAP, mais cela ne fonctionne pas. J'ai essayé localhost et un autre serveur. Par exemple: soap.xml:SOAP ne fonctionne pas
POST /InStock HTTP/1.1
Host: www.example.org
Content-Type: application/soap+xml; charset=utf-8
Content-Length: nnn
<?xml version="1.0"?>
<soap:Envelope
xmlns:soap="http://www.w3.org/2001/12/soap-envelope"
soap:encodingStyle="http://www.w3.org/2001/12/soap-encoding">
<soap:Body xmlns:m="http://www.example.org/stock">
<m:GetStockPrice>
<m:StockName>IBM</m:StockName>
</m:GetStockPrice>
</soap:Body>
</soap:Envelope>
et le résultat est:
XML Parsing Error: syntax error Location: http://w3.localhost/soap/soap.xml Line Number 1, Column 1:POST /InStock HTTP/1.1 ^
phpinfo:
soap
Soap Client enabled
Soap Server enabled
mime.types apache
application/fastsoap
application/soap+fastinfoset
application/soap+xml
J'ai essayé avec nusoap aussi, mais example.php me montre cette erreur:
Fatal error: Cannot redeclare class soapclient in C:\xampp\htdocs\w3\soap\nusoap.php on line 3896
Merci pour toute aide et désolé pour mon anglais.
quelle version de php utilisez-vous? sur une autre note, SOAP est construit en PHP5, donc il ne devrait pas être nécessaire d'utiliser NuSOAP –
PHP Version 5.3.1, mais si je n'utilise pas PHP (il suffit d'aller à soap.xml), il montre XML Erreur d'analyse ? – simple