|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2007-02-12 14:43 UTC] dreddy at duke-energy dot com
Description: ------------ We are using PHP version 5.1.6 (not in the drop down for bugs) Testing Flash8 Webservice Component connecting to a PHP5 SOAP Extension soap server, and the Apache listener will generate an internal server error (500). Problem appears to be libsoap not handling what appears to be a valid SOAP1.1 envelope, even if the the soap server is defined to be SOAP1.1. The workaround for us, is to use NuSoap, which is a SOAP 1.1 implementation. Reproduce code: --------------- The problem is the additional element on the BODY tab, legit in SOAP1.1 but not in SOAP1.2 <SOAP-ENV:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"><SOAP-ENV:Body xmlns:ns1="urn :myquote"><ns1:getQuote><symbol>ibm</symbol></ns1:getQuote></SOAP-ENV:Body></SOAP-ENV:Envelope> See http://www.w3.org/TR/2003/REC-soap12-part0-20030624/#L4697 ...and look for a section titled, "6. Changes Between SOAP 1.1 and SOAP 1.2" The first item under additional or changed syntax: SOAP 1.2 does not permit any element after the body. The SOAP 1.1 schema definition allowed for such a possibility, but the textual description is silent about it. PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Oct 27 15:00:01 2025 UTC |
The soap server: <?php /** * Testing SOAP Server Extension * * @author dreddy * @package defaultPackage */ class QuoteService { private $quotes = array("ibm" => 90, "se"=>20); /** * Test Function * * @param string $symbol * @return string */ function getQuote($symbol) { if (isset($this->quotes[$symbol])) { return $this->quotes[$symbol]; } else { throw new SoapFault("Server","Unknow Symbol '$symbol'."); } } } ini_set("soap.wsdl_cache_enabled", "0"); $server = new SoapServer("testsoap.wsdl"); $server->setClass("QuoteService"); $server->handle(); ?>