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

Edit the returned headers #65

Open
lologhi opened this issue May 3, 2013 · 0 comments
Open

Edit the returned headers #65

lologhi opened this issue May 3, 2013 · 0 comments

Comments

@lologhi
Copy link

lologhi commented May 3, 2013

I've seen on the #4 (comment) issue that @francisbesset explained how to add headers to an answer :

use BeSimple\SoapBundle\Soap\SoapHeader;
$response = new SoapResponse();
$response->addSoapHeader(new SoapHeader($namespace, $name, $data));
return $response;

But I don't really see where to add these in this situation :/

class someController extends ContainerAware {
    /**
     * @Soap\Method("soapTest")
     * @Soap\Header("aTestCookie", phpType = "string")
     * @Soap\Param("lowerCaseString", phpType = "string")
     * @Soap\Result(phpType = "string")
     */
    public function soapTestAction($lowerCaseString) {
        $request = Request::createFromGlobals();
        if ( $request->cookies->has('aTestCookie') ) {
            $lowerCaseString = $request->cookies->get('aTestCookie');
        }
        return strtoupper($lowerCaseString);
    }
}

Thank you for your help !

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

1 participant