Skip to content

Commit e5dff2d

Browse files
author
cspruiell
committed
Merge remote-tracking branch 'origin/MAGETWO-66882-public_wsdl-2.2' into MAGETWO-65444-Api-Annotations
2 parents b9986a1 + cba6394 commit e5dff2d

File tree

2 files changed

+40
-10
lines changed

2 files changed

+40
-10
lines changed

app/code/Magento/Webapi/Model/AbstractSchemaGenerator.php

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -81,16 +81,7 @@ public function __construct(
8181
*/
8282
public function getListOfServices()
8383
{
84-
$listOfAllowedServices = [];
85-
foreach ($this->serviceMetadata->getServicesConfig() as $serviceName => $service) {
86-
foreach ($service[ServiceMetadata::KEY_SERVICE_METHODS] as $method) {
87-
if ($this->authorization->isAllowed($method[ServiceMetadata::KEY_ACL_RESOURCES])) {
88-
$listOfAllowedServices[] = $serviceName;
89-
break;
90-
}
91-
}
92-
}
93-
return $listOfAllowedServices;
84+
return array_keys($this->serviceMetadata->getServicesConfig());
9485
}
9586

9687
/**
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
<?php
2+
/**
3+
* Copyright © 2013-2017 Magento, Inc. All rights reserved.
4+
* See COPYING.txt for license details.
5+
*/
6+
7+
namespace Magento\Webapi\Controller;
8+
9+
class SoapTest extends \PHPUnit_Framework_TestCase
10+
{
11+
/**
12+
* @var \Magento\Webapi\Controller\Soap
13+
*/
14+
protected $soapController;
15+
16+
/**
17+
* @var \Magento\Framework\ObjectManagerInterface
18+
*/
19+
protected $objectManager;
20+
21+
protected function setUp()
22+
{
23+
$this->objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager();
24+
$this->soapController = $this->objectManager->get(\Magento\Webapi\Controller\Soap::class);
25+
}
26+
27+
/*
28+
* Get the public wsdl with anonymous credentials
29+
*/
30+
public function testDispatchWsdlRequest()
31+
{
32+
$request = $this->objectManager->get(\Magento\Framework\Webapi\Request::class);
33+
$request->setParam(\Magento\Webapi\Model\Soap\Server::REQUEST_PARAM_LIST_WSDL, true);
34+
$response = $this->soapController->dispatch($request);
35+
$decoded_wsdl = json_decode($response->getContent(), true);
36+
$this->assertArrayHasKey("customerAccountManagementV1", $decoded_wsdl );
37+
$this->assertArrayHasKey("integrationAdminTokenServiceV1", $decoded_wsdl );
38+
}
39+
}

0 commit comments

Comments
 (0)