Visual Studio 2022 .Net Core 6 Web Reference Issue

144 Views Asked by At

I am trying to convert a WCF service in .Net FW 4.7.2 to a Web API in .Net Core 6.

Everything is going fine except for a web reference the service uses. In the original project, the web service was added as a Web Reference. There is no Reference.cs. If you double click on the reference is bring up the object explorer and you can see all the methods and objects and such.

The Core 6 using Connected Service. Based on many guides I added as a WCF reference even though it's not a WCF. It's a mainframe hosted Java SOAP service with a WSDL. It created a Reference.cs. Here's the problem.

The method I need to call takes in some parameters and returns some data in XML. The simple properties like Name are coming over fine. But the complex objects like Address that would be something like:

<Address>
<Street>
<City>
<State>
<ZIP>
</Address>

They are not coming over correctly

In debug, I will see the root node "Address" only. It's like the properties that are part of Address are not being mapped properly. I looked at the code in the Reference.cs and I can see the object properly being set up. So I am at a loss as to what is going on here. I wish I could give real code snippers but it's proprietary to my company.

I have tried with and without "Reuse types", "Always generate messages contracts", and "Generate Synchronous Operations."

Any suggestion would be appreciated.

0

There are 0 best solutions below