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 : 19 + 27 = ?

 
 [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] User who submitted this comment has not confirmed identity
If you submitted this note, check your email.If you do not have a message, click here to re-send
MANUAL CONFIRMATION IS NOT POSSIBLE.  Write a message to pear-dev@lists.php.net
to request the confirmation link.  All bugs/comments/patches associated with this

email address will be deleted within 48 hours if the account request is not confirmed!