我有WCF服务,它接受xmldocument并返回一个xml文档,下面是接口代码
namespace CreateLabelWS
{
[ServiceContract(Namespace = "http://localhost/Create")]
public interface ICreateLabel
{
[OperationContract,XmlSerializerFormat]
[FaultContract(typeof(CustomException))]
XmlDocument CreateLabelRequestIntoDB(XmlDocument Request);
}
[DataContract(Namespace="")]
public class CustomException
{
[DataMember()]
public string Title;
[DataMember()]
public string ExceptionMessage;
[DataMember()]
public string InnerException;
[DataMember()]
public string StackTrace;
[DataMember()]
public int RowsInserted;
}
}
但是当我为此创建代理并尝试从客户端应用程序访问CreateLabelRequestIntoDB时,我发现它将作为Xelement类型而不是XMLDocument公开。有人可以帮助我,并告诉我代码中是否有任何错误
DINS