-
Notifications
You must be signed in to change notification settings - Fork 562
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
Webservice SOAP ASMX downt work in iOS .net MAUI 8.0 #5617
Comments
Hello, we can also reproduce the error in our iOS app. Our SOAP service no longer works. |
Was your app working in earlier versions of .NET MAUI, ie .NET 6, or is this a new app? Line 19 of MauiSoapConsumer/MainPage.xaml.cs isn't where I would have expected an exception like that to appear. We have a couple of places where historically (as in .NET Framework) WCF has used dynamic code generation, but I wouldn't have expected either of those to be hit at that line. The first one we use DispatchProxy to create a class which implements your service interface. I had presumed that had been implemented for aot but it looks like it hasn't been. I think this works for Android as I believe they can support Ref.Emit. The issue tracking this is dotnet/runtime#73136. The second place is when you use a callback contract. The code which invokes the callback method used to use Ref.Emit on .NET Framework. We've replaced it with 2 implementations. When dynamic code generation is enabled, we use Expression to call it. When it isn't supported, we invoke it using MethodInfo.Invoke. But you're hitting the aot DispatchProxy lack of support problem. There's not much we can do about that. Xamarin had an interesting approach (it had its own implementation of WCF pulled from mono) where they addressed this in the "Add Service Reference" tooling. They generated a client derived from If I don't come back to this within a week, feel free to mention me to give me a nudge. |
Describe the bug
I try to consume a SOAP WebService at App MAUI .net 8.0 on an iOS app the error is "dynamic code generation is not supported on this platform", even with AOT enabled. It works normally on Windows Machine connect to webservice.
Error at line 19 from MauiSoapConsumer/MainPage.xaml.cs
Repro project: https://github.com/markos-jr/MauiSoapConsumer
To Reproduce
Steps to reproduce the behavior:
For iOS:
`
The text was updated successfully, but these errors were encountered: