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

Wrong Version #66

Open
JuanDaniel opened this issue May 28, 2013 · 4 comments
Open

Wrong Version #66

JuanDaniel opened this issue May 28, 2013 · 4 comments

Comments

@JuanDaniel
Copy link

Hi, I am developing a application with Symfony 2.0.21. I installed the bundle and I defined a web service with several method and everything is ok. But... when I want to consumed any method, I get response "Wrong Version".
Someone can help me?

@lologhi
Copy link

lologhi commented May 28, 2013

It's the generic error when something's wrong. You might need to add SoapFault and logs to your code to check that the methods called are ok.

@JuanDaniel
Copy link
Author

I dont know when I must use the SoapFault. The error message said me that the problem is when a client use SoapClient for consume the method of the webservice.
What should I do?

@JuanDaniel
Copy link
Author

The source code of a method....

/**

  • @soap\Method("AutenticarServicio")

  • @soap\Param("user", phpType = "string")

  • @soap\Param("password", phpType = "string")

  • @soap\Result(phpType = "string")
    */
    public function autenticarServicioAction($user, $password) {
    $em = $this->getDoctrine()->getEntityManager();

    $usuario = $em->getRepository('ICAAEBundle:Usuario')->findOneBy(array(
    'usuario' => $user,
    'clave' => $password
    ));

    if (!$usuario)
    //throw new AuthenticationException('Autenticación inválida');
    return $this->container->get('besimple.soap.response')->setReturnValue("Autenticación inválida");

    $token = new UsernamePasswordToken(
    $usuario, $usuario->getClave(), 'usuarios', array($usuario->getRol()->getRol()));
    $this->get('security.context')->setToken($token);

    $this->getRequest()->getSession()->set('securityToken', uniqid());

    return $this->container->get('besimple.soap.response')->setReturnValue(
    $this->getRequest()->getSession()->get('securityToken')
    );
    }

@francisbesset
Copy link
Member

@JuanDaniel Do you still have this problem?
If yes, try to up BeSimpleSoapBundle and BeSimpleSoapServer.

I think that this problem is solved by BeSimple/BeSimpleSoap@e99f707.

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

No branches or pull requests

3 participants