locked
WCF service from - WCF Test client RRS feed

  • Question

  • Hi there,

    Using Visual Studio 2008 command line utility , trying to run WCF Test Client . When It opens the WCF Test client when the service url is given as below.

    c:\Program Files\Microsoft Visual Studio 9.0\VC>wcftestclient http://myService.svc

    and it shows all the methods. But when I try to invoke them by selecting the method and selecting the invoke button it throws below exception.

    Failed to invoke the service. Possible causes: The service is offline or inaccessible; the client-side configuration does not match the proxy; the existing proxy is invalid. Refer to the stack trace for more detail. You can try to recover by starting a new proxy, restoring to default configuration, or refreshing the service.
    
    
    
    The maximum message size quota for incoming messages (65536) has been exceeded. To increase the quota, use the MaxReceivedMessageSize property on the appropriate binding element.
    
    Server stack trace: 
      at System.ServiceModel.Channels.HttpInput.ThrowMaxReceivedMessageSizeExceeded()
      at System.ServiceModel.Channels.HttpInput.GetMessageBuffer()
      at System.ServiceModel.Channels.HttpInput.ReadBufferedMessage(Stream inputStream)
      at System.ServiceModel.Channels.HttpInput.ParseIncomingMessage(Exception& requestException)
      at System.ServiceModel.Channels.HttpChannelFactory.HttpRequestChannel.HttpChannelRequest.WaitForReply(TimeSpan timeout)
      at System.ServiceModel.Channels.RequestChannel.Request(Message message, TimeSpan timeout)
      at System.ServiceModel.Channels.ClientReliableChannelBinder`1.RequestClientReliableChannelBinder`1.OnRequest(TRequestChannel channel, Message message, TimeSpan timeout, MaskingMode maskingMode)
      at System.ServiceModel.Channels.ClientReliableChannelBinder`1.Request(Message message, TimeSpan timeout, MaskingMode maskingMode)
      at System.ServiceModel.Channels.ClientReliableChannelBinder`1.Request(Message message, TimeSpan timeout)
      at System.ServiceModel.Security.SecuritySessionClientSettings`1.SecurityRequestSessionChannel.Request(Message message, TimeSpan timeout)
      at System.ServiceModel.Dispatcher.RequestChannelBinder.Request(Message message, TimeSpan timeout)
      at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)
      at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs)
      at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)
      at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)
    
    Exception rethrown at [0]: 
      at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
      at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
      at IAnnouncements.GetAllNews()
      at AnnouncementsClient.GetAllNews()

     


    Apriori algorithm [association rule]
    Friday, April 23, 2010 8:26 AM

Answers

  • Hi Sukumar,

    As for the WCFTestClient tool, it will programmtically read the service metadata(wsdl) from the service endpoint address and then genreate a client proxy type dynamically. For your scenario, I'm wondering if there is any special setting in your WCF service or the contract that makes the dynamically genrated client(and the configuration) not work correctly.

    I suggest you use Visual Studio "Add ServiceReference" or svcutil.exe tool to create the client service proxy and call the service to see whether it works.

    #Accessing Services Using a WCF Client
    http://msdn.microsoft.com/en-us/library/ms734691.aspx





    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    • Marked as answer by Mog Liang Monday, May 3, 2010 2:23 AM
    Monday, April 26, 2010 7:37 AM

All replies

  • Hello Sukumar!

    Maybe you should try to check Start a new proxy box. Also your service could be configured in a wrong way. It seems that you exceeded some message quotas.

    Friday, April 23, 2010 9:11 AM
  • Hi Sukumar,

    As for the WCFTestClient tool, it will programmtically read the service metadata(wsdl) from the service endpoint address and then genreate a client proxy type dynamically. For your scenario, I'm wondering if there is any special setting in your WCF service or the contract that makes the dynamically genrated client(and the configuration) not work correctly.

    I suggest you use Visual Studio "Add ServiceReference" or svcutil.exe tool to create the client service proxy and call the service to see whether it works.

    #Accessing Services Using a WCF Client
    http://msdn.microsoft.com/en-us/library/ms734691.aspx





    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    • Marked as answer by Mog Liang Monday, May 3, 2010 2:23 AM
    Monday, April 26, 2010 7:37 AM