Skip to content

return an object without <return> tag #104

Description

@sitobcn82

I'm trying to return an object and always I see in the XML the tag return, is possible to remove that tag ? I generate the response in the controller as follows:

/**
* @soap\Method("Login")
* @soap\Param("UserName", phpType = "string")
* @soap\Result(phpType = "LoginOutput")
*/

$out = new LoginOutput();
$out->setSessionId($tokenGenerated);
$out->setValidTo($Timestamp);
$this->container->get('besimple.soap.response')->setReturnValue($out);
return $this->container->get('besimple.soap.response');

The response that I obtain is:

<ns1:LoginResponse>
         <return>
            <SessionId>5643097cee2b5</SessionId>
            <ValidTo/>
         </return>
      </ns1:LoginResponse>

And i want this return

<loginResponse>
         <SessionId>5643097cee2b5</SessionId>
         <ValidTo>2015-11-11T10:58:58.21775+01:00</ValidTo>
</loginResponse>

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