-1
我開發我的第一個WCF web服務,我需要將傳入的SOAP消息加載到xml dom中進行處理,但我無法找到如何執行此操作。 我想:c#如何將傳入的soap1.2消息加載到xml dom
namespace acdCM
{
[ServiceContract]
public interface IResNotif
{
[OperationContract]
[XmlSerializerFormat]
XmlDocument OTA_HotelResNotifRQ();
}
}
namespace acdCM
{
public class ResNotif : IResNotif
{
public XmlDocument OTA_HotelResNotifRQ()
{
XmlDocument doc = new XmlDocument();
doc.LoadXml(System.Web.Services.Protocols.SoapMessage.ToString());
.......
}
}
}
這是因爲的SOAPMessage不能用來作爲一個字符串完全不工作。
我的問題是,我無法找到如何從傳入的SoapMessage中創建一個字符串,以便我可以將它加載到XmlDocument中。
請仔細閱讀[問]並解釋「根本不起作用」的意思。 – CodeCaster
您是否在使用/撥打肥皂服務?或者你正在創建一個主機服務?在服務契約上,返回類型XmlDocument沒有意義。 – loopedcode
@CodeCaster - 嗨,感謝您的期待。我有點編輯我的文章 - 我希望我的困境現在解釋得更清楚。 – Craig