.NET 6.0 proxy classes from WSDL

171 Views Asked by At

I'm developing an ASP.NET Core 6.0 web app which uses, among other things, web services defined in WSDLs. Those services are reliable and used by other applications including my own .NET Framework apps.

Using VS 2022's Managed Connected Services applet, I've been adding WCF Web Service service references to my project by adding the web service host's wsdl URL. http://MyHost:6055/wfm/api/?Handler=WFMSessionService700WSDL is an example.

The proxy classes generated by the Connected Services applet seem to be OK but when I call a method that returns data I get the following exception:

System.ServiceModel.CommunicationException, Error in deserializing body of reply message for operation 'OpenSession'

with inner exceptions such as:

InvalidOperationException: There is an error in XML document (1, 525)
InvalidOperationException, The specified type was not recognized: name='ServiceInfo'

As I know the web service is operating reliably for other app's, something is wrong in the the proxy classes that's resulting in the incorrect deserialization of the XML returned by a web service method call.

I've tried all sorts of changes to the Connected Services applet but can't get past this issued. I've tried the WSDL.EXE utility to generate the proxy classes but that generates classes that reference System.Web.Services which I understand is deprecated in .NET 6.0.

I'm stuck. Any and all suggestions would be appreciated. Thanks

0

There are 0 best solutions below