Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

return an object without <return> tag #104

Open
sitobcn82 opened this issue Nov 11, 2015 · 3 comments
Open

return an object without <return> tag #104

sitobcn82 opened this issue Nov 11, 2015 · 3 comments

Comments

@sitobcn82
Copy link

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>
@h3llr4iser
Copy link

Hi,
I have the same problem. Have you solved?

@sitobcn82
Copy link
Author

No, i haven't solved yet

El 28 març 2016 , 13:25 +0200, [email protected], escribió:

Hi,
I have the same problem. Have you solved?


You are receiving this because you authored the thread.
Reply to this email directly orview it on GitHub(#104 (comment))

@boukhanfra
Copy link

i think there no way to change this, because the beSimpleBundle is based on ZendSoap which encapsulate this definition.

The return tag is generated in the beSimple\SoapBundle\ServiceDefinition\Dumper\WsdlDumper line 66.

You can extends this class and modify it to return the object without tag.

I think the return tag is a standard specification for SoapResponse (to be verified)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants