magento2 icon indicating copy to clipboard operation
magento2 copied to clipboard

Soap API Fails once DI is compiled

Open davefarthing opened this issue 11 years ago • 6 comments

Hi,

I can call and use the Soap API fine until I run bin/magento setup:di:compile then all Soap Interface stop working.

After the DI is compiled as Soap Interfaces return with

<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
   <SOAP-ENV:Body>
      <SOAP-ENV:Fault>
         <faultcode>SOAP-ENV:Server</faultcode>
         <faultstring>SoapServer::SoapServer(): Invalid parameters</faultstring>
      </SOAP-ENV:Fault>
   </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

Tracing through it seems that DI does not see the arguments required by the SoapServer construct. There are no di preferences/arguments that I could find for the SoapSever class and presumably reflection fails to spot the construct arguments. I am running under php 5.5.29.

If I remove the var/di folder everything works as expected. I am working against master currently so apologies if this is already taken care of in develop. I checked the issues, but couldn't see any matches.

Here is an example of the request:

WSDL

http://www.magento2.local/index.php/soap/default?services=catalogProductRepositoryV1&wsdl=1

BODY

<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:def="http://www.magento2.m2/soap/default?services=catalogProductRepositoryV1">
   <soap:Header/>
   <soap:Body>
      <def:catalogProductRepositoryV1GetRequest>
         <sku>24-MB01</sku>
      </def:catalogProductRepositoryV1GetRequest>
   </soap:Body>
</soap:Envelope>

davefarthing avatar Oct 06 '15 07:10 davefarthing

@choukalos FYI

internal issue MAGETWO-44060

piotrekkaminski avatar Oct 14 '15 04:10 piotrekkaminski

@davefarthing this issue does not exist in the develop branch.

cspruiell avatar Oct 26 '15 15:10 cspruiell

I have the same issue on master branch. As M2 is already released when do you want to fix this?

sydekumf avatar Dec 10 '15 07:12 sydekumf

This has been fixed in our latest develop branch and will be included in our next release.

cspruiell avatar Mar 18 '16 18:03 cspruiell

This issue is still happening in Magento 2.0.12

svdev avatar Feb 08 '17 13:02 svdev

I met that issue on my project [Magento 2.0.10], any update please ?

ngoctruong1610 avatar Mar 21 '17 11:03 ngoctruong1610