emulate php mixed type in wsdl

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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?

--
PHP Soap Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Kernel Newbies]     [PHP Database]     [Yosemite]

  Powered by Linux