owebia / magento2-module-advanced-shipping

Other
90 stars 28 forks source link

The new version of Owebia_AdvancedShipping creates a conflict with the API. #59

Closed xeve closed 5 years ago

xeve commented 5 years ago

After the update from version 2.5 to version 2.6.1 the api soap does not work.

I am using Magento 2.2.6

Example call

curl -X GET "https://example.com/soap/default?wsdl&services=catalogProductRepositoryV1" -H "Authorization: Bearer 12312312312312312312312312312312"

Server response

<?xml version="1.0" encoding="UTF-8"?>
<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope" xmlns:m="https%3A%2F%2Fexample.com%2Fsoap%2Fdefault%3Fservices%3DcatalogProductRepositoryV1%26wsdl%3D1">
   <env:Body>
      <env:Fault>
         <env:Code>
            <env:Value>env:Receiver</env:Value>
         </env:Code>
         <env:Reason>
            <env:Text xml:lang="de">Class &quot;array&quot; does not exist. Please note that namespace must be specified.</env:Text>
         </env:Reason>
         <env:Detail><m:GenericFault><m:Trace>&lt;![CDATA[#0 /var/www/example.com/lib/internal/Magento/Framework/Reflection/TypeProcessor.php(213): Magento\Framework\Reflection\TypeProcessor-&gt;register('array')
#1 /var/www/example.com/lib/internal/Magento/Framework/Reflection/TypeProcessor.php(182): Magento\Framework\Reflection\TypeProcessor-&gt;_processMethod(Object(Zend\Code\Reflection\MethodReflection), 'QuoteDataShippi...')
#2 /var/www/example.com/lib/internal/Magento/Framework/Reflection/TypeProcessor.php(146): Magento\Framework\Reflection\TypeProcessor-&gt;_processComplexType('\\Magento\\Quote\\...')
#3 /var/www/example.com/lib/internal/Magento/Framework/Reflection/TypeProcessor.php(213): Magento\Framework\Reflection\TypeProcessor-&gt;register('\\Magento\\Quote\\...')
#4 /var/www/example.com/lib/internal/Magento/Framework/Reflection/TypeProcessor.php(182): Magento\Framework\Reflection\TypeProcessor-&gt;_processMethod(Object(Zend\Code\Reflection\MethodReflection), 'QuoteDataShippi...')
#5 /var/www/example.com/lib/internal/Magento/Framework/Reflection/TypeProcessor.php(146): Magento\Framework\Reflection\TypeProcessor-&gt;_processComplexType('\\Magento\\Quote\\...')
#6 /var/www/example.com/lib/internal/Magento/Framework/Reflection/TypeProcessor.php(167): Magento\Framework\Reflection\TypeProcessor-&gt;register('\\Magento\\Quote\\...')
#7 /var/www/example.com/lib/internal/Magento/Framework/Reflection/TypeProcessor.php(146): Magento\Framework\Reflection\TypeProcessor-&gt;_processComplexType('\\Magento\\Quote\\...')
#8 /var/www/example.com/app/code/Magento/Webapi/Model/Config/ClassReflector.php(103): Magento\Framework\Reflection\TypeProcessor-&gt;register('\\Magento\\Quote\\...')
#9 /var/www/example.com/app/code/Magento/Webapi/Model/Config/ClassReflector.php(72): Magento\Webapi\Model\Config\ClassReflector-&gt;extractMethodData(Object(Zend\Code\Reflection\MethodReflection))
#10 /var/www/example.com/app/code/Magento/Webapi/Model/ServiceMetadata.php(127): Magento\Webapi\Model\Config\ClassReflector-&gt;reflectClassMethods('Magento\\Quote\\A...', Array)
#11 /var/www/example.com/app/code/Magento/Webapi/Model/ServiceMetadata.php(156): Magento\Webapi\Model\ServiceMetadata-&gt;initServicesMetadata()
#12 /var/www/example.com/app/code/Magento/Webapi/Model/ServiceMetadata.php(179): Magento\Webapi\Model\ServiceMetadata-&gt;getServicesConfig()
#13 /var/www/example.com/app/code/Magento/Webapi/Model/Soap/Wsdl/Generator.php(366): Magento\Webapi\Model\ServiceMetadata-&gt;getServiceMetadata('catalogProductR...')
#14 /var/www/example.com/app/code/Magento/Webapi/Model/AbstractSchemaGenerator.php(171): Magento\Webapi\Model\Soap\Wsdl\Generator-&gt;getServiceMetadata('catalogProductR...')
#15 /var/www/example.com/app/code/Magento/Webapi/Model/Soap/Wsdl/Generator.php(374): Magento\Webapi\Model\AbstractSchemaGenerator-&gt;getAllowedServicesMetadata(Array)
#16 /var/www/example.com/app/code/Magento/Webapi/Model/AbstractSchemaGenerator.php(106): Magento\Webapi\Model\Soap\Wsdl\Generator-&gt;getAllowedServicesMetadata(Array)
#17 /var/www/example.com/app/code/Magento/Webapi/Controller/Soap.php(134): Magento\Webapi\Model\AbstractSchemaGenerator-&gt;generate(Array, 'https', 'example.c...', 'https://example...')
#18 /var/www/example.com/lib/internal/Magento/Framework/Interception/Interceptor.php(58): Magento\Webapi\Controller\Soap-&gt;dispatch(Object(Magento\Framework\App\Request\Http))
#19 /var/www/example.com/lib/internal/Magento/Framework/Interception/Interceptor.php(138): Magento\Webapi\Controller\Soap\Interceptor-&gt;___callParent('dispatch', Array)
#20 /var/www/example.com/lib/internal/Magento/Framework/Interception/Interceptor.php(153): Magento\Webapi\Controller\Soap\Interceptor-&gt;Magento\Framework\Interception\{closure}(Object(Magento\Framework\App\Request\Http))
#21 /var/www/example.com/generated/code/Magento/Webapi/Controller/Soap/Interceptor.php(26): Magento\Webapi\Controller\Soap\Interceptor-&gt;___callPlugins('dispatch', Array, Array)
#22 /var/www/example.com/lib/internal/Magento/Framework/App/Http.php(135): Magento\Webapi\Controller\Soap\Interceptor-&gt;dispatch(Object(Magento\Framework\App\Request\Http))
#23 /var/www/example.com/lib/internal/Magento/Framework/App/Bootstrap.php(257): Magento\Framework\App\Http-&gt;launch()
#24 /var/www/example.com/pub/index.php(37): Magento\Framework\App\Bootstrap-&gt;run(Object(Magento\Framework\App\Http\Interceptor))
#25 {main}]]&gt;</m:Trace></m:GenericFault></env:Detail>
      </env:Fault>
   </env:Body>

When Owebia_AdvancedShipping is disabled, the API is working properly.

bin/magento module:disable Owebia_AdvancedShipping

owebia commented 5 years ago

Issue fixed in version 2.6.2. @xeve thanks for your feedback

xeve commented 5 years ago

thx :)