ZF-5689: ArrayOf in wsdl - Zend_Soap_Autodiscovery

Issue Type: Bug Created: 2009-02-04T10:47:44.000+0000 Last Updated: 2009-02-04T13:31:54.000+0000 Status: Closed Fix version(s): Reporter: Bojan Mauser (bmauser) Assignee: Benjamin Eberlei (beberlei) Tags: - Zend_Soap_Wsdl

Related issues: - ZF-5430



I guess it is a bug.. if I use Zend_Soap_Wsdl_Strategy_ArrayOfTypeSequence and write docblock for method like this:

<pre class="highlight">
 * @param string $session_id
 * @param string[] $type 
 * @param string[] $status 
 * @param string[] $registrar 
 * @return object

I get in wsdl:

<pre class="highlight">

only first string[] argument has wsdl type ArrayOfString other have 'string[]'. That is also true for int[] and other arrays.


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:

     <type xsi:type="web:ArrayOfString">
        <!--Zero or more repetitions:-->
            <item xsi:type="xsd:string">1</item>
    <item xsi:type="xsd:string">2</item>
            <item xsi:type="xsd:string">3</item>

and for $type argument of my method I get:

    stdClass Object
        [item] => Array
                [0] => 1
                [1] => 2
                [2] => 3

but if client send this xml in request (only one item):

     <type xsi:type="web:ArrayOfString">
        <!--Zero or more repetitions:-->
            <item xsi:type="xsd:string">1</item>

I get this for $type method argument:

           stdClass Object
                [item] => all

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.

Have you found an issue?

See the Overview section for more details.


© 2006-2019 by Zend, a Rogue Wave Company. Made with by awesome contributors.

This website is built using zend-expressive and it runs on PHP 7.