WCF返回NULL值

时间:2019-06-28 10:43:46

标签: asp.net-mvc wcf

我正在MVC应用程序中调用第三方WCF服务。 当我尝试从服务读取响应时,我将所有值都获取为NULL,而如果我在提琴手中签入,则会在其中显示响应。 我是否需要代码中缺少的任何特殊配置?请耐心等待,因为我是WCF的新学习者

代码如下

SalesReviewMD efm = new SalesReviewMD(Server.MapPath("~/Cert/CertGlobal.pfx"), "*****");

    @string stSales = new @string();
    stSales.Value = "slo:cv";
    IdentificationType salesJune = new IdentificationType();
    salesJune.IdentificationID = stSales;
    SaleType salesJuneType = new SaleType();
    EntityType entity = new EntityType();
    entity.id = "7yt678-0330-12312d-238-d4ww444f";            
    DateRangeType dt = new DateRangeType();
    DateRangeType[] dtte = { dt };
    SalesListType request = new SalesListType();
    request.DocumentSubmitter = entity;

    request.SendingSalesProfileCode = "urn:oasis:names:tc:legalxml-salesList:schema:xsd:WebServicesMessaging-2.0";
    SalesListResponseMessageType response = efm.GetSalesList(request);

Wsdl中的SalesListResponseMessageType

  [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.7.2612.0")]
        [System.SerializableAttribute()]
        [System.Diagnostics.DebuggerStepThroughAttribute()]
        [System.ComponentModel.DesignerCategoryAttribute("code")]
        [System.Xml.Serialization.XmlTypeAttribute(Namespace="urn:oasis:names:tc:legalxml-salesList:schema:xsd:WebServicesMessaging-2.0")]
    public partial class SalesListResponseMessageType : QueryResponseMessageType {
    -------------------
    -------------------
    }

0 个答案:

没有答案