Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 8 additions & 5 deletions Controller/SoapWebServiceController.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,20 +16,23 @@
use BeSimple\SoapBundle\Soap\SoapRequest;
use BeSimple\SoapBundle\Soap\SoapResponse;
use BeSimple\SoapServer\SoapServerBuilder;
use Symfony\Component\DependencyInjection\ContainerAware;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Symfony\Component\DependencyInjection\ContainerAwareTrait;
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;
use Symfony\Component\Routing\Generator\UrlGeneratorInterface;

/**
* @author Christian Kerl <[email protected]>
* @author Francis Besset <[email protected]>
*/
class SoapWebServiceController extends ContainerAware
class SoapWebServiceController extends Controller
{
use ContainerAwareTrait;
/**
* @var \SoapServer
*/
Expand Down Expand Up @@ -64,7 +67,7 @@ public function callAction($webservice)

$this->serviceBinder = $webServiceContext->getServiceBinder();

$this->soapRequest = SoapRequest::createFromHttpRequest($this->container->get('request'));
$this->soapRequest = SoapRequest::createFromHttpRequest($this->container->get('request_stack')->pop());
$this->soapServer = $webServiceContext
->getServerBuilder()
->withSoapVersion11()
Expand All @@ -91,11 +94,11 @@ public function definitionAction($webservice)
$this->container->get('router')->generate(
'_webservice_call',
array('webservice' => $webservice),
true
UrlGeneratorInterface::ABSOLUTE_URL
)
));

$request = $this->container->get('request');
$request = $this->container->get('request_stack')->pop();
$query = $request->query;
if ($query->has('wsdl') || $query->has('WSDL')) {
$request->setRequestFormat('wsdl');
Expand Down
4 changes: 2 additions & 2 deletions WebServiceContext.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public function getServiceDefinition()
if (null === $this->serviceDefinition) {
$cache = new ConfigCache(sprintf('%s/%s.definition.php', $this->options['cache_dir'], $this->options['name']), $this->options['debug']);
if ($cache->isFresh()) {
$this->serviceDefinition = include (string) $cache;
$this->serviceDefinition = include (string) $cache->getPath();
} else {
if (!$this->loader->supports($this->options['resource'], $this->options['resource_type'])) {
throw new \LogicException(sprintf('Cannot load "%s" (%s)', $this->options['resource'], $this->options['resource_type']));
Expand Down Expand Up @@ -82,7 +82,7 @@ public function getWsdlFile($endpoint = null)
$cache->write($dumper->dump());
}

return (string) $cache;
return (string) $cache->getPath();
}

public function getServiceBinder()
Expand Down
20 changes: 10 additions & 10 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "besimple/soap-bundle",
"name": "awelara/besimple-soap-bundle",
"type": "symfony-bundle",
"description": "Build and consume SOAP and WSDL based web services with Symfony2",
"description": "Build and consume SOAP and WSDL based web services with Symfony4",
"keywords": [ "soap", "soap-bundle" ],
"homepage": "https://github.com/BeSimple/BeSimpleSoapBundle",
"license": "MIT",
Expand All @@ -20,26 +20,26 @@
}
],
"require": {
"php": ">=5.3.0",
"php": ">=7.0",
"ext-soap": "*",
"besimple/soap-common": "0.3.*",
"besimple/soap-wsdl": "0.3.*",
"besimple/soap-common": "0.2.*",
"besimple/soap-wsdl": "0.2.*",
"ass/xmlsecurity": "~1.0",
"symfony/framework-bundle": "~2.6",
"symfony/twig-bundle": "~2.6",
"symfony/twig-bundle": "*",
"symfony/framework-bundle": "^4.1",
"zendframework/zend-mime": "2.1.*"
},
"suggest": {
"besimple/soap-client": "0.3.*",
"besimple/soap-server": "0.3.*"
"besimple/soap-client": "0.2.*",
"besimple/soap-server": "0.2.*"
},
"autoload": {
"psr-0": { "BeSimple\\SoapBundle": "" }
},
"target-dir": "BeSimple/SoapBundle",
"extra": {
"branch-alias": {
"dev-master": "0.3-dev"
"dev-master": "0.4-dev"
}
}
}