简体   繁体   中英

.Net Web Services XML Serializer

I am using VS2015 to consume some old web services (SAP). I can import the WSDL just fine, and all the references come across ok. But, when I try and use the service, it looks like the XML output only includes properties with values. That is not working with the WSDL service. I am using SoapUI to test and it can communicate just fine with the service. Using SoapUI, if I remove some of the outbound XML in the call, it will fail. So, I think my issue is the outbound XML serialization. Any ideas on how to tackle this? Is there a way to mark the properties so they will be output even if they don't have a value? (short of putting a space or something in the field? Thanks.

这是设计使然以区分null和null,看看从XmlSerializer发出抑制Null值类型

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM