我試圖序列與XmlSerializer的和SoapFormatter的對象,但我不能讓輸出看起來像這樣:創建SOAP請求
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<Login xmlns="http://www.myfirm.com/2010/core/ConnectTypes">
<UserLogin>
<UserName>User</UserName>
<Password>PW</Password>
<Mandant>1</Mandant>
</UserLogin>
</Login>
</soap:Body>
</soap:Envelope>
我的課:
[System.SerializableAttribute()]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
public partial class UserLoginType
{
private string userNameField;
private string passwordField;
private int mandantField;
/// <remarks/>
public string UserName
{
get
{
return this.userNameField;
}
set
{
this.userNameField = value;
}
}
/// <remarks/>
public string Password
{
get
{
return this.passwordField;
}
set
{
this.passwordField = value;
}
}
/// <remarks/>
public int Mandant
{
get
{
return this.mandantField;
}
set
{
this.mandantField = value;
}
}
}
[System.SerializableAttribute()]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
public partial class LoginType
{
private object itemField;
/// <remarks/>
[System.Xml.Serialization.XmlElementAttribute("LoginToken", typeof(string))]
[System.Xml.Serialization.XmlElementAttribute("UserLogin", typeof(UserLoginType))]
public object Item
{
get
{
return this.itemField;
}
set
{
this.itemField = value;
}
}
}
任何人都可以幫幫我?
對於我需要登錄肥皂請求?!? – Sys 2011-05-24 11:11:30