none
c#客户端调用axis构架的webSerivce时出现棘手的报错问题 RRS feed

答案

  • 解决了~
    如节点:  <Security mustUnderstand="0"
           ns1="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
    要实现Security中添加mustUnderstand和ns1属性,则在Security类中加如一下字段(属性)即可:
    [System.Xml.Serialization.XmlRootAttribute("Security", Namespace = "" ,IsNullable = false)]
    public class RequestSOAPHeader : System.Web.Services.Protocols.SoapHeader
    {
        private string mustUnderstandField;
        private string ns1Field;
        [System.Xml.Serialization.XmlAttributeAttribute(DataType = "anyURI")]
        public string mustUnderstand
        {
            get
            {
                return this.mustUnderstandField;
            }
            set
            {
                this.mustUnderstandField = value;
            }
        }
        [System.Xml.Serialization.XmlAttributeAttribute(DataType = "anyURI")]
        public string ns1
        {
            get
            {
                return this.ns1Field;
            }
            set
            {
                this.ns1Field = value;
            }
        }
    }


    Code
    2009年3月13日 10:36