emulate php mixed type in wsdl

From: Date: Wed, 01 Nov 2006 09:03:53 +0000
Subject: emulate php mixed type in wsdl
Groups: php.soap 
Request: Send a blank email to php-soap+get-2382@lists.php.net to get a copy of this message
Is it possible to define the type in wsdl which would be whether boolean or, for example, integer. To finally have something like: <mixed>343</mixed> or <mixed>false</mixed> in responding xml. The best I have managed to achieve is: <xsd:complexType name="mixed"> <xsd:choice> <xsd:element name="int" type="xsd:integer"/> <xsd:element name="boo" type="xsd:boolean"/> </xsd:choice> </xsd:complexType> but it responds with <mixed><int>334</int></mixed> or <mixed><boo>false</boo></mixed> and in php i have an object with ->int or ->boo property set. .. The goal I'm following to is to have ala php syntax: if (false === ($some_id = $soapclient->mixed_method())) { echo 'boolean'; } else { echo 'integer '.$some_id; } i.e. to have boolean or integer scalar as returning value. is it somehow possible, except setting the element of :anyType?

« previous php.soap (#2382) next »