@@ -50,9 +50,9 @@ class Generator
5050 protected $ storeManager ;
5151
5252 /**
53- * @var array
53+ * @var \Magento\Framework\Webapi\CustomAttributeTypeLocatorInterface
5454 */
55- protected $ customAttributeMapArray = null ;
55+ protected $ customAttributeTypeLocator = null ;
5656
5757 /**
5858 * Initialize dependencies.
@@ -62,22 +62,22 @@ class Generator
6262 * @param \Magento\Framework\App\Cache\Type\Webapi $cache
6363 * @param \Magento\Framework\Reflection\TypeProcessor $typeProcessor
6464 * @param \Magento\Store\Model\StoreManagerInterface $storeManager
65- * @param \Magento\Framework\Object $customAttributeMap
65+ * @param \Magento\Framework\Webapi\CustomAttributeTypeLocatorInterface $customAttributeTypeLocator
6666 */
6767 public function __construct (
6868 \Magento \Webapi \Model \Soap \Config $ apiConfig ,
6969 WsdlFactory $ wsdlFactory ,
7070 \Magento \Framework \App \Cache \Type \Webapi $ cache ,
7171 \Magento \Framework \Reflection \TypeProcessor $ typeProcessor ,
7272 \Magento \Store \Model \StoreManagerInterface $ storeManager ,
73- \Magento \Framework \Object $ customAttributeMap
73+ \Magento \Framework \Webapi \ CustomAttributeTypeLocatorInterface $ customAttributeTypeLocator
7474 ) {
7575 $ this ->_apiConfig = $ apiConfig ;
7676 $ this ->_wsdlFactory = $ wsdlFactory ;
7777 $ this ->_cache = $ cache ;
7878 $ this ->_typeProcessor = $ typeProcessor ;
7979 $ this ->storeManager = $ storeManager ;
80- $ this ->customAttributeMapArray = array_values ( $ customAttributeMap -> getData ()) ;
80+ $ this ->customAttributeTypeLocator = $ customAttributeTypeLocator ;
8181 }
8282
8383 /**
@@ -178,7 +178,7 @@ protected function _generate($requestedServices, $endPointUrl)
178178 */
179179 protected function addCustomAttributeTypes ($ wsdl )
180180 {
181- foreach ($ this ->customAttributeMapArray as $ customAttributeClass ) {
181+ foreach ($ this ->customAttributeTypeLocator -> getAllServiceDataInterfaces () as $ customAttributeClass ) {
182182 $ typeName = $ this ->_typeProcessor ->register ($ customAttributeClass );
183183 $ wsdl ->addComplexType ($ typeName );
184184 }
0 commit comments