WCF response is missing data RRS feed

  • Question

  • Hello,

    I have a WSDL provided by a vendor that I used to generate proxies in .NET.  Certain fields were coming back as NULL when they should have had values.

    I took the same exact WSDL and used it in SoapUI.  SoapUI showed data in the fields that .NET showed as NULL.

    Here is the Response from SoapUI:

    <env:Envelope xmlns:xsi="" xmlns:xsd="" xmlns:env="">
          <n1:RetrieveReferralResponse env:encodingStyle="" xmlns:n1="">
             <return xsi:type="n1:Referral">
                <id xsi:type="xsd:int">1234</id>
                <business xsi:type="xsd:string">My Business</business>
                <fdcActivationDate xsi:type="xsd:string">2017-02-02 00:00:00 -0500</fdcActivationDate>
                <fdcCreatedAt xsi:type="xsd:dateTime">2017-01-30T11:29:19Z</fdcCreatedAt>
                <fdcCreditDate xsi:type="xsd:string">2017-01-31 00:00:00 -0500</fdcCreditDate>
                <fdcCreditStatus xsi:type="xsd:string">Approved</fdcCreditStatus>
                <fdcDbaName xsi:type="xsd:string">MY BUSINESS</fdcDbaName>
                <fdcMerchantId xsi:type="xsd:string">12345678</fdcMerchantId>
                <fdcReferralStatus xsi:type="xsd:string">Closed Won</fdcReferralStatus>
                <fdcUpdatedAt xsi:type="xsd:dateTime">2017-02-03T21:08:00Z</fdcUpdatedAt>

    Here is the Response from .NET:

    <s:Envelope xmlns:s="">
          <RetrieveReferralResponse xmlns="http://MerchantReferralService.Operations">
             <RetrieveReferralResult xmlns:a="" xmlns:i="">
                <a:PropertyChanged i:nil="true" xmlns:b=""/>
    <a:businessField>My Business</a:businessField>
                <a:fdcActivationDateField>2017-02-02 00:00:00 -0500</a:fdcActivationDateField>
                <a:fdcCreditDateField i:nil="true"/>
                <a:fdcCreditStatusField i:nil="true"/>
                <a:fdcDbaNameField i:nil="true"/>
                <a:fdcMerchantIdField i:nil="true"/>
                <a:fdcReferralStatusField i:nil="true"/>
                <a:fdcUpdatedAtField i:nil="true"/>

    The .NET response is showing the Credit Date, Credit Status, DBA Name, Merchant ID, Referral Status and Updated At as NULL. 

    I had the vendor capture the Requests and Responses from SoapUI and .NET and they show the Responses being identical.  All the fields have values.  So, I'm wondering why .NET is excluding certain fields.

    Any assistance would be appreciated!

    Thank you very much!!

    Wednesday, February 27, 2019 4:58 PM

All replies

  • Hi Hiline1961,

    According to your description, I also don’t know where the issue went wrong. Is it possible that you pass the wrong parameters(spelling typo, capitalization problem)?

    By the way, I would like to check how do you call the web service through DoNet, I will be appreciated that you could share the code with me. Or the another situation, even if you're using the same code as the vendor, there's still a problem on your side.

    Look forward to your reply.

    Best Regards


    Thursday, February 28, 2019 3:12 AM
  • Hello Abraham!

    Thanks for responding.  I have verified that I am passing the correct parameters.  And, the vendor states that their logs show their response to include all the data elements.

    However, when the .NET payload shows various elements as NULL when the vendor logs show the fields as containing data.

    For .NET and SoapUI I used the same WSDL file to generate the proxies.  In .NET I named the Service Reference as PROD.

    The .NET operation I'm calling from SoapUI is as follows:

    public PROD.Referral RetrieveReferral(int referralID)
         PROD.RemotePortClient client = new PROD.RemotePortClient();
         PROD.LoginResult result = client.Login(DOMIAN, USER, PASSWORD);
         if (result.success==true)
         return client.RetrieveReferral(result.sessionId, referralID);
    throw new FaultException("Login Unsuccessful");

    I've asked the Vendor for a new WSDL.  I'm going to regenerate the proxy classes.  If that doesn't clear the issue I saw a post by Carlos Figueira on capturing the data at the Message Encoder and I'll do that to inspect the payload.


    • Edited by Hiline1961 Thursday, February 28, 2019 5:22 PM
    Thursday, February 28, 2019 4:34 PM
  • Hi Hiline1961,
    Have you solved the problem?  In order to prevent this issue will be a meaningless discussion, I would like you could share your solution here and help others who encountered similar questions.
    Best Regards
    Monday, May 27, 2019 2:01 AM