#45404 [Opn]: SoapClient.__getTypes don't care about inheritance

From: Date: Tue, 01 Jul 2008 14:59:22 +0000
Subject: #45404 [Opn]: SoapClient.__getTypes don't care about inheritance
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-126158@lists.php.net to get a copy of this message
ID: 45404 User updated by: oamblet at vmware dot com Reported By: oamblet at vmware dot com Status: Open Bug Type: SOAP related Operating System: OS X 10.5 PHP Version: 5.2.6 New Comment: Perhaps a good alternative could be to add the extension information in the output of __getTypes(). Previous Comments: ------------------------------------------------------------------------ [2008-07-01 14:42:39] oamblet at vmware dot com Description: ------------ the __getTypes() function return a list of structs which represents the various types from the parsed WSDL. However, the inherited attributes are not listed in the struct. It becomes hard to introspect a WSDL file with this __getTypes() give this limitation. Reproduce code: --------------- Given this WSDL fragment: ... <xs:element name="Entry" type="tns:Entry"/> <xs:element name="ManagedEntry" type="tns:ManagedEntry"/> <xs:complexType name="ManagedEntry"> <xs:complexContent> <xs:extension base="tns:Entry"> <xs:sequence> <xs:element minOccurs="0" name="id" type="xs:string"/> <xs:element minOccurs="0" name="stringRepresentation" type="xs:string"/> </xs:sequence> </xs:extension> </xs:complexContent> </xs:complexType> <xs:complexType name="Entry"> <xs:sequence> <xs:element minOccurs="0" name="name" type="xs:string"/> <xs:element maxOccurs="unbounded" minOccurs="0" name="properties" nillable="true" type="tns:EntryProperty"/> <xs:element minOccurs="0" name="type" type="xs:string"/> </xs:sequence> </xs:complexType> ... <?php $client = new SoapClient("http://x.x.x.x/echo?WSDL"); $client->__getTypes(); ?> Expected result: ---------------- [ struct ManagedEntry { string id; string stringRepresentation; string name; EntryProperty properties; string type; }, struct Entry { string name; EntryProperty properties; string type; } ] Actual result: -------------- [ struct ManagedEntry { string id; string stringRepresentation; }, struct Entry { string name; EntryProperty properties; string type; } ] ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=45404&edit=1

« previous php.bugs (#126158) next »