ZF-5689: ArrayOf<Type> in wsdl - Zend_Soap_Autodiscovery
Description
I guess it is a bug.. if I use Zend_Soap_Wsdl_Strategy_ArrayOfTypeSequence and write docblock for method like this:
/**
* @param string $session_id
* @param string[] $type
* @param string[] $status
* @param string[] $registrar
* @return object
*/
I get in wsdl:
only first string[] argument has wsdl type ArrayOfString other have 'string[]'. That is also true for int[] and other arrays.
Comments
Posted by Benjamin Eberlei (beberlei) on 2009-02-04T10:57:10.000+0000
Can you please verify that this has been fixed in ZF 1.7.4? I closed a similar bug for this release, see Ticket ZF-5430
Posted by Bojan Mauser (bmauser) on 2009-02-04T11:48:21.000+0000
Yes, it's OK in 1.7.4. Thanks.
I noticed one more thing about arrays that comes from client request. This is part of soap xml that client send to my zend soap server:
and for $type argument of my method I get:
but if client send this xml in request (only one item):
I get this for $type method argument:
So in the second example [item] property is not an array. I guess it should be, like in first example, only with one element cause I expect array from client. Maybe this is intentional, but I always have to check if [item] is an array and if not convert it to array cause my method expects array as argument which can be, for example, passed to foreach loop.
Posted by Bojan Mauser (bmauser) on 2009-02-04T11:52:04.000+0000
sory, in comment above last stdClass object should look like
stdClass Object ( [item] => 1 )
not 'all' as value for [item]
Posted by Benjamin Eberlei (beberlei) on 2009-02-04T11:56:06.000+0000
this is indeed strange behaviour, but the parsing of WSDL structure and building of requests and responses of it is done by the internal PHP SOAPClient and SOAPServer we only wrap convenience functionality around it.
Posted by Bojan Mauser (bmauser) on 2009-02-04T12:05:13.000+0000
Ok. Thanks. You can close the ticket.