Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

release 1.3.1 breaks magento2 API #30

Closed
davidverholen opened this issue Feb 7, 2017 · 11 comments
Closed

release 1.3.1 breaks magento2 API #30

davidverholen opened this issue Feb 7, 2017 · 11 comments
Assignees
Labels

Comments

@davidverholen
Copy link

In the latest release, the Payone\Core\Model\WebApi\Addresscheck was added as a webservice class.

It does not follow the magento2 best practices for creating a new service in the service layer and fails an internal check which leads to an exception (in our case, when calling the getOrderList SOAP Call)

main.CRITICAL: InvalidArgumentException: The service interface name "Payone\Core\Model\WebApi\Addresscheck" is invalid. in /var/www/share/stage.ballon24.de/project/releases/20170206141358/vendor/magento/module-webapi/Model/ServiceMetadata.php:227

I assume, this breaks all SOAP API calls (maybe also REST) since the exception is thrown during the WSDL generation.

@fjbender
Copy link
Contributor

fjbender commented Feb 7, 2017

Thanks for pointing out this issue! We'll look into that.

@davidverholen
Copy link
Author

@fjbender will this be fixed anytime soon? Currently our Customer cannot continue developing / testing the SAP integration since the getOrders API Call does not work on the staging System

@fjbender
Copy link
Contributor

@davidverholen We have assessed the issue and are currently working on it. Expect more feedback the next week.

@fjbender
Copy link
Contributor

Hi @davidverholen, can you check Robert's patch from #35?

@davidverholen
Copy link
Author

@fjbender looks good to me

@davidverholen
Copy link
Author

@fjbender unfortunately, it still throws an exception with the message: Invalid parameter type "\Payone\Core\Model\WebApi\AddresscheckResponse"

I think it's the same Problem, but this time for the parameter. I'll look into it now

@fjbender
Copy link
Contributor

@davidverholen all right, thanks. Any way for me to reproduce this on our system without having a complete SAP Integration?

@fjbender fjbender reopened this Feb 14, 2017
@davidverholen
Copy link
Author

should be sufficient to execute the getOrderList SOAP API call.

Problem seems to be here: https://github.com/magento/magento2/blob/develop/lib/internal/Magento/Framework/Reflection/TypeProcessor.php#L462

Also the Parameter has to be in the Api or Service Namespace. Best practice would be the same changes as for the Service itself:

  • create API Interface
  • use the Interface in the webapi.xml
  • Implement the Interface in the Serviec/V1 namespace
  • add a preference for the Interface pointing to the implementation in di.xml

I could provide a PR again, but maybe it's just faster, if you do it directly? ;)

@davidverholen
Copy link
Author

ok, I just created the PR since I will test it now on our installation from my forked repository and then come back with the result

@davidverholen
Copy link
Author

it's looking good. After pulling in the changes I can use the order API again

@fjbender
Copy link
Contributor

Great, thanks! I was still busy reproducing this issue. Apparently, we didn't break the REST API, only SOAP.

I'll test your changes and merge if successful.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants