Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 0.14.0

Bug #8551 incorect mapping of function for wsdl generator
Submitted: 2006-08-24 14:32 UTC
From: marek dot nos at centrum dot cz Assigned: yunosh
Status: Closed Package: SOAP (version 0.9.4)
PHP Version: 5.1.4 OS: linux
Roadmaps: (Not assigned)    
Subscription  
Comments Add Comment Add patch


Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know! Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem : 21 - 14 = ?

 
 [2006-08-24 14:32 UTC] marek dot nos at centrum dot cz (fabicz)
Description: ------------ Even I map a function using addToMap() method I'm not giving correct WSDL. addToMap() fills the dispatch_map array of the SOAP_Server object. But if I look at the Disco.php:157-158 I see a workaround which uses class $server which isn't defined. I suggest there should be $this->soap_server instead. Test script: --------------- <? require_once('SOAP/Server.php'); function foo($param1, $param2) { return $param1 + $param2; } $server = new SOAP_Server; $server->_auto_translation = true; $server->addToMap('foo', Array('test' => 'string', 'param1' => 'int', 'param2' => 'int'), Array('data' => 'int')); //$server->service($HTTP_RAW_POST_DATA); //init require_once('SOAP/Disco.php'); $disco = new SOAP_DISCO_Server($server, 'namespace'); //vypise header("Content-type: text/xml"); echo $disco->getWSDL(); Expected result: ---------------- <?xml version="1.0" ?> - <definitions name="namespace" targetNamespace="urn:namespace" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="urn:namespace" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns="http://schemas.xmlsoap.org/wsdl/"> <types xmlns="http://schemas.xmlsoap.org/wsdl/" /> - <message name="fooRequest"> <part name="test" type="xsd:string" /> <part name="param1" type="xsd:int" /> <part name="param2" type="xsd:int" /> </message> - <message name="fooResponse"> <part name="data" type="xsd:int" /> </message> - <portType name="namespacePort"> - <operation name="foo"> <input message="tns:fooRequest" /> <output message="tns:fooResponse" /> </operation> </portType> - <binding name="namespaceBinding" type="tns:namespacePort"> <soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http" /> - <operation name="foo"> <soap:operation soapAction="#foo" /> - <input> <soap:body use="encoded" namespace="" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" /> </input> - <output> <soap:body use="encoded" namespace="" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" /> </output> </operation> </binding> - <service name="namespaceService"> <documentation /> - <port name="namespacePort" binding="tns:namespaceBinding"> <soap:address location="http://192.168.2.249:81/rpc/addtomap_bug.php" /> </port> </service> </definitions> Actual result: -------------- <?xml version="1.0" ?> - <definitions name="namespace" targetNamespace="urn:namespace" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="urn:namespace" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns="http://schemas.xmlsoap.org/wsdl/"> <types xmlns="http://schemas.xmlsoap.org/wsdl/" /> <portType name="namespacePort" /> - <binding name="namespaceBinding" type="tns:namespacePort"> <soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http" /> </binding> - <service name="namespaceService"> <documentation /> - <port name="namespacePort" binding="tns:namespaceBinding"> <soap:address location="http://192.168.2.249:81/rpc/addtomap_bug.php" /> </port> </service> </definitions>

Comments

 [2007-01-20 00:01 UTC] yunosh (Jan Schneider)
This bug has been fixed in CVS. If this was a documentation problem, the fix will appear on pear.php.net by the end of next Sunday (CET). If this was a problem with the pear.php.net website, the change should be live shortly. Otherwise, the fix will appear in the package's next release. Thank you for the report and for helping us make PEAR better.