-
Notifications
You must be signed in to change notification settings - Fork 135
Description
Good day,
Please your help!
I built a Web service, but when I execute it. I got the next issue:
http://localhost:8000/app_dev.php/ws/AplicationService?wsdl
Catchable Fatal Error: Object of class Symfony\Component\Config\ConfigCache could not be converted to string
Consiguratiion:
#PruebaConrroller.php
"<?php
namespace Acme\SOAPBundle\Controller;
use BeSimple\SoapBundle\ServiceDefinition\Annotation as Soap;
use Symfony\Component\DependencyInjection\ContainerAwareInterface;
use Symfony\Component\DependencyInjection\ContainerInterface;
use Symfony\Component\DependencyInjection\Container;class PruebaController implements ContainerAwareInterface
{
/**
* Sets the container.
*
* @param ContainerInterface|null $container A ContainerInterface instance or null
*/
public function setContainer(ContainerInterface $container = null){
$this->container = $container;
}/**
#routing.yml
acme_soap_homepage:
path: /
defaults: { _controller: AcmeSOAPBundle:Default:index }
acme_soap:
resource: '@AcmeSOAPBundle/Controller/'
type: annotation
_besimple_soap:
resource: 'be_simple_soap.yml'
prefix: /ws
#be_simple_soap.yml
_webservice_call:
path: /{webservice}
defaults: { _controller: BeSimpleSoapBundle:SoapWebService:Call }
requirements:
_format: xml
methods: POST_webservice_definition:
path: /{webservice}
defaults: { _controller: BeSimpleSoapBundle:SoapWebService:Definition }
requirements:
_format: xml
methods: GET
#config.yml
be_simple_soap:
services:
AplicationService:
namespace: http://localhost:8000/app_dev.php/ws/AplicationService
binding: rpc-literal
resource: '@AcmeSOAPBundle/Controller/PruebaController.php'
resource_type: annotation
#SoapWebServiceController.php
"<?php
/*
- This file is part of the BeSimpleSoapBundle.
- (c) Christian Kerl christian-kerl@web.de
- (c) Francis Besset francis.besset@gmail.com
- This source file is subject to the MIT license that is bundled
- with this source code in the file LICENSE.
*/namespace BeSimple\SoapBundle\Controller;
use BeSimple\SoapBundle\Handler\ExceptionHandler;
use BeSimple\SoapBundle\Soap\SoapRequest;
use BeSimple\SoapBundle\Soap\SoapResponse;
use BeSimple\SoapServer\SoapServerBuilder;
use Symfony\Component\DependencyInjection\ContainerAwareInterface;
use Symfony\Component\DependencyInjection\ContainerInterface;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\HttpKernel\Exception\FlattenException;
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
use Symfony\Component\HttpKernel\HttpKernelInterface;
use Symfony\Component\HttpKernel\Log\DebugLoggerInterface;/**
.....
/
class SoapWebServiceController Implements ContainerAwareInterface
{
/*
* Sets the container.
*
* @param ContainerInterface|null $container A ContainerInterface instance or null
*/
public function setContainer(ContainerInterface $container = null){
$this->container = $container;
}
#autoload.php
"<?php
use Doctrine\Common\Annotations\AnnotationRegistry;
use Composer\Autoload\ClassLoader;/** @var ClassLoader $loader */
$loader = require DIR.'/../vendor/autoload.php';
//Load BesimpleSoap
$loader->add('BeSimple\SoapCommon' , DIR.'/../vendor/besimple-soapcommon/src');
$loader->add('BeSimple\SoapServer' , DIR.'/../vendor/besimple-soapserver/src');
$loader->add('BeSimple\SoapClient' , DIR.'/../vendor/besimple-soapclient/src');
$loader->add('BeSimple\SoapClient' , DIR.'/../vendor/besimple-soapclient/src');
$loader->add('BeSimple', DIR.'/../vendor/bundles');// var_dump ($loader);
// exit();AnnotationRegistry::registerLoader([$loader, 'loadClass']);
return $loader;
#AppKernel.php
"<?php
use Symfony\Component\HttpKernel\Kernel;
use Symfony\Component\Config\Loader\LoaderInterface;class AppKernel extends Kernel
{
public function registerBundles()
{
$bundles = [
new Symfony\Bundle\FrameworkBundle\FrameworkBundle(),
new Symfony\Bundle\AsseticBundle\AsseticBundle(),
new Symfony\Bundle\SecurityBundle\SecurityBundle(),
new Symfony\Bundle\TwigBundle\TwigBundle(),
new Symfony\Bundle\MonologBundle\MonologBundle(),
new Symfony\Bundle\SwiftmailerBundle\SwiftmailerBundle(),
new Doctrine\Bundle\DoctrineBundle\DoctrineBundle(),
new Sensio\Bundle\FrameworkExtraBundle\SensioFrameworkExtraBundle(),
new AppBundle\AppBundle(),
new Acme\SOAPBundle\AcmeSOAPBundle(),
new BeSimple\SoapBundle\BeSimpleSoapBundle(),
];if (in_array($this->getEnvironment(), ['dev', 'test'], true)) { $bundles[] = new Symfony\Bundle\DebugBundle\DebugBundle(); $bundles[] = new Symfony\Bundle\WebProfilerBundle\WebProfilerBundle(); $bundles[] = new Sensio\Bundle\DistributionBundle\SensioDistributionBundle(); $bundles[] = new Sensio\Bundle\GeneratorBundle\SensioGeneratorBundle(); }