我想将Model类对象序列化为soap1.2格式的字符串。
public class Model
{
public string name{get;set;}
public int age{get;set;}
}
<?xml version="1.0" encoding="utf-8"?>
<soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope">
<soap12:Body>
<Model xmlns="http://modelws/">
<name>Kevin</name>
<age>25</age>
</Model>
</soap12:Body>
</soap12:Envelope>