YVES Exception Error


#1

Hello, I installed spryker,

As I am working on Tutorial - Transfering Data Between Yves and Zed, Following issue i am facing.

YVES Exception

Error - Class 'Generated\Shared\Transfer\HelloWorldMessageTransfer' not found

in /data/shop/src/Pyz/Client/HelloWorld/Zed/HelloWorldStub.php (32)

Url:/hello

Trace:

#0 /data/shop/src/Pyz/Client/HelloWorld/HelloWorldClient.php(19): Pyz\Client\HelloWorld\Zed\HelloWorldStub->getSalutationMessage()
#1 /data/shop/src/Pyz/Yves/HelloWorld/Controller/IndexController.php(18): Pyz\Client\HelloWorld\HelloWorldClient->getSalutationMessage()
#2 [internal function]: Pyz\Yves\HelloWorld\Controller\IndexController->indexAction()
#3 /data/shop/vendor/symfony/http-kernel/HttpKernel.php(144): call_user_func_array(Array, Array)
#4 /data/shop/vendor/symfony/http-kernel/HttpKernel.php(64): Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object(Symfony\Component\HttpFoundation\Request), 1)
#5 /data/shop/vendor/silex/silex/src/Silex/Application.php(586): Symfony\Component\HttpKernel\HttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#6 /data/shop/vendor/silex/silex/src/Silex/Application.php(563): Silex\Application->handle(Object(Symfony\Component\HttpFoundation\Request))
#7 /data/shop/public/Yves/index.php(24): Silex\Application->run()
#8 {main}

Any ideas?

Regards,
Amol Ranjegaonkar


#2

Did you run the transfer generate console command?


#3

Yes, I executed command : console transfer:generate .
Also it generated the Generated\Shared\Transfer\HelloWorldMessageTransfer class as well.

Following is my code for HelloWorldStub.php

namespace Pyz\Client\HelloWorld\Zed;

use Generated\Shared\Transfer\HelloWorldMessageTransfer;
use Spryker\Client\ZedRequest\ZedRequestClientInterface;

class HelloWorldStub implements HelloWorldStubInterface
{

    /**
     * @var \Spryker\Client\ZedRequest\ZedRequestClientInterface
     */
    protected $zedRequestClient;

    /**
     * @param \Spryker\Client\ZedRequest\ZedRequestClientInterface $zedRequestClient
     */
    public function __construct(ZedRequestClientInterface $zedRequestClient)
    {
        $this->zedRequestClient = $zedRequestClient;
    }

    /**
     * @return \Generated\Shared\Transfer\HelloWorldMessageTransfer
     */
    public function getSalutationMessage()
    {
	//return $this->zedRequestClient->call('testing','rrrr');
	return $this->zedRequestClient->call(
            '/hello-world/gateway/get-salutation-message',
         new HelloWorldMessageTransfer()
        );
    }

}