Skip to content

Empty associative array in soap server #105

Description

@gotha

Hi, I am testing the example in the documentation: http://besim.pl/SoapBundle/soapserver/tutorial/associative_array.html

my code is like this:

/**
     * @Soap\Method("sendAssocArray")
     * @Soap\Param("assocArray", phpType = "BeSimple\SoapCommon\Type\KeyValue\String[]")
     * @Soap\Result(phpType = "BeSimple\SoapCommon\Type\KeyValue\String[]")
     */
    public function sendAssocArrayOfStringAction(array $assocArray)
    {
        return $assocArray;
    }

My client call it like this:

$client = new SoapClient("http://localhost:9999/app_dev.php/ws/MyService?wsdl", array('cache_wsdl' => WSDL_CACHE_NONE));
$response = $client->sendAssocArray(["name" => "Ivan", "lastName" => "Petrov"]);
var_dump($response);

$response is empty stdClass and when I check $assocArray is empty too.

Is this some kind of bug or I am doing something wrong ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions