locked
WCF service not returning data RRS feed

  • Question

  • User832284694 posted

    Hi,

    I have WCF service which is retriving data from database. From database I am retriving more than 150000+ rows and each row is having atleast 20 columns. When I debug code I can see my response object have 150000+ records however I am not getting records on SOUP UI tool.

    I have set maxReceivedMessageSize to 2147483647 but still it is not working.

    Note: I am using SOUP UI tool to test response.

    Monday, October 20, 2014 2:08 PM

Answers

  • User-484054684 posted

    What is the error you are exactly getting.

    Most probably you want to set Max items in object graph property for serializers.

    On service side:

    <serviceBehaviors>
            <behavior name="Services.ServiceInterface.SearchServiceBehavior">          
              <serviceMetadata httpGetEnabled="true" />
              <serviceDebug includeExceptionDetailInFaults="true" />
              <serviceAuthorization impersonateCallerForAllOperations="false" />          
              
              <!--Certificate Settings disabled-->                  
              <serviceThrottling
                maxConcurrentCalls="64"
                maxConcurrentSessions="400"
                maxConcurrentInstances="464"
              />
              <dataContractSerializer maxItemsInObjectGraph="2147483647" />
            </behavior>
          </serviceBehaviors>
    

    Similarly on client side:

    <client>
                <endpoint address="https://api.e-conomic.com/secure/api1/EconomicWebService.asmx"  
    behaviorConfiguration="serviceBehaviorConfiguration" binding="basicHttpBinding" bindingConfiguration="EconomicWebServiceSoap" contract="EconomicWebService.EconomicWebServiceSoap" name="EconomicWebServiceSoap" /> </client> <behaviors> <endpointBehaviors> <behavior name="serviceBehaviorConfiguration"> <dataContractSerializer maxItemsInObjectGraph="2147483647" /> </behavior> </endpointBehaviors> </behaviors>

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, October 20, 2014 2:15 PM
  • User503812343 posted

    you will have to set Service throttling part at service and client config files.

    http://msdn.microsoft.com/en-us/library/vstudio/ms735114(v=vs.100).aspx

    if your client is http you can use webHttpBinding to implement rest services which gives you lightweight output

    http://dotnetmentors.com/wcf/how-to-create-wcf-restful-services.aspx

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, October 21, 2014 5:42 AM

All replies

  • User-484054684 posted

    What is the error you are exactly getting.

    Most probably you want to set Max items in object graph property for serializers.

    On service side:

    <serviceBehaviors>
            <behavior name="Services.ServiceInterface.SearchServiceBehavior">          
              <serviceMetadata httpGetEnabled="true" />
              <serviceDebug includeExceptionDetailInFaults="true" />
              <serviceAuthorization impersonateCallerForAllOperations="false" />          
              
              <!--Certificate Settings disabled-->                  
              <serviceThrottling
                maxConcurrentCalls="64"
                maxConcurrentSessions="400"
                maxConcurrentInstances="464"
              />
              <dataContractSerializer maxItemsInObjectGraph="2147483647" />
            </behavior>
          </serviceBehaviors>
    

    Similarly on client side:

    <client>
                <endpoint address="https://api.e-conomic.com/secure/api1/EconomicWebService.asmx"  
    behaviorConfiguration="serviceBehaviorConfiguration" binding="basicHttpBinding" bindingConfiguration="EconomicWebServiceSoap" contract="EconomicWebService.EconomicWebServiceSoap" name="EconomicWebServiceSoap" /> </client> <behaviors> <endpointBehaviors> <behavior name="serviceBehaviorConfiguration"> <dataContractSerializer maxItemsInObjectGraph="2147483647" /> </behavior> </endpointBehaviors> </behaviors>

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, October 20, 2014 2:15 PM
  • User-271186128 posted

    Hi rbodhale,<!--?xml:namespace prefix = "o" ns = "urn:schemas-microsoft-com:office:office" /--><o:p></o:p>

    From your description, I have searched some resource about SOUP UI, with reference to this article, I think the soup is used in Java. So, I suppose perhaps you are using the SOAP UI. If that is the case, according to your description, the response object have 150000+ records. Because each row is having at least 20 columns. So, I would like to suggest you make sure the data size is less than the service maxReceivedMessageSize though you have set it. <o:p></o:p>

    Besides, I suppose perhaps it is related to the SOAP UI tools. You could post this issue to SOAP UI forums, you will get more professional answers in there. The following is the SOAP forum address: http://forum.soapui.org/viewforum.php?f=2<o:p></o:p>

    Best Regards,
    Dillion
    <o:p></o:p>

    Tuesday, October 21, 2014 1:28 AM
  • User503812343 posted

    you will have to set Service throttling part at service and client config files.

    http://msdn.microsoft.com/en-us/library/vstudio/ms735114(v=vs.100).aspx

    if your client is http you can use webHttpBinding to implement rest services which gives you lightweight output

    http://dotnetmentors.com/wcf/how-to-create-wcf-restful-services.aspx

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, October 21, 2014 5:42 AM